@synnaxlabs/pluto 0.26.7 → 0.27.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-C-Fn9eLa.cjs → Animated-CZ63NC05.cjs} +1 -1
- package/dist/{Animated-DEXyK03s.js → Animated-CqT7-gZp.js} +2 -2
- package/dist/{Keyboard-DkBJ6mo5.cjs → Keyboard-BIXxwSvF.cjs} +1 -1
- package/dist/{Keyboard-D2y8u-A6.js → Keyboard-fZbH7UAB.js} +2 -2
- package/dist/LinePlot-C6UR06-e.cjs +66 -0
- package/dist/{LinePlot-DYkTuZP2.js → LinePlot-Cc3CIgai.js} +1814 -1803
- package/dist/Link-BDA_zOS7.js +10 -0
- package/dist/Link-CYHWDE13.cjs +1 -0
- package/dist/{List-DQ5KNkbE.js → List-DS2DLWjR.js} +2 -2
- package/dist/{List-bpq4WGKS.cjs → List-qhbpsD-f.cjs} +1 -1
- package/dist/{Pack-BM_LmeO7.cjs → Pack--3w90epp.cjs} +1 -1
- package/dist/{Pack-E_3LSkGG.js → Pack-B7_4Xpi5.js} +1 -1
- package/dist/{Toggle-2UJtIoEe.js → Toggle-0_fgC0fe.js} +8127 -8097
- package/dist/Toggle-DBbZoe_A.cjs +143 -0
- package/dist/{Video-Ct4BfJzt.js → Video-Breqk8IV.js} +1 -1
- package/dist/{Video-A2NddcPS.cjs → Video-yUL4iEVD.cjs} +1 -1
- package/dist/{aggregator-BTr6vhAN.js → aggregator-BQAqJzjZ.js} +4091 -3824
- package/dist/aggregator-Bs9fTewE.cjs +51 -0
- package/dist/align.cjs +1 -1
- package/dist/align.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-DY1Oedjj.cjs → css-B7TifAVb.cjs} +1 -1
- package/dist/{css-DEMSADUS.js → css-Dic6npsA.js} +1 -1
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +5 -5
- package/dist/external-3Q2dzLIL.cjs +1 -0
- package/dist/{external-IEF-QKNR.js → external-69Ao7j7k.js} +13 -13
- package/dist/{external-DZazAjmw.cjs → external-B4OSNdH_.cjs} +1 -1
- package/dist/{external-BqEoRX0C.js → external-BUFyYRiR.js} +4 -4
- package/dist/{external-DDLu6Grz.js → external-BWE1zUh9.js} +14 -13
- package/dist/{external-Djw4SjVz.js → external-BjLjce7d.js} +2 -2
- package/dist/{external-5sM5N2VW.cjs → external-BnJhvG1t.cjs} +1 -1
- package/dist/{external-uvPI2OkG.js → external-By-puR46.js} +3 -3
- package/dist/{external-Crwp6CSf.cjs → external-C3c1BoRE.cjs} +1 -1
- package/dist/external-CAS1RuN6.cjs +1 -0
- package/dist/{external-t7zjVyib.cjs → external-CHYxZzhb.cjs} +1 -1
- package/dist/{external-BW4VYEGd.js → external-CNTzwgmW.js} +16 -16
- package/dist/{external-BW10aqAd.js → external-CPUf0VYV.js} +2 -2
- package/dist/{external-BT_-8FGY.js → external-CVzm1emB.js} +4 -4
- package/dist/{external-aMslGVso.cjs → external-CpUUO6Ja.cjs} +1 -1
- package/dist/external-DA_ZnqPs.js +350 -0
- package/dist/{external-DlkO8mh4.js → external-DH3sAQ0c.js} +1 -1
- package/dist/{external-CUKyGhKO.cjs → external-DR0u7Ium.cjs} +1 -1
- package/dist/{external-CKhZ6pQ5.cjs → external-DddErJ4X.cjs} +1 -1
- package/dist/{external-D3fxB_on.js → external-DeMvP0U_.js} +6 -6
- package/dist/{external-BAw0sDOf.cjs → external-DrJrhKqG.cjs} +1 -1
- package/dist/{external-wossX6OP.cjs → external-mBw4Opva.cjs} +1 -1
- package/dist/{external-BFMmnG8X.cjs → external-o0TYQr9r.cjs} +1 -1
- package/dist/external-vJteyGA3.js +241 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5007 -4535
- 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/src/accordion/Accordion.d.ts +0 -1
- package/dist/src/aether/aether/aether.d.ts +0 -1
- package/dist/src/aether/aether/worker.spec.d.ts +0 -1
- package/dist/src/aether/main.d.ts +0 -1
- package/dist/src/aether/main.spec.d.ts +0 -1
- package/dist/src/aether/test/test.d.ts +0 -1
- package/dist/src/alamos/Provider.d.ts +0 -1
- package/dist/src/alamos/aether/alamos.d.ts +0 -1
- package/dist/src/align/Center.d.ts +0 -1
- package/dist/src/align/Pack.d.ts +0 -1
- package/dist/src/align/Space.d.ts +0 -1
- package/dist/src/button/Button.d.ts +0 -1
- package/dist/src/button/Icon.d.ts +0 -1
- package/dist/src/button/Link.d.ts +0 -1
- package/dist/src/button/Toggle.d.ts +0 -1
- package/dist/src/button/color.d.ts +0 -1
- package/dist/src/caret/Animated.d.ts +0 -1
- package/dist/src/caret/Animated.d.ts.map +1 -1
- package/dist/src/caret/index.d.ts.map +1 -1
- package/dist/src/channel/AliasProvider.d.ts +0 -1
- package/dist/src/channel/LinePlot.d.ts +0 -1
- package/dist/src/channel/Select.d.ts +0 -1
- package/dist/src/color/Picker/Picker.d.ts +0 -1
- package/dist/src/color/Swatch/Swatch.d.ts +0 -1
- package/dist/src/color/Swatch/Swatch.d.ts.map +1 -1
- package/dist/src/color/core/color.d.ts +0 -1
- package/dist/src/css/bem.d.ts +0 -1
- package/dist/src/css/color.d.ts +0 -1
- package/dist/src/css/css.d.ts +1 -1
- package/dist/src/css/css.d.ts.map +1 -1
- package/dist/src/css/grid.d.ts +0 -1
- package/dist/src/cursor/cursor.d.ts +0 -1
- package/dist/src/dialog/use.d.ts +5 -1
- package/dist/src/dialog/use.d.ts.map +1 -1
- package/dist/src/divider/Divider.d.ts +0 -1
- package/dist/src/dropdown/Dropdown.d.ts +4 -3
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Field.d.ts +0 -1
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +25 -4
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/external.d.ts +1 -0
- package/dist/src/form/external.d.ts.map +1 -1
- package/dist/src/form/synced.d.ts +25 -0
- package/dist/src/form/synced.d.ts.map +1 -0
- package/dist/src/generic/Generic.d.ts +0 -1
- package/dist/src/hardware/device/Select.d.ts +0 -1
- package/dist/src/haul/Haul.d.ts +0 -1
- package/dist/src/header/Actions.d.ts +0 -1
- package/dist/src/header/ButtonTitle.d.ts +0 -1
- package/dist/src/header/Header.d.ts +0 -1
- package/dist/src/header/Title.d.ts +0 -1
- package/dist/src/hooks/effect.d.ts +0 -1
- package/dist/src/hooks/ref.d.ts +0 -1
- package/dist/src/hooks/useClickOutside.d.ts +1 -2
- package/dist/src/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/types.d.ts +0 -1
- package/dist/src/hooks/useCursorDrag/useCursorDrag.d.ts +0 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebKit.d.ts +0 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebView.d.ts +0 -1
- package/dist/src/hooks/useDebouncedCallback.d.ts +0 -1
- package/dist/src/hooks/useFilter.d.ts +0 -1
- package/dist/src/hooks/useResize.d.ts +0 -1
- package/dist/src/hooks/useTransforms.d.ts +0 -1
- package/dist/src/icon/Icon.d.ts +0 -1
- package/dist/src/icon/Icon.d.ts.map +1 -1
- package/dist/src/icon/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Date.d.ts +0 -1
- package/dist/src/input/DateTime.d.ts +0 -1
- package/dist/src/input/DragButton.d.ts +0 -1
- package/dist/src/input/HelpText.d.ts +0 -1
- package/dist/src/input/Item.d.ts +0 -1
- package/dist/src/input/Label.d.ts +0 -1
- package/dist/src/input/Numeric.d.ts +0 -1
- package/dist/src/input/Switch.d.ts +0 -1
- package/dist/src/input/Switch.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +4 -1
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/input/TextArea.d.ts +0 -1
- package/dist/src/input/Time.d.ts +0 -1
- package/dist/src/input/types.d.ts +0 -1
- package/dist/src/label/Select.d.ts +11 -0
- package/dist/src/label/Select.d.ts.map +1 -0
- package/dist/src/label/external.d.ts +3 -0
- package/dist/src/label/external.d.ts.map +1 -0
- package/dist/src/label/index.d.ts +2 -0
- package/dist/src/label/index.d.ts.map +1 -0
- package/dist/src/label/types.d.ts +2 -0
- package/dist/src/label/types.d.ts.map +1 -0
- package/dist/src/list/Column.d.ts +1 -1
- package/dist/src/list/Column.d.ts.map +1 -1
- package/dist/src/list/Core.d.ts +0 -1
- package/dist/src/list/Data.d.ts +0 -1
- package/dist/src/list/Filter.d.ts +0 -1
- package/dist/src/list/Hover.d.ts +0 -1
- package/dist/src/list/Infinite.d.ts +0 -1
- package/dist/src/list/Item.d.ts +2 -2
- package/dist/src/list/Item.d.ts.map +1 -1
- package/dist/src/list/List.d.ts +0 -1
- package/dist/src/list/Search.d.ts +2 -2
- package/dist/src/list/Search.d.ts.map +1 -1
- package/dist/src/list/Selector.d.ts +0 -1
- package/dist/src/list/types.d.ts +0 -1
- package/dist/src/list/useSelect.d.ts +0 -1
- package/dist/src/memo/proxyMemo.d.ts +0 -1
- package/dist/src/memo/useMemoCompare.d.ts +2 -2
- package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +0 -1
- package/dist/src/menu/ContextMenu.d.ts.map +1 -1
- package/dist/src/menu/Item.d.ts +0 -1
- package/dist/src/menu/Menu.d.ts +0 -1
- package/dist/src/mock/MockGLBufferController.d.ts +5 -6
- package/dist/src/mock/MockGLBufferController.d.ts.map +1 -1
- package/dist/src/modal/Modal.d.ts +1 -2
- package/dist/src/modal/Modal.d.ts.map +1 -1
- package/dist/src/mosaic/Mosaic.d.ts +0 -1
- package/dist/src/mosaic/tree.d.ts +1 -1
- package/dist/src/mosaic/tree.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +0 -1
- package/dist/src/mosaic/use.d.ts +0 -1
- package/dist/src/nav/Bar.d.ts +0 -1
- package/dist/src/nav/Drawer.d.ts +0 -1
- package/dist/src/note/Note.d.ts +0 -1
- package/dist/src/observe/index.d.ts.map +1 -1
- package/dist/src/observe/use.d.ts +6 -10
- package/dist/src/observe/use.d.ts.map +1 -1
- package/dist/src/os/Controls/Controls.d.ts +0 -1
- package/dist/src/os/Controls/Mac.d.ts +0 -1
- package/dist/src/os/Controls/Windows.d.ts +0 -1
- package/dist/src/os/Controls/types.d.ts +0 -1
- package/dist/src/os/use.d.ts +0 -1
- package/dist/src/pluto/Pluto.d.ts +0 -1
- package/dist/src/progress/Progress.d.ts +0 -1
- package/dist/src/ranger/Select.d.ts +11 -0
- package/dist/src/ranger/Select.d.ts.map +1 -0
- package/dist/src/ranger/SelectLabel.d.ts +0 -1
- package/dist/src/ranger/TimeRangeChip.d.ts +3 -3
- package/dist/src/ranger/TimeRangeChip.d.ts.map +1 -1
- package/dist/src/ranger/external.d.ts +1 -0
- package/dist/src/ranger/external.d.ts.map +1 -1
- package/dist/src/ranger/types.d.ts +2 -0
- package/dist/src/ranger/types.d.ts.map +1 -0
- package/dist/src/resize/Core.d.ts +0 -1
- package/dist/src/resize/Multiple.d.ts +0 -1
- package/dist/src/resize/Single.d.ts +0 -1
- package/dist/src/select/Button.d.ts +1 -2
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/ClearButton.d.ts +0 -1
- package/dist/src/select/DataType.d.ts +0 -1
- package/dist/src/select/Direction.d.ts +0 -1
- package/dist/src/select/List.d.ts +5 -4
- package/dist/src/select/List.d.ts.map +1 -1
- package/dist/src/select/Modal.d.ts +1 -0
- package/dist/src/select/Modal.d.ts.map +1 -0
- package/dist/src/select/Multiple.d.ts +5 -3
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Select.spec.d.ts +0 -1
- package/dist/src/select/Single.d.ts +10 -4
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +0 -1
- package/dist/src/status/Aggregator.d.ts +0 -1
- package/dist/src/status/Aggregator.d.ts.map +1 -1
- package/dist/src/status/Circle.d.ts +0 -1
- package/dist/src/status/Notification.d.ts +0 -1
- package/dist/src/status/Text.d.ts +0 -1
- package/dist/src/status/aether/aggregator.d.ts +0 -1
- package/dist/src/status/aether/types.d.ts +0 -1
- package/dist/src/status/colors.d.ts +0 -1
- package/dist/src/steps/Steps.d.ts +0 -1
- package/dist/src/synnax/Provider.d.ts +0 -1
- package/dist/src/synnax/aether/provider.d.ts +30 -31
- package/dist/src/tabs/Selector.d.ts +0 -1
- package/dist/src/tabs/Tabs.d.ts +0 -1
- package/dist/src/tabs/types.d.ts +0 -1
- package/dist/src/tag/Tag.d.ts +2 -2
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/telem/Pipeline.d.ts +0 -1
- package/dist/src/telem/Provider.d.ts +0 -1
- package/dist/src/telem/aether/context.d.ts +0 -1
- package/dist/src/telem/aether/convertSeries.d.ts +0 -1
- package/dist/src/telem/aether/factory.d.ts +0 -1
- package/dist/src/telem/aether/noop.d.ts +0 -1
- package/dist/src/telem/aether/pipeline.d.ts +0 -1
- package/dist/src/telem/aether/provider.d.ts +0 -1
- package/dist/src/telem/aether/remote.d.ts +0 -1
- package/dist/src/telem/aether/static.d.ts +0 -1
- package/dist/src/telem/aether/telem.d.ts +0 -1
- package/dist/src/telem/aether/transformers.d.ts +0 -1
- package/dist/src/telem/client/cache/cache.d.ts +0 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +0 -1
- package/dist/src/telem/client/cache/static.d.ts +0 -1
- package/dist/src/telem/client/cache/unary.d.ts +0 -1
- package/dist/src/telem/client/client.d.ts +0 -1
- package/dist/src/telem/client/reader.d.ts +0 -1
- package/dist/src/telem/client/streamer.d.ts +0 -1
- package/dist/src/telem/client/types.d.ts +0 -1
- package/dist/src/telem/control/Chip.d.ts +0 -1
- package/dist/src/telem/control/Controller.d.ts +0 -1
- package/dist/src/telem/control/Indicator.d.ts +0 -1
- package/dist/src/telem/control/Legend.d.ts +0 -1
- package/dist/src/telem/control/StateProvider.d.ts +0 -1
- package/dist/src/telem/control/aether/chip.d.ts +0 -1
- package/dist/src/telem/control/aether/controller.d.ts +0 -1
- package/dist/src/telem/control/aether/indicator.d.ts +0 -1
- package/dist/src/telem/control/aether/legend.d.ts +0 -1
- package/dist/src/telem/control/aether/registry.d.ts +0 -1
- package/dist/src/telem/control/aether/state.d.ts +0 -1
- package/dist/src/telem/test/mock.d.ts +0 -1
- package/dist/src/testutil/dom.d.ts +1 -2
- package/dist/src/testutil/dom.d.ts.map +1 -1
- package/dist/src/text/DateTime.d.ts +0 -1
- package/dist/src/text/Editable.d.ts +0 -1
- package/dist/src/text/Keyboard.d.ts +0 -1
- package/dist/src/text/Link.d.ts +0 -1
- package/dist/src/text/SelectLevel.d.ts +0 -1
- package/dist/src/text/Text.d.ts +0 -1
- package/dist/src/text/WithIcon.d.ts +0 -1
- package/dist/src/text/core/types.d.ts +0 -1
- package/dist/src/text/dimensions.d.ts +0 -1
- package/dist/src/text/index.d.ts +0 -1
- package/dist/src/text/symbols.d.ts +0 -1
- package/dist/src/theming/Provider.d.ts +0 -1
- package/dist/src/theming/aether/provider.d.ts +0 -1
- package/dist/src/theming/core/fontString.d.ts +0 -1
- package/dist/src/theming/core/theme.d.ts +0 -1
- package/dist/src/theming/css.d.ts +0 -1
- package/dist/src/theming/font.d.ts +0 -1
- package/dist/src/theming/index.d.ts +0 -1
- package/dist/src/tooltip/Config.d.ts +0 -1
- package/dist/src/tooltip/Dialog.d.ts +0 -1
- package/dist/src/tooltip/Dialog.d.ts.map +1 -1
- package/dist/src/tooltip/wrap.d.ts +0 -1
- package/dist/src/tree/Tree.d.ts +0 -1
- package/dist/src/tree/core.d.ts +1 -1
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts +0 -1
- package/dist/src/triggers/Status.d.ts +0 -1
- package/dist/src/triggers/Text.d.ts +0 -1
- package/dist/src/triggers/hooks.d.ts +0 -1
- package/dist/src/triggers/triggers.d.ts +0 -1
- package/dist/src/triggers/useDrag.d.ts +0 -1
- package/dist/src/util/children.d.ts +0 -1
- package/dist/src/util/component.d.ts +0 -1
- package/dist/src/util/renderProp.d.ts +0 -1
- package/dist/src/util/zod.d.ts +0 -1
- package/dist/src/video/Video.d.ts +0 -1
- package/dist/src/viewport/Mask.d.ts +0 -1
- package/dist/src/viewport/SelectMode.d.ts +0 -1
- package/dist/src/viewport/use.d.ts +0 -1
- package/dist/src/vis/axis/axis.d.ts +0 -1
- package/dist/src/vis/axis/canvas.d.ts +0 -1
- package/dist/src/vis/axis/ticks.d.ts +0 -1
- package/dist/src/vis/button/aether/button.d.ts +0 -1
- package/dist/src/vis/button/use.d.ts +0 -1
- package/dist/src/vis/canvas/Canvas.d.ts +0 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +0 -1
- package/dist/src/vis/diagram/Diagram.d.ts +0 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +0 -1
- package/dist/src/vis/diagram/align.d.ts +0 -1
- package/dist/src/vis/diagram/edge/Edge.d.ts +0 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +0 -1
- package/dist/src/vis/diagram/util.d.ts +0 -1
- package/dist/src/vis/draw2d/canvas.d.ts +0 -1
- package/dist/src/vis/draw2d/index.d.ts +0 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +0 -1
- package/dist/src/vis/eraser/use.d.ts +0 -1
- package/dist/src/vis/legend/Container.d.ts +0 -1
- package/dist/src/vis/legend/Simple.d.ts +0 -1
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts +0 -1
- package/dist/src/vis/line/aether/line.d.ts +0 -1
- package/dist/src/vis/lineplot/Axis.d.ts +0 -1
- package/dist/src/vis/lineplot/Legend.d.ts +0 -1
- package/dist/src/vis/lineplot/Line.d.ts +0 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +0 -1
- package/dist/src/vis/lineplot/Title.d.ts +0 -1
- package/dist/src/vis/lineplot/Viewport.d.ts +0 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +0 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +0 -1
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +0 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts +0 -1
- package/dist/src/vis/lineplot/aether/grid.d.ts +0 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts +0 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts +0 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +0 -1
- package/dist/src/vis/lineplot/range/aether/external.d.ts +0 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +0 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +0 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +0 -1
- package/dist/src/vis/measure/aether/measure.d.ts +0 -1
- package/dist/src/vis/render/GLProgram.d.ts +0 -1
- package/dist/src/vis/render/clear/program.d.ts +0 -1
- package/dist/src/vis/render/context.d.ts +0 -1
- package/dist/src/vis/render/controller.d.ts +0 -1
- package/dist/src/vis/render/eraser.d.ts +0 -1
- package/dist/src/vis/render/loop.d.ts +0 -1
- package/dist/src/vis/render/performance.d.ts +0 -1
- package/dist/src/vis/render/performance.d.ts.map +1 -1
- package/dist/src/vis/render/util.d.ts +0 -1
- package/dist/src/vis/rule/Rule.d.ts +0 -1
- package/dist/src/vis/rule/aether/aether.d.ts +0 -1
- package/dist/src/vis/schematic/Forms.d.ts +0 -1
- package/dist/src/vis/schematic/Labeled.d.ts +0 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +0 -1
- package/dist/src/vis/schematic/Symbols.d.ts +0 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +0 -1
- package/dist/src/vis/schematic/registry.d.ts +0 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +0 -1
- package/dist/src/vis/setpoint/use.d.ts +0 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +0 -1
- package/dist/src/vis/toggle/use.d.ts +0 -1
- package/dist/src/vis/value/aether/value.d.ts +0 -1
- package/dist/src/vis/value/use.d.ts +0 -1
- package/dist/src/worker/Context.d.ts +0 -1
- package/dist/style.css +1 -1
- 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-DNx3byGw.cjs → units-Bq69s424.cjs} +1 -1
- package/dist/{units-BREWRknL.js → units-BynnjwvA.js} +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +14 -14
- package/dist/LinePlot-Cgjyihyx.cjs +0 -66
- package/dist/Link-BTJDCfSs.cjs +0 -1
- package/dist/Link-CBJMkW3j.js +0 -10
- package/dist/Toggle-CICqV_L2.cjs +0 -143
- package/dist/aggregator-CYlhZeym.cjs +0 -51
- package/dist/external-C727M7V8.js +0 -344
- package/dist/external-CjpJQPg2.cjs +0 -1
- package/dist/external-otevW3YE.cjs +0 -1
- package/dist/external-te3uGVrs.js +0 -231
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";const Me=require("./jsx-runtime-Cek9Ww4S.cjs"),_=require("react"),ye=require("./aggregator-Bs9fTewE.cjs"),V=require("./css-B7TifAVb.cjs"),to=require("react-dom"),It=require("./Pack--3w90epp.cjs"),Ft=require("zod"),br=require("./units-Bq69s424.cjs");function p3(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const eo=p3(_);var Fl={exports:{}},ki={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Fp;function d3(){if(Fp)return ki;Fp=1;var e=_,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},p=null,d=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(d=u.ref);for(c in u)n.call(u,c)&&!i.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:r,type:s,key:p,ref:d,props:f,_owner:a.current}}return ki.Fragment=t,ki.jsx=o,ki.jsxs=o,ki}var Lo={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Bp;function v3(){return Bp||(Bp=1,process.env.NODE_ENV!=="production"&&function(){var e=_,r=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function y(ee){if(ee===null||typeof ee!="object")return null;var Oe=v&&ee[v]||ee[m];return typeof Oe=="function"?Oe:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(ee){{for(var Oe=arguments.length,Be=new Array(Oe>1?Oe-1:0),Ve=1;Ve<Oe;Ve++)Be[Ve-1]=arguments[Ve];h("error",ee,Be)}}function h(ee,Oe,Be){{var Ve=g.ReactDebugCurrentFrame,gr=Ve.getStackAddendum();gr!==""&&(Oe+="%s",Be=Be.concat([gr]));var Sr=Be.map(function(pr){return String(pr)});Sr.unshift("Warning: "+Oe),Function.prototype.apply.call(console[ee],console,Sr)}}var w=!1,x=!1,b=!1,D=!1,A=!1,S;S=Symbol.for("react.module.reference");function C(ee){return!!(typeof ee=="string"||typeof ee=="function"||ee===n||ee===i||A||ee===a||ee===l||ee===c||D||ee===d||w||x||b||typeof ee=="object"&&ee!==null&&(ee.$$typeof===p||ee.$$typeof===f||ee.$$typeof===o||ee.$$typeof===s||ee.$$typeof===u||ee.$$typeof===S||ee.getModuleId!==void 0))}function M(ee,Oe,Be){var Ve=ee.displayName;if(Ve)return Ve;var gr=Oe.displayName||Oe.name||"";return gr!==""?Be+"("+gr+")":Be}function $(ee){return ee.displayName||"Context"}function B(ee){if(ee==null)return null;if(typeof ee.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ee=="function")return ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case n:return"Fragment";case t:return"Portal";case i:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof ee=="object")switch(ee.$$typeof){case s:var Oe=ee;return $(Oe)+".Consumer";case o:var Be=ee;return $(Be._context)+".Provider";case u:return M(ee,ee.render,"ForwardRef");case f:var Ve=ee.displayName||null;return Ve!==null?Ve:B(ee.type)||"Memo";case p:{var gr=ee,Sr=gr._payload,pr=gr._init;try{return B(pr(Sr))}catch{return null}}}return null}var P=Object.assign,R=0,N,O,U,F,q,Y,G;function z(){}z.__reactDisabledLog=!0;function J(){{if(R===0){N=console.log,O=console.info,U=console.warn,F=console.error,q=console.group,Y=console.groupCollapsed,G=console.groupEnd;var ee={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:ee,log:ee,warn:ee,error:ee,group:ee,groupCollapsed:ee,groupEnd:ee})}R++}}function le(){{if(R--,R===0){var ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},ee,{value:N}),info:P({},ee,{value:O}),warn:P({},ee,{value:U}),error:P({},ee,{value:F}),group:P({},ee,{value:q}),groupCollapsed:P({},ee,{value:Y}),groupEnd:P({},ee,{value:G})})}R<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=g.ReactCurrentDispatcher,re;function se(ee,Oe,Be){{if(re===void 0)try{throw Error()}catch(gr){var Ve=gr.stack.trim().match(/\n( *(at )?)/);re=Ve&&Ve[1]||""}return`
|
|
18
|
+
`+re+ee}}var te=!1,ae;{var fe=typeof WeakMap=="function"?WeakMap:Map;ae=new fe}function ne(ee,Oe){if(!ee||te)return"";{var Be=ae.get(ee);if(Be!==void 0)return Be}var Ve;te=!0;var gr=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Sr;Sr=Q.current,Q.current=null,J();try{if(Oe){var pr=function(){throw Error()};if(Object.defineProperty(pr.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pr,[])}catch(sr){Ve=sr}Reflect.construct(ee,[],pr)}else{try{pr.call()}catch(sr){Ve=sr}ee.call(pr.prototype)}}else{try{throw Error()}catch(sr){Ve=sr}ee()}}catch(sr){if(sr&&Ve&&typeof sr.stack=="string"){for(var lr=sr.stack.split(`
|
|
19
|
+
`),Kr=Ve.stack.split(`
|
|
20
|
+
`),Pr=lr.length-1,Ir=Kr.length-1;Pr>=1&&Ir>=0&&lr[Pr]!==Kr[Ir];)Ir--;for(;Pr>=1&&Ir>=0;Pr--,Ir--)if(lr[Pr]!==Kr[Ir]){if(Pr!==1||Ir!==1)do if(Pr--,Ir--,Ir<0||lr[Pr]!==Kr[Ir]){var gt=`
|
|
21
|
+
`+lr[Pr].replace(" at new "," at ");return ee.displayName&>.includes("<anonymous>")&&(gt=gt.replace("<anonymous>",ee.displayName)),typeof ee=="function"&&ae.set(ee,gt),gt}while(Pr>=1&&Ir>=0);break}}}finally{te=!1,Q.current=Sr,le(),Error.prepareStackTrace=gr}var _n=ee?ee.displayName||ee.name:"",$n=_n?se(_n):"";return typeof ee=="function"&&ae.set(ee,$n),$n}function xe(ee,Oe,Be){return ne(ee,!1)}function $e(ee){var Oe=ee.prototype;return!!(Oe&&Oe.isReactComponent)}function k(ee,Oe,Be){if(ee==null)return"";if(typeof ee=="function")return ne(ee,$e(ee));if(typeof ee=="string")return se(ee);switch(ee){case l:return se("Suspense");case c:return se("SuspenseList")}if(typeof ee=="object")switch(ee.$$typeof){case u:return xe(ee.render);case f:return k(ee.type,Oe,Be);case p:{var Ve=ee,gr=Ve._payload,Sr=Ve._init;try{return k(Sr(gr),Oe,Be)}catch{}}}return""}var W=Object.prototype.hasOwnProperty,ue={},j=g.ReactDebugCurrentFrame;function K(ee){if(ee){var Oe=ee._owner,Be=k(ee.type,ee._source,Oe?Oe.type:null);j.setExtraStackFrame(Be)}else j.setExtraStackFrame(null)}function oe(ee,Oe,Be,Ve,gr){{var Sr=Function.call.bind(W);for(var pr in ee)if(Sr(ee,pr)){var lr=void 0;try{if(typeof ee[pr]!="function"){var Kr=Error((Ve||"React class")+": "+Be+" type `"+pr+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ee[pr]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Kr.name="Invariant Violation",Kr}lr=ee[pr](Oe,pr,Ve,Be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Pr){lr=Pr}lr&&!(lr instanceof Error)&&(K(gr),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ve||"React class",Be,pr,typeof lr),K(null)),lr instanceof Error&&!(lr.message in ue)&&(ue[lr.message]=!0,K(gr),E("Failed %s type: %s",Be,lr.message),K(null))}}}var he=Array.isArray;function me(ee){return he(ee)}function I(ee){{var Oe=typeof Symbol=="function"&&Symbol.toStringTag,Be=Oe&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return Be}}function H(ee){try{return ie(ee),!1}catch{return!0}}function ie(ee){return""+ee}function ce(ee){if(H(ee))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",I(ee)),ie(ee)}var de=g.ReactCurrentOwner,ve={key:!0,ref:!0,__self:!0,__source:!0},Se,we,Te;Te={};function De(ee){if(W.call(ee,"ref")){var Oe=Object.getOwnPropertyDescriptor(ee,"ref").get;if(Oe&&Oe.isReactWarning)return!1}return ee.ref!==void 0}function ir(ee){if(W.call(ee,"key")){var Oe=Object.getOwnPropertyDescriptor(ee,"key").get;if(Oe&&Oe.isReactWarning)return!1}return ee.key!==void 0}function or(ee,Oe){if(typeof ee.ref=="string"&&de.current&&Oe&&de.current.stateNode!==Oe){var Be=B(de.current.type);Te[Be]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(de.current.type),ee.ref),Te[Be]=!0)}}function Le(ee,Oe){{var Be=function(){Se||(Se=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Oe))};Be.isReactWarning=!0,Object.defineProperty(ee,"key",{get:Be,configurable:!0})}}function _r(ee,Oe){{var Be=function(){we||(we=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Oe))};Be.isReactWarning=!0,Object.defineProperty(ee,"ref",{get:Be,configurable:!0})}}var T=function(ee,Oe,Be,Ve,gr,Sr,pr){var lr={$$typeof:r,type:ee,key:Oe,ref:Be,props:pr,_owner:Sr};return lr._store={},Object.defineProperty(lr._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(lr,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ve}),Object.defineProperty(lr,"_source",{configurable:!1,enumerable:!1,writable:!1,value:gr}),Object.freeze&&(Object.freeze(lr.props),Object.freeze(lr)),lr};function X(ee,Oe,Be,Ve,gr){{var Sr,pr={},lr=null,Kr=null;Be!==void 0&&(ce(Be),lr=""+Be),ir(Oe)&&(ce(Oe.key),lr=""+Oe.key),De(Oe)&&(Kr=Oe.ref,or(Oe,gr));for(Sr in Oe)W.call(Oe,Sr)&&!ve.hasOwnProperty(Sr)&&(pr[Sr]=Oe[Sr]);if(ee&&ee.defaultProps){var Pr=ee.defaultProps;for(Sr in Pr)pr[Sr]===void 0&&(pr[Sr]=Pr[Sr])}if(lr||Kr){var Ir=typeof ee=="function"?ee.displayName||ee.name||"Unknown":ee;lr&&Le(pr,Ir),Kr&&_r(pr,Ir)}return T(ee,lr,Kr,gr,Ve,de.current,pr)}}var pe=g.ReactCurrentOwner,Ae=g.ReactDebugCurrentFrame;function qe(ee){if(ee){var Oe=ee._owner,Be=k(ee.type,ee._source,Oe?Oe.type:null);Ae.setExtraStackFrame(Be)}else Ae.setExtraStackFrame(null)}var Ge;Ge=!1;function Xr(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===r}function Na(){{if(pe.current){var ee=B(pe.current.type);if(ee)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+ee+"`."}return""}}function Wu(ee){return""}var Bo={};function Zu(ee){{var Oe=Na();if(!Oe){var Be=typeof ee=="string"?ee:ee.displayName||ee.name;Be&&(Oe=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+Be+">.")}return Oe}}function Ro(ee,Oe){{if(!ee._store||ee._store.validated||ee.key!=null)return;ee._store.validated=!0;var Be=Zu(Oe);if(Bo[Be])return;Bo[Be]=!0;var Ve="";ee&&ee._owner&&ee._owner!==pe.current&&(Ve=" It was passed a child from "+B(ee._owner.type)+"."),qe(ee),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Be,Ve),qe(null)}}function Po(ee,Oe){{if(typeof ee!="object")return;if(me(ee))for(var Be=0;Be<ee.length;Be++){var Ve=ee[Be];Xr(Ve)&&Ro(Ve,Oe)}else if(Xr(ee))ee._store&&(ee._store.validated=!0);else if(ee){var gr=y(ee);if(typeof gr=="function"&&gr!==ee.entries)for(var Sr=gr.call(ee),pr;!(pr=Sr.next()).done;)Xr(pr.value)&&Ro(pr.value,Oe)}}}function Yu(ee){{var Oe=ee.type;if(Oe==null||typeof Oe=="string")return;var Be;if(typeof Oe=="function")Be=Oe.propTypes;else if(typeof Oe=="object"&&(Oe.$$typeof===u||Oe.$$typeof===f))Be=Oe.propTypes;else return;if(Be){var Ve=B(Oe);oe(Be,ee.props,"prop",Ve,ee)}else if(Oe.PropTypes!==void 0&&!Ge){Ge=!0;var gr=B(Oe);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",gr||"Unknown")}typeof Oe.getDefaultProps=="function"&&!Oe.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xu(ee){{for(var Oe=Object.keys(ee.props),Be=0;Be<Oe.length;Be++){var Ve=Oe[Be];if(Ve!=="children"&&Ve!=="key"){qe(ee),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ve),qe(null);break}}ee.ref!==null&&(qe(ee),E("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function zo(ee,Oe,Be,Ve,gr,Sr){{var pr=C(ee);if(!pr){var lr="";(ee===void 0||typeof ee=="object"&&ee!==null&&Object.keys(ee).length===0)&&(lr+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Kr=Wu();Kr?lr+=Kr:lr+=Na();var Pr;ee===null?Pr="null":me(ee)?Pr="array":ee!==void 0&&ee.$$typeof===r?(Pr="<"+(B(ee.type)||"Unknown")+" />",lr=" Did you accidentally export a JSX literal instead of a component?"):Pr=typeof ee,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Pr,lr)}var Ir=X(ee,Oe,Be,gr,Sr);if(Ir==null)return Ir;if(pr){var gt=Oe.children;if(gt!==void 0)if(Ve)if(me(gt)){for(var _n=0;_n<gt.length;_n++)Po(gt[_n],ee);Object.freeze&&Object.freeze(gt)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Po(gt,ee)}return ee===n?Xu(Ir):Yu(Ir),Ir}}function Ku(ee,Oe,Be){return zo(ee,Oe,Be,!0)}function Ju(ee,Oe,Be){return zo(ee,Oe,Be,!1)}var Qu=Ju,el=Ku;Lo.Fragment=n,Lo.jsx=Qu,Lo.jsxs=el}()),Lo}process.env.NODE_ENV==="production"?Fl.exports=d3():Fl.exports=v3();var Nt=Fl.exports;function fg(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=fg(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ec(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=fg(e))&&(n&&(n+=" "),n+=r);return n}var pg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Rp=_.createContext&&_.createContext(pg),m3=["attr","size","title"];function h3(e,r){if(e==null)return{};var t=g3(e,r),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function g3(e,r){if(e==null)return{};var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(r.indexOf(n)>=0)continue;t[n]=e[n]}return t}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ms.apply(this,arguments)}function Pp(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function hs(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Pp(Object(t),!0).forEach(function(n){y3(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pp(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y3(e,r,t){return r=b3(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function b3(e){var r=x3(e,"string");return typeof r=="symbol"?r:r+""}function x3(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dg(e){return e&&e.map((r,t)=>_.createElement(r.tag,hs({key:t},r.attr),dg(r.child)))}function Ce(e){return r=>_.createElement(w3,ms({attr:hs({},e.attr)},r),dg(e.child))}function w3(e){var r=t=>{var{attr:n,size:a,title:i}=e,o=h3(e,m3),s=a||t.size||"1em",u;return t.className&&(u=t.className),e.className&&(u=(u?u+" ":"")+e.className),_.createElement("svg",ms({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,o,{className:u,style:hs(hs({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&_.createElement("title",null,i),e.children)};return Rp!==void 0?_.createElement(Rp.Consumer,null,t=>r(t)):r(pg)}function E3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"},child:[]}]})(e)}function zp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 0 0-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32z"},child:[]}]})(e)}function S3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"},child:[]}]})(e)}function A3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function D3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM349.3 793.7H230.6V411.9h118.7v381.8zm-59.3-434a68.8 68.8 0 1 1 68.8-68.8c-.1 38-30.9 68.8-68.8 68.8zm503.7 434H675.1V608c0-44.3-.8-101.2-61.7-101.2-61.7 0-71.2 48.2-71.2 98v188.9H423.7V411.9h113.8v52.2h1.6c15.8-30 54.5-61.7 112.3-61.7 120.2 0 142.3 79.1 142.3 181.9v209.4z"},child:[]}]})(e)}function C3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function N3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"},child:[]}]})(e)}function M3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"},child:[]}]})(e)}function T3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M799.855 166.312c.023.007.043.018.084.059l57.69 57.69c.041.041.052.06.059.084a.118.118 0 0 1 0 .069c-.007.023-.018.042-.059.083L569.926 512l287.703 287.703c.041.04.052.06.059.083a.118.118 0 0 1 0 .07c-.007.022-.018.042-.059.083l-57.69 57.69c-.041.041-.06.052-.084.059a.118.118 0 0 1-.069 0c-.023-.007-.042-.018-.083-.059L512 569.926 224.297 857.629c-.04.041-.06.052-.083.059a.118.118 0 0 1-.07 0c-.022-.007-.042-.018-.083-.059l-57.69-57.69c-.041-.041-.052-.06-.059-.084a.118.118 0 0 1 0-.069c.007-.023.018-.042.059-.083L454.073 512 166.371 224.297c-.041-.04-.052-.06-.059-.083a.118.118 0 0 1 0-.07c.007-.022.018-.042.059-.083l57.69-57.69c.041-.041.06-.052.084-.059a.118.118 0 0 1 .069 0c.023.007.042.018.083.059L512 454.073l287.703-287.702c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(e)}function O3(e){return Ce({tag:"svg",attr:{t:"1569683683230",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M342 88H120c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V168h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zM920 664h-48c-8.8 0-16 7.2-16 16v176H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V680c0-8.8-7.2-16-16-16zM342 856H168V680c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zM904 88H682c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V120c0-17.7-14.3-32-32-32z"},child:[]}]})(e)}function _3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"},child:[]}]})(e)}function $3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"},child:[]}]})(e)}function F3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2z"},child:[]}]})(e)}function B3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m13 3 3.293 3.293-7 7 1.414 1.414 7-7L21 11V3z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"},child:[]}]})(e)}function R3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z"},child:[]},{tag:"path",attr:{d:"M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z"},child:[]}]})(e)}function P3(e){return Ce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5"},child:[]}]})(e)}function z3(e){return Ce({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.27 2.047a1 1 0 0 1 1.46 0l6.345 6.77c.6.638.146 1.683-.73 1.683H11.5v3a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-3H1.654C.78 10.5.326 9.455.924 8.816z"},child:[]}]})(e)}function I3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"},child:[]}]})(e)}function L3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M349.9 236.3h-66.1v-59.4h66.1v59.4zm0-204.3h-66.1v60.7h66.1V32zm78.2 144.8H362v59.4h66.1v-59.4zm-156.3-72.1h-66.1v60.1h66.1v-60.1zm78.1 0h-66.1v60.1h66.1v-60.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1l-13.3-8.9zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1v-59.4zm-78.1-72.1h-66.1v60.1h66.1v-60.1z"},child:[]}]})(e)}function q3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"},child:[]}]})(e)}function vg(e){return Ce({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"},child:[]}]})(e)}function k3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M368 32h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32V64c0-17.67-14.33-32-32-32zM208 88h-84.75C113.75 64.56 90.84 48 64 48 28.66 48 0 76.65 0 112s28.66 64 64 64c26.84 0 49.75-16.56 59.25-40h79.73c-55.37 32.52-95.86 87.32-109.54 152h49.4c11.3-41.61 36.77-77.21 71.04-101.56-3.7-8.08-5.88-16.99-5.88-26.44V88zm-48 232H64c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zM576 48c-26.84 0-49.75 16.56-59.25 40H432v72c0 9.45-2.19 18.36-5.88 26.44 34.27 24.35 59.74 59.95 71.04 101.56h49.4c-13.68-64.68-54.17-119.48-109.54-152h79.73c9.5 23.44 32.41 40 59.25 40 35.34 0 64-28.65 64-64s-28.66-64-64-64zm0 272h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function Ip(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z"},child:[]}]})(e)}function U3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"},child:[]}]})(e)}function H3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M22,12 C22,12 19.0000009,15.0000004 13.0000004,21.0000004 C6.99999996,27.0000004 -2.00000007,18.0000004 3.99999994,12.0000004 C9.99999996,6.00000037 9,7.00000011 13,3.00000008 C17,-0.999999955 23,4.99999994 19,9.00000005 C15,13.0000002 12.0000004,16.0000007 9.99999995,18.0000004 C7.99999952,20 5,17 6.99999995,15.0000004 C8.99999991,13.0000007 16,6 16,6"},child:[]}]})(e)}function j3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M15,5 L17,5 L17,3 L15,3 L15,5 Z M7,5 L9,5 L9,3 L7,3 L7,5 Z M15,13 L17,13 L17,11 L15,11 L15,13 Z M7,13 L9,13 L9,11 L7,11 L7,13 Z M15,21 L17,21 L17,19 L15,19 L15,21 Z M7,21 L9,21 L9,19 L7,19 L7,21 Z"},child:[]}]})(e)}function V3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M8.5,5.5 L12,2 L15.5,5.5 M22,12 L2,12 M5.5,8.5 L2,12 L5.5,15.5 M18.5,15.5 L22,12 L18.5,8.5 M12,22 L12,2 M8.5,18.5 L12,22 L15.5,18.5"},child:[]}]})(e)}function G3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(e)}function W3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"},child:[]}]})(e)}function Z3(e){return Ce({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"},child:[]}]})(e)}function Y3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M11.644 1.59a.75.75 0 0 1 .712 0l9.75 5.25a.75.75 0 0 1 0 1.32l-9.75 5.25a.75.75 0 0 1-.712 0l-9.75-5.25a.75.75 0 0 1 0-1.32l9.75-5.25Z"},child:[]},{tag:"path",attr:{d:"m3.265 10.602 7.668 4.129a2.25 2.25 0 0 0 2.134 0l7.668-4.13 1.37.739a.75.75 0 0 1 0 1.32l-9.75 5.25a.75.75 0 0 1-.71 0l-9.75-5.25a.75.75 0 0 1 0-1.32l1.37-.738Z"},child:[]},{tag:"path",attr:{d:"m10.933 19.231-7.668-4.13-1.37.739a.75.75 0 0 0 0 1.32l9.75 5.25c.221.12.489.12.71 0l9.75-5.25a.75.75 0 0 0 0-1.32l-1.37-.738-7.668 4.13a2.25 2.25 0 0 1-2.134-.001Z"},child:[]}]})(e)}function X3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(e)}function K3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 48c-67.61.29-117.87 9.6-154.24 25.69-27.14 12-37.76 21.08-37.76 51.84V448c41.57-37.5 78.46-48 224-48V48zM48 48c67.61.29 117.87 9.6 154.24 25.69 27.14 12 37.76 21.08 37.76 51.84V448c-41.57-37.5-78.46-48-224-48V48z"},child:[]}]})(e)}function J3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M456 480H136a24 24 0 0 1-24-24V128a16 16 0 0 1 16-16h328a24 24 0 0 1 24 24v320a24 24 0 0 1-24 24z"},child:[]},{tag:"path",attr:{d:"M112 80h288V56a24 24 0 0 0-24-24H60a28 28 0 0 0-28 28v316a24 24 0 0 0 24 24h24V112a32 32 0 0 1 32-32z"},child:[]}]})(e)}function Q3(e){return Ce({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48zm96 240h-96a16 16 0 0 1-16-16V128a16 16 0 0 1 32 0v128h80a16 16 0 0 1 0 32z"},child:[]}]})(e)}function e4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.126 8.125 1.937-1.937 3.747 3.747-1.937 1.938zM20.71 5.63l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75L20.71 7a1 1 0 0 0 0-1.37zM2 5l6.63 6.63L3 17.25V21h3.75l5.63-5.62L18 21l2-2L4 3 2 5z"},child:[]}]})(e)}function Lp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"},child:[]}]})(e)}function r4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"},child:[]}]})(e)}function t4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function n4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.76 16.24C6.67 15.16 6 13.66 6 12s.67-3.16 1.76-4.24l1.42 1.42C8.45 9.9 8 10.9 8 12c0 1.1.45 2.1 1.17 2.83l-1.41 1.41zm8.48 0C17.33 15.16 18 13.66 18 12s-.67-3.16-1.76-4.24l-1.42 1.42C15.55 9.9 16 10.9 16 12c0 1.1-.45 2.1-1.17 2.83l1.41 1.41zM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm8 2c0 2.21-.9 4.21-2.35 5.65l1.42 1.42C20.88 17.26 22 14.76 22 12s-1.12-5.26-2.93-7.07l-1.42 1.42A7.94 7.94 0 0 1 20 12zM6.35 6.35 4.93 4.93C3.12 6.74 2 9.24 2 12s1.12 5.26 2.93 7.07l1.42-1.42C4.9 16.21 4 14.21 4 12s.9-4.21 2.35-5.65z"},child:[]}]})(e)}function a4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"8"},child:[]}]})(e)}function i4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(e)}function o4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8 5v14l11-7z"},child:[]}]})(e)}function s4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"},child:[]},{tag:"path",attr:{d:"m15 9 .94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11 4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"},child:[]}]})(e)}function u4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"},child:[]}]})(e)}function l4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"},child:[]}]})(e)}function c4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m17.66 17.66-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06L9.7 9.7l-1.06 1.06-.71-.71 1.06-1.06-1.94-1.94-1.06 1.06-.71-.71 1.06-1.06L4 4v14c0 1.1.9 2 2 2h14l-2.34-2.34zM7 17v-5.76L12.76 17H7z"},child:[]}]})(e)}function f4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 2h2v5h8v3h-8v4h5v3h-5v5h-2v-5H6v-3h5v-4H3V7h8z"},child:[]}]})(e)}function p4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M4 22H2V2h2v20zM22 7H6v3h16V7zm-6 7H6v3h10v-3z"},child:[]}]})(e)}function d4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2h2v20h-2V2zM2 10h16V7H2v3zm6 7h10v-3H8v3z"},child:[]}]})(e)}function v4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 22H2v-2h20v2zM10 2H7v16h3V2zm7 6h-3v10h3V8z"},child:[]}]})(e)}function m4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 11h-5V6h-3v5h-4V3H7v8H1.84v2H7v8h3v-8h4v5h3v-5h5z"},child:[]}]})(e)}function h4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M22 2v2H2V2h20zM7 22h3V6H7v16zm7-6h3V6h-3v10z"},child:[]}]})(e)}function qp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13v7h18v-1.5l-9-7L8 17l-5-4zm0-6 4 3 5-7 5 4h4v8.97l-9.4-7.31-3.98 5.48L3 10.44V7z"},child:[]}]})(e)}function g4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"},child:[]}]})(e)}function y4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7zM21 10c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4h-1z"},child:[]}]})(e)}function b4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"},child:[]},{tag:"path",attr:{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-3.37 12.5-.8-2.3H12.2l-.82 2.3H9.81l3.38-9h1.61l3.38 9h-1.55z"},child:[]},{tag:"path",attr:{d:"m13.96 7.17-1.31 3.72h2.69l-1.3-3.72z"},child:[]}]})(e)}function x4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 13c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-10C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z"},child:[]}]})(e)}function w4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 12v2H5v-2h2zm-2-2V8h2v2H5zm6 2v2H9v-2h2zm-2-2V8h2v2H9zm7 6v1H8v-1h8zm-1-4v2h-2v-2h2zm-2-2V8h2v2h-2zm4 4v-2h2v2h-2zm2-4h-2V8h2v2z"},child:[]}]})(e)}function E4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}function S4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},child:[]}]})(e)}function A4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(e)}function D4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"},child:[]}]})(e)}function C4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"},child:[]}]})(e)}function N4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8.41 16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"},child:[]}]})(e)}function M4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.5 3C15.57 3 14 4.57 14 6.5V8h-4V6.5C10 4.57 8.43 3 6.5 3S3 4.57 3 6.5 4.57 10 6.5 10H8v4H6.5C4.57 14 3 15.57 3 17.5S4.57 21 6.5 21s3.5-1.57 3.5-3.5V16h4v1.5c0 1.93 1.57 3.5 3.5 3.5s3.5-1.57 3.5-3.5-1.57-3.5-3.5-3.5H16v-4h1.5c1.93 0 3.5-1.57 3.5-3.5S19.43 3 17.5 3zM16 8V6.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S18.33 8 17.5 8H16zM6.5 8C5.67 8 5 7.33 5 6.5S5.67 5 6.5 5 8 5.67 8 6.5V8H6.5zm3.5 6v-4h4v4h-4zm7.5 5c-.83 0-1.5-.67-1.5-1.5V16h1.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5zm-11 0c-.83 0-1.5-.67-1.5-1.5S5.67 16 6.5 16H8v1.5c0 .83-.67 1.5-1.5 1.5z"},child:[]}]})(e)}function T4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m5 12 1.41 1.41L12 7.83l5.59 5.58L19 12l-7-7z"},child:[]}]})(e)}function O4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15 4-4H8l4 4z"},child:[]}]})(e)}function _4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15 5h6v2h-6zM9 5H3v2h4.85l6.92 12H21v-2h-5.07z"},child:[]}]})(e)}function $4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"},child:[]}]})(e)}function F4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.59 7.41 15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"},child:[]}]})(e)}function B4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"},child:[]}]})(e)}function R4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},child:[]}]})(e)}function P4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m18 3-3 3V3H9C6.24 3 4 5.24 4 8h5v3h6V8l3 3h2V3h-2zM9 13v7c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-7H9z"},child:[]}]})(e)}function z4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"},child:[]}]})(e)}function I4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm3.3 14.71L11 12.41V7h2v4.59l3.71 3.71-1.42 1.41z"},child:[]}]})(e)}function kp(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5z"},child:[]}]})(e)}function L4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0zm0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m17 16-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"},child:[]}]})(e)}function q4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M2.81 2.81 1.39 4.22l2.27 2.27A9.91 9.91 0 0 0 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.42L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 0-1.48.41-2.86 1.12-4.06l10.93 10.94A7.869 7.869 0 0 1 12 20zM12 4c4.41 0 8 3.59 8 8 0 1.48-.41 2.86-1.12 4.05l1.45 1.45A9.782 9.782 0 0 0 22 12c0-5.52-4.48-10-10-10-2.04 0-3.93.61-5.51 1.66l1.45 1.45C9.14 4.41 10.52 4 12 4z"},child:[]}]})(e)}function k4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m2.88 7.88 1.54 1.54C4.15 10.23 4 11.1 4 12c0 4.41 3.59 8 8 8s8-3.59 8-8-3.59-8-8-8c-.9 0-1.77.15-2.58.42L7.89 2.89C9.15 2.32 10.54 2 12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12c0-1.47.32-2.86.88-4.12zM7 5.5C7 6.33 6.33 7 5.5 7S4 6.33 4 5.5 4.67 4 5.5 4 7 4.67 7 5.5z"},child:[]}]})(e)}function U4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"},child:[]}]})(e)}function Up(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"},child:[]}]})(e)}function H4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M156,40a12,12,0,0,1-12,12H112a12,12,0,0,1,0-24h32A12,12,0,0,1,156,40ZM144,204H112a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24ZM204,52V72a12,12,0,0,0,24,0V48a20,20,0,0,0-20-20H184a12,12,0,0,0,0,24Zm12,48a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V112A12,12,0,0,0,216,100ZM40,156a12,12,0,0,0,12-12V112a12,12,0,0,0-24,0v32A12,12,0,0,0,40,156Zm32,48H52V184a12,12,0,0,0-24,0v24a20,20,0,0,0,20,20H72a12,12,0,0,0,0-24ZM72,28H48A20,20,0,0,0,28,48V72a12,12,0,0,0,24,0V52H72a12,12,0,0,0,0-24ZM240,204H228V192a12,12,0,0,0-24,0v12H192a12,12,0,0,0,0,24h12v12a12,12,0,0,0,24,0V228h12a12,12,0,0,0,0-24Z"},child:[]}]})(e)}function j4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"},child:[]}]})(e)}function V4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"},child:[]}]})(e)}function G4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"},child:[]}]})(e)}function W4(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9.95401 2.2106C11.2876 1.93144 12.6807 1.92263 14.0449 2.20785C14.2219 3.3674 14.9048 4.43892 15.9997 5.07103C17.0945 5.70313 18.364 5.75884 19.4566 5.3323C20.3858 6.37118 21.0747 7.58203 21.4997 8.87652C20.5852 9.60958 19.9997 10.736 19.9997 11.9992C19.9997 13.2632 20.5859 14.3902 21.5013 15.1232C21.29 15.7636 21.0104 16.3922 20.6599 16.9992C20.3094 17.6063 19.9049 18.1627 19.4559 18.6659C18.3634 18.2396 17.0943 18.2955 15.9997 18.9274C14.9057 19.559 14.223 20.6294 14.0453 21.7879C12.7118 22.067 11.3187 22.0758 9.95443 21.7906C9.77748 20.6311 9.09451 19.5595 7.99967 18.9274C6.90484 18.2953 5.63539 18.2396 4.54272 18.6662C3.61357 17.6273 2.92466 16.4164 2.49964 15.1219C3.41412 14.3889 3.99968 13.2624 3.99968 11.9992C3.99968 10.7353 3.41344 9.60827 2.49805 8.87524C2.70933 8.23482 2.98894 7.60629 3.33942 6.99923C3.68991 6.39217 4.09443 5.83576 4.54341 5.33257C5.63593 5.75881 6.90507 5.703 7.99967 5.07103C9.09364 4.43942 9.7764 3.3691 9.95401 2.2106ZM11.9997 14.9992C13.6565 14.9992 14.9997 13.6561 14.9997 11.9992C14.9997 10.3424 13.6565 8.99923 11.9997 8.99923C10.3428 8.99923 8.99967 10.3424 8.99967 11.9992C8.99967 13.6561 10.3428 14.9992 11.9997 14.9992Z"},child:[]}]})(e)}function Z4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M6.5459 12.0003L12.001 6.545l5.4541 5.4552-5.4541 5.454zm16.9763-1.154L13.158.48a1.635 1.635 0 00-2.314 0L.4778 10.8462a1.629 1.629 0 000 2.305L10.848 23.5226a1.629 1.629 0 002.304 0l10.3702-10.3712a1.629 1.629 0 000-2.305zM12 20.7263l-8.7272-8.7281L12 3.27l8.7272 8.7282z"},child:[]}]})(e)}function Y4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"},child:[]}]})(e)}function X4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z"},child:[]}]})(e)}function K4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},child:[]}]})(e)}function J4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(e)}function Q4(e){return Ce({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z"},child:[]}]})(e)}function e5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 10a2 2 0 0 1 1.678 .911l.053 .089h7.269l.117 .007a1 1 0 0 1 .883 .993c0 5.523 -4.477 10 -10 10a1 1 0 0 1 -1 -1v-7.269l-.089 -.053a2 2 0 0 1 -.906 -1.529l-.005 -.149a2 2 0 0 1 2 -2m9.428 -1.334a1 1 0 0 1 -1.884 .668a8 8 0 1 0 -10.207 10.218a1 1 0 0 1 -.666 1.886a10 10 0 1 1 12.757 -12.772m-4.628 -.266a1 1 0 0 1 -1.6 1.2a4 4 0 1 0 -5.6 5.6a1 1 0 0 1 -1.2 1.6a6 6 0 1 1 8.4 -8.4"},child:[]}]})(e)}function r5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 13l-6 6"},child:[]},{tag:"path",attr:{d:"M6 13l6 6"},child:[]}]})(e)}function t5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M5 12l6 6"},child:[]},{tag:"path",attr:{d:"M5 12l6 -6"},child:[]}]})(e)}function n5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M13 18l6 -6"},child:[]},{tag:"path",attr:{d:"M13 6l6 6"},child:[]}]})(e)}function a5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 11l-6 -6"},child:[]},{tag:"path",attr:{d:"M6 11l6 -6"},child:[]}]})(e)}function i5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"},child:[]},{tag:"path",attr:{d:"M15.9 20.11l0 .01"},child:[]},{tag:"path",attr:{d:"M19.04 17.61l0 .01"},child:[]},{tag:"path",attr:{d:"M20.77 14l0 .01"},child:[]},{tag:"path",attr:{d:"M20.77 10l0 .01"},child:[]},{tag:"path",attr:{d:"M19.04 6.39l0 .01"},child:[]},{tag:"path",attr:{d:"M15.9 3.89l0 .01"},child:[]},{tag:"path",attr:{d:"M12 3l0 .01"},child:[]},{tag:"path",attr:{d:"M8.1 3.89l0 .01"},child:[]},{tag:"path",attr:{d:"M4.96 6.39l0 .01"},child:[]},{tag:"path",attr:{d:"M3.23 10l0 .01"},child:[]},{tag:"path",attr:{d:"M3.23 14l0 .01"},child:[]},{tag:"path",attr:{d:"M4.96 17.61l0 .01"},child:[]},{tag:"path",attr:{d:"M8.1 20.11l0 .01"},child:[]},{tag:"path",attr:{d:"M12 21l0 .01"},child:[]}]})(e)}function o5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 16l-4 4"},child:[]},{tag:"path",attr:{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"},child:[]},{tag:"path",attr:{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"},child:[]},{tag:"path",attr:{d:"M3 21l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M18.5 5.5l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M10 11l-2 2"},child:[]},{tag:"path",attr:{d:"M13 14l-2 2"},child:[]},{tag:"path",attr:{d:"M16 16l4 4"},child:[]}]})(e)}function s5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5z"},child:[]},{tag:"path",attr:{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5z"},child:[]},{tag:"path",attr:{d:"M3 21l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M18.5 5.5l2.5 -2.5"},child:[]},{tag:"path",attr:{d:"M10 11l-2 2"},child:[]},{tag:"path",attr:{d:"M13 14l-2 2"},child:[]}]})(e)}function u5(e){return Ce({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 4c-2.5 5 -2.5 10 0 16m14 -16c2.5 5 2.5 10 0 16m-10 -11h1c1 0 1 1 2.016 3.527c.984 2.473 .984 3.473 1.984 3.473h1"},child:[]},{tag:"path",attr:{d:"M8 16c1.5 0 3 -2 4 -3.5s2.5 -3.5 4 -3.5"},child:[]}]})(e)}const l5=e=>Nt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 78 51",...e,className:Ec(e.className,"logo"),stroke:"currentColor",fill:"currentColor",children:[Nt.jsx("g",{clipPath:"url(#clip0_327_656)",children:Nt.jsx("path",{d:"M17.3026 17.0048V51.0427H0V17.0048H17.3026ZM34.6051 -0.0140575C36.8587 -0.0327593 39.0939 0.392621 41.1831 1.23779C43.2723 2.08297 45.1746 3.33138 46.7813 4.91175C48.388 6.49211 49.6677 8.37348 50.5473 10.4484C51.4269 12.5234 51.8891 14.7512 51.9077 17.0048V51.0427H34.6051V17.0048H17.3026V-0.0140575H34.6051ZM77.8615 -0.0140575V51.0427C75.6074 51.0632 73.3714 50.6391 71.2813 49.7946C69.1913 48.9501 67.2883 47.7018 65.6812 46.1211C64.0741 44.5403 62.7945 42.6582 61.9156 40.5824C61.0366 38.5066 60.5756 36.2779 60.559 34.0238V-0.0140575H77.8615Z",fill:"#03B584"})}),Nt.jsx("defs",{children:Nt.jsx("clipPath",{id:"clip0_327_656",children:Nt.jsx("rect",{width:"77.8615",height:"51",fill:"white"})})})]}),c5=({className:e,style:r,...t})=>Nt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",className:Ec(e,"logo"),...t,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 512 325.74567",style:{transform:"scale(1.25)",...r},children:Nt.jsx("g",{transform:"translate(-151.28831,-121.30134)",id:"layer1",children:Nt.jsxs("g",{transform:"matrix(2.7387317,0,0,2.7387317,-938.60269,-766.86241)",id:"g3606",children:[Nt.jsx("path",{d:"m 405.36669,375.73826 c 4.0225,-3.7175 9.16125,-7.18625 15.20125,-10.32375 -0.74875,-2.4425 -1.085,-5.12 -1.085,-7.64375 0,-7.5075 2.73,-16.49375 11.71625,-16.49375 8.5125,0 11.5125,8.06125 11.80625,15.2925 10.53625,-3.17125 22.36875,-5.64 35.15375,-7.165 2.115,-6.09125 6.77375,-8.1275 10.68125,-8.1275 4.88875,0 7.94625,2.72625 9.6675,6.4675 3.5775,-0.1425 7.2475,-0.15875 10.915,-0.15875 9.17001,0 18.09501,0.40125 26.64001,1.25875 1.5525,-4.33625 4.76,-7.5675 11.15875,-7.5675 4.89125,0 9.32875,3.52625 9.4425,8.53125 l 18.76875,0 c -1.36625,-15.585 -14.4475,-23.32 -29.12125,-23.32 -14.0825,0 -24.29,7.3775 -28.6275,18.84125 -3.36625,-10.705 -11.15626,-18.84125 -24.40876,-18.84125 -6.825,0 -12.51125,2.95875 -16.265,8.5325 l -0.2275,0 0,-6.82625 -18.4275,0 0,13.57625 c -5.16625,-9.26625 -14.9475,-15.2825 -27.15625,-15.2825 -18.3125,0 -31.05375,13.5375 -31.05375,31.2825 0,6.79375 1.89,12.95125 5.22125,17.9675",id:"path3299",fillRule:"nonzero",fillOpacity:1}),Nt.jsx("path",{d:"m 426.05169,372.92451 c 1.42625,0.78 3.13,1.2275 5.1475,1.2275 6.175,0 9.45875,-4.1875 10.9025,-9.24375 10.05,-4.0125 21.88125,-7.235 34.94875,-9.4375 -0.0275,0.5225 -0.04,1.06125 -0.04,1.6175 0,10.3525 2.9575,17.06375 11.71625,17.06375 8.645,0 11.6025,-8.98625 11.6025,-17.06375 0,-1.42875 -0.0937,-2.88625 -0.32,-4.31 5.86,-0.40625 11.865,-0.61625 18.00001,-0.61625 5.82375,0 11.54375,0.19125 17.1225,0.5575 -0.30875,1.95125 -0.4225,3.98625 -0.4225,5.9625 0,7.62125 3.3,15.47 11.48875,15.47 6.7125,0 10.125,-3.8675 11.03375,-10.12375 l 18.76875,0 c -1.705,15.81125 -13.99125,24.9125 -29.68875,24.9125 -13.22625,0 -23.925,-6.76375 -28.51625,-17.6975 -3.2875,10.0525 -10.92501,17.6975 -23.04001,17.6975 -7.28,0 -12.85375,-2.73125 -16.83625,-8.0775 l -0.2275,0 0,28.92 -19.33625,0 0,-36.04 c -5.16625,9.2325 -14.9475,15.1975 -27.15625,15.1975 -6.8475,0 -12.8975,-1.8775 -17.8125,-5.155 3.10875,-3.875 7.38125,-7.51875 12.665,-10.86125",id:"path3301",fillOpacity:1,fillRule:"nonzero"}),Nt.jsx("path",{d:"m 582.7117,362.38451 c -19.015,-7.0775 -43.9375,-11.36875 -71.22126,-11.36875 -59.675,0 -108.05,20.525 -108.05,45.84375 0,21.07875 33.53,38.83125 79.19375,44.1875 -41.985,-6.12625 -72.15125,-22.9375 -72.15125,-42.7175 0,-24.96 48.005,-45.19375 107.22251,-45.19375 24.4475,0 46.97,3.4425 65.00625,9.24875",id:"path3303",fillOpacity:1,fillRule:"nonzero"})]})})}),be=(e,r,{className:t}={})=>{const n=a=>Nt.jsx(e,{...a,className:Ec(a.className,`synnax-icon-${r}`,t,"synnax-icon")});return n.displayName=e.displayName||e.name,n},qo={Linux:q3,MacOS:I3,Windows:vg,Docker:L3},Lt={Pause:be(i4,"pause"),Play:be(o4,"play"),Circle:be(a4,"circle"),Edit:be(R4,"edit"),EditOff:be(e4,"edit-off"),Add:be(Z3,"add"),Subtract:be($3,"subtract"),Copy:be(J3,"copy"),Close:be(T3,"close"),Info:be(A3,"info"),Warning:be(C3,"warning"),Check:be(M3,"check"),Refresh:be(X3,"refresh"),Delete:be(E3,"delete"),Time:be(Q3,"time"),Acquire:be(Ip,"acquire"),Analyze:be(k3,"analyze"),Concepts:be(P3,"concepts"),Visualize:be(qp,"visualize"),LinePlot:be(qp,"line-plot"),Expand:be(O3,"expand"),Cluster:be(Y3,"cluster"),Loading:be(_3,"loading",{className:"media--spin"}),Schematic:be(Ip,"schematic"),Caret:{Right:be(G4,"caret-right"),Left:be(V4,"caret-left"),Up:be(U4,"caret-up"),Down:be(j4,"caret-down")},Settings:be(W4,"settings"),Reference:be(K3,"reference"),Bolt:be(W3,"bolt"),Download:be(G3,"download"),Range:be(I4,"range"),Node:be(L4,"node"),Channel:be(n4,"channel"),Resources:be(zp,"resources"),Group:be(zp,"group"),Workspace:be(x4,"workspace"),OS:{Linux:be(qo.Linux,"os-linux"),MacOS:be(qo.MacOS,"os-macos"),Windows:be(qo.Windows,"os-windows"),Docker:be(qo.Docker,"os-docker")},Box:be(N3,"box"),Python:be(K4,"python"),TypeScript:be(J4,"typescript"),NPM:be(Y4,"npm"),PNPM:be(X4,"pnpm"),Yarn:be(Q4,"yarn"),QuestionMark:be(t4,"question-mark"),Menu:be(U3,"menu"),Logo:{Github:be(S3,"logo-github"),LinkedIn:be(D3,"logo-linkedin"),NI:be(l5,"logo-ni"),OPC:be(c5,"logo-opc")},Arrow:{Right:be(n5,"arrow-right"),Down:be(r5,"arrow-down"),Up:be(a5,"arrow-up"),Left:be(t5,"arrow-left")},Keyboard:{Command:be(M4,"keyboard-command"),Windows:be(vg,"keyboard-windows"),Tab:be(F4,"keyboard-tab"),Return:be($4,"keyboard-return"),Backspace:be(C4,"keyboard-backspace"),Capslock:be(N4,"keyboard-capslock"),Hide:be(O4,"keyboard-hide"),Control:be(T4,"keyboard-control"),Arrow:{Up:be(D4,"keyboard-arrow-up"),Down:be(E4,"keyboard-arrow-down"),Left:be(S4,"keyboard-arrow-left"),Right:be(A4,"keyboard-arrow-right")},Alt:be(w4,"keyboard-alt"),Option:be(_4,"keyboard-option"),Shift:be(z3,"keyboard-shift")},Tooltip:be(s4,"tooltip"),Annotate:be(Lp,"annotate"),Zoom:be(Up,"zoom"),Selection:be(H4,"selection"),Pan:be(V3,"pan"),Rule:be(c4,"rule"),User:be(z4,"user"),Rename:be(R3,"rename"),Snapshot:be(r4,"snapshot"),Sync:be(F3,"sync"),Search:be(Up,"search"),Auto:be(B4,"auto"),Table:be(kp,"table"),Align:{Right:be(d4,"align-right"),Left:be(p4,"align-left"),XCenter:be(f4,"align-x-center"),YCenter:be(m4,"align-y-center"),Top:be(h4,"align-top"),Bottom:be(v4,"align-bottom")},Connect:be(s5,"connect"),Disconnect:be(o5,"disconnect"),Hardware:be(P4,"hardware"),Save:be(l4,"save"),Task:be(e5,"task"),Device:be(Z4,"device"),Link:be(u4,"link"),Attachment:be(H3,"attachment"),Drag:be(j3,"drag"),Dynamic:be(i5,"dynamic"),Enable:be(k4,"enable"),Disable:be(q4,"disable"),Variable:be(u5,"variable"),Object:be(y4,"object"),Type:be(b4,"type"),Array:be(g4,"array"),Label:be(Lp,"label"),Details:be(kp,"details"),LinkExternal:be(B3,"link-external")},Bl=e=>{if(e==null)return{x:void 0,y:void 0};const r=V.k$1.safeParse(e);if(r.success)return r.data;const t=V.c.safeParse(e);return t.success?V.t(t.data)==="x"?{x:t.data,y:void 0}:{x:void 0,y:t.data}:e},f5=({container:e,target:r,dialog:t,initial:n,prefer:a,alignments:i=["start"],disable:o=[]})=>{const s=Bl(n);let u=V.M;if(a!=null){const m=a.map(y=>Bl(y));u=u.slice().sort((y,g)=>{const E=m.findIndex(w=>V.B(y,w)),h=m.findIndex(w=>V.B(g,w));return E>-1&&h>-1?E-h:E>-1?-1:h>-1?1:0})}const l=u.filter(m=>!V.$(m,V.y)&&(s.x==null||m.x===s.x)&&(s.y==null||m.y===s.y)&&!o.some(y=>V.B(m,y))).map(m=>i==null?void 0:i.map(y=>[m,y])).flat(),c=V.c$1(e),f=V.c$1(r),p=V.c$1(t);let d=-1/0;const v={location:V.y,adjustedDialog:p};return l.forEach(([m,y])=>{const[g,E]=p5({option:m,alignment:y,container:c,target:f,dialog:p});E>d&&(d=E,v.location=m,v.adjustedDialog=g)}),v},p5=({option:e,alignment:r,container:t,target:n,dialog:a})=>{const i=mg(e,r),o=V.g$1(n,e),s=V.po(o.x,o.y,V.u$1(a),V.l(a),i,V.T$1),u=V.fo(V.wo(s,t));return[s,u]},d5={start:"left",center:"center",end:"right"},v5={start:"bottom",center:"center",end:"top"},mg=(e,r)=>{const t={x:"center",y:"center"};if(e.y!=="center"){t.y=V.A(e.y);const n=e.x==="left"?V.A:a=>a;t.x=n(d5[r])}else t.x=V.A(e.x),t.y=v5[r];return t},Sc=Object.freeze(Object.defineProperty({__proto__:null,dialog:f5,getRoot:mg,parseLocationOptions:Bl},Symbol.toStringTag,{value:"Module"}));var Pt={},co={},m5=typeof ye.commonjsGlobal=="object"&&ye.commonjsGlobal&&ye.commonjsGlobal.Object===Object&&ye.commonjsGlobal,hg=m5,h5=hg,g5=typeof self=="object"&&self&&self.Object===Object&&self,y5=h5||g5||Function("return this")(),ln=y5,b5=ln,x5=b5.Symbol,fo=x5,Hp=fo,gg=Object.prototype,w5=gg.hasOwnProperty,E5=gg.toString,Ui=Hp?Hp.toStringTag:void 0;function S5(e){var r=w5.call(e,Ui),t=e[Ui];try{e[Ui]=void 0;var n=!0}catch{}var a=E5.call(e);return n&&(r?e[Ui]=t:delete e[Ui]),a}var A5=S5,D5=Object.prototype,C5=D5.toString;function N5(e){return C5.call(e)}var M5=N5,jp=fo,T5=A5,O5=M5,_5="[object Null]",$5="[object Undefined]",Vp=jp?jp.toStringTag:void 0;function F5(e){return e==null?e===void 0?$5:_5:Vp&&Vp in Object(e)?T5(e):O5(e)}var sa=F5,B5=Array.isArray,Jt=B5;function R5(e){return e!=null&&typeof e=="object"}var Dn=R5,P5=sa,z5=Jt,I5=Dn,L5="[object String]";function q5(e){return typeof e=="string"||!z5(e)&&I5(e)&&P5(e)==L5}var k5=q5;function U5(e){return function(r,t,n){for(var a=-1,i=Object(r),o=n(r),s=o.length;s--;){var u=o[e?s:++a];if(t(i[u],u,i)===!1)break}return r}}var H5=U5,j5=H5,V5=j5(),G5=V5;function W5(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Z5=W5,Y5=sa,X5=Dn,K5="[object Arguments]";function J5(e){return X5(e)&&Y5(e)==K5}var Q5=J5,Gp=Q5,eE=Dn,yg=Object.prototype,rE=yg.hasOwnProperty,tE=yg.propertyIsEnumerable,nE=Gp(function(){return arguments}())?Gp:function(e){return eE(e)&&rE.call(e,"callee")&&!tE.call(e,"callee")},bg=nE,gs={exports:{}};function aE(){return!1}var iE=aE;gs.exports;(function(e,r){var t=ln,n=iE,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?t.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||n;e.exports=l})(gs,gs.exports);var Ac=gs.exports,oE=9007199254740991,sE=/^(?:0|[1-9]\d*)$/;function uE(e,r){var t=typeof e;return r=r??oE,!!r&&(t=="number"||t!="symbol"&&sE.test(e))&&e>-1&&e%1==0&&e<r}var xg=uE,lE=9007199254740991;function cE(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lE}var Dc=cE,fE=sa,pE=Dc,dE=Dn,vE="[object Arguments]",mE="[object Array]",hE="[object Boolean]",gE="[object Date]",yE="[object Error]",bE="[object Function]",xE="[object Map]",wE="[object Number]",EE="[object Object]",SE="[object RegExp]",AE="[object Set]",DE="[object String]",CE="[object WeakMap]",NE="[object ArrayBuffer]",ME="[object DataView]",TE="[object Float32Array]",OE="[object Float64Array]",_E="[object Int8Array]",$E="[object Int16Array]",FE="[object Int32Array]",BE="[object Uint8Array]",RE="[object Uint8ClampedArray]",PE="[object Uint16Array]",zE="[object Uint32Array]",$r={};$r[TE]=$r[OE]=$r[_E]=$r[$E]=$r[FE]=$r[BE]=$r[RE]=$r[PE]=$r[zE]=!0;$r[vE]=$r[mE]=$r[NE]=$r[hE]=$r[ME]=$r[gE]=$r[yE]=$r[bE]=$r[xE]=$r[wE]=$r[EE]=$r[SE]=$r[AE]=$r[DE]=$r[CE]=!1;function IE(e){return dE(e)&&pE(e.length)&&!!$r[fE(e)]}var LE=IE;function qE(e){return function(r){return e(r)}}var Cc=qE,ys={exports:{}};ys.exports;(function(e,r){var t=hg,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&t.process,s=function(){try{var u=a&&a.require&&a.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(ys,ys.exports);var Nc=ys.exports,kE=LE,UE=Cc,Wp=Nc,Zp=Wp&&Wp.isTypedArray,HE=Zp?UE(Zp):kE,wg=HE,jE=Z5,VE=bg,GE=Jt,WE=Ac,ZE=xg,YE=wg,XE=Object.prototype,KE=XE.hasOwnProperty;function JE(e,r){var t=GE(e),n=!t&&VE(e),a=!t&&!n&&WE(e),i=!t&&!n&&!a&&YE(e),o=t||n||a||i,s=o?jE(e.length,String):[],u=s.length;for(var l in e)(r||KE.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ZE(l,u)))&&s.push(l);return s}var Eg=JE,QE=Object.prototype;function eS(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||QE;return e===t}var Mc=eS;function rS(e,r){return function(t){return e(r(t))}}var Sg=rS,tS=Sg,nS=tS(Object.keys,Object),aS=nS,iS=Mc,oS=aS,sS=Object.prototype,uS=sS.hasOwnProperty;function lS(e){if(!iS(e))return oS(e);var r=[];for(var t in Object(e))uS.call(e,t)&&t!="constructor"&&r.push(t);return r}var cS=lS;function fS(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var fi=fS,pS=sa,dS=fi,vS="[object AsyncFunction]",mS="[object Function]",hS="[object GeneratorFunction]",gS="[object Proxy]";function yS(e){if(!dS(e))return!1;var r=pS(e);return r==mS||r==hS||r==vS||r==gS}var Ag=yS,bS=Ag,xS=Dc;function wS(e){return e!=null&&xS(e.length)&&!bS(e)}var Qs=wS,ES=Eg,SS=cS,AS=Qs;function DS(e){return AS(e)?ES(e):SS(e)}var po=DS,CS=G5,NS=po;function MS(e,r){return e&&CS(e,r,NS)}var Dg=MS;function TS(e){return e}var Cg=TS,OS=Cg;function _S(e){return typeof e=="function"?e:OS}var $S=_S,FS=Dg,BS=$S;function RS(e,r){return e&&FS(e,BS(r))}var Tc=RS,PS=Sg,zS=PS(Object.getPrototypeOf,Object),Oc=zS,IS=sa,LS=Oc,qS=Dn,kS="[object Object]",US=Function.prototype,HS=Object.prototype,Ng=US.toString,jS=HS.hasOwnProperty,VS=Ng.call(Object);function GS(e){if(!qS(e)||IS(e)!=kS)return!1;var r=LS(e);if(r===null)return!0;var t=jS.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ng.call(t)==VS}var WS=GS;function ZS(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var Mg=ZS;function YS(){this.__data__=[],this.size=0}var XS=YS;function KS(e,r){return e===r||e!==e&&r!==r}var _c=KS,JS=_c;function QS(e,r){for(var t=e.length;t--;)if(JS(e[t][0],r))return t;return-1}var eu=QS,eA=eu,rA=Array.prototype,tA=rA.splice;function nA(e){var r=this.__data__,t=eA(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():tA.call(r,t,1),--this.size,!0}var aA=nA,iA=eu;function oA(e){var r=this.__data__,t=iA(r,e);return t<0?void 0:r[t][1]}var sA=oA,uA=eu;function lA(e){return uA(this.__data__,e)>-1}var cA=lA,fA=eu;function pA(e,r){var t=this.__data__,n=fA(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var dA=pA,vA=XS,mA=aA,hA=sA,gA=cA,yA=dA;function pi(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}pi.prototype.clear=vA;pi.prototype.delete=mA;pi.prototype.get=hA;pi.prototype.has=gA;pi.prototype.set=yA;var ru=pi,bA=ru;function xA(){this.__data__=new bA,this.size=0}var wA=xA;function EA(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var SA=EA;function AA(e){return this.__data__.get(e)}var DA=AA;function CA(e){return this.__data__.has(e)}var NA=CA,MA=ln,TA=MA["__core-js_shared__"],OA=TA,rl=OA,Yp=function(){var e=/[^.]+$/.exec(rl&&rl.keys&&rl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _A(e){return!!Yp&&Yp in e}var $A=_A,FA=Function.prototype,BA=FA.toString;function RA(e){if(e!=null){try{return BA.call(e)}catch{}try{return e+""}catch{}}return""}var Tg=RA,PA=Ag,zA=$A,IA=fi,LA=Tg,qA=/[\\^$.*+?()[\]{}|]/g,kA=/^\[object .+?Constructor\]$/,UA=Function.prototype,HA=Object.prototype,jA=UA.toString,VA=HA.hasOwnProperty,GA=RegExp("^"+jA.call(VA).replace(qA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function WA(e){if(!IA(e)||zA(e))return!1;var r=PA(e)?GA:kA;return r.test(LA(e))}var ZA=WA;function YA(e,r){return e==null?void 0:e[r]}var XA=YA,KA=ZA,JA=XA;function QA(e,r){var t=JA(e,r);return KA(t)?t:void 0}var ua=QA,eD=ua,rD=ln,tD=eD(rD,"Map"),$c=tD,nD=ua,aD=nD(Object,"create"),tu=aD,Xp=tu;function iD(){this.__data__=Xp?Xp(null):{},this.size=0}var oD=iD;function sD(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var uD=sD,lD=tu,cD="__lodash_hash_undefined__",fD=Object.prototype,pD=fD.hasOwnProperty;function dD(e){var r=this.__data__;if(lD){var t=r[e];return t===cD?void 0:t}return pD.call(r,e)?r[e]:void 0}var vD=dD,mD=tu,hD=Object.prototype,gD=hD.hasOwnProperty;function yD(e){var r=this.__data__;return mD?r[e]!==void 0:gD.call(r,e)}var bD=yD,xD=tu,wD="__lodash_hash_undefined__";function ED(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=xD&&r===void 0?wD:r,this}var SD=ED,AD=oD,DD=uD,CD=vD,ND=bD,MD=SD;function di(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}di.prototype.clear=AD;di.prototype.delete=DD;di.prototype.get=CD;di.prototype.has=ND;di.prototype.set=MD;var TD=di,Kp=TD,OD=ru,_D=$c;function $D(){this.size=0,this.__data__={hash:new Kp,map:new(_D||OD),string:new Kp}}var FD=$D;function BD(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var RD=BD,PD=RD;function zD(e,r){var t=e.__data__;return PD(r)?t[typeof r=="string"?"string":"hash"]:t.map}var nu=zD,ID=nu;function LD(e){var r=ID(this,e).delete(e);return this.size-=r?1:0,r}var qD=LD,kD=nu;function UD(e){return kD(this,e).get(e)}var HD=UD,jD=nu;function VD(e){return jD(this,e).has(e)}var GD=VD,WD=nu;function ZD(e,r){var t=WD(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var YD=ZD,XD=FD,KD=qD,JD=HD,QD=GD,eC=YD;function vi(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}vi.prototype.clear=XD;vi.prototype.delete=KD;vi.prototype.get=JD;vi.prototype.has=QD;vi.prototype.set=eC;var Fc=vi,rC=ru,tC=$c,nC=Fc,aC=200;function iC(e,r){var t=this.__data__;if(t instanceof rC){var n=t.__data__;if(!tC||n.length<aC-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new nC(n)}return t.set(e,r),this.size=t.size,this}var oC=iC,sC=ru,uC=wA,lC=SA,cC=DA,fC=NA,pC=oC;function mi(e){var r=this.__data__=new sC(e);this.size=r.size}mi.prototype.clear=uC;mi.prototype.delete=lC;mi.prototype.get=cC;mi.prototype.has=fC;mi.prototype.set=pC;var Bc=mi,dC="__lodash_hash_undefined__";function vC(e){return this.__data__.set(e,dC),this}var mC=vC;function hC(e){return this.__data__.has(e)}var gC=hC,yC=Fc,bC=mC,xC=gC;function bs(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new yC;++r<t;)this.add(e[r])}bs.prototype.add=bs.prototype.push=bC;bs.prototype.has=xC;var wC=bs;function EC(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var SC=EC;function AC(e,r){return e.has(r)}var DC=AC,CC=wC,NC=SC,MC=DC,TC=1,OC=2;function _C(e,r,t,n,a,i){var o=t&TC,s=e.length,u=r.length;if(s!=u&&!(o&&u>s))return!1;var l=i.get(e),c=i.get(r);if(l&&c)return l==r&&c==e;var f=-1,p=!0,d=t&OC?new CC:void 0;for(i.set(e,r),i.set(r,e);++f<s;){var v=e[f],m=r[f];if(n)var y=o?n(m,v,f,r,e,i):n(v,m,f,e,r,i);if(y!==void 0){if(y)continue;p=!1;break}if(d){if(!NC(r,function(g,E){if(!MC(d,E)&&(v===g||a(v,g,t,n,i)))return d.push(E)})){p=!1;break}}else if(!(v===m||a(v,m,t,n,i))){p=!1;break}}return i.delete(e),i.delete(r),p}var Og=_C,$C=ln,FC=$C.Uint8Array,_g=FC;function BC(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var RC=BC;function PC(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var zC=PC,Jp=fo,Qp=_g,IC=_c,LC=Og,qC=RC,kC=zC,UC=1,HC=2,jC="[object Boolean]",VC="[object Date]",GC="[object Error]",WC="[object Map]",ZC="[object Number]",YC="[object RegExp]",XC="[object Set]",KC="[object String]",JC="[object Symbol]",QC="[object ArrayBuffer]",eN="[object DataView]",ed=Jp?Jp.prototype:void 0,tl=ed?ed.valueOf:void 0;function rN(e,r,t,n,a,i,o){switch(t){case eN:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case QC:return!(e.byteLength!=r.byteLength||!i(new Qp(e),new Qp(r)));case jC:case VC:case ZC:return IC(+e,+r);case GC:return e.name==r.name&&e.message==r.message;case YC:case KC:return e==r+"";case WC:var s=qC;case XC:var u=n&UC;if(s||(s=kC),e.size!=r.size&&!u)return!1;var l=o.get(e);if(l)return l==r;n|=HC,o.set(e,r);var c=LC(s(e),s(r),n,a,i,o);return o.delete(e),c;case JC:if(tl)return tl.call(e)==tl.call(r)}return!1}var tN=rN;function nN(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var $g=nN,aN=$g,iN=Jt;function oN(e,r,t){var n=r(e);return iN(e)?n:aN(n,t(e))}var Fg=oN;function sN(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var o=e[t];r(o,t,e)&&(i[a++]=o)}return i}var uN=sN;function lN(){return[]}var Bg=lN,cN=uN,fN=Bg,pN=Object.prototype,dN=pN.propertyIsEnumerable,rd=Object.getOwnPropertySymbols,vN=rd?function(e){return e==null?[]:(e=Object(e),cN(rd(e),function(r){return dN.call(e,r)}))}:fN,Rc=vN,mN=Fg,hN=Rc,gN=po;function yN(e){return mN(e,gN,hN)}var Rg=yN,td=Rg,bN=1,xN=Object.prototype,wN=xN.hasOwnProperty;function EN(e,r,t,n,a,i){var o=t&bN,s=td(e),u=s.length,l=td(r),c=l.length;if(u!=c&&!o)return!1;for(var f=u;f--;){var p=s[f];if(!(o?p in r:wN.call(r,p)))return!1}var d=i.get(e),v=i.get(r);if(d&&v)return d==r&&v==e;var m=!0;i.set(e,r),i.set(r,e);for(var y=o;++f<u;){p=s[f];var g=e[p],E=r[p];if(n)var h=o?n(E,g,p,r,e,i):n(g,E,p,e,r,i);if(!(h===void 0?g===E||a(g,E,t,n,i):h)){m=!1;break}y||(y=p=="constructor")}if(m&&!y){var w=e.constructor,x=r.constructor;w!=x&&"constructor"in e&&"constructor"in r&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(m=!1)}return i.delete(e),i.delete(r),m}var SN=EN,AN=ua,DN=ln,CN=AN(DN,"DataView"),NN=CN,MN=ua,TN=ln,ON=MN(TN,"Promise"),_N=ON,$N=ua,FN=ln,BN=$N(FN,"Set"),RN=BN,PN=ua,zN=ln,IN=PN(zN,"WeakMap"),LN=IN,Rl=NN,Pl=$c,zl=_N,Il=RN,Ll=LN,Pg=sa,hi=Tg,nd="[object Map]",qN="[object Object]",ad="[object Promise]",id="[object Set]",od="[object WeakMap]",sd="[object DataView]",kN=hi(Rl),UN=hi(Pl),HN=hi(zl),jN=hi(Il),VN=hi(Ll),Qn=Pg;(Rl&&Qn(new Rl(new ArrayBuffer(1)))!=sd||Pl&&Qn(new Pl)!=nd||zl&&Qn(zl.resolve())!=ad||Il&&Qn(new Il)!=id||Ll&&Qn(new Ll)!=od)&&(Qn=function(e){var r=Pg(e),t=r==qN?e.constructor:void 0,n=t?hi(t):"";if(n)switch(n){case kN:return sd;case UN:return nd;case HN:return ad;case jN:return id;case VN:return od}return r});var au=Qn,nl=Bc,GN=Og,WN=tN,ZN=SN,ud=au,ld=Jt,cd=Ac,YN=wg,XN=1,fd="[object Arguments]",pd="[object Array]",ko="[object Object]",KN=Object.prototype,dd=KN.hasOwnProperty;function JN(e,r,t,n,a,i){var o=ld(e),s=ld(r),u=o?pd:ud(e),l=s?pd:ud(r);u=u==fd?ko:u,l=l==fd?ko:l;var c=u==ko,f=l==ko,p=u==l;if(p&&cd(e)){if(!cd(r))return!1;o=!0,c=!1}if(p&&!c)return i||(i=new nl),o||YN(e)?GN(e,r,t,n,a,i):WN(e,r,u,t,n,a,i);if(!(t&XN)){var d=c&&dd.call(e,"__wrapped__"),v=f&&dd.call(r,"__wrapped__");if(d||v){var m=d?e.value():e,y=v?r.value():r;return i||(i=new nl),a(m,y,t,n,i)}}return p?(i||(i=new nl),ZN(e,r,t,n,a,i)):!1}var QN=JN,e6=QN,vd=Dn;function zg(e,r,t,n,a){return e===r?!0:e==null||r==null||!vd(e)&&!vd(r)?e!==e&&r!==r:e6(e,r,t,n,zg,a)}var Ig=zg,r6=Bc,t6=Ig,n6=1,a6=2;function i6(e,r,t,n){var a=t.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=t[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=t[a];var u=s[0],l=e[u],c=s[1];if(o&&s[2]){if(l===void 0&&!(u in e))return!1}else{var f=new r6;if(n)var p=n(l,c,u,e,r,f);if(!(p===void 0?t6(c,l,n6|a6,n,f):p))return!1}}return!0}var o6=i6,s6=fi;function u6(e){return e===e&&!s6(e)}var Lg=u6,l6=Lg,c6=po;function f6(e){for(var r=c6(e),t=r.length;t--;){var n=r[t],a=e[n];r[t]=[n,a,l6(a)]}return r}var p6=f6;function d6(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}var qg=d6,v6=o6,m6=p6,h6=qg;function g6(e){var r=m6(e);return r.length==1&&r[0][2]?h6(r[0][0],r[0][1]):function(t){return t===e||v6(t,e,r)}}var y6=g6,b6=sa,x6=Dn,w6="[object Symbol]";function E6(e){return typeof e=="symbol"||x6(e)&&b6(e)==w6}var Pc=E6,S6=Jt,A6=Pc,D6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C6=/^\w*$/;function N6(e,r){if(S6(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||A6(e)?!0:C6.test(e)||!D6.test(e)||r!=null&&e in Object(r)}var zc=N6,kg=Fc,M6="Expected a function";function Ic(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(M6);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(Ic.Cache||kg),t}Ic.Cache=kg;var T6=Ic,O6=T6,_6=500;function $6(e){var r=O6(e,function(n){return t.size===_6&&t.clear(),n}),t=r.cache;return r}var F6=$6,B6=F6,R6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P6=/\\(\\)?/g,z6=B6(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(R6,function(t,n,a,i){r.push(a?i.replace(P6,"$1"):n||t)}),r}),I6=z6,md=fo,L6=Mg,q6=Jt,k6=Pc,U6=1/0,hd=md?md.prototype:void 0,gd=hd?hd.toString:void 0;function Ug(e){if(typeof e=="string")return e;if(q6(e))return L6(e,Ug)+"";if(k6(e))return gd?gd.call(e):"";var r=e+"";return r=="0"&&1/e==-U6?"-0":r}var H6=Ug,j6=H6;function V6(e){return e==null?"":j6(e)}var G6=V6,W6=Jt,Z6=zc,Y6=I6,X6=G6;function K6(e,r){return W6(e)?e:Z6(e,r)?[e]:Y6(X6(e))}var Hg=K6,J6=Pc,Q6=1/0;function e8(e){if(typeof e=="string"||J6(e))return e;var r=e+"";return r=="0"&&1/e==-Q6?"-0":r}var iu=e8,r8=Hg,t8=iu;function n8(e,r){r=r8(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[t8(r[t++])];return t&&t==n?e:void 0}var jg=n8,a8=jg;function i8(e,r,t){var n=e==null?void 0:a8(e,r);return n===void 0?t:n}var o8=i8;function s8(e,r){return e!=null&&r in Object(e)}var u8=s8,l8=Hg,c8=bg,f8=Jt,p8=xg,d8=Dc,v8=iu;function m8(e,r,t){r=l8(r,e);for(var n=-1,a=r.length,i=!1;++n<a;){var o=v8(r[n]);if(!(i=e!=null&&t(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&d8(a)&&p8(o,a)&&(f8(e)||c8(e)))}var h8=m8,g8=u8,y8=h8;function b8(e,r){return e!=null&&y8(e,r,g8)}var x8=b8,w8=Ig,E8=o8,S8=x8,A8=zc,D8=Lg,C8=qg,N8=iu,M8=1,T8=2;function O8(e,r){return A8(e)&&D8(r)?C8(N8(e),r):function(t){var n=E8(t,e);return n===void 0&&n===r?S8(t,e):w8(r,n,M8|T8)}}var _8=O8;function $8(e){return function(r){return r==null?void 0:r[e]}}var F8=$8,B8=jg;function R8(e){return function(r){return B8(r,e)}}var P8=R8,z8=F8,I8=P8,L8=zc,q8=iu;function k8(e){return L8(e)?z8(q8(e)):I8(e)}var U8=k8,H8=y6,j8=_8,V8=Cg,G8=Jt,W8=U8;function Z8(e){return typeof e=="function"?e:e==null?V8:typeof e=="object"?G8(e)?j8(e[0],e[1]):H8(e):W8(e)}var Y8=Z8,X8=Qs;function K8(e,r){return function(t,n){if(t==null)return t;if(!X8(t))return e(t,n);for(var a=t.length,i=r?a:-1,o=Object(t);(r?i--:++i<a)&&n(o[i],i,o)!==!1;);return t}}var J8=K8,Q8=Dg,eM=J8,rM=eM(Q8),tM=rM,nM=tM,aM=Qs;function iM(e,r){var t=-1,n=aM(e)?Array(e.length):[];return nM(e,function(a,i,o){n[++t]=r(a,i,o)}),n}var oM=iM,sM=Mg,uM=Y8,lM=oM,cM=Jt;function fM(e,r){var t=cM(e)?sM:lM;return t(e,uM(r))}var pM=fM;Object.defineProperty(co,"__esModule",{value:!0});co.flattenNames=void 0;var dM=k5,vM=ou(dM),mM=Tc,hM=ou(mM),gM=WS,yM=ou(gM),bM=pM,xM=ou(bM);function ou(e){return e&&e.__esModule?e:{default:e}}var wM=co.flattenNames=function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return(0,xM.default)(r,function(n){Array.isArray(n)?e(n).map(function(a){return t.push(a)}):(0,yM.default)(n)?(0,hM.default)(n,function(a,i){a===!0&&t.push(i),t.push(i+"-"+a)}):(0,vM.default)(n)&&t.push(n)}),t};co.default=wM;var vo={};function EM(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var SM=EM,AM=ua,DM=function(){try{var e=AM(Object,"defineProperty");return e({},"",{}),e}catch{}}(),CM=DM,yd=CM;function NM(e,r,t){r=="__proto__"&&yd?yd(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var Vg=NM,MM=Vg,TM=_c,OM=Object.prototype,_M=OM.hasOwnProperty;function $M(e,r,t){var n=e[r];(!(_M.call(e,r)&&TM(n,t))||t===void 0&&!(r in e))&&MM(e,r,t)}var Gg=$M,FM=Gg,BM=Vg;function RM(e,r,t,n){var a=!t;t||(t={});for(var i=-1,o=r.length;++i<o;){var s=r[i],u=n?n(t[s],e[s],s,t,e):void 0;u===void 0&&(u=e[s]),a?BM(t,s,u):FM(t,s,u)}return t}var su=RM,PM=su,zM=po;function IM(e,r){return e&&PM(r,zM(r),e)}var LM=IM;function qM(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var kM=qM,UM=fi,HM=Mc,jM=kM,VM=Object.prototype,GM=VM.hasOwnProperty;function WM(e){if(!UM(e))return jM(e);var r=HM(e),t=[];for(var n in e)n=="constructor"&&(r||!GM.call(e,n))||t.push(n);return t}var ZM=WM,YM=Eg,XM=ZM,KM=Qs;function JM(e){return KM(e)?YM(e,!0):XM(e)}var Lc=JM,QM=su,e7=Lc;function r7(e,r){return e&&QM(r,e7(r),e)}var t7=r7,xs={exports:{}};xs.exports;(function(e,r){var t=ln,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(l,c){if(c)return l.slice();var f=l.length,p=s?s(f):new l.constructor(f);return l.copy(p),p}e.exports=u})(xs,xs.exports);var n7=xs.exports;function a7(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var i7=a7,o7=su,s7=Rc;function u7(e,r){return o7(e,s7(e),r)}var l7=u7,c7=$g,f7=Oc,p7=Rc,d7=Bg,v7=Object.getOwnPropertySymbols,m7=v7?function(e){for(var r=[];e;)c7(r,p7(e)),e=f7(e);return r}:d7,Wg=m7,h7=su,g7=Wg;function y7(e,r){return h7(e,g7(e),r)}var b7=y7,x7=Fg,w7=Wg,E7=Lc;function S7(e){return x7(e,E7,w7)}var A7=S7,D7=Object.prototype,C7=D7.hasOwnProperty;function N7(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&C7.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var M7=N7,bd=_g;function T7(e){var r=new e.constructor(e.byteLength);return new bd(r).set(new bd(e)),r}var qc=T7,O7=qc;function _7(e,r){var t=r?O7(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var $7=_7,F7=/\w*$/;function B7(e){var r=new e.constructor(e.source,F7.exec(e));return r.lastIndex=e.lastIndex,r}var R7=B7,xd=fo,wd=xd?xd.prototype:void 0,Ed=wd?wd.valueOf:void 0;function P7(e){return Ed?Object(Ed.call(e)):{}}var z7=P7,I7=qc;function L7(e,r){var t=r?I7(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var q7=L7,k7=qc,U7=$7,H7=R7,j7=z7,V7=q7,G7="[object Boolean]",W7="[object Date]",Z7="[object Map]",Y7="[object Number]",X7="[object RegExp]",K7="[object Set]",J7="[object String]",Q7="[object Symbol]",e9="[object ArrayBuffer]",r9="[object DataView]",t9="[object Float32Array]",n9="[object Float64Array]",a9="[object Int8Array]",i9="[object Int16Array]",o9="[object Int32Array]",s9="[object Uint8Array]",u9="[object Uint8ClampedArray]",l9="[object Uint16Array]",c9="[object Uint32Array]";function f9(e,r,t){var n=e.constructor;switch(r){case e9:return k7(e);case G7:case W7:return new n(+e);case r9:return U7(e,t);case t9:case n9:case a9:case i9:case o9:case s9:case u9:case l9:case c9:return V7(e,t);case Z7:return new n;case Y7:case J7:return new n(e);case X7:return H7(e);case K7:return new n;case Q7:return j7(e)}}var p9=f9,d9=fi,Sd=Object.create,v9=function(){function e(){}return function(r){if(!d9(r))return{};if(Sd)return Sd(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),m9=v9,h9=m9,g9=Oc,y9=Mc;function b9(e){return typeof e.constructor=="function"&&!y9(e)?h9(g9(e)):{}}var x9=b9,w9=au,E9=Dn,S9="[object Map]";function A9(e){return E9(e)&&w9(e)==S9}var D9=A9,C9=D9,N9=Cc,Ad=Nc,Dd=Ad&&Ad.isMap,M9=Dd?N9(Dd):C9,T9=M9,O9=au,_9=Dn,$9="[object Set]";function F9(e){return _9(e)&&O9(e)==$9}var B9=F9,R9=B9,P9=Cc,Cd=Nc,Nd=Cd&&Cd.isSet,z9=Nd?P9(Nd):R9,I9=z9,L9=Bc,q9=SM,k9=Gg,U9=LM,H9=t7,j9=n7,V9=i7,G9=l7,W9=b7,Z9=Rg,Y9=A7,X9=au,K9=M7,J9=p9,Q9=x9,eT=Jt,rT=Ac,tT=T9,nT=fi,aT=I9,iT=po,oT=Lc,sT=1,uT=2,lT=4,Zg="[object Arguments]",cT="[object Array]",fT="[object Boolean]",pT="[object Date]",dT="[object Error]",Yg="[object Function]",vT="[object GeneratorFunction]",mT="[object Map]",hT="[object Number]",Xg="[object Object]",gT="[object RegExp]",yT="[object Set]",bT="[object String]",xT="[object Symbol]",wT="[object WeakMap]",ET="[object ArrayBuffer]",ST="[object DataView]",AT="[object Float32Array]",DT="[object Float64Array]",CT="[object Int8Array]",NT="[object Int16Array]",MT="[object Int32Array]",TT="[object Uint8Array]",OT="[object Uint8ClampedArray]",_T="[object Uint16Array]",$T="[object Uint32Array]",Or={};Or[Zg]=Or[cT]=Or[ET]=Or[ST]=Or[fT]=Or[pT]=Or[AT]=Or[DT]=Or[CT]=Or[NT]=Or[MT]=Or[mT]=Or[hT]=Or[Xg]=Or[gT]=Or[yT]=Or[bT]=Or[xT]=Or[TT]=Or[OT]=Or[_T]=Or[$T]=!0;Or[dT]=Or[Yg]=Or[wT]=!1;function ps(e,r,t,n,a,i){var o,s=r&sT,u=r&uT,l=r&lT;if(t&&(o=a?t(e,n,a,i):t(e)),o!==void 0)return o;if(!nT(e))return e;var c=eT(e);if(c){if(o=K9(e),!s)return V9(e,o)}else{var f=X9(e),p=f==Yg||f==vT;if(rT(e))return j9(e,s);if(f==Xg||f==Zg||p&&!a){if(o=u||p?{}:Q9(e),!s)return u?W9(e,H9(o,e)):G9(e,U9(o,e))}else{if(!Or[f])return a?e:{};o=J9(e,f,s)}}i||(i=new L9);var d=i.get(e);if(d)return d;i.set(e,o),aT(e)?e.forEach(function(y){o.add(ps(y,r,t,y,e,i))}):tT(e)&&e.forEach(function(y,g){o.set(g,ps(y,r,t,g,e,i))});var v=l?u?Y9:Z9:u?oT:iT,m=c?void 0:v(e);return q9(m||e,function(y,g){m&&(g=y,y=e[g]),k9(o,g,ps(y,r,t,g,e,i))}),o}var FT=ps,BT=FT,RT=1,PT=4;function zT(e){return BT(e,RT|PT)}var IT=zT;Object.defineProperty(vo,"__esModule",{value:!0});vo.mergeClasses=void 0;var LT=Tc,qT=Kg(LT),kT=IT,UT=Kg(kT),HT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};function Kg(e){return e&&e.__esModule?e:{default:e}}var jT=vo.mergeClasses=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=r.default&&(0,UT.default)(r.default)||{};return t.map(function(a){var i=r[a];return i&&(0,qT.default)(i,function(o,s){n[s]||(n[s]={}),n[s]=HT({},n[s],i[s])}),a}),n};vo.default=jT;var mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.autoprefix=void 0;var VT=Tc,Md=WT(VT),GT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e};function WT(e){return e&&e.__esModule?e:{default:e}}var ZT={borderRadius:function(r){return{msBorderRadius:r,MozBorderRadius:r,OBorderRadius:r,WebkitBorderRadius:r,borderRadius:r}},boxShadow:function(r){return{msBoxShadow:r,MozBoxShadow:r,OBoxShadow:r,WebkitBoxShadow:r,boxShadow:r}},userSelect:function(r){return{WebkitTouchCallout:r,KhtmlUserSelect:r,MozUserSelect:r,msUserSelect:r,WebkitUserSelect:r,userSelect:r}},flex:function(r){return{WebkitBoxFlex:r,MozBoxFlex:r,WebkitFlex:r,msFlex:r,flex:r}},flexBasis:function(r){return{WebkitFlexBasis:r,flexBasis:r}},justifyContent:function(r){return{WebkitJustifyContent:r,justifyContent:r}},transition:function(r){return{msTransition:r,MozTransition:r,OTransition:r,WebkitTransition:r,transition:r}},transform:function(r){return{msTransform:r,MozTransform:r,OTransform:r,WebkitTransform:r,transform:r}},absolute:function(r){var t=r&&r.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(r,t){var n=t[r];return n||{extend:r}}},YT=mo.autoprefix=function(r){var t={};return(0,Md.default)(r,function(n,a){var i={};(0,Md.default)(n,function(o,s){var u=ZT[s];u?i=GT({},i,u(o)):i[s]=o}),t[a]=i}),t};mo.default=YT;var ho={};Object.defineProperty(ho,"__esModule",{value:!0});ho.hover=void 0;var XT=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},KT=_,al=JT(KT);function JT(e){return e&&e.__esModule?e:{default:e}}function QT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Td(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function eO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var rO=ho.hover=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){eO(a,n);function a(){var i,o,s,u;QT(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return u=(o=(s=Td(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),s),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return al.default.createElement(t,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},al.default.createElement(r,XT({},s.props,s.state)))},o),Td(s,u)}return a}(al.default.Component)};ho.default=rO;var go={};Object.defineProperty(go,"__esModule",{value:!0});go.active=void 0;var tO=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},nO=_,il=aO(nO);function aO(e){return e&&e.__esModule?e:{default:e}}function iO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Od(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function oO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var sO=go.active=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){oO(a,n);function a(){var i,o,s,u;iO(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return u=(o=(s=Od(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),s),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return il.default.createElement(t,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},il.default.createElement(r,tO({},s.props,s.state)))},o),Od(s,u)}return a}(il.default.Component)};go.default=sO;var kc={};Object.defineProperty(kc,"__esModule",{value:!0});var uO=function(r,t){var n={},a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[o]=s};return r===0&&a("first-child"),r===t-1&&a("last-child"),(r===0||r%2===0)&&a("even"),Math.abs(r%2)===1&&a("odd"),a("nth-child",r),n};kc.default=uO;Object.defineProperty(Pt,"__esModule",{value:!0});Pt.ReactCSS=Pt.loop=Pt.handleActive=Uc=Pt.handleHover=Pt.hover=void 0;var lO=co,cO=gi(lO),fO=vo,pO=gi(fO),dO=mo,vO=gi(dO),mO=ho,Jg=gi(mO),hO=go,gO=gi(hO),yO=kc,bO=gi(yO);function gi(e){return e&&e.__esModule?e:{default:e}}Pt.hover=Jg.default;var Uc=Pt.handleHover=Jg.default;Pt.handleActive=gO.default;Pt.loop=bO.default;var xO=Pt.ReactCSS=function(r){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var i=(0,cO.default)(n),o=(0,pO.default)(r,i);return(0,vO.default)(o)},Ye=Pt.default=xO,wO=function(r,t,n,a,i){var o=i.clientWidth,s=i.clientHeight,u=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,l=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,c=u-(i.getBoundingClientRect().left+window.pageXOffset),f=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var p=void 0;if(f<0?p=0:f>s?p=1:p=Math.round(f*100/s)/100,t.a!==p)return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}else{var d=void 0;if(c<0?d=0:c>o?d=1:d=Math.round(c*100/o)/100,a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}return null},ol={},EO=function(r,t,n,a){if(typeof document>"u"&&!a)return null;var i=a?new a:document.createElement("canvas");i.width=n*2,i.height=n*2;var o=i.getContext("2d");return o?(o.fillStyle=r,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null},SO=function(r,t,n,a){var i=r+"-"+t+"-"+n+(a?"-server":"");if(ol[i])return ol[i];var o=EO(r,t,n,a);return ol[i]=o,o},_d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},yi=function(r){var t=r.white,n=r.grey,a=r.size,i=r.renderers,o=r.borderRadius,s=r.boxShadow,u=r.children,l=Ye({default:{grid:{borderRadius:o,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+SO(t,n,a,i.canvas)+") center left"}}});return _.isValidElement(u)?_.cloneElement(u,_d({},u.props,{style:_d({},u.props.style,l.grid)})):_.createElement("div",{style:l.grid})};yi.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var AO=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},DO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function CO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function $d(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function NO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var Hc=function(e){NO(r,e);function r(){var t,n,a,i;CO(this,r);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return i=(n=(a=$d(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(s))),a),a.handleChange=function(l){var c=wO(l,a.props.hsl,a.props.direction,a.props.a,a.container);c&&typeof a.props.onChange=="function"&&a.props.onChange(c,l)},a.handleMouseDown=function(l){a.handleChange(l),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},n),$d(a,i)}return DO(r,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var n=this,a=this.props.rgb,i=Ye({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
26
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:a.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+a.r+","+a.g+","+a.b+`, 0) 0%,
|
|
27
|
+
rgba(`+a.r+","+a.g+","+a.b+", 1) 100%)"},pointer:{left:0,top:a.a*100+"%"}},overwrite:AO({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return _.createElement("div",{style:i.alpha},_.createElement("div",{style:i.checkboard},_.createElement(yi,{renderers:this.props.renderers})),_.createElement("div",{style:i.gradient}),_.createElement("div",{style:i.container,ref:function(s){return n.container=s},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_.createElement("div",{style:i.pointer},this.props.pointer?_.createElement(this.props.pointer,this.props):_.createElement("div",{style:i.slider}))))}}]),r}(_.PureComponent||_.Component),MO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function TO(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function OO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _O(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function $O(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var FO=1,Qg=38,BO=40,RO=[Qg,BO],PO=function(r){return RO.indexOf(r)>-1},zO=function(r){return Number(String(r).replace(/%/g,""))},IO=1,vr=function(e){$O(r,e);function r(t){OO(this,r);var n=_O(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(a){n.setUpdatedValue(a.target.value,a)},n.handleKeyDown=function(a){var i=zO(a.target.value);if(!isNaN(i)&&PO(a.keyCode)){var o=n.getArrowOffset(),s=a.keyCode===Qg?i+o:i-o;n.setUpdatedValue(s,a)}},n.handleDrag=function(a){if(n.props.dragLabel){var i=Math.round(n.props.value+a.movementX);i>=0&&i<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(i),a)}},n.handleMouseDown=function(a){n.props.dragLabel&&(a.preventDefault(),n.handleDrag(a),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},n.inputId="rc-editable-input-"+IO++,n}return MO(r,[{key:"componentDidUpdate",value:function(n,a){this.props.value!==this.state.value&&(n.value!==this.props.value||a.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(n){return TO({},this.props.label,n)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||FO}},{key:"setUpdatedValue",value:function(n,a){var i=this.props.label?this.getValueObjectWithLabel(n):n;this.props.onChange&&this.props.onChange(i,a),this.setState({value:n})}},{key:"render",value:function(){var n=this,a=Ye({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return _.createElement("div",{style:a.wrap},_.createElement("input",{id:this.inputId,style:a.input,ref:function(o){return n.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?_.createElement("label",{htmlFor:this.inputId,style:a.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),r}(_.PureComponent||_.Component),LO=function(r,t,n,a){var i=a.clientWidth,o=a.clientHeight,s=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,u=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,l=s-(a.getBoundingClientRect().left+window.pageXOffset),c=u-(a.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var f=void 0;if(c<0)f=359;else if(c>o)f=0;else{var p=-(c*100/o)+100;f=360*p/100}if(n.h!==f)return{h:f,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(l<0)d=0;else if(l>i)d=359;else{var v=l*100/i;d=360*v/100}if(n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null},qO=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function kO(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Fd(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function UO(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var bi=function(e){UO(r,e);function r(){var t,n,a,i;kO(this,r);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return i=(n=(a=Fd(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(s))),a),a.handleChange=function(l){var c=LO(l,a.props.direction,a.props.hsl,a.container);c&&typeof a.props.onChange=="function"&&a.props.onChange(c,l)},a.handleMouseDown=function(l){a.handleChange(l),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},n),Fd(a,i)}return qO(r,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.direction,i=a===void 0?"horizontal":a,o=Ye({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return _.createElement("div",{style:o.hue},_.createElement("div",{className:"hue-"+i,style:o.container,ref:function(u){return n.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_.createElement("style",null,`
|
|
28
|
+
.hue-horizontal {
|
|
29
|
+
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
30
|
+
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
31
|
+
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
32
|
+
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hue-vertical {
|
|
36
|
+
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
37
|
+
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
38
|
+
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
39
|
+
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
40
|
+
}
|
|
41
|
+
`),_.createElement("div",{style:o.pointer},this.props.pointer?_.createElement(this.props.pointer,this.props):_.createElement("div",{style:o.slider}))))}}]),r}(_.PureComponent||_.Component),ql={exports:{}},Uo={exports:{}},xr={};/** @license React v16.13.1
|
|
42
|
+
* react-is.production.min.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var Bd;function HO(){if(Bd)return xr;Bd=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function h(x){if(typeof x=="object"&&x!==null){var b=x.$$typeof;switch(b){case r:switch(x=x.type,x){case u:case l:case n:case i:case a:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case c:case v:case d:case o:return x;default:return b}}case t:return b}}}function w(x){return h(x)===l}return xr.AsyncMode=u,xr.ConcurrentMode=l,xr.ContextConsumer=s,xr.ContextProvider=o,xr.Element=r,xr.ForwardRef=c,xr.Fragment=n,xr.Lazy=v,xr.Memo=d,xr.Portal=t,xr.Profiler=i,xr.StrictMode=a,xr.Suspense=f,xr.isAsyncMode=function(x){return w(x)||h(x)===u},xr.isConcurrentMode=w,xr.isContextConsumer=function(x){return h(x)===s},xr.isContextProvider=function(x){return h(x)===o},xr.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},xr.isForwardRef=function(x){return h(x)===c},xr.isFragment=function(x){return h(x)===n},xr.isLazy=function(x){return h(x)===v},xr.isMemo=function(x){return h(x)===d},xr.isPortal=function(x){return h(x)===t},xr.isProfiler=function(x){return h(x)===i},xr.isStrictMode=function(x){return h(x)===a},xr.isSuspense=function(x){return h(x)===f},xr.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===l||x===i||x===a||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===d||x.$$typeof===o||x.$$typeof===s||x.$$typeof===c||x.$$typeof===y||x.$$typeof===g||x.$$typeof===E||x.$$typeof===m)},xr.typeOf=h,xr}var wr={};/** @license React v16.13.1
|
|
49
|
+
* react-is.development.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/var Rd;function jO(){return Rd||(Rd=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function h(ne){return typeof ne=="string"||typeof ne=="function"||ne===n||ne===l||ne===i||ne===a||ne===f||ne===p||typeof ne=="object"&&ne!==null&&(ne.$$typeof===v||ne.$$typeof===d||ne.$$typeof===o||ne.$$typeof===s||ne.$$typeof===c||ne.$$typeof===y||ne.$$typeof===g||ne.$$typeof===E||ne.$$typeof===m)}function w(ne){if(typeof ne=="object"&&ne!==null){var xe=ne.$$typeof;switch(xe){case r:var $e=ne.type;switch($e){case u:case l:case n:case i:case a:case f:return $e;default:var k=$e&&$e.$$typeof;switch(k){case s:case c:case v:case d:case o:return k;default:return xe}}case t:return xe}}}var x=u,b=l,D=s,A=o,S=r,C=c,M=n,$=v,B=d,P=t,R=i,N=a,O=f,U=!1;function F(ne){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),q(ne)||w(ne)===u}function q(ne){return w(ne)===l}function Y(ne){return w(ne)===s}function G(ne){return w(ne)===o}function z(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===r}function J(ne){return w(ne)===c}function le(ne){return w(ne)===n}function Q(ne){return w(ne)===v}function re(ne){return w(ne)===d}function se(ne){return w(ne)===t}function te(ne){return w(ne)===i}function ae(ne){return w(ne)===a}function fe(ne){return w(ne)===f}wr.AsyncMode=x,wr.ConcurrentMode=b,wr.ContextConsumer=D,wr.ContextProvider=A,wr.Element=S,wr.ForwardRef=C,wr.Fragment=M,wr.Lazy=$,wr.Memo=B,wr.Portal=P,wr.Profiler=R,wr.StrictMode=N,wr.Suspense=O,wr.isAsyncMode=F,wr.isConcurrentMode=q,wr.isContextConsumer=Y,wr.isContextProvider=G,wr.isElement=z,wr.isForwardRef=J,wr.isFragment=le,wr.isLazy=Q,wr.isMemo=re,wr.isPortal=se,wr.isProfiler=te,wr.isStrictMode=ae,wr.isSuspense=fe,wr.isValidElementType=h,wr.typeOf=w}()),wr}var Pd;function ey(){return Pd||(Pd=1,process.env.NODE_ENV==="production"?Uo.exports=HO():Uo.exports=jO()),Uo.exports}/*
|
|
56
|
+
object-assign
|
|
57
|
+
(c) Sindre Sorhus
|
|
58
|
+
@license MIT
|
|
59
|
+
*/var sl,zd;function VO(){if(zd)return sl;zd=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return sl=a()?Object.assign:function(i,o){for(var s,u=n(i),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)r.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)t.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},sl}var ul,Id;function jc(){if(Id)return ul;Id=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ul=e,ul}var ll,Ld;function ry(){return Ld||(Ld=1,ll=Function.call.bind(Object.prototype.hasOwnProperty)),ll}var cl,qd;function GO(){if(qd)return cl;qd=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=jc(),t={},n=ry();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var p=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[c](o,c,u,s,null,r)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},cl=a,cl}var fl,kd;function WO(){if(kd)return fl;kd=1;var e=ey(),r=VO(),t=jc(),n=ry(),a=GO(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return fl=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(q){var Y=q&&(l&&q[l]||q[c]);if(typeof Y=="function")return Y}var p="<<anonymous>>",d={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:E(),arrayOf:h,element:w(),elementType:x(),instanceOf:b,node:C(),objectOf:A,oneOf:D,oneOfType:S,shape:$,exact:B};function v(q,Y){return q===Y?q!==0||1/q===1/Y:q!==q&&Y!==Y}function m(q,Y){this.message=q,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}m.prototype=Error.prototype;function y(q){if(process.env.NODE_ENV!=="production")var Y={},G=0;function z(le,Q,re,se,te,ae,fe){if(se=se||p,ae=ae||re,fe!==t){if(u){var ne=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var xe=se+":"+re;!Y[xe]&&G<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Y[xe]=!0,G++)}}return Q[re]==null?le?Q[re]===null?new m("The "+te+" `"+ae+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new m("The "+te+" `"+ae+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:q(Q,re,se,te,ae)}var J=z.bind(null,!1);return J.isRequired=z.bind(null,!0),J}function g(q){function Y(G,z,J,le,Q,re){var se=G[z],te=N(se);if(te!==q){var ae=O(se);return new m("Invalid "+le+" `"+Q+"` of type "+("`"+ae+"` supplied to `"+J+"`, expected ")+("`"+q+"`."),{expectedType:q})}return null}return y(Y)}function E(){return y(o)}function h(q){function Y(G,z,J,le,Q){if(typeof q!="function")return new m("Property `"+Q+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var re=G[z];if(!Array.isArray(re)){var se=N(re);return new m("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected an array."))}for(var te=0;te<re.length;te++){var ae=q(re,te,J,le,Q+"["+te+"]",t);if(ae instanceof Error)return ae}return null}return y(Y)}function w(){function q(Y,G,z,J,le){var Q=Y[G];if(!s(Q)){var re=N(Q);return new m("Invalid "+J+" `"+le+"` of type "+("`"+re+"` supplied to `"+z+"`, expected a single ReactElement."))}return null}return y(q)}function x(){function q(Y,G,z,J,le){var Q=Y[G];if(!e.isValidElementType(Q)){var re=N(Q);return new m("Invalid "+J+" `"+le+"` of type "+("`"+re+"` supplied to `"+z+"`, expected a single ReactElement type."))}return null}return y(q)}function b(q){function Y(G,z,J,le,Q){if(!(G[z]instanceof q)){var re=q.name||p,se=F(G[z]);return new m("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected ")+("instance of `"+re+"`."))}return null}return y(Y)}function D(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function Y(G,z,J,le,Q){for(var re=G[z],se=0;se<q.length;se++)if(v(re,q[se]))return null;var te=JSON.stringify(q,function(fe,ne){var xe=O(ne);return xe==="symbol"?String(ne):ne});return new m("Invalid "+le+" `"+Q+"` of value `"+String(re)+"` "+("supplied to `"+J+"`, expected one of "+te+"."))}return y(Y)}function A(q){function Y(G,z,J,le,Q){if(typeof q!="function")return new m("Property `"+Q+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var re=G[z],se=N(re);if(se!=="object")return new m("Invalid "+le+" `"+Q+"` of type "+("`"+se+"` supplied to `"+J+"`, expected an object."));for(var te in re)if(n(re,te)){var ae=q(re,te,J,le,Q+"."+te,t);if(ae instanceof Error)return ae}return null}return y(Y)}function S(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var Y=0;Y<q.length;Y++){var G=q[Y];if(typeof G!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(G)+" at index "+Y+"."),o}function z(J,le,Q,re,se){for(var te=[],ae=0;ae<q.length;ae++){var fe=q[ae],ne=fe(J,le,Q,re,se,t);if(ne==null)return null;ne.data&&n(ne.data,"expectedType")&&te.push(ne.data.expectedType)}var xe=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new m("Invalid "+re+" `"+se+"` supplied to "+("`"+Q+"`"+xe+"."))}return y(z)}function C(){function q(Y,G,z,J,le){return P(Y[G])?null:new m("Invalid "+J+" `"+le+"` supplied to "+("`"+z+"`, expected a ReactNode."))}return y(q)}function M(q,Y,G,z,J){return new m((q||"React class")+": "+Y+" type `"+G+"."+z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function $(q){function Y(G,z,J,le,Q){var re=G[z],se=N(re);if(se!=="object")return new m("Invalid "+le+" `"+Q+"` of type `"+se+"` "+("supplied to `"+J+"`, expected `object`."));for(var te in q){var ae=q[te];if(typeof ae!="function")return M(J,le,Q,te,O(ae));var fe=ae(re,te,J,le,Q+"."+te,t);if(fe)return fe}return null}return y(Y)}function B(q){function Y(G,z,J,le,Q){var re=G[z],se=N(re);if(se!=="object")return new m("Invalid "+le+" `"+Q+"` of type `"+se+"` "+("supplied to `"+J+"`, expected `object`."));var te=r({},G[z],q);for(var ae in te){var fe=q[ae];if(n(q,ae)&&typeof fe!="function")return M(J,le,Q,ae,O(fe));if(!fe)return new m("Invalid "+le+" `"+Q+"` key `"+ae+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(G[z],null," ")+`
|
|
60
|
+
Valid keys: `+JSON.stringify(Object.keys(q),null," "));var ne=fe(re,ae,J,le,Q+"."+ae,t);if(ne)return ne}return null}return y(Y)}function P(q){switch(typeof q){case"number":case"string":case"undefined":return!0;case"boolean":return!q;case"object":if(Array.isArray(q))return q.every(P);if(q===null||s(q))return!0;var Y=f(q);if(Y){var G=Y.call(q),z;if(Y!==q.entries){for(;!(z=G.next()).done;)if(!P(z.value))return!1}else for(;!(z=G.next()).done;){var J=z.value;if(J&&!P(J[1]))return!1}}else return!1;return!0;default:return!1}}function R(q,Y){return q==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function N(q){var Y=typeof q;return Array.isArray(q)?"array":q instanceof RegExp?"object":R(Y,q)?"symbol":Y}function O(q){if(typeof q>"u"||q===null)return""+q;var Y=N(q);if(Y==="object"){if(q instanceof Date)return"date";if(q instanceof RegExp)return"regexp"}return Y}function U(q){var Y=O(q);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function F(q){return!q.constructor||!q.constructor.name?p:q.constructor.name}return d.checkPropTypes=a,d.resetWarningCache=a.resetWarningCache,d.PropTypes=d,d},fl}var pl,Ud;function ZO(){if(Ud)return pl;Ud=1;var e=jc();function r(){}function t(){}return t.resetWarningCache=r,pl=function(){function n(o,s,u,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:t,resetWarningCache:r};return i.PropTypes=i,i},pl}if(process.env.NODE_ENV!=="production"){var YO=ey(),XO=!0;ql.exports=WO()(YO.isElement,XO)}else ql.exports=ZO()();var KO=ql.exports;const Fe=ye.getDefaultExportFromCjs(KO);function JO(){this.__data__=[],this.size=0}function yo(e,r){return e===r||e!==e&&r!==r}function uu(e,r){for(var t=e.length;t--;)if(yo(e[t][0],r))return t;return-1}var QO=Array.prototype,e_=QO.splice;function r_(e){var r=this.__data__,t=uu(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():e_.call(r,t,1),--this.size,!0}function t_(e){var r=this.__data__,t=uu(r,e);return t<0?void 0:r[t][1]}function n_(e){return uu(this.__data__,e)>-1}function a_(e,r){var t=this.__data__,n=uu(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}function Cn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Cn.prototype.clear=JO;Cn.prototype.delete=r_;Cn.prototype.get=t_;Cn.prototype.has=n_;Cn.prototype.set=a_;function i_(){this.__data__=new Cn,this.size=0}function o_(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}function s_(e){return this.__data__.get(e)}function u_(e){return this.__data__.has(e)}var ty=typeof global=="object"&&global&&global.Object===Object&&global,l_=typeof self=="object"&&self&&self.Object===Object&&self,Qt=ty||l_||Function("return this")(),In=Qt.Symbol,ny=Object.prototype,c_=ny.hasOwnProperty,f_=ny.toString,Hi=In?In.toStringTag:void 0;function p_(e){var r=c_.call(e,Hi),t=e[Hi];try{e[Hi]=void 0;var n=!0}catch{}var a=f_.call(e);return n&&(r?e[Hi]=t:delete e[Hi]),a}var d_=Object.prototype,v_=d_.toString;function m_(e){return v_.call(e)}var h_="[object Null]",g_="[object Undefined]",Hd=In?In.toStringTag:void 0;function la(e){return e==null?e===void 0?g_:h_:Hd&&Hd in Object(e)?p_(e):m_(e)}function kt(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var y_="[object AsyncFunction]",b_="[object Function]",x_="[object GeneratorFunction]",w_="[object Proxy]";function Vc(e){if(!kt(e))return!1;var r=la(e);return r==b_||r==x_||r==y_||r==w_}var dl=Qt["__core-js_shared__"],jd=function(){var e=/[^.]+$/.exec(dl&&dl.keys&&dl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function E_(e){return!!jd&&jd in e}var S_=Function.prototype,A_=S_.toString;function ca(e){if(e!=null){try{return A_.call(e)}catch{}try{return e+""}catch{}}return""}var D_=/[\\^$.*+?()[\]{}|]/g,C_=/^\[object .+?Constructor\]$/,N_=Function.prototype,M_=Object.prototype,T_=N_.toString,O_=M_.hasOwnProperty,__=RegExp("^"+T_.call(O_).replace(D_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $_(e){if(!kt(e)||E_(e))return!1;var r=Vc(e)?__:C_;return r.test(ca(e))}function F_(e,r){return e==null?void 0:e[r]}function fa(e,r){var t=F_(e,r);return $_(t)?t:void 0}var no=fa(Qt,"Map"),ao=fa(Object,"create");function B_(){this.__data__=ao?ao(null):{},this.size=0}function R_(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var P_="__lodash_hash_undefined__",z_=Object.prototype,I_=z_.hasOwnProperty;function L_(e){var r=this.__data__;if(ao){var t=r[e];return t===P_?void 0:t}return I_.call(r,e)?r[e]:void 0}var q_=Object.prototype,k_=q_.hasOwnProperty;function U_(e){var r=this.__data__;return ao?r[e]!==void 0:k_.call(r,e)}var H_="__lodash_hash_undefined__";function j_(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ao&&r===void 0?H_:r,this}function aa(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}aa.prototype.clear=B_;aa.prototype.delete=R_;aa.prototype.get=L_;aa.prototype.has=U_;aa.prototype.set=j_;function V_(){this.size=0,this.__data__={hash:new aa,map:new(no||Cn),string:new aa}}function G_(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function lu(e,r){var t=e.__data__;return G_(r)?t[typeof r=="string"?"string":"hash"]:t.map}function W_(e){var r=lu(this,e).delete(e);return this.size-=r?1:0,r}function Z_(e){return lu(this,e).get(e)}function Y_(e){return lu(this,e).has(e)}function X_(e,r){var t=lu(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}function Nn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Nn.prototype.clear=V_;Nn.prototype.delete=W_;Nn.prototype.get=Z_;Nn.prototype.has=Y_;Nn.prototype.set=X_;var K_=200;function J_(e,r){var t=this.__data__;if(t instanceof Cn){var n=t.__data__;if(!no||n.length<K_-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Nn(n)}return t.set(e,r),this.size=t.size,this}function sn(e){var r=this.__data__=new Cn(e);this.size=r.size}sn.prototype.clear=i_;sn.prototype.delete=o_;sn.prototype.get=s_;sn.prototype.has=u_;sn.prototype.set=J_;var ws=function(){try{var e=fa(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Gc(e,r,t){r=="__proto__"&&ws?ws(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function kl(e,r,t){(t!==void 0&&!yo(e[r],t)||t===void 0&&!(r in e))&&Gc(e,r,t)}function Q_(e){return function(r,t,n){for(var a=-1,i=Object(r),o=n(r),s=o.length;s--;){var u=o[++a];if(t(i[u],u,i)===!1)break}return r}}var ay=Q_(),iy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vd=iy&&typeof module=="object"&&module&&!module.nodeType&&module,e$=Vd&&Vd.exports===iy,Gd=e$?Qt.Buffer:void 0;Gd&&Gd.allocUnsafe;function r$(e,r){return e.slice()}var Es=Qt.Uint8Array;function t$(e){var r=new e.constructor(e.byteLength);return new Es(r).set(new Es(e)),r}function n$(e,r){var t=t$(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}function a$(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Wd=Object.create,i$=function(){function e(){}return function(r){if(!kt(r))return{};if(Wd)return Wd(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();function oy(e,r){return function(t){return e(r(t))}}var sy=oy(Object.getPrototypeOf,Object),o$=Object.prototype;function Wc(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||o$;return e===t}function s$(e){return typeof e.constructor=="function"&&!Wc(e)?i$(sy(e)):{}}function Ln(e){return e!=null&&typeof e=="object"}var u$="[object Arguments]";function Zd(e){return Ln(e)&&la(e)==u$}var uy=Object.prototype,l$=uy.hasOwnProperty,c$=uy.propertyIsEnumerable,Ss=Zd(function(){return arguments}())?Zd:function(e){return Ln(e)&&l$.call(e,"callee")&&!c$.call(e,"callee")},Tt=Array.isArray,f$=9007199254740991;function Zc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=f$}function xi(e){return e!=null&&Zc(e.length)&&!Vc(e)}function p$(e){return Ln(e)&&xi(e)}function d$(){return!1}var ly=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yd=ly&&typeof module=="object"&&module&&!module.nodeType&&module,v$=Yd&&Yd.exports===ly,Xd=v$?Qt.Buffer:void 0,m$=Xd?Xd.isBuffer:void 0,As=m$||d$,h$="[object Object]",g$=Function.prototype,y$=Object.prototype,cy=g$.toString,b$=y$.hasOwnProperty,x$=cy.call(Object);function w$(e){if(!Ln(e)||la(e)!=h$)return!1;var r=sy(e);if(r===null)return!0;var t=b$.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&cy.call(t)==x$}var E$="[object Arguments]",S$="[object Array]",A$="[object Boolean]",D$="[object Date]",C$="[object Error]",N$="[object Function]",M$="[object Map]",T$="[object Number]",O$="[object Object]",_$="[object RegExp]",$$="[object Set]",F$="[object String]",B$="[object WeakMap]",R$="[object ArrayBuffer]",P$="[object DataView]",z$="[object Float32Array]",I$="[object Float64Array]",L$="[object Int8Array]",q$="[object Int16Array]",k$="[object Int32Array]",U$="[object Uint8Array]",H$="[object Uint8ClampedArray]",j$="[object Uint16Array]",V$="[object Uint32Array]",Fr={};Fr[z$]=Fr[I$]=Fr[L$]=Fr[q$]=Fr[k$]=Fr[U$]=Fr[H$]=Fr[j$]=Fr[V$]=!0;Fr[E$]=Fr[S$]=Fr[R$]=Fr[A$]=Fr[P$]=Fr[D$]=Fr[C$]=Fr[N$]=Fr[M$]=Fr[T$]=Fr[O$]=Fr[_$]=Fr[$$]=Fr[F$]=Fr[B$]=!1;function G$(e){return Ln(e)&&Zc(e.length)&&!!Fr[la(e)]}function W$(e){return function(r){return e(r)}}var fy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ro=fy&&typeof module=="object"&&module&&!module.nodeType&&module,Z$=ro&&ro.exports===fy,vl=Z$&&ty.process,Kd=function(){try{var e=ro&&ro.require&&ro.require("util").types;return e||vl&&vl.binding&&vl.binding("util")}catch{}}(),Jd=Kd&&Kd.isTypedArray,Yc=Jd?W$(Jd):G$;function Ul(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Y$=Object.prototype,X$=Y$.hasOwnProperty;function K$(e,r,t){var n=e[r];(!(X$.call(e,r)&&yo(n,t))||t===void 0&&!(r in e))&&Gc(e,r,t)}function J$(e,r,t,n){var a=!t;t||(t={});for(var i=-1,o=r.length;++i<o;){var s=r[i],u=void 0;u===void 0&&(u=e[s]),a?Gc(t,s,u):K$(t,s,u)}return t}function Q$(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var eF=9007199254740991,rF=/^(?:0|[1-9]\d*)$/;function Xc(e,r){var t=typeof e;return r=r??eF,!!r&&(t=="number"||t!="symbol"&&rF.test(e))&&e>-1&&e%1==0&&e<r}var tF=Object.prototype,nF=tF.hasOwnProperty;function py(e,r){var t=Tt(e),n=!t&&Ss(e),a=!t&&!n&&As(e),i=!t&&!n&&!a&&Yc(e),o=t||n||a||i,s=o?Q$(e.length,String):[],u=s.length;for(var l in e)(r||nF.call(e,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Xc(l,u)))&&s.push(l);return s}function aF(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var iF=Object.prototype,oF=iF.hasOwnProperty;function sF(e){if(!kt(e))return aF(e);var r=Wc(e),t=[];for(var n in e)n=="constructor"&&(r||!oF.call(e,n))||t.push(n);return t}function dy(e){return xi(e)?py(e,!0):sF(e)}function uF(e){return J$(e,dy(e))}function lF(e,r,t,n,a,i,o){var s=Ul(e,t),u=Ul(r,t),l=o.get(u);if(l){kl(e,t,l);return}var c=i?i(s,u,t+"",e,r,o):void 0,f=c===void 0;if(f){var p=Tt(u),d=!p&&As(u),v=!p&&!d&&Yc(u);c=u,p||d||v?Tt(s)?c=s:p$(s)?c=a$(s):d?(f=!1,c=r$(u)):v?(f=!1,c=n$(u)):c=[]:w$(u)||Ss(u)?(c=s,Ss(s)?c=uF(s):(!kt(s)||Vc(s))&&(c=s$(u))):f=!1}f&&(o.set(u,c),a(c,u,n,i,o),o.delete(u)),kl(e,t,c)}function vy(e,r,t,n,a){e!==r&&ay(r,function(i,o){if(a||(a=new sn),kt(i))lF(e,r,o,t,vy,n,a);else{var s=n?n(Ul(e,o),i,o+"",e,r,a):void 0;s===void 0&&(s=i),kl(e,o,s)}},dy)}function cu(e){return e}function cF(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}var Qd=Math.max;function fF(e,r,t){return r=Qd(r===void 0?e.length-1:r,0),function(){for(var n=arguments,a=-1,i=Qd(n.length-r,0),o=Array(i);++a<i;)o[a]=n[r+a];a=-1;for(var s=Array(r+1);++a<r;)s[a]=n[a];return s[r]=t(o),cF(e,this,s)}}function pF(e){return function(){return e}}var dF=ws?function(e,r){return ws(e,"toString",{configurable:!0,enumerable:!1,value:pF(r),writable:!0})}:cu,vF=800,mF=16,hF=Date.now;function gF(e){var r=0,t=0;return function(){var n=hF(),a=mF-(n-t);if(t=n,a>0){if(++r>=vF)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var yF=gF(dF);function bF(e,r){return yF(fF(e,r,cu),e+"")}function xF(e,r,t){if(!kt(t))return!1;var n=typeof r;return(n=="number"?xi(t)&&Xc(r,t.length):n=="string"&&r in t)?yo(t[r],e):!1}function wF(e){return bF(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:void 0,o=a>2?t[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,o&&xF(t[0],t[1],o)&&(i=a<3?void 0:i,a=1),r=Object(r);++n<a;){var s=t[n];s&&e(r,s,n,i)}return r})}var Et=wF(function(e,r,t){vy(e,r,t)}),bo=function(r){var t=r.zDepth,n=r.radius,a=r.background,i=r.children,o=r.styles,s=o===void 0?{}:o,u=Ye(Et({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+t*4+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":t===1});return _.createElement("div",{style:u.wrap},_.createElement("div",{style:u.bg}),_.createElement("div",{style:u.content},i))};bo.propTypes={background:Fe.string,zDepth:Fe.oneOf([0,1,2,3,4,5]),radius:Fe.number,styles:Fe.object};bo.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var ml=function(){return Qt.Date.now()},EF=/\s/;function SF(e){for(var r=e.length;r--&&EF.test(e.charAt(r)););return r}var AF=/^\s+/;function DF(e){return e&&e.slice(0,SF(e)+1).replace(AF,"")}var CF="[object Symbol]";function fu(e){return typeof e=="symbol"||Ln(e)&&la(e)==CF}var ev=NaN,NF=/^[-+]0x[0-9a-f]+$/i,MF=/^0b[01]+$/i,TF=/^0o[0-7]+$/i,OF=parseInt;function rv(e){if(typeof e=="number")return e;if(fu(e))return ev;if(kt(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=kt(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=DF(e);var t=MF.test(e);return t||TF.test(e)?OF(e.slice(2),t?2:8):NF.test(e)?ev:+e}var _F="Expected a function",$F=Math.max,FF=Math.min;function my(e,r,t){var n,a,i,o,s,u,l=0,c=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(_F);r=rv(r)||0,kt(t)&&(c=!!t.leading,f="maxWait"in t,i=f?$F(rv(t.maxWait)||0,r):i,p="trailing"in t?!!t.trailing:p);function d(b){var D=n,A=a;return n=a=void 0,l=b,o=e.apply(A,D),o}function v(b){return l=b,s=setTimeout(g,r),c?d(b):o}function m(b){var D=b-u,A=b-l,S=r-D;return f?FF(S,i-A):S}function y(b){var D=b-u,A=b-l;return u===void 0||D>=r||D<0||f&&A>=i}function g(){var b=ml();if(y(b))return E(b);s=setTimeout(g,m(b))}function E(b){return s=void 0,p&&n?d(b):(n=a=void 0,o)}function h(){s!==void 0&&clearTimeout(s),l=0,n=u=a=s=void 0}function w(){return s===void 0?o:E(ml())}function x(){var b=ml(),D=y(b);if(n=arguments,a=this,u=b,D){if(s===void 0)return v(u);if(f)return clearTimeout(s),s=setTimeout(g,r),d(u)}return s===void 0&&(s=setTimeout(g,r)),o}return x.cancel=h,x.flush=w,x}var BF="Expected a function";function RF(e,r,t){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(BF);return kt(t)&&(n="leading"in t?!!t.leading:n,a="trailing"in t?!!t.trailing:a),my(e,r,{leading:n,maxWait:r,trailing:a})}var PF=function(r,t,n){var a=n.getBoundingClientRect(),i=a.width,o=a.height,s=typeof r.pageX=="number"?r.pageX:r.touches[0].pageX,u=typeof r.pageY=="number"?r.pageY:r.touches[0].pageY,l=s-(n.getBoundingClientRect().left+window.pageXOffset),c=u-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>i&&(l=i),c<0?c=0:c>o&&(c=o);var f=l/i,p=1-c/o;return{h:t.h,s:f,v:p,a:t.a,source:"hsv"}},zF=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function IF(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function LF(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function qF(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var pu=function(e){qF(r,e);function r(t){IF(this,r);var n=LF(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return n.handleChange=function(a){typeof n.props.onChange=="function"&&n.throttle(n.props.onChange,PF(a,n.props.hsl,n.container),a)},n.handleMouseDown=function(a){n.handleChange(a);var i=n.getContainerRenderWindow();i.addEventListener("mousemove",n.handleChange),i.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=RF(function(a,i,o){a(i,o)},50),n}return zF(r,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var n=this.container,a=window;!a.document.contains(n)&&a.parent!==a;)a=a.parent;return a}},{key:"unbindEventListeners",value:function(){var n=this.getContainerRenderWindow();n.removeEventListener("mousemove",this.handleChange),n.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var n=this,a=this.props.style||{},i=a.color,o=a.white,s=a.black,u=a.pointer,l=a.circle,c=Ye({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
61
|
+
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:o,black:s,pointer:u,circle:l}},{custom:!!this.props.style});return _.createElement("div",{style:c.color,ref:function(p){return n.container=p},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_.createElement("style",null,`
|
|
62
|
+
.saturation-white {
|
|
63
|
+
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
64
|
+
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
65
|
+
}
|
|
66
|
+
.saturation-black {
|
|
67
|
+
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
68
|
+
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
69
|
+
}
|
|
70
|
+
`),_.createElement("div",{style:c.white,className:"saturation-white"},_.createElement("div",{style:c.black,className:"saturation-black"}),_.createElement("div",{style:c.pointer},this.props.pointer?_.createElement(this.props.pointer,this.props):_.createElement("div",{style:c.circle}))))}}]),r}(_.PureComponent||_.Component);function kF(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var UF=oy(Object.keys,Object),HF=Object.prototype,jF=HF.hasOwnProperty;function VF(e){if(!Wc(e))return UF(e);var r=[];for(var t in Object(e))jF.call(e,t)&&t!="constructor"&&r.push(t);return r}function Kc(e){return xi(e)?py(e):VF(e)}function GF(e,r){return e&&ay(e,r,Kc)}function WF(e,r){return function(t,n){if(t==null)return t;if(!xi(t))return e(t,n);for(var a=t.length,i=-1,o=Object(t);++i<a&&n(o[i],i,o)!==!1;);return t}}var hy=WF(GF);function ZF(e){return typeof e=="function"?e:cu}function YF(e,r){var t=Tt(e)?kF:hy;return t(e,ZF(r))}function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ds(e)}var XF=/^\s+/,KF=/\s+$/;function Ie(e,r){if(e=e||"",r=r||{},e instanceof Ie)return e;if(!(this instanceof Ie))return new Ie(e,r);var t=JF(e);this._originalInput=e,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||t.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=t.ok}Ie.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),t,n,a,i,o,s;return t=r.r/255,n=r.g/255,a=r.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*i+.7152*o+.0722*s},setAlpha:function(r){return this._a=gy(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=nv(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=nv(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this._a==1?"hsv("+t+", "+n+"%, "+a+"%)":"hsva("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var r=tv(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=tv(this._r,this._g,this._b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this._a==1?"hsl("+t+", "+n+"%, "+a+"%)":"hsla("+t+", "+n+"%, "+a+"%, "+this._roundA+")"},toHex:function(r){return av(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return tB(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Br(this._r,255)*100)+"%",g:Math.round(Br(this._g,255)*100)+"%",b:Math.round(Br(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Br(this._r,255)*100)+"%, "+Math.round(Br(this._g,255)*100)+"%, "+Math.round(Br(this._b,255)*100)+"%)":"rgba("+Math.round(Br(this._r,255)*100)+"%, "+Math.round(Br(this._g,255)*100)+"%, "+Math.round(Br(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vB[av(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var t="#"+iv(this._r,this._g,this._b,this._a),n=t,a=this._gradientType?"GradientType = 1, ":"";if(r){var i=Ie(r);n="#"+iv(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+n+")"},toString:function(r){var t=!!r;r=r||this._format;var n=!1,a=this._a<1&&this._a>=0,i=!t&&a&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return i?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Ie(this.toString())},_applyModification:function(r,t){var n=r.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(oB,arguments)},brighten:function(){return this._applyModification(sB,arguments)},darken:function(){return this._applyModification(uB,arguments)},desaturate:function(){return this._applyModification(nB,arguments)},saturate:function(){return this._applyModification(aB,arguments)},greyscale:function(){return this._applyModification(iB,arguments)},spin:function(){return this._applyModification(lB,arguments)},_applyCombination:function(r,t){return r.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(pB,arguments)},complement:function(){return this._applyCombination(cB,arguments)},monochromatic:function(){return this._applyCombination(dB,arguments)},splitcomplement:function(){return this._applyCombination(fB,arguments)},triad:function(){return this._applyCombination(ov,[3])},tetrad:function(){return this._applyCombination(ov,[4])}};Ie.fromRatio=function(e,r){if(Ds(e)=="object"){var t={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?t[n]=e[n]:t[n]=Yi(e[n]));e=t}return Ie(e,r)};function JF(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,i=null,o=!1,s=!1;return typeof e=="string"&&(e=yB(e)),Ds(e)=="object"&&(vn(e.r)&&vn(e.g)&&vn(e.b)?(r=QF(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):vn(e.h)&&vn(e.s)&&vn(e.v)?(n=Yi(e.s),a=Yi(e.v),r=rB(e.h,n,a),o=!0,s="hsv"):vn(e.h)&&vn(e.s)&&vn(e.l)&&(n=Yi(e.s),i=Yi(e.l),r=eB(e.h,n,i),o=!0,s="hsl"),e.hasOwnProperty("a")&&(t=e.a)),t=gy(t),{ok:o,format:e.format||s,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}function QF(e,r,t){return{r:Br(e,255)*255,g:Br(r,255)*255,b:Br(t,255)*255}}function tv(e,r,t){e=Br(e,255),r=Br(r,255),t=Br(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),i,o,s=(n+a)/2;if(n==a)i=o=0;else{var u=n-a;switch(o=s>.5?u/(2-n-a):u/(n+a),n){case e:i=(r-t)/u+(r<t?6:0);break;case r:i=(t-e)/u+2;break;case t:i=(e-r)/u+4;break}i/=6}return{h:i,s:o,l:s}}function eB(e,r,t){var n,a,i;e=Br(e,360),r=Br(r,100),t=Br(t,100);function o(l,c,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?l+(c-l)*6*f:f<1/2?c:f<2/3?l+(c-l)*(2/3-f)*6:l}if(r===0)n=a=i=t;else{var s=t<.5?t*(1+r):t+r-t*r,u=2*t-s;n=o(u,s,e+1/3),a=o(u,s,e),i=o(u,s,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function nv(e,r,t){e=Br(e,255),r=Br(r,255),t=Br(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),i,o,s=n,u=n-a;if(o=n===0?0:u/n,n==a)i=0;else{switch(n){case e:i=(r-t)/u+(r<t?6:0);break;case r:i=(t-e)/u+2;break;case t:i=(e-r)/u+4;break}i/=6}return{h:i,s:o,v:s}}function rB(e,r,t){e=Br(e,360)*6,r=Br(r,100),t=Br(t,100);var n=Math.floor(e),a=e-n,i=t*(1-r),o=t*(1-a*r),s=t*(1-(1-a)*r),u=n%6,l=[t,o,i,i,s,t][u],c=[s,t,t,o,i,i][u],f=[i,i,s,t,t,o][u];return{r:l*255,g:c*255,b:f*255}}function av(e,r,t,n){var a=[Yt(Math.round(e).toString(16)),Yt(Math.round(r).toString(16)),Yt(Math.round(t).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function tB(e,r,t,n,a){var i=[Yt(Math.round(e).toString(16)),Yt(Math.round(r).toString(16)),Yt(Math.round(t).toString(16)),Yt(yy(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function iv(e,r,t,n){var a=[Yt(yy(n)),Yt(Math.round(e).toString(16)),Yt(Math.round(r).toString(16)),Yt(Math.round(t).toString(16))];return a.join("")}Ie.equals=function(e,r){return!e||!r?!1:Ie(e).toRgbString()==Ie(r).toRgbString()};Ie.random=function(){return Ie.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function nB(e,r){r=r===0?0:r||10;var t=Ie(e).toHsl();return t.s-=r/100,t.s=du(t.s),Ie(t)}function aB(e,r){r=r===0?0:r||10;var t=Ie(e).toHsl();return t.s+=r/100,t.s=du(t.s),Ie(t)}function iB(e){return Ie(e).desaturate(100)}function oB(e,r){r=r===0?0:r||10;var t=Ie(e).toHsl();return t.l+=r/100,t.l=du(t.l),Ie(t)}function sB(e,r){r=r===0?0:r||10;var t=Ie(e).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),Ie(t)}function uB(e,r){r=r===0?0:r||10;var t=Ie(e).toHsl();return t.l-=r/100,t.l=du(t.l),Ie(t)}function lB(e,r){var t=Ie(e).toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,Ie(t)}function cB(e){var r=Ie(e).toHsl();return r.h=(r.h+180)%360,Ie(r)}function ov(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Ie(e).toHsl(),n=[Ie(e)],a=360/r,i=1;i<r;i++)n.push(Ie({h:(t.h+i*a)%360,s:t.s,l:t.l}));return n}function fB(e){var r=Ie(e).toHsl(),t=r.h;return[Ie(e),Ie({h:(t+72)%360,s:r.s,l:r.l}),Ie({h:(t+216)%360,s:r.s,l:r.l})]}function pB(e,r,t){r=r||6,t=t||30;var n=Ie(e).toHsl(),a=360/t,i=[Ie(e)];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,i.push(Ie(n));return i}function dB(e,r){r=r||6;for(var t=Ie(e).toHsv(),n=t.h,a=t.s,i=t.v,o=[],s=1/r;r--;)o.push(Ie({h:n,s:a,v:i})),i=(i+s)%1;return o}Ie.mix=function(e,r,t){t=t===0?0:t||50;var n=Ie(e).toRgb(),a=Ie(r).toRgb(),i=t/100,o={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return Ie(o)};Ie.readability=function(e,r){var t=Ie(e),n=Ie(r);return(Math.max(t.getLuminance(),n.getLuminance())+.05)/(Math.min(t.getLuminance(),n.getLuminance())+.05)};Ie.isReadable=function(e,r,t){var n=Ie.readability(e,r),a,i;switch(i=!1,a=bB(t),a.level+a.size){case"AAsmall":case"AAAlarge":i=n>=4.5;break;case"AAlarge":i=n>=3;break;case"AAAsmall":i=n>=7;break}return i};Ie.mostReadable=function(e,r,t){var n=null,a=0,i,o,s,u;t=t||{},o=t.includeFallbackColors,s=t.level,u=t.size;for(var l=0;l<r.length;l++)i=Ie.readability(e,r[l]),i>a&&(a=i,n=Ie(r[l]));return Ie.isReadable(e,n,{level:s,size:u})||!o?n:(t.includeFallbackColors=!1,Ie.mostReadable(e,["#fff","#000"],t))};var Hl=Ie.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vB=Ie.hexNames=mB(Hl);function mB(e){var r={};for(var t in e)e.hasOwnProperty(t)&&(r[e[t]]=t);return r}function gy(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Br(e,r){hB(e)&&(e="100%");var t=gB(e);return e=Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function du(e){return Math.min(1,Math.max(0,e))}function Dt(e){return parseInt(e,16)}function hB(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function gB(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Yt(e){return e.length==1?"0"+e:""+e}function Yi(e){return e<=1&&(e=e*100+"%"),e}function yy(e){return Math.round(parseFloat(e)*255).toString(16)}function sv(e){return Dt(e)/255}var Wt=function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",t="(?:"+r+")|(?:"+e+")",n="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",a="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function vn(e){return!!Wt.CSS_UNIT.exec(e)}function yB(e){e=e.replace(XF,"").replace(KF,"").toLowerCase();var r=!1;if(Hl[e])e=Hl[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Wt.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Wt.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Wt.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Wt.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Wt.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Wt.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Wt.hex8.exec(e))?{r:Dt(t[1]),g:Dt(t[2]),b:Dt(t[3]),a:sv(t[4]),format:r?"name":"hex8"}:(t=Wt.hex6.exec(e))?{r:Dt(t[1]),g:Dt(t[2]),b:Dt(t[3]),format:r?"name":"hex"}:(t=Wt.hex4.exec(e))?{r:Dt(t[1]+""+t[1]),g:Dt(t[2]+""+t[2]),b:Dt(t[3]+""+t[3]),a:sv(t[4]+""+t[4]),format:r?"name":"hex8"}:(t=Wt.hex3.exec(e))?{r:Dt(t[1]+""+t[1]),g:Dt(t[2]+""+t[2]),b:Dt(t[3]+""+t[3]),format:r?"name":"hex"}:!1}function bB(e){var r,t;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),t=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:r,size:t}}var uv=function(r){var t=["r","g","b","a","h","s","l","v"],n=0,a=0;return YF(t,function(i){if(r[i]&&(n+=1,isNaN(r[i])||(a+=1),i==="s"||i==="l")){var o=/^\d+%$/;o.test(r[i])&&(a+=1)}}),n===a?r:!1},Xi=function(r,t){var n=r.hex?Ie(r.hex):Ie(r),a=n.toHsl(),i=n.toHsv(),o=n.toRgb(),s=n.toHex();a.s===0&&(a.h=t||0,i.h=t||0);var u=s==="000000"&&o.a===0;return{hsl:a,hex:u?"transparent":"#"+s,rgb:o,hsv:i,oldHue:r.h||t||a.h,source:r.source}},Hn=function(r){if(r==="transparent")return!0;var t=String(r).charAt(0)==="#"?1:0;return r.length!==4+t&&r.length<7+t&&Ie(r).isValid()},Jc=function(r){if(!r)return"#fff";var t=Xi(r);if(t.hex==="transparent")return"rgba(0,0,0,0.4)";var n=(t.rgb.r*299+t.rgb.g*587+t.rgb.b*114)/1e3;return n>=128?"#000":"#fff"},hl=function(r,t){var n=r.replace("°","");return Ie(t+" ("+n+")")._ok},ji=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},xB=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function wB(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function EB(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function SB(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var St=function(r){var t=function(n){SB(a,n);function a(i){wB(this,a);var o=EB(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.handleChange=function(s,u){var l=uv(s);if(l){var c=Xi(s,s.h||o.state.oldHue);o.setState(c),o.props.onChangeComplete&&o.debounce(o.props.onChangeComplete,c,u),o.props.onChange&&o.props.onChange(c,u)}},o.handleSwatchHover=function(s,u){var l=uv(s);if(l){var c=Xi(s,s.h||o.state.oldHue);o.props.onSwatchHover&&o.props.onSwatchHover(c,u)}},o.state=ji({},Xi(i.color,0)),o.debounce=my(function(s,u,l){s(u,l)},100),o}return xB(a,[{key:"render",value:function(){var o={};return this.props.onSwatchHover&&(o.onSwatchHover=this.handleSwatchHover),_.createElement(r,ji({},this.props,this.state,{onChange:this.handleChange},o))}}],[{key:"getDerivedStateFromProps",value:function(o,s){return ji({},Xi(o.color,s.oldHue))}}]),a}(_.PureComponent||_.Component);return t.propTypes=ji({},r.propTypes),t.defaultProps=ji({},r.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t},AB=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},DB=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function CB(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function lv(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function NB(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var MB=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(n){NB(a,n);function a(){var i,o,s,u;CB(this,a);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return u=(o=(s=lv(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(c))),s),s.state={focus:!1},s.handleFocus=function(){return s.setState({focus:!0})},s.handleBlur=function(){return s.setState({focus:!1})},o),lv(s,u)}return DB(a,[{key:"render",value:function(){return _.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},_.createElement(r,AB({},this.props,this.state)))}}]),a}(_.Component)},cv=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},TB=13,OB=function(r){var t=r.color,n=r.style,a=r.onClick,i=a===void 0?function(){}:a,o=r.onHover,s=r.title,u=s===void 0?t:s,l=r.children,c=r.focus,f=r.focusStyle,p=f===void 0?{}:f,d=t==="transparent",v=Ye({default:{swatch:cv({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,c?p:{})}}),m=function(w){return i(t,w)},y=function(w){return w.keyCode===TB&&i(t,w)},g=function(w){return o(t,w)},E={};return o&&(E.onMouseOver=g),_.createElement("div",cv({style:v.swatch,onClick:m,title:u,tabIndex:0,onKeyDown:y},E),l,d&&_.createElement(yi,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const pa=MB(OB);var _B=function(r){var t=r.direction,n=Ye({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return _.createElement("div",{style:n.picker})},$B=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},by=function(r){var t=r.rgb,n=r.hsl,a=r.width,i=r.height,o=r.onChange,s=r.direction,u=r.style,l=r.renderers,c=r.pointer,f=r.className,p=f===void 0?"":f,d=Ye({default:{picker:{position:"relative",width:a,height:i},alpha:{radius:"2px",style:u}}});return _.createElement("div",{style:d.picker,className:"alpha-picker "+p},_.createElement(Hc,$B({},d.alpha,{rgb:t,hsl:n,pointer:c,renderers:l,onChange:o,direction:s})))};by.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:_B};St(by);function xy(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var FB="__lodash_hash_undefined__";function BB(e){return this.__data__.set(e,FB),this}function RB(e){return this.__data__.has(e)}function Cs(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Nn;++r<t;)this.add(e[r])}Cs.prototype.add=Cs.prototype.push=BB;Cs.prototype.has=RB;function PB(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}function zB(e,r){return e.has(r)}var IB=1,LB=2;function wy(e,r,t,n,a,i){var o=t&IB,s=e.length,u=r.length;if(s!=u&&!(o&&u>s))return!1;var l=i.get(e),c=i.get(r);if(l&&c)return l==r&&c==e;var f=-1,p=!0,d=t&LB?new Cs:void 0;for(i.set(e,r),i.set(r,e);++f<s;){var v=e[f],m=r[f];if(n)var y=o?n(m,v,f,r,e,i):n(v,m,f,e,r,i);if(y!==void 0){if(y)continue;p=!1;break}if(d){if(!PB(r,function(g,E){if(!zB(d,E)&&(v===g||a(v,g,t,n,i)))return d.push(E)})){p=!1;break}}else if(!(v===m||a(v,m,t,n,i))){p=!1;break}}return i.delete(e),i.delete(r),p}function qB(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}function kB(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var UB=1,HB=2,jB="[object Boolean]",VB="[object Date]",GB="[object Error]",WB="[object Map]",ZB="[object Number]",YB="[object RegExp]",XB="[object Set]",KB="[object String]",JB="[object Symbol]",QB="[object ArrayBuffer]",eR="[object DataView]",fv=In?In.prototype:void 0,gl=fv?fv.valueOf:void 0;function rR(e,r,t,n,a,i,o){switch(t){case eR:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case QB:return!(e.byteLength!=r.byteLength||!i(new Es(e),new Es(r)));case jB:case VB:case ZB:return yo(+e,+r);case GB:return e.name==r.name&&e.message==r.message;case YB:case KB:return e==r+"";case WB:var s=qB;case XB:var u=n&UB;if(s||(s=kB),e.size!=r.size&&!u)return!1;var l=o.get(e);if(l)return l==r;n|=HB,o.set(e,r);var c=wy(s(e),s(r),n,a,i,o);return o.delete(e),c;case JB:if(gl)return gl.call(e)==gl.call(r)}return!1}function tR(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}function nR(e,r,t){var n=r(e);return Tt(e)?n:tR(n,t(e))}function aR(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var o=e[t];r(o,t,e)&&(i[a++]=o)}return i}function iR(){return[]}var oR=Object.prototype,sR=oR.propertyIsEnumerable,pv=Object.getOwnPropertySymbols,uR=pv?function(e){return e==null?[]:(e=Object(e),aR(pv(e),function(r){return sR.call(e,r)}))}:iR;function dv(e){return nR(e,Kc,uR)}var lR=1,cR=Object.prototype,fR=cR.hasOwnProperty;function pR(e,r,t,n,a,i){var o=t&lR,s=dv(e),u=s.length,l=dv(r),c=l.length;if(u!=c&&!o)return!1;for(var f=u;f--;){var p=s[f];if(!(o?p in r:fR.call(r,p)))return!1}var d=i.get(e),v=i.get(r);if(d&&v)return d==r&&v==e;var m=!0;i.set(e,r),i.set(r,e);for(var y=o;++f<u;){p=s[f];var g=e[p],E=r[p];if(n)var h=o?n(E,g,p,r,e,i):n(g,E,p,e,r,i);if(!(h===void 0?g===E||a(g,E,t,n,i):h)){m=!1;break}y||(y=p=="constructor")}if(m&&!y){var w=e.constructor,x=r.constructor;w!=x&&"constructor"in e&&"constructor"in r&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(m=!1)}return i.delete(e),i.delete(r),m}var jl=fa(Qt,"DataView"),Vl=fa(Qt,"Promise"),Gl=fa(Qt,"Set"),Wl=fa(Qt,"WeakMap"),vv="[object Map]",dR="[object Object]",mv="[object Promise]",hv="[object Set]",gv="[object WeakMap]",yv="[object DataView]",vR=ca(jl),mR=ca(no),hR=ca(Vl),gR=ca(Gl),yR=ca(Wl),Fn=la;(jl&&Fn(new jl(new ArrayBuffer(1)))!=yv||no&&Fn(new no)!=vv||Vl&&Fn(Vl.resolve())!=mv||Gl&&Fn(new Gl)!=hv||Wl&&Fn(new Wl)!=gv)&&(Fn=function(e){var r=la(e),t=r==dR?e.constructor:void 0,n=t?ca(t):"";if(n)switch(n){case vR:return yv;case mR:return vv;case hR:return mv;case gR:return hv;case yR:return gv}return r});var bR=1,bv="[object Arguments]",xv="[object Array]",Ho="[object Object]",xR=Object.prototype,wv=xR.hasOwnProperty;function wR(e,r,t,n,a,i){var o=Tt(e),s=Tt(r),u=o?xv:Fn(e),l=s?xv:Fn(r);u=u==bv?Ho:u,l=l==bv?Ho:l;var c=u==Ho,f=l==Ho,p=u==l;if(p&&As(e)){if(!As(r))return!1;o=!0,c=!1}if(p&&!c)return i||(i=new sn),o||Yc(e)?wy(e,r,t,n,a,i):rR(e,r,u,t,n,a,i);if(!(t&bR)){var d=c&&wv.call(e,"__wrapped__"),v=f&&wv.call(r,"__wrapped__");if(d||v){var m=d?e.value():e,y=v?r.value():r;return i||(i=new sn),a(m,y,t,n,i)}}return p?(i||(i=new sn),pR(e,r,t,n,a,i)):!1}function Qc(e,r,t,n,a){return e===r?!0:e==null||r==null||!Ln(e)&&!Ln(r)?e!==e&&r!==r:wR(e,r,t,n,Qc,a)}var ER=1,SR=2;function AR(e,r,t,n){var a=t.length,i=a;if(e==null)return!i;for(e=Object(e);a--;){var o=t[a];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=t[a];var s=o[0],u=e[s],l=o[1];if(o[2]){if(u===void 0&&!(s in e))return!1}else{var c=new sn,f;if(!(f===void 0?Qc(l,u,ER|SR,n,c):f))return!1}}return!0}function Ey(e){return e===e&&!kt(e)}function DR(e){for(var r=Kc(e),t=r.length;t--;){var n=r[t],a=e[n];r[t]=[n,a,Ey(a)]}return r}function Sy(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}function CR(e){var r=DR(e);return r.length==1&&r[0][2]?Sy(r[0][0],r[0][1]):function(t){return t===e||AR(t,e,r)}}var NR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MR=/^\w*$/;function ef(e,r){if(Tt(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||fu(e)?!0:MR.test(e)||!NR.test(e)||r!=null&&e in Object(r)}var TR="Expected a function";function rf(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(TR);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(rf.Cache||Nn),t}rf.Cache=Nn;var OR=500;function _R(e){var r=rf(e,function(n){return t.size===OR&&t.clear(),n}),t=r.cache;return r}var $R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FR=/\\(\\)?/g,BR=_R(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace($R,function(t,n,a,i){r.push(a?i.replace(FR,"$1"):n||t)}),r}),RR=1/0,Ev=In?In.prototype:void 0,Sv=Ev?Ev.toString:void 0;function Ay(e){if(typeof e=="string")return e;if(Tt(e))return xy(e,Ay)+"";if(fu(e))return Sv?Sv.call(e):"";var r=e+"";return r=="0"&&1/e==-RR?"-0":r}function PR(e){return e==null?"":Ay(e)}function Dy(e,r){return Tt(e)?e:ef(e,r)?[e]:BR(PR(e))}var zR=1/0;function vu(e){if(typeof e=="string"||fu(e))return e;var r=e+"";return r=="0"&&1/e==-zR?"-0":r}function Cy(e,r){r=Dy(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[vu(r[t++])];return t&&t==n?e:void 0}function IR(e,r,t){var n=e==null?void 0:Cy(e,r);return n===void 0?t:n}function LR(e,r){return e!=null&&r in Object(e)}function qR(e,r,t){r=Dy(r,e);for(var n=-1,a=r.length,i=!1;++n<a;){var o=vu(r[n]);if(!(i=e!=null&&t(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&Zc(a)&&Xc(o,a)&&(Tt(e)||Ss(e)))}function kR(e,r){return e!=null&&qR(e,r,LR)}var UR=1,HR=2;function jR(e,r){return ef(e)&&Ey(r)?Sy(vu(e),r):function(t){var n=IR(t,e);return n===void 0&&n===r?kR(t,e):Qc(r,n,UR|HR)}}function VR(e){return function(r){return r==null?void 0:r[e]}}function GR(e){return function(r){return Cy(r,e)}}function WR(e){return ef(e)?VR(vu(e)):GR(e)}function ZR(e){return typeof e=="function"?e:e==null?cu:typeof e=="object"?Tt(e)?jR(e[0],e[1]):CR(e):WR(e)}function YR(e,r){var t=-1,n=xi(e)?Array(e.length):[];return hy(e,function(a,i,o){n[++t]=r(a,i,o)}),n}function da(e,r){var t=Tt(e)?xy:YR;return t(e,ZR(r))}var XR=function(r){var t=r.colors,n=r.onClick,a=r.onSwatchHover,i=Ye({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return _.createElement("div",{style:i.swatches},da(t,function(o){return _.createElement(pa,{key:o,color:o,style:i.swatch,onClick:n,onHover:a,focusStyle:{boxShadow:"0 0 4px "+o}})}),_.createElement("div",{style:i.clear}))},tf=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.hex,i=r.colors,o=r.width,s=r.triangle,u=r.styles,l=u===void 0?{}:u,c=r.className,f=c===void 0?"":c,p=a==="transparent",d=function(y,g){Hn(y)&&t({hex:y,source:"hex"},g)},v=Ye(Et({default:{card:{width:o,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:a,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Jc(a),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+a+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},l),{"hide-triangle":s==="hide"});return _.createElement("div",{style:v.card,className:"block-picker "+f},_.createElement("div",{style:v.triangle}),_.createElement("div",{style:v.head},p&&_.createElement(yi,{borderRadius:"6px 6px 0 0"}),_.createElement("div",{style:v.label},a)),_.createElement("div",{style:v.body},_.createElement(XR,{colors:i,onClick:d,onSwatchHover:n}),_.createElement(vr,{style:{input:v.input},value:a,onChange:d})))};tf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.string),triangle:Fe.oneOf(["top","hide"]),styles:Fe.object};tf.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};St(tf);var $a={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Fa={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},Ba={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Ra={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Pa={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},za={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Ia={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},La={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},qa={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Ki={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},ka={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Ua={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},Ha={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},ja={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Va={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Ga={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Wa={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Za={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},Ny=function(r){var t=r.color,n=r.onClick,a=r.onSwatchHover,i=r.hover,o=r.active,s=r.circleSize,u=r.circleSpacing,l=Ye({default:{swatch:{width:s,height:s,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:o});return _.createElement("div",{style:l.swatch},_.createElement(pa,{style:l.Swatch,color:t,onClick:n,onHover:a,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};Ny.defaultProps={circleSize:28,circleSpacing:14};const KR=Uc(Ny);var nf=function(r){var t=r.width,n=r.onChange,a=r.onSwatchHover,i=r.colors,o=r.hex,s=r.circleSize,u=r.styles,l=u===void 0?{}:u,c=r.circleSpacing,f=r.className,p=f===void 0?"":f,d=Ye(Et({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},l)),v=function(y,g){return n({hex:y,source:"hex"},g)};return _.createElement("div",{style:d.card,className:"circle-picker "+p},da(i,function(m){return _.createElement(KR,{key:m,color:m,onClick:v,onSwatchHover:a,active:o===m.toLowerCase(),circleSize:s,circleSpacing:c})}))};nf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),circleSize:Fe.number,circleSpacing:Fe.number,styles:Fe.object};nf.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[$a[500],Fa[500],Ba[500],Ra[500],Pa[500],za[500],Ia[500],La[500],qa[500],Ki[500],ka[500],Ua[500],Ha[500],ja[500],Va[500],Ga[500],Wa[500],Za[500]],styles:{}};St(nf);function Av(e){return e===void 0}var My={};Object.defineProperty(My,"__esModule",{value:!0});var Dv=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},JR=_,Cv=QR(JR);function QR(e){return e&&e.__esModule?e:{default:e}}function eP(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var jo=24,rP=My.default=function(e){var r=e.fill,t=r===void 0?"currentColor":r,n=e.width,a=n===void 0?jo:n,i=e.height,o=i===void 0?jo:i,s=e.style,u=s===void 0?{}:s,l=eP(e,["fill","width","height","style"]);return Cv.default.createElement("svg",Dv({viewBox:"0 0 "+jo+" "+jo,style:Dv({fill:t,width:a,height:o},u)},l),Cv.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},tP=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function nP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function aP(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function iP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var Ty=function(e){iP(r,e);function r(t){nP(this,r);var n=aP(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.toggleViews=function(){n.state.view==="hex"?n.setState({view:"rgb"}):n.state.view==="rgb"?n.setState({view:"hsl"}):n.state.view==="hsl"&&(n.props.hsl.a===1?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(a,i){a.hex?Hn(a.hex)&&n.props.onChange({hex:a.hex,source:"hex"},i):a.r||a.g||a.b?n.props.onChange({r:a.r||n.props.rgb.r,g:a.g||n.props.rgb.g,b:a.b||n.props.rgb.b,source:"rgb"},i):a.a?(a.a<0?a.a=0:a.a>1&&(a.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(a.a*100)/100,source:"rgb"},i)):(a.h||a.s||a.l)&&(typeof a.s=="string"&&a.s.includes("%")&&(a.s=a.s.replace("%","")),typeof a.l=="string"&&a.l.includes("%")&&(a.l=a.l.replace("%","")),a.s==1?a.s=.01:a.l==1&&(a.l=.01),n.props.onChange({h:a.h||n.props.hsl.h,s:Number(Av(a.s)?n.props.hsl.s:a.s),l:Number(Av(a.l)?n.props.hsl.l:a.l),source:"hsl"},i))},n.showHighlight=function(a){a.currentTarget.style.background="#eee"},n.hideHighlight=function(a){a.currentTarget.style.background="transparent"},t.hsl.a!==1&&t.view==="hex"?n.state={view:"rgb"}:n.state={view:t.view},n}return tP(r,[{key:"render",value:function(){var n=this,a=Ye({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=_.createElement("div",{style:a.fields,className:"flexbox-fix"},_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=_.createElement("div",{style:a.fields,className:"flexbox-fix"},_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),_.createElement("div",{style:a.alpha},_.createElement(vr,{style:{input:a.input,label:a.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=_.createElement("div",{style:a.fields,className:"flexbox-fix"},_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),_.createElement("div",{style:a.field},_.createElement(vr,{style:{input:a.input,label:a.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),_.createElement("div",{style:a.alpha},_.createElement(vr,{style:{input:a.input,label:a.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),_.createElement("div",{style:a.wrap,className:"flexbox-fix"},i,_.createElement("div",{style:a.toggle},_.createElement("div",{style:a.icon,onClick:this.toggleViews,ref:function(s){return n.icon=s}},_.createElement(rP,{style:a.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.hsl.a!==1&&a.view==="hex"?{view:"rgb"}:null}}]),r}(_.Component);Ty.defaultProps={view:"hex"};var Nv=function(){var r=Ye({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return _.createElement("div",{style:r.picker})},oP=function(){var r=Ye({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return _.createElement("div",{style:r.picker})},af=function(r){var t=r.width,n=r.onChange,a=r.disableAlpha,i=r.rgb,o=r.hsl,s=r.hsv,u=r.hex,l=r.renderers,c=r.styles,f=c===void 0?{}:c,p=r.className,d=p===void 0?"":p,v=r.defaultView,m=Ye(Et({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:a});return _.createElement("div",{style:m.picker,className:"chrome-picker "+d},_.createElement("div",{style:m.saturation},_.createElement(pu,{style:m.Saturation,hsl:o,hsv:s,pointer:oP,onChange:n})),_.createElement("div",{style:m.body},_.createElement("div",{style:m.controls,className:"flexbox-fix"},_.createElement("div",{style:m.color},_.createElement("div",{style:m.swatch},_.createElement("div",{style:m.active}),_.createElement(yi,{renderers:l}))),_.createElement("div",{style:m.toggles},_.createElement("div",{style:m.hue},_.createElement(bi,{style:m.Hue,hsl:o,pointer:Nv,onChange:n})),_.createElement("div",{style:m.alpha},_.createElement(Hc,{style:m.Alpha,rgb:i,hsl:o,pointer:Nv,renderers:l,onChange:n})))),_.createElement(Ty,{rgb:i,hsl:o,hex:u,view:v,onChange:n,disableAlpha:a})))};af.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),disableAlpha:Fe.bool,styles:Fe.object,defaultView:Fe.oneOf(["hex","rgb","hsl"])};af.defaultProps={width:225,disableAlpha:!1,styles:{}};St(af);var sP=function(r){var t=r.color,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=r.active,s=Ye({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Jc(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return _.createElement(pa,{style:s.color,color:t,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},_.createElement("div",{style:s.dot}))},uP=function(r){var t=r.hex,n=r.rgb,a=r.onChange,i=Ye({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(u,l){u.r||u.g||u.b?a({r:u.r||n.r,g:u.g||n.g,b:u.b||n.b,source:"rgb"},l):a({hex:u.hex,source:"hex"},l)};return _.createElement("div",{style:i.fields,className:"flexbox-fix"},_.createElement("div",{style:i.active}),_.createElement(vr,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:o}),_.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:o}),_.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:o}),_.createElement(vr,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:o}))},of=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.colors,i=r.hex,o=r.rgb,s=r.styles,u=s===void 0?{}:s,l=r.className,c=l===void 0?"":l,f=Ye(Et({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),p=function(v,m){v.hex?Hn(v.hex)&&t({hex:v.hex,source:"hex"},m):t(v,m)};return _.createElement(bo,{style:f.Compact,styles:u},_.createElement("div",{style:f.compact,className:"compact-picker "+c},_.createElement("div",null,da(a,function(d){return _.createElement(sP,{key:d,color:d,active:d.toLowerCase()===i,onClick:p,onSwatchHover:n})}),_.createElement("div",{style:f.clear})),_.createElement(uP,{hex:i,rgb:o,onChange:p})))};of.propTypes={colors:Fe.arrayOf(Fe.string),styles:Fe.object};of.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};St(of);var lP=function(r){var t=r.hover,n=r.color,a=r.onClick,i=r.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=Ye({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return _.createElement("div",{style:s.swatch},_.createElement(pa,{color:n,onClick:a,onHover:i,focusStyle:o}))};const cP=Uc(lP);var sf=function(r){var t=r.width,n=r.colors,a=r.onChange,i=r.onSwatchHover,o=r.triangle,s=r.styles,u=s===void 0?{}:s,l=r.className,c=l===void 0?"":l,f=Ye(Et({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":o==="hide","top-left-triangle":o==="top-left","top-right-triangle":o==="top-right","bottom-left-triangle":o==="bottom-left","bottom-right-triangle":o==="bottom-right"}),p=function(v,m){return a({hex:v,source:"hex"},m)};return _.createElement("div",{style:f.card,className:"github-picker "+c},_.createElement("div",{style:f.triangleShadow}),_.createElement("div",{style:f.triangle}),da(n,function(d){return _.createElement(cP,{color:d,key:d,onClick:p,onSwatchHover:i})}))};sf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.string),triangle:Fe.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:Fe.object};sf.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};St(sf);var fP=function(r){var t=r.direction,n=Ye({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:t==="vertical"});return _.createElement("div",{style:n.picker})},pP=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},uf=function(r){var t=r.width,n=r.height,a=r.onChange,i=r.hsl,o=r.direction,s=r.pointer,u=r.styles,l=u===void 0?{}:u,c=r.className,f=c===void 0?"":c,p=Ye(Et({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},l)),d=function(m){return a({a:1,h:m.h,l:.5,s:1})};return _.createElement("div",{style:p.picker,className:"hue-picker "+f},_.createElement(bi,pP({},p.hue,{hsl:i,pointer:s,onChange:d,direction:o})))};uf.propTypes={styles:Fe.object};uf.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:fP,styles:{}};St(uf);var dP=function(r){var t=r.onChange,n=r.hex,a=r.rgb,i=r.styles,o=i===void 0?{}:i,s=r.className,u=s===void 0?"":s,l=Ye(Et({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},o)),c=function(p,d){p.hex?Hn(p.hex)&&t({hex:p.hex,source:"hex"},d):(p.r||p.g||p.b)&&t({r:p.r||a.r,g:p.g||a.g,b:p.b||a.b,source:"rgb"},d)};return _.createElement(bo,{styles:o},_.createElement("div",{style:l.material,className:"material-picker "+u},_.createElement(vr,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:n,onChange:c}),_.createElement("div",{style:l.split,className:"flexbox-fix"},_.createElement("div",{style:l.third},_.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:a.r,onChange:c})),_.createElement("div",{style:l.third},_.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:a.g,onChange:c})),_.createElement("div",{style:l.third},_.createElement(vr,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:a.b,onChange:c})))))};St(dP);var vP=function(r){var t=r.onChange,n=r.rgb,a=r.hsv,i=r.hex,o=Ye({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(l,c){l["#"]?Hn(l["#"])&&t({hex:l["#"],source:"hex"},c):l.r||l.g||l.b?t({r:l.r||n.r,g:l.g||n.g,b:l.b||n.b,source:"rgb"},c):(l.h||l.s||l.v)&&t({h:l.h||a.h,s:l.s||a.s,v:l.v||a.v,source:"hsv"},c)};return _.createElement("div",{style:o.fields},_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"h",value:Math.round(a.h),onChange:s}),_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"s",value:Math.round(a.s*100),onChange:s}),_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"v",value:Math.round(a.v*100),onChange:s}),_.createElement("div",{style:o.divider}),_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:n.r,onChange:s}),_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:n.g,onChange:s}),_.createElement(vr,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:n.b,onChange:s}),_.createElement("div",{style:o.divider}),_.createElement(vr,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"#",value:i.replace("#",""),onChange:s}),_.createElement("div",{style:o.fieldSymbols},_.createElement("div",{style:o.symbol},"°"),_.createElement("div",{style:o.symbol},"%"),_.createElement("div",{style:o.symbol},"%")))},mP=function(r){var t=r.hsl,n=Ye({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return _.createElement("div",{style:n.picker})},hP=function(){var r=Ye({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return _.createElement("div",{style:r.pointer},_.createElement("div",{style:r.left},_.createElement("div",{style:r.leftInside})),_.createElement("div",{style:r.right},_.createElement("div",{style:r.rightInside})))},Mv=function(r){var t=r.onClick,n=r.label,a=r.children,i=r.active,o=Ye({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return _.createElement("div",{style:o.button,onClick:t},n||a)},gP=function(r){var t=r.rgb,n=r.currentColor,a=Ye({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return _.createElement("div",null,_.createElement("div",{style:a.label},"new"),_.createElement("div",{style:a.swatches},_.createElement("div",{style:a.new}),_.createElement("div",{style:a.current})),_.createElement("div",{style:a.label},"current"))},yP=function(){function e(r,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();function bP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xP(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function wP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}var lf=function(e){wP(r,e);function r(t){bP(this,r);var n=xP(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.state={currentColor:t.hex},n}return yP(r,[{key:"render",value:function(){var n=this.props,a=n.styles,i=a===void 0?{}:a,o=n.className,s=o===void 0?"":o,u=Ye(Et({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return _.createElement("div",{style:u.picker,className:"photoshop-picker "+s},_.createElement("div",{style:u.head},this.props.header),_.createElement("div",{style:u.body,className:"flexbox-fix"},_.createElement("div",{style:u.saturation},_.createElement(pu,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:mP,onChange:this.props.onChange})),_.createElement("div",{style:u.hue},_.createElement(bi,{direction:"vertical",hsl:this.props.hsl,pointer:hP,onChange:this.props.onChange})),_.createElement("div",{style:u.controls},_.createElement("div",{style:u.top,className:"flexbox-fix"},_.createElement("div",{style:u.previews},_.createElement(gP,{rgb:this.props.rgb,currentColor:this.state.currentColor})),_.createElement("div",{style:u.actions},_.createElement(Mv,{label:"OK",onClick:this.props.onAccept,active:!0}),_.createElement(Mv,{label:"Cancel",onClick:this.props.onCancel}),_.createElement(vP,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),r}(_.Component);lf.propTypes={header:Fe.string,styles:Fe.object};lf.defaultProps={header:"Color Picker",styles:{}};St(lf);var EP=function(r){var t=r.onChange,n=r.rgb,a=r.hsl,i=r.hex,o=r.disableAlpha,s=Ye({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),u=function(c,f){c.hex?Hn(c.hex)&&t({hex:c.hex,source:"hex"},f):c.r||c.g||c.b?t({r:c.r||n.r,g:c.g||n.g,b:c.b||n.b,a:n.a,source:"rgb"},f):c.a&&(c.a<0?c.a=0:c.a>100&&(c.a=100),c.a/=100,t({h:a.h,s:a.s,l:a.l,a:c.a,source:"rgb"},f))};return _.createElement("div",{style:s.fields,className:"flexbox-fix"},_.createElement("div",{style:s.double},_.createElement(vr,{style:{input:s.input,label:s.label},label:"hex",value:i.replace("#",""),onChange:u})),_.createElement("div",{style:s.single},_.createElement(vr,{style:{input:s.input,label:s.label},label:"r",value:n.r,onChange:u,dragLabel:"true",dragMax:"255"})),_.createElement("div",{style:s.single},_.createElement(vr,{style:{input:s.input,label:s.label},label:"g",value:n.g,onChange:u,dragLabel:"true",dragMax:"255"})),_.createElement("div",{style:s.single},_.createElement(vr,{style:{input:s.input,label:s.label},label:"b",value:n.b,onChange:u,dragLabel:"true",dragMax:"255"})),_.createElement("div",{style:s.alpha},_.createElement(vr,{style:{input:s.input,label:s.label},label:"a",value:Math.round(n.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},SP=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Oy=function(r){var t=r.colors,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=Ye({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),s=function(l,c){a({hex:l,source:"hex"},c)};return _.createElement("div",{style:o.colors,className:"flexbox-fix"},t.map(function(u){var l=typeof u=="string"?{color:u}:u,c=""+l.color+(l.title||"");return _.createElement("div",{key:c,style:o.swatchWrap},_.createElement(pa,SP({},l,{style:o.swatch,onClick:s,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+l.color}})))}))};Oy.propTypes={colors:Fe.arrayOf(Fe.oneOfType([Fe.string,Fe.shape({color:Fe.string,title:Fe.string})])).isRequired};var AP=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},cf=function(r){var t=r.width,n=r.rgb,a=r.hex,i=r.hsv,o=r.hsl,s=r.onChange,u=r.onSwatchHover,l=r.disableAlpha,c=r.presetColors,f=r.renderers,p=r.styles,d=p===void 0?{}:p,v=r.className,m=v===void 0?"":v,y=Ye(Et({default:AP({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},d),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:l});return _.createElement("div",{style:y.picker,className:"sketch-picker "+m},_.createElement("div",{style:y.saturation},_.createElement(pu,{style:y.Saturation,hsl:o,hsv:i,onChange:s})),_.createElement("div",{style:y.controls,className:"flexbox-fix"},_.createElement("div",{style:y.sliders},_.createElement("div",{style:y.hue},_.createElement(bi,{style:y.Hue,hsl:o,onChange:s})),_.createElement("div",{style:y.alpha},_.createElement(Hc,{style:y.Alpha,rgb:n,hsl:o,renderers:f,onChange:s}))),_.createElement("div",{style:y.color},_.createElement(yi,null),_.createElement("div",{style:y.activeColor}))),_.createElement(EP,{rgb:n,hsl:o,hex:a,onChange:s,disableAlpha:l}),_.createElement(Oy,{colors:c,onClick:s,onSwatchHover:u}))};cf.propTypes={disableAlpha:Fe.bool,width:Fe.oneOfType([Fe.string,Fe.number]),styles:Fe.object};cf.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const DP=St(cf);var Vi=function(r){var t=r.hsl,n=r.offset,a=r.onClick,i=a===void 0?function(){}:a,o=r.active,s=r.first,u=r.last,l=Ye({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+n*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:o,first:s,last:u}),c=function(p){return i({h:t.h,s:.5,l:n,source:"hsl"},p)};return _.createElement("div",{style:l.swatch,onClick:c})},CP=function(r){var t=r.onClick,n=r.hsl,a=Ye({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return _.createElement("div",{style:a.swatches},_.createElement("div",{style:a.swatch},_.createElement(Vi,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<i&&Math.abs(n.s-.5)<i,onClick:t,first:!0})),_.createElement("div",{style:a.swatch},_.createElement(Vi,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<i&&Math.abs(n.s-.5)<i,onClick:t})),_.createElement("div",{style:a.swatch},_.createElement(Vi,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<i&&Math.abs(n.s-.5)<i,onClick:t})),_.createElement("div",{style:a.swatch},_.createElement(Vi,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<i&&Math.abs(n.s-.5)<i,onClick:t})),_.createElement("div",{style:a.swatch},_.createElement(Vi,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<i&&Math.abs(n.s-.5)<i,onClick:t,last:!0})),_.createElement("div",{style:a.clear}))},NP=function(){var r=Ye({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return _.createElement("div",{style:r.picker})},ff=function(r){var t=r.hsl,n=r.onChange,a=r.pointer,i=r.styles,o=i===void 0?{}:i,s=r.className,u=s===void 0?"":s,l=Ye(Et({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},o));return _.createElement("div",{style:l.wrap||{},className:"slider-picker "+u},_.createElement("div",{style:l.hue},_.createElement(bi,{style:l.Hue,hsl:t,pointer:a,onChange:n})),_.createElement("div",{style:l.swatches},_.createElement(CP,{hsl:t,onClick:n})))};ff.propTypes={styles:Fe.object};ff.defaultProps={pointer:NP,styles:{}};St(ff);var _y={};Object.defineProperty(_y,"__esModule",{value:!0});var Tv=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},MP=_,Ov=TP(MP);function TP(e){return e&&e.__esModule?e:{default:e}}function OP(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var Vo=24,_P=_y.default=function(e){var r=e.fill,t=r===void 0?"currentColor":r,n=e.width,a=n===void 0?Vo:n,i=e.height,o=i===void 0?Vo:i,s=e.style,u=s===void 0?{}:s,l=OP(e,["fill","width","height","style"]);return Ov.default.createElement("svg",Tv({viewBox:"0 0 "+Vo+" "+Vo,style:Tv({fill:t,width:a,height:o},u)},l),Ov.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},$P=function(r){var t=r.color,n=r.onClick,a=n===void 0?function(){}:n,i=r.onSwatchHover,o=r.first,s=r.last,u=r.active,l=Ye({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:Jc(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:s,active:u,"color-#FFFFFF":t==="#FFFFFF",transparent:t==="transparent"});return _.createElement(pa,{color:t,style:l.color,onClick:a,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},_.createElement("div",{style:l.check},_.createElement(_P,null)))},FP=function(r){var t=r.onClick,n=r.onSwatchHover,a=r.group,i=r.active,o=Ye({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return _.createElement("div",{style:o.group},da(a,function(s,u){return _.createElement($P,{key:s,color:s,active:s.toLowerCase()===i,first:u===0,last:u===a.length-1,onClick:t,onSwatchHover:n})}))},pf=function(r){var t=r.width,n=r.height,a=r.onChange,i=r.onSwatchHover,o=r.colors,s=r.hex,u=r.styles,l=u===void 0?{}:u,c=r.className,f=c===void 0?"":c,p=Ye(Et({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),d=function(m,y){return a({hex:m,source:"hex"},y)};return _.createElement("div",{style:p.picker,className:"swatches-picker "+f},_.createElement(bo,null,_.createElement("div",{style:p.overflow},_.createElement("div",{style:p.body},da(o,function(v){return _.createElement(FP,{key:v.toString(),group:v,active:s,onClick:d,onSwatchHover:i})}),_.createElement("div",{style:p.clear})))))};pf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),height:Fe.oneOfType([Fe.string,Fe.number]),colors:Fe.arrayOf(Fe.arrayOf(Fe.string)),styles:Fe.object};pf.defaultProps={width:320,height:240,colors:[[$a[900],$a[700],$a[500],$a[300],$a[100]],[Fa[900],Fa[700],Fa[500],Fa[300],Fa[100]],[Ba[900],Ba[700],Ba[500],Ba[300],Ba[100]],[Ra[900],Ra[700],Ra[500],Ra[300],Ra[100]],[Pa[900],Pa[700],Pa[500],Pa[300],Pa[100]],[za[900],za[700],za[500],za[300],za[100]],[Ia[900],Ia[700],Ia[500],Ia[300],Ia[100]],[La[900],La[700],La[500],La[300],La[100]],[qa[900],qa[700],qa[500],qa[300],qa[100]],["#194D33",Ki[700],Ki[500],Ki[300],Ki[100]],[ka[900],ka[700],ka[500],ka[300],ka[100]],[Ua[900],Ua[700],Ua[500],Ua[300],Ua[100]],[Ha[900],Ha[700],Ha[500],Ha[300],Ha[100]],[ja[900],ja[700],ja[500],ja[300],ja[100]],[Va[900],Va[700],Va[500],Va[300],Va[100]],[Ga[900],Ga[700],Ga[500],Ga[300],Ga[100]],[Wa[900],Wa[700],Wa[500],Wa[300],Wa[100]],[Za[900],Za[700],Za[500],Za[300],Za[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};St(pf);var df=function(r){var t=r.onChange,n=r.onSwatchHover,a=r.hex,i=r.colors,o=r.width,s=r.triangle,u=r.styles,l=u===void 0?{}:u,c=r.className,f=c===void 0?"":c,p=Ye(Et({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),d=function(m,y){Hn(m)&&t({hex:m,source:"hex"},y)};return _.createElement("div",{style:p.card,className:"twitter-picker "+f},_.createElement("div",{style:p.triangleShadow}),_.createElement("div",{style:p.triangle}),_.createElement("div",{style:p.body},da(i,function(v,m){return _.createElement(pa,{key:m,color:v,hex:v,style:p.swatch,onClick:d,onHover:n,focusStyle:{boxShadow:"0 0 4px "+v}})}),_.createElement("div",{style:p.hash},"#"),_.createElement(vr,{label:null,style:{input:p.input},value:a.replace("#",""),onChange:d}),_.createElement("div",{style:p.clear})))};df.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),triangle:Fe.oneOf(["hide","top-left","top-right"]),colors:Fe.arrayOf(Fe.string),styles:Fe.object};df.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};St(df);var vf=function(r){var t=Ye({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(r.hsl.h)+", "+Math.round(r.hsl.s*100)+"%, "+Math.round(r.hsl.l*100)+"%)"}}});return _.createElement("div",{style:t.picker})};vf.propTypes={hsl:Fe.shape({h:Fe.number,s:Fe.number,l:Fe.number,a:Fe.number})};vf.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var mf=function(r){var t=Ye({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(r.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return _.createElement("div",{style:t.picker})};mf.propTypes={hsl:Fe.shape({h:Fe.number,s:Fe.number,l:Fe.number,a:Fe.number})};mf.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var BP=function(r){var t=r.onChange,n=r.rgb,a=r.hsl,i=r.hex,o=r.hsv,s=function(d,v){if(d.hex)Hn(d.hex)&&t({hex:d.hex,source:"hex"},v);else if(d.rgb){var m=d.rgb.split(",");hl(d.rgb,"rgb")&&t({r:m[0],g:m[1],b:m[2],a:1,source:"rgb"},v)}else if(d.hsv){var y=d.hsv.split(",");hl(d.hsv,"hsv")&&(y[2]=y[2].replace("%",""),y[1]=y[1].replace("%",""),y[0]=y[0].replace("°",""),y[1]==1?y[1]=.01:y[2]==1&&(y[2]=.01),t({h:Number(y[0]),s:Number(y[1]),v:Number(y[2]),source:"hsv"},v))}else if(d.hsl){var g=d.hsl.split(",");hl(d.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),t({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},v))}},u=Ye({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=n.r+", "+n.g+", "+n.b,c=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.l*100)+"%",f=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.v*100)+"%";return _.createElement("div",{style:u.wrap,className:"flexbox-fix"},_.createElement("div",{style:u.fields},_.createElement("div",{style:u.double},_.createElement(vr,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:s})),_.createElement("div",{style:u.column},_.createElement("div",{style:u.single},_.createElement(vr,{style:{input:u.input2,label:u.label2},label:"rgb",value:l,onChange:s})),_.createElement("div",{style:u.single},_.createElement(vr,{style:{input:u.input2,label:u.label2},label:"hsv",value:f,onChange:s})),_.createElement("div",{style:u.single},_.createElement(vr,{style:{input:u.input2,label:u.label2},label:"hsl",value:c,onChange:s})))))},hf=function(r){var t=r.width,n=r.onChange,a=r.rgb,i=r.hsl,o=r.hsv,s=r.hex,u=r.header,l=r.styles,c=l===void 0?{}:l,f=r.className,p=f===void 0?"":f,d=Ye(Et({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+a.r+", "+a.g+", "+a.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return _.createElement("div",{style:d.picker,className:"google-picker "+p},_.createElement("div",{style:d.head},u),_.createElement("div",{style:d.swatch}),_.createElement("div",{style:d.saturation},_.createElement(pu,{hsl:i,hsv:o,pointer:vf,onChange:n})),_.createElement("div",{style:d.body},_.createElement("div",{style:d.controls,className:"flexbox-fix"},_.createElement("div",{style:d.hue},_.createElement(bi,{style:d.Hue,hsl:i,radius:"4px",pointer:mf,onChange:n}))),_.createElement(BP,{rgb:a,hsl:i,hex:s,hsv:o,onChange:n})))};hf.propTypes={width:Fe.oneOfType([Fe.string,Fe.number]),styles:Fe.object,header:Fe.string};hf.defaultProps={width:652,styles:{},header:"Color picker"};St(hf);const gf=_.createContext({close:()=>{console.error("Dialog context not provided.")}}),RP=()=>_.useContext(gf),$y=e=>{const{initialVisible:r=!1,onVisibleChange:t}=e??{},[n,a]=_.useState(r);_.useEffect(()=>t==null?void 0:t(n),[n,t]);const i=_.useCallback(u=>a(l=>typeof u=="boolean"?u:!l),[a,t]),o=_.useCallback(()=>i(!0),[i]),s=_.useCallback(()=>i(!1),[i]);return{visible:n,open:o,close:s,toggle:i}},PP=Object.freeze(Object.defineProperty({__proto__:null,Context:gf,use:$y,useContext:RP},Symbol.toStringTag,{value:"Module"})),va=(e,r,t)=>{const n=_.useRef();return n.current==null?n.current={deps:t,value:e()}:r(n.current.deps,t)||(n.current={deps:t,value:e()}),n.current.value},Fy=([e],[r])=>ye.E.primitiveArrays(e,r)===0,zP=e=>{const r=_.useRef();return r.current==null?r.current=e:ye._.equal(r.current,e)||(r.current=e),r.current},IP=e=>{const r=_.useRef();return(r.current==null||ye.E.primitiveArrays(r.current,e)!==0)&&(r.current=e),r.current},LP=(e,r)=>{_.useEffect(()=>{const t=e();return()=>{t.then(n=>n==null?void 0:n()).catch(n=>console.error(n))}},r)},By=(e,r,t)=>{const n=va(()=>t,r,t);_.useEffect(e,[n])},xo=e=>{const r=_.useRef(ye.executeInitialSetter(e)),t=_.useCallback(n=>{r.current=ye.executeSetter(n,r.current)},[]);return[r,t]},Ut=e=>{const r=_.useRef(e);return r.current=e,r},Ns=(...e)=>_.useCallback(r=>e.forEach(t=>{t!=null&&(typeof t=="function"?t(r):t.current=r)},r),[]),ia=e=>{const r=_.useRef(null),[t,n]=_.useState(()=>{const i=ye.executeInitialSetter(e);return r.current=i,i}),a=_.useCallback(i=>{n(o=>(r.current=ye.executeSetter(i,o),r.current))},[n]);return[t,a,r]},yf=e=>{const r=_.useRef(),t=r.current;return r.current=e,t},bf=({ref:e,onClickOutside:r,exclude:t})=>{const n=Ut(t),a=_.useCallback(i=>{const o=e.current,s=V.To.construct(window.document.documentElement),u=V.q.construct(i),l=n.current;if(l!=null){if(typeof l=="function"){if(l(i))return}else if(l.some(c=>{var f;return(f=c.current)==null?void 0:f.contains(i.target)}))return}o==null||o.contains(i.target)||V.To.contains(o,u)||!V.To.contains(s,u)||r()},[r]);_.useEffect(()=>(document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)),[a])},Ry=(e,r,t)=>_.useCallback(ye.o$1(e,r),[r,...t]),Zl=(e,r={})=>{const{triggers:t=[],debounce:n=0,enabled:a=!0}=r,i=_.useRef(V.To.ZERO),o=_.useRef(null),s=_.useRef(null),u=va(()=>t,Fy,[t]),l=_.useCallback(c=>{s.current!=null&&s.current.disconnect(),i.current==null&&(i.current=V.To.ZERO);const f=ye.o$1(()=>{const p=V.To.construct(c);qP(u,i.current,p)&&(i.current=p,e(p,o.current))},n);s.current=new ResizeObserver(f),s.current.observe(c)},[u,e,n]);return _.useEffect(()=>(o.current!=null&&a&&l(o.current),()=>{var c;return(c=s.current)==null?void 0:c.disconnect()}),[l,a]),_.useCallback(c=>{o.current=c,c!=null&&a&&l(c)},[l])},qP=(e,r,t)=>e.length===0?!V.To.equals(t,r):!!(e.includes("x")&&V.To.width(r)!==V.To.width(t)||e.includes("y")&&V.To.height(r)!==V.To.height(t)),Py=({transforms:e=[]})=>{const[r,t]=_.useState(e),n=_.useCallback((o,s,u=0)=>t(l=>{const c=l.filter(f=>f.key!==o);return c.push({key:o,transform:s,priority:u}),c.sort((f,p)=>p.priority-f.priority),c}),[t]),a=_.useCallback(o=>t(s=>s.filter(u=>u.key!==o)),[n]);return{transform:_.useCallback(o=>r.reduce((s,u)=>u.transform(s),{...o,transformed:!1}),[r]),setTransform:n,deleteTransform:a}},mu=["MouseLeft","MouseMiddle","MouseRight"],kP=Ft.z.enum(mu),xf=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],zy=new Set(xf),Iy=[...mu,...xf,"Backspace","Tab","Enter","Shift","Control","Alt","CapsLock","Escape","Space","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Insert","Delete","ContextMenu","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","F13","F14","F15","F16","F17","F18","F19","F20","F21","F22","F23","F24","NumLock","ScrollLock","AudioVolumeMute","AudioVolumeDown","AudioVolumeUp","AudioTrackNext","AudioTrackPrevious","AudioStop","AudioPlay","AudioPause","AudioRewind","AudioForward","AudioRepeat","AudioRandomPlay","AudioSelect","LaunchMail","LaunchApp2","LaunchApp1","SelectTask","LaunchScreenSaver","BrowserSearch","BrowserHome","BrowserBack","BrowserForward","BrowserStop","BrowserRefresh","BrowserFavorites","ZoomToggle","Clear","Power","Eject"],Ly=Ft.z.enum(Iy),UP=Ft.z.array(Ly),ti=e=>e.type.includes("key")?qy(e):ky(e.button),HP=["Control","Alt","Shift"],qy=e=>{if(["Digit","Key"].some(t=>e.code.startsWith(t)))return e.code.slice(-1);if(e.code.includes("Meta"))return"Control";const r=HP.find(t=>e.code.includes(t));return r??e.code},jP={0:"MouseLeft",1:"MouseMiddle",2:"MouseRight"},ky=e=>jP[e]??"MouseLeft",ra=(e,r,t=!1)=>Ms(e,r,t).length>0,VP=(e,r)=>t=>{if(ra(e,[[ti(t)]]))return r(t)},Ms=(e,r,t=!1)=>{const n=Hy(t);return e.filter(a=>r.some(i=>n(a,i)===ye.E.EQUAL))},wf=(e,r)=>e.filter(t=>!r.some(n=>ye.E.unorderedPrimitiveArrays(t,n)===ye.E.EQUAL)),Uy=(e,r)=>{const t=Hy(!1),n=e.filter(i=>!r.some(o=>t(i,o)===ye.E.EQUAL)),a=r.filter(i=>!e.some(o=>t(i,o)===ye.E.EQUAL));return[n,a]},Hy=e=>e?GP:ye.E.unorderedPrimitiveArrays,GP=(e,r)=>e.every(t=>r.includes(t))?ye.E.EQUAL:ye.E.LESS_THAN,WP=(e,r,t=!1)=>{const o=Object.entries(e).filter(([s])=>s!=="defaultMode").map(([s,u])=>u.map(l=>[s,l])).flat().sort(([,s],[,u])=>u.length-s.length).find(([,s])=>ra([s],r,t));return o!=null?o[0]:e.defaultMode},jy=([e],[r])=>{if(e==null&&r==null)return!0;if(e==null||r==null||e.defaultMode!==r.defaultMode)return!1;const t=Object.keys(e),n=Object.keys(r);return t.length!==n.length||e.defaultMode!==r.defaultMode?!1:t.every(a=>ye.E.unorderedPrimitiveArrays(e[a],r[a])===0)},Vy=e=>Object.entries(e).filter(([t])=>t!=="defaultMode").map(([,t])=>t).flat(),ZP=e=>va(()=>Vy(e),jy,[e]),YP=e=>e.map(r=>r.filter(t=>!t.startsWith("Mouse"))).filter(r=>r.length>0),XP={listen:()=>()=>{}},Gy=_.createContext(XP),Wy=()=>_.useContext(Gy),KP={next:[],prev:[],last:new ye.m(0)},Zy=["CapsLock"],JP=(e,r)=>!!(Zy.includes(e)||r.target instanceof HTMLInputElement&&zy.has(e)||r.target instanceof HTMLElement&&r.target.matches("[contenteditable]")),QP=({children:e,preventDefaultOn:r})=>{const t=_.useRef(V.q.ZERO),n=_.useCallback(f=>{t.current=V.q.construct(f)},[]),a=_.useRef(new Map),[,i]=xo({...KP}),o=_.useCallback((f,p)=>{const d=f.next.length>0?[f.next]:[],v=f.prev.length>0?[f.prev]:[],m={target:p,next:d,prev:v,cursor:t.current};a.current.forEach((y,g)=>g(m))},[]),s=_.useCallback(f=>{const p=ti(f);["ArrowUp","ArrowDown"].includes(p)&&f.preventDefault(),!JP(p,f)&&i(d=>{const v=[...d.next,p];if(d.next.includes(p))return d;d.prev.includes(p)&&ye.m.since(d.last).valueOf()<ye.w.milliseconds(300).valueOf()&&v.push(p);const m={next:v,prev:d.next,last:new ye.m};return _v(v,r)&&f.preventDefault(),o(m,f.target),m})},[]),u=_.useCallback(f=>{const p=ti(f);["ArrowUp","ArrowDown"].includes(p)&&f.preventDefault(),!Zy.includes(p)&&i(d=>{const v=d.next.filter(g=>g!==p&&!mu.includes(g)),m=d.next,y={...d,next:v,prev:m};return _v(v,r)&&f.preventDefault(),o(y,f.target),y})},[]),l=_.useCallback(f=>{i(p=>{const d=p.next,v={...p,next:[],prev:d};return o(v,f.target),v})},[]);_.useEffect(()=>(window.addEventListener("keydown",s),window.addEventListener("keyup",u),window.addEventListener("mousemove",n),window.addEventListener("mousedown",s),window.addEventListener("mouseup",u),window.addEventListener("dragend",u),window.addEventListener("drop",u),window.addEventListener("blur",l),()=>{window.removeEventListener("keydown",s),window.removeEventListener("keyup",u),window.removeEventListener("mousemove",n),window.removeEventListener("mousedown",s),window.removeEventListener("mouseup",u),window.removeEventListener("dragend",u),window.removeEventListener("drop",u),window.removeEventListener("blur",l)}),[s,u,n]);const c=_.useCallback(f=>(a.current.set(f,null),()=>a.current.delete(f)),[]);return Me.jsxRuntimeExports.jsx(Gy.Provider,{value:{listen:c},children:e})},_v=(e,r)=>r!=null&&ra([e],r),wi=({triggers:e,callback:r,region:t,loose:n})=>{const{listen:a}=Wy(),i=va(()=>e,([o],[s])=>o==null&&s==null?!0:o==null||s==null?!1:ye.E.primitiveArrays(o.flat(),s.flat())===ye.E.EQUAL,[e]);_.useEffect(()=>{if(!(i==null||i.length===0))return a(o=>{const s=Ms(i,o.prev,n),u=Ms(i,o.next,n),l=Uy(u,s);let c=l[0];const f=l[1];if(c.length===0&&f.length===0)return;c=ez(o.target,o.cursor,c,t);const p={target:o.target,cursor:o.cursor};c.length>0&&(r==null||r({...p,stage:"start",triggers:c})),f.length>0&&(r==null||r({...p,stage:"end",triggers:f}))})},[r,i,a,n,t])},ez=(e,r,t,n)=>{if(n==null)return t;if(n.current==null)return[];const a=V.To.construct(n.current);return t.filter(i=>i.some(o=>o.includes("Mouse"))?V.To.contains(a,r)&&e===n.current:V.To.contains(a,r))},Yl=({triggers:e,loose:r})=>{const[t,n]=xo({triggers:[],held:!1});return wi({triggers:e,callback:_.useCallback(a=>{n(i=>{let o=[];return a.stage==="start"?o=ye.n([...i.triggers,...a.triggers]):o=wf(i.triggers,a.triggers),{triggers:o,held:o.length>0}})},[]),loose:r}),t},rz=({triggers:e,loose:r})=>{const[t,n]=_.useState({triggers:[],held:!1});return wi({triggers:e,callback:_.useCallback(a=>{n(i=>{let o=[];return a.stage==="start"?o=ye.n([...i.triggers,...a.triggers]):o=wf(i.triggers,a.triggers),{triggers:o,held:o.length>0}})},[]),loose:r}),t},tz=({level:e="p",color:r,className:t,style:n,children:a,noWrap:i=!1,shade:o,weight:s,...u},l)=>Me.jsxRuntimeExports.jsx(It.Element,{el:e,ref:l,style:{color:Ef(r,o),fontWeight:s,...n},className:V.CSS(V.CSS.B("text"),V.CSS.BM("text",e),V.CSS.noWrap(i),t),...u,children:a}),wn=_.forwardRef(tz),Ef=(e,r)=>{if(e!=null)return typeof e=="boolean"?void 0:V.cssString(e);if(r!=null)return`var(--pluto-gray-l${r})`},Yy=({format:e="dateTime",suppliedTZ:r="UTC",displayTZ:t="local",children:n,...a},i)=>Me.jsxRuntimeExports.jsx(wn,{ref:i,...a,children:new ye.m(n,r).fString(e,t)}),nz=_.forwardRef(Yy),az=["Escape","Enter"],iz=V.CSS.BM("text","editable"),oz=10,Xy="renamed",Ky="escaped",Jy=(e,r)=>{let t=0;const n=()=>{t++;const a=document.getElementById(e);if(a==null||!a.classList.contains(iz)){if(t<oz)setTimeout(()=>n(),100);else throw new Error(`Could not find element with id ${e}`);return}a.setAttribute("contenteditable","true"),r!=null&&(a.addEventListener(Xy,i=>r(Xl(i.target),!0)),a.addEventListener(Ky,i=>r(Xl(i.target),!1)))};n()},sz=e=>new Promise(r=>{Jy(e,(n,a)=>r([n,a]))}),Xl=e=>e.innerText.trim(),Qy=({onChange:e,value:r,useEditableState:t=_.useState,allowDoubleClick:n=!0,onDoubleClick:a,...i})=>{const[o,s]=t(!1),u=_.useRef(null),l=p=>{n&&s(!0),a==null||a(p)},c=(p,d=!1)=>{const v=Xl(p);d||v.length===0?(p.innerText=r,p.dispatchEvent(new Event(Ky))):(e==null||e(v),p.dispatchEvent(new Event(Xy)))},f=p=>{if(!o||!az.includes(p.key)||u.current==null)return;p.stopPropagation(),p.preventDefault();const d=u.current;u.current!=null&&(s(!1),c(d,p.key==="Escape"),d.blur())};return _.useLayoutEffect(()=>{if(u.current==null||!o)return;const{current:p}=u;p.focus();const d=document.createRange();d.selectNodeContents(p);const v=window.getSelection();v==null||v.removeAllRanges(),v==null||v.addRange(d)},[o]),u.current!==null&&!o&&(u.current.innerHTML=r),_.useEffect(()=>{new MutationObserver(d=>{d.forEach(v=>{if(v.attributeName!=="contenteditable")return;v.target.contentEditable==="true"&&s(!0)})}).observe(u.current,{attributes:!0})},[]),Me.jsxRuntimeExports.jsx(wn,{ref:u,className:V.CSS.BM("text","editable"),onBlur:()=>{s(!1);const p=u.current;p!=null&&c(p)},onKeyDown:f,onKeyUp:p=>{p.stopPropagation(),p.preventDefault()},onDoubleClick:l,contentEditable:o,suppressContentEditableWarning:!0,...i,children:r})},uz=({onChange:e,disabled:r=!1,value:t,allowDoubleClick:n,...a})=>r||e==null||typeof e=="boolean"?Me.jsxRuntimeExports.jsx(wn,{...a,children:t}):Me.jsxRuntimeExports.jsx(Me.jsxRuntimeExports.Fragment,{children:Me.jsxRuntimeExports.jsx(Qy,{allowDoubleClick:n,onChange:e,value:t,...a})}),lz=({href:e,download:r,target:t,rel:n,...a},i)=>Me.jsxRuntimeExports.jsx("a",{className:V.CSS.B("text-link"),ref:i,href:e,download:r,target:t,rel:n,children:Me.jsxRuntimeExports.jsx(wn,{className:V.CSS.BE("text-link","text"),...a})}),cz=_.forwardRef(lz),e2=e=>e==null?!0:Array.isArray(e)||typeof e=="string"?e.length===0:!1,fz=[],pz=[],r2=({data:e=fz,value:r=pz,allowMultiple:t,allowNone:n,replaceOnSingle:a=!1,autoSelectOnNone:i=!1,onChange:o})=>{const s=_.useRef(null),u=Yl({triggers:[["Shift"]],loose:!0}),l=Yl({triggers:[["Control"]],loose:!0}),c=Ut(r),f=Ut(e),p=_.useCallback((m,y)=>{if(c.current=m,m.length===0&&n!==!1)return o(t!==!1?[]:null,y);if(t!==!1)return o(m,y);if(m.length>0)return o(m[0],y)},[o,n,t]);_.useEffect(()=>{let m=f.current;if(Array.isArray(m)||(m=m()),e2(r)&&n===!1&&m.length>0&&i){const y=m[0];s.current=y.key,p([y.key],{entries:[y],clicked:y.key,clickedIndex:0})}},[p,f,r,n]);const d=_.useCallback(m=>{const y=s.current;let g=f.current;Array.isArray(g)||(g=g());let E=[];const h=ye.A(c.current).filter(x=>x!=null);if(t===!1)E=h.includes(m)?[]:[m];else if(l.current.held&&a)h.includes(m)?E=h.filter(x=>x!==m):E=[...h,m];else if(u.current.held&&y!==null){const[x,b]=[g.findIndex(A=>A.key===m),g.findIndex(A=>A.key===y)].sort((A,S)=>A-S),D=g.slice(x,b+1).map(({key:A})=>A);D.slice(1,D.length-1).every(A=>h.includes(A))&&h.includes(m)?E=h.filter(A=>!D.includes(A)):E=[...h,...D],s.current=null}else s.current=m,a?E=h.includes(m)&&h.length===1?[]:[m]:h.includes(m)?E=h.filter(x=>x!==m):E=[...h,m];const w=ye.n(E);if(n===!1&&w.length===0)return p(h,{entries:g.filter(({key:x})=>h.includes(x)),clicked:m,clickedIndex:g.findIndex(({key:x})=>x===m)});w.length===0&&(s.current=null),p(w,{entries:g.filter(({key:x})=>E.includes(x)),clicked:m,clickedIndex:g.findIndex(({key:x})=>x===m)})},[c,f,p,t,n]),v=_.useCallback(()=>p([],{entries:[],clicked:null,clickedIndex:0}),[p]);return{onSelect:d,clear:v}},Sf=e=>{const r=_.useContext(e);if(r===null)throw new Error("useRequiredContext: context value is null");return r},t2=_.createContext({transformedData:[],sourceData:[],transformed:!1}),n2=_.createContext({setSourceData:()=>{},getSourceData:()=>[],getTransformedData:()=>[],deleteTransform:()=>{},setTransform:()=>{},setEmptyContent:()=>{},getEmptyContent:()=>{},getDefaultEmptyContent:()=>{},getTransformed:()=>!1}),Ei=()=>Sf(t2),wo=()=>Sf(n2),dz=()=>Ei().transformedData,a2=()=>Ei().sourceData,Af=()=>wo().getTransformedData,vz=()=>wo().setSourceData,mz=({data:e,emptyContent:r,children:t})=>{const{transform:n,setTransform:a,deleteTransform:i}=Py({}),[o,s,u]=ia(()=>e??[]);_.useEffect(()=>{e!=null&&s(e)},[e]);const l=_.useMemo(()=>n({data:[...o],transformed:!1}),[o,n]),c=Ut(l),f=Ut(r),[p,d,v]=ia(void 0);_.useEffect(()=>{r!=null&&d(r)},[r]);const m=_.useMemo(()=>({setSourceData:s,getSourceData:()=>u.current,getTransformedData:()=>c.current.data,getTransformed:()=>c.current.transformed,deleteTransform:i,setTransform:a,setEmptyContent:d,getEmptyContent:()=>v.current,getDefaultEmptyContent:()=>f.current}),[s,u,c,i,a]),y=_.useMemo(()=>({transformed:l.transformed,transformedData:l.data,sourceData:o,emptyContent:p}),[l,o,p]);return Me.jsxRuntimeExports.jsx(n2.Provider,{value:m,children:Me.jsxRuntimeExports.jsx(t2.Provider,{value:y,children:t})})},$v={visible:!1,position:V.q.ZERO,cursor:V.q.ZERO,keys:[]},Df=V.CSS.BM("context","selected"),Ts=V.CSS.BE("context","target"),i2=V.CSS.BE("menu-context","container"),hz=e=>{let r=e;for(;!r.classList.contains(Ts);){if(r.classList.contains(i2)||r.parentElement==null)return e;r=r.parentElement}return r.classList.contains(Ts)?r:e},gz=e=>{var n;const r=hz(e);if(r==null)return[];const t=Array.from(((n=r.parentElement)==null?void 0:n.querySelectorAll(`.${Df}`))??[]);return t.includes(r)?t:[r]},yz=()=>{const e=_.useRef(null),[r,t]=_.useState($v),n=(o,s)=>{const u=V.q.construct(o);if(typeof o=="object"&&"preventDefault"in o){o.preventDefault(),o.stopPropagation();const l=gz(o.target);s=s??ye.n(l.map(c=>c.id).filter(c=>c.length>0))}else s=[];t({visible:!0,keys:s,position:u,cursor:u})},a=o=>{e.current=o,o!=null&&t(s=>{if(!s.visible)return s;const{adjustedDialog:u}=Sc.dialog({container:V.To.construct(0,0,window.innerWidth,window.innerHeight),dialog:V.To.construct(o),target:V.To.construct(s.cursor,0,0),prefer:[{y:"bottom"}]}),l=V.To.topLeft(u);return V.q.equals(s.position,l)?s:{...s,position:l}})},i=()=>t($v);return bf({ref:e,onClickOutside:i}),{...r,close:i,open:n,ref:a}},bz=({children:e,menu:r,visible:t,open:n,close:a,position:i,keys:o,className:s,cursor:u,...l},c)=>{const f=t?r==null?void 0:r({keys:o}):null;return Me.jsxRuntimeExports.jsxs("div",{className:V.CSS(i2,s,V.CSS.inheritDims()),onContextMenu:n,...l,children:[e,f!=null&&to.createPortal(Me.jsxRuntimeExports.jsx(It.Space,{className:V.CSS(V.CSS.B("menu-context"),V.CSS.bordered()),ref:c,style:{left:i.x,top:i.y},onClick:a,size:1/2,children:f}),document.body)]})},o2=_.forwardRef(bz);o2.displayName="ContextMenu";const s2=({entry:e,selected:r,hovered:t,onSelect:n,className:a,draggingOver:i,rightAligned:o=!1,highlightHovered:s=!1,allowSelect:u=!0,translate:l,style:c,sourceIndex:f,...p})=>Me.jsxRuntimeExports.jsx(It.Space,{id:e.key.toString(),direction:"x",onClick:()=>n==null?void 0:n(e.key),tabIndex:0,className:V.CSS(a,Ts,r&&Df,u&&V.CSS.M("selectable"),t&&V.CSS.M("hovered"),o&&V.CSS.M("right-aligned"),s&&V.CSS.M("highlight-hover"),V.CSS.BE("list","item"),V.CSS.selected(r)),style:{position:l!=null?"absolute":"relative",transform:`translateY(${l}px)`,...c},...p}),At=[95,90,85,80,75,70,65,60,55,50,45,40,35,30,25,20,15,10,5],u2=e=>Object.entries({"theme-name":e.name,"theme-key":e.key,"primary-m1":e.colors.primary.m1.hex,"primary-z":e.colors.primary.z.hex,"primary-p1":e.colors.primary.p1.hex,...br.createHexOpacityVariants("primary-z",e.colors.primary.z,At),"secondary-m1":e.colors.secondary.m1.hex,"secondary-z":e.colors.secondary.z.hex,"secondary-p1":e.colors.secondary.p1.hex,...br.createHexOpacityVariants("secondary-z",e.colors.secondary.z,At),"gray-l0":e.colors.gray.l0.hex,"gray-l0-rgb":e.colors.gray.l0.rgbString,...br.createHexOpacityVariants("gray-l0",e.colors.gray.l0,At),"gray-l1":e.colors.gray.l1.hex,...br.createHexOpacityVariants("gray-l1",e.colors.gray.l1,At),"gray-l2":e.colors.gray.l2.hex,...br.createHexOpacityVariants("gray-l2",e.colors.gray.l2,At),"gray-l3":e.colors.gray.l3.hex,...br.createHexOpacityVariants("gray-l3",e.colors.gray.l3,At),"gray-l4":e.colors.gray.l4.hex,"gray-l5":e.colors.gray.l5.hex,...br.createHexOpacityVariants("gray-l5",e.colors.gray.l5,At),"gray-l6":e.colors.gray.l6.hex,...br.createHexOpacityVariants("gray-l6",e.colors.gray.l6,At),"gray-l7":e.colors.gray.l7.hex,...br.createHexOpacityVariants("gray-l7",e.colors.gray.l7,At),"gray-l8":e.colors.gray.l8.hex,"gray-l9":e.colors.gray.l9.hex,...br.createHexOpacityVariants("gray-l9",e.colors.gray.l9,At),"gray-l10":e.colors.gray.l10.hex,"logo-color":e.colors.logo,"error-m1":e.colors.error.m1.hex,"error-z":e.colors.error.z.hex,...br.createHexOpacityVariants("error-z",e.colors.error.z,At),"error-p1":e.colors.error.p1.hex,"warning-m1":e.colors.warning.m1.hex,"warning-z":e.colors.warning.z.hex,...br.createHexOpacityVariants("warning-z",e.colors.warning.z,At),"warning-p1":e.colors.warning.p1.hex,"success-m1":e.colors.secondary.m1.hex,"success-z":e.colors.secondary.z.hex,...br.createHexOpacityVariants("success-z",e.colors.secondary.z,At),"success-p1":e.colors.secondary.p1.hex,white:e.colors.white.hex,"white-rgb":e.colors.white.rgbString,black:e.colors.black.hex,"black-rgb":e.colors.black.rgbString,"text-color":e.colors.text.hex,"text-color-rgb":e.colors.text.rgbString,"text-on-primary":e.colors.textOnPrimary.hex,"border-color":e.colors.border.hex,"base-size":br.unitProperty(e.sizes.base,"px"),"border-radius":br.unitProperty(e.sizes.border.radius,"px"),"border-width":br.unitProperty(e.sizes.border.width,"px"),"schematic-element-stroke-width":br.unitProperty(e.sizes.schematic.elementStrokeWidth,"px"),"font-family":e.typography.family,"h1-size":br.unitProperty(e.typography.h1.size,"rem"),"h1-weight":e.typography.h1.weight,"h1-line-height":br.unitProperty(e.typography.h1.lineHeight,"rem"),"h2-size":br.unitProperty(e.typography.h2.size,"rem"),"h2-weight":e.typography.h2.weight,"h2-line-height":br.unitProperty(e.typography.h2.lineHeight,"rem"),"h3-size":br.unitProperty(e.typography.h3.size,"rem"),"h3-weight":e.typography.h3.weight,"h3-line-height":br.unitProperty(e.typography.h3.lineHeight,"rem"),"h4-size":br.unitProperty(e.typography.h4.size,"rem"),"h4-weight":e.typography.h4.weight,"h4-line-height":br.unitProperty(e.typography.h4.lineHeight,"rem"),"h5-size":br.unitProperty(e.typography.h5.size,"rem"),"h5-weight":e.typography.h5.weight,"h5-line-height":br.unitProperty(e.typography.h5.lineHeight,"rem"),"h5-text-transform":e.typography.h5.textTransform,"p-size":br.unitProperty(e.typography.p.size,"rem"),"p-weight":e.typography.p.weight,"p-line-height":br.unitProperty(e.typography.p.lineHeight,"rem"),"small-size":br.unitProperty(e.typography.small.size,"rem"),"small-weight":e.typography.small.weight,"small-line-height":br.unitProperty(e.typography.small.lineHeight,"rem")}).reduce((r,[t,n])=>({...r,[V.CSS.var(t)]:n}),{}),l2=e=>{const r=_.useRef(null);return r.current===null&&(r.current=e??ye.mt.id()),r.current},c2=_.createContext({enabled:!1,route:null}),Cf=_.memo(({children:e,url:r,enabled:t=!0})=>{const[n,a]=_.useState({route:null,enabled:!1});return By(()=>{if(!t)return;const i=new Worker(r,{type:"module"});i.onmessageerror=s=>{console.error(s),console.error(s),console.error(JSON.stringify(s))},i.onerror=s=>{console.error(s),console.error(s.message),console.error(JSON.stringify(s))};const o=new ye.l((s,u=[])=>i.postMessage(s,u));return i.onmessage=s=>o.handle(s),a({route:s=>{if(n==null)throw new Error("Worker is not initialized");return o.route(s)},enabled:!0}),()=>i.terminate()},([i],[o])=>i.toString()===o.toString(),[r]),t&&n.route==null?null:Me.jsxRuntimeExports.jsx(c2.Provider,{value:n,children:e})});Cf.displayName="worker.Provider";const f2=e=>{const r=_.useContext(c2);return r.enabled?va(()=>r.route(e),([t],[n])=>t===n,[r.route]):null},xz=Object.freeze(Object.defineProperty({__proto__:null,Provider:Cf,use:f2},Symbol.toStringTag,{value:"Module"})),wz={path:[],create:()=>({setState:()=>{},delete:()=>{}})},hu=_.createContext(wz),p2=({workerKey:e,worker:r,children:t})=>{const n=f2(e),a=_.useRef(new Map),[i,o]=_.useState(!1),s=_.useMemo(()=>r??n,[r,n]),u=_.useCallback((c,f,p)=>{const d=f.at(-1);if(d==null)throw new ye.j(`[Aether.Provider] - received zero length path when registering component of type ${c}`);return c.length===0&&console.warn(`[Aether.Provider] - received zero length type when registering component at ${f.join(".")} This is probably a bad idea.`),a.current.set(d,{path:f,handler:p}),{setState:(v,m=[])=>{s==null&&console.warn("aether - no worker"),s==null||s.send({variant:"update",path:f,state:v,type:c},m)},delete:()=>{s==null&&console.warn("aether - no worker"),s==null||s.send({variant:"delete",path:f,type:c})}}},[s,a]);_.useEffect(()=>{s==null||s.handle(c=>{const{key:f,state:p}=c,d=a.current.get(f);if(d==null)throw new ye.Se(`[Aether.Provider] - received worker update message for unregistered component with key ${f}`);if(d.handler==null)throw new ye.Se(`[Aether.Provider] - received worker update message for component with key ${f} that has no handler`);d.handler(p)}),o(!0)},[s]);const l=_.useMemo(()=>({create:u,path:["root"]}),[u]);return Me.jsxRuntimeExports.jsx(hu.Provider,{value:l,children:i&&t})},Nf=()=>_.useContext(hu),Ez=({type:e,aetherKey:r,initialState:t,schema:n,initialTransfer:a=[],onReceive:i})=>{const o=_.useRef(),s=Nf(),u=va(()=>[...s.path,r],([f],[p])=>ye.E.primitiveArrays(f,p)===0,[s.path,r]),l=_.useCallback((f,p=[])=>{var d;return(d=o.current)==null?void 0:d.setState(ye.prettyParse(n,f),p)},[]);o.current==null&&(o.current=s.create(e,u,i),o.current.setState(t,a));const c=_.useRef(!0);return _.useEffect(()=>{if(c.current){c.current=!1;return}return o.current=s.create(e,u,i),l(t,a),()=>{var f;(f=o.current)==null||f.delete(),o.current=null}},[e,u,i,l]),_.useLayoutEffect(()=>()=>{var f;(f=o.current)==null||f.delete(),o.current=null},[]),_.useMemo(()=>({setState:l,path:u}),[l,r,u])},gu=e=>{const{type:r,schema:t,initialState:n}=e,[a,i]=_.useState(()=>ye.prettyParse(t,n)),o=_.useCallback(c=>i(ye.prettyParse(t,c)),[t]),{path:s,setState:u}=Ez({...e,onReceive:o}),l=_.useCallback((c,f=[])=>{ye.isSetter(c)?i(p=>{const d=c(p);return u(d,f),d}):(i(c),u(c,f))},[s,r]);return[{path:s},a,l]},Eo=_.memo(({children:e,path:r})=>{const t=Nf(),n=_.useMemo(()=>({...t,path:r}),[t,r]);return Me.jsxRuntimeExports.jsx(hu.Provider,{value:n,children:e})});Eo.displayName="AetherComposite";const yu=(e,r)=>{r.displayName=`Aether.wrap(${e})`;const t=_.memo(({aetherKey:n,...a})=>{const i=l2(n);return Me.jsxRuntimeExports.jsx(r,{...a,aetherKey:i})});return t.displayName=e,t},Sz=Object.freeze(Object.defineProperty({__proto__:null,Composite:Eo,Context:hu,Provider:p2,use:gu,useAetherContext:Nf,wrap:yu},Symbol.toStringTag,{value:"Module"})),d2="cursor-style",Fv=(e,r=document.head)=>{v2();const t=document.createElement("style");t.innerHTML=`*{cursor: ${e} !important;}`,t.id=d2,r.appendChild(t)},v2=()=>{const e=document.getElementById(d2);e!=null&&e.remove()},Az={start:V.q.ZERO,mouseKey:"MouseLeft"},Dz=({ref:e,onMove:r,onStart:t,onEnd:n})=>{const[a,i]=xo(Az);_.useEffect(()=>{if(e.current==null)return;const{current:o}=e,s=c=>{const f=V.q.construct(c),{mouseKey:p,start:d}=a.current;r==null||r(V.To.construct(d,f),p,c)},u=c=>{o.setPointerCapture(c.pointerId),o.onpointermove=s;const f=V.q.construct(c),p=ti(c);i({start:f,mouseKey:p}),t==null||t(f,p,c),o.addEventListener("pointerup",l,{once:!0})};o.addEventListener("pointerdown",u);const l=c=>{o.onpointermove=null,o.releasePointerCapture(c.pointerId);const{start:f,mouseKey:p}=a.current;n==null||n(V.To.construct(f,V.q.construct(c)),p,c)};return()=>o.removeEventListener("pointerdown",u)},[r,t,n])},Bv=(e,r,t,n,a)=>{const{x:i,y:o}=n??V.q.construct(V.To.dims(a));if(V.To.width(r)>i&&V.To.width(r)>V.To.height(r)){const s=V.To.signedWidth(r)<0?i:-i;e+=(V.To.signedWidth(r)+s)*t.x,Fv("ew-resize")}if(V.To.height(r)>o&&V.To.height(r)>V.To.width(r)){const s=V.To.signedHeight(r)<0?o:-o;e+=(V.To.signedHeight(r)+s)*t.y,Fv("ns-resize")}return e},bu=({direction:e,className:r,dragScale:t={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,size:s,resetValue:u,onDragEnd:l,...c})=>{const f=_.useRef({dragging:!1,curr:o,prev:o}),p=_.useRef(null);f.current.dragging||(f.current.prev=o);const d=_.useMemo(()=>{const y=V.q.construct(t);return a==="x"?V.q.construct(y.x,0):a==="y"?V.q.construct(0,y.y):y},[t,a]),v=_.useMemo(()=>n!=null?V.q.construct(n):null,[n]);Dz({ref:p,onMove:_.useCallback(y=>{if(p.current==null)return;let g=f.current.prev;f.current.dragging=!0,g=Bv(g,y,d,v,V.To.construct(p.current)),f.current.curr=g,i(g)},[i,d,v]),onEnd:_.useCallback((y,g)=>{var h;if(p.current==null)return;let E=f.current.prev;E=Bv(E,y,d,v,V.To.construct(p.current)),f.current.prev=E,f.current.dragging=!1,v2(),l==null||l(E),(h=c.onBlur)==null||h.call(c)},[c.onBlur,l,d,v])});const m=_.useCallback(()=>{i(u??f.current.prev)},[i,u]);return Me.jsxRuntimeExports.jsx($p,{tabIndex:-1,ref:p,variant:"outlined",className:V.CSS(V.CSS.BE("input","drag-btn"),V.CSS.dir(e),r),onDoubleClick:m,onClick:y=>y.preventDefault(),...c,children:Me.jsxRuntimeExports.jsx(Lt.Drag,{})})},Si=_.forwardRef(({size:e="medium",value:r,style:t,onChange:n,className:a,onFocus:i,selectOnFocus:o=!1,centerPlaceholder:s=!1,placeholder:u,variant:l="outlined",sharp:c=!1,children:f,level:p,onBlur:d,disabled:v,resetOnBlurIfEmpty:m=!1,status:y,shade:g,weight:E,color:h,onlyChangeOnBlur:w=!1,...x},b)=>{const D=_.useRef(""),[A,S]=_.useState(null),C=N=>{m&&N.target.value===""?n==null||n(D.current):w&&A!=null&&(n==null||n(A)),S(null),d==null||d(N)},M=N=>{w?S(N.target.value):n==null||n(N.target.value)},$=N=>{if(w&&S(r),i==null||i(N),D.current=N.target.value,!o)return;const O=setInterval(()=>N.target.select(),2);setTimeout(()=>clearInterval(O),50)},B=N=>{w&&N.key==="Enter"&&N.currentTarget.blur()},P=_.useRef(null),R=Ns(b,P);return Me.jsxRuntimeExports.jsxs(It.Pack,{style:t,className:V.CSS(V.CSS.B("input"),v&&V.CSS.BM("input","disabled"),p==null&&V.CSS.size(e),g!=null&&V.CSS.shade(g),V.CSS.BM("input",l),V.CSS.sharp(c),y!=null&&V.CSS.M(y),a),align:"center",size:e,children:[Me.jsxRuntimeExports.jsxs("div",{className:V.CSS.BE("input","internal"),children:[(r==null||r.length===0)&&A==null&&Me.jsxRuntimeExports.jsx("div",{className:V.CSS(V.CSS.BE("input","placeholder"),s&&V.CSS.M("centered")),children:Dp(p??ye.ComponentSizeLevels[e],u)}),Me.jsxRuntimeExports.jsx("input",{ref:R,value:A??r,onChange:M,role:"textbox",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onFocus:$,onKeyDown:B,onBlur:C,className:V.CSS(V.CSS.visible(!1),p!=null&&V.CSS.BM("text",p)),disabled:v,placeholder:typeof u=="string"?u:void 0,style:{fontWeight:E,color:h},...x})]}),f]})});Si.displayName="Input";const Cz={x:Number(ye.m.HOUR.valueOf()),y:Number(ye.m.days(.75).valueOf())},m2=({value:e,onChange:r})=>{const t=new ye.m(e,"UTC");_.useLayoutEffect(()=>{const i=t.sub(ye.m.utcOffset);if(i.remainder(ye.m.DAY).isZero)return;const o=i.sub(i.remainder(ye.m.DAY));r(Number(new ye.m(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new ye.m(i,"UTC");else{if(i.length===0)return;o=new ye.m(i,"local")}r(Number(o.valueOf()))};return{value:t.fString("ISODate","local"),onChange:n}},h2=_.forwardRef(({onChange:e,value:r,className:t,showDragHandle:n=!0,children:a,...i},o)=>{const{value:s,onChange:u}=m2({value:r,onChange:e});return Me.jsxRuntimeExports.jsxs(Si,{ref:o,value:s,className:V.CSS(V.CSS.B("input-date"),t),onChange:u,type:"date",...i,children:[n&&Me.jsxRuntimeExports.jsx(bu,{value:r,onChange:u,dragScale:Cz}),a]})});h2.displayName="InputDate";function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Hr.apply(null,arguments)}var g2={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null};function Je(e){return typeof e=="number"}function Qe(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Nz(e){return typeof e=="bigint"}function bn(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function So(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function Rt(e){return e&&e.constructor.prototype.isUnit===!0||!1}function it(e){return typeof e=="string"}var hr=Array.isArray;function Ue(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function Ht(e){return Array.isArray(e)||Ue(e)}function Os(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ea(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Mf(e){return e&&e.constructor.prototype.isRange===!0||!1}function xu(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Mz(e){return typeof e=="boolean"}function Tz(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function y2(e){return e&&e.constructor.prototype.isHelp===!0||!1}function Oz(e){return typeof e=="function"}function _z(e){return e instanceof Date}function $z(e){return e instanceof RegExp}function wu(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!bn(e)&&!So(e))}function Fz(e){return e===null}function Bz(e){return e===void 0}function oa(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bt(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rz(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Pz(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function zz(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function cr(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Kl(e){return cr(e)||kr(e)&&e.args.length===1&&cr(e.args[0])&&"-+~".includes(e.op)}function Ao(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function qn(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ai(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Er(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Eu(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function kr(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function En(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function Iz(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Lz(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Zr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function b2(e){return e&&e.constructor.prototype.isChain===!0||!1}function Cr(e){var r=typeof e;return r==="object"?e===null?"null":Qe(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":r}function We(e){var r=typeof e;if(r==="number"||r==="bigint"||r==="string"||r==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(t){return We(t)});if(e instanceof Date)return new Date(e.valueOf());if(Qe(e))return e;if(wu(e))return qz(e,We);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function qz(e,r){var t={};for(var n in e)Re(e,n)&&(t[n]=r(e[n]));return t}function x2(e,r){for(var t in r)Re(r,t)&&(e[t]=r[t]);return e}function Sn(e,r){var t,n,a;if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(n=0,a=e.length;n<a;n++)if(!Sn(e[n],r[n]))return!1;return!0}else{if(typeof e=="function")return e===r;if(e instanceof Object){if(Array.isArray(r)||!(r instanceof Object))return!1;for(t in e)if(!(t in r)||!Sn(e[t],r[t]))return!1;for(t in r)if(!(t in e))return!1;return!0}else return e===r}}function kz(e,r,t){var n=!0,a;Object.defineProperty(e,r,{get:function(){return n&&(a=t(),n=!1),a},set:function(o){a=o,n=!1},configurable:!0,enumerable:!0})}function Re(e,r){return e&&Object.hasOwnProperty.call(e,r)}function Uz(e,r){for(var t={},n=0;n<r.length;n++){var a=r[n],i=e[a];i!==void 0&&(t[a]=i)}return t}var Hz=["Matrix","Array"],jz=["number","BigNumber","Fraction"],ge=function(r){if(r)throw new Error(`The global config is readonly.
|
|
71
|
+
Please create a mathjs instance if you want to change the default configuration.
|
|
72
|
+
Example:
|
|
73
|
+
|
|
74
|
+
import { create, all } from 'mathjs';
|
|
75
|
+
const mathjs = create(all);
|
|
76
|
+
mathjs.config({ number: 'BigNumber' });
|
|
77
|
+
`);return Object.freeze(g2)};Hr(ge,g2,{MATRIX_OPTIONS:Hz,NUMBER_OPTIONS:jz});function Rv(){return!0}function $t(){return!1}function Ma(){}const Pv="Argument is not a typed-function.";function w2(){function e(I){return typeof I=="object"&&I!==null&&I.constructor===Object}const r=[{name:"number",test:function(I){return typeof I=="number"}},{name:"string",test:function(I){return typeof I=="string"}},{name:"boolean",test:function(I){return typeof I=="boolean"}},{name:"Function",test:function(I){return typeof I=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(I){return I instanceof Date}},{name:"RegExp",test:function(I){return I instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(I){return I===null}},{name:"undefined",test:function(I){return I===void 0}}],t={name:"any",test:Rv,isAny:!0};let n,a,i=0,o={createCount:0};function s(I){const H=n.get(I);if(H)return H;let ie='Unknown type "'+I+'"';const ce=I.toLowerCase();let de;for(de of a)if(de.toLowerCase()===ce){ie+='. Did you mean "'+de+'" ?';break}throw new TypeError(ie)}function u(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const ie=H?s(H).index:a.length,ce=[];for(let ve=0;ve<I.length;++ve){if(!I[ve]||typeof I[ve].name!="string"||typeof I[ve].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const Se=I[ve].name;if(n.has(Se))throw new TypeError('Duplicate type name "'+Se+'"');ce.push(Se),n.set(Se,{name:Se,test:I[ve].test,isAny:I[ve].isAny,index:ie+ve,conversionsTo:[]})}const de=a.slice(ie);a=a.slice(0,ie).concat(ce).concat(de);for(let ve=ie+ce.length;ve<a.length;++ve)n.get(a[ve]).index=ve}function l(){n=new Map,a=[],i=0,u([t],!1)}l(),u(r);function c(){let I;for(I of a)n.get(I).conversionsTo=[];i=0}function f(I){const H=a.filter(ie=>{const ce=n.get(ie);return!ce.isAny&&ce.test(I)});return H.length?H:["any"]}function p(I){return I&&typeof I=="function"&&"_typedFunctionData"in I}function d(I,H,ie){if(!p(I))throw new TypeError(Pv);const ce=ie&&ie.exact,de=Array.isArray(H)?H.join(","):H,ve=w(de),Se=y(ve);if(!ce||Se in I.signatures){const ir=I._typedFunctionData.signatureMap.get(Se);if(ir)return ir}const we=ve.length;let Te;if(ce){Te=[];let ir;for(ir in I.signatures)Te.push(I._typedFunctionData.signatureMap.get(ir))}else Te=I._typedFunctionData.signatures;for(let ir=0;ir<we;++ir){const or=ve[ir],Le=[];let _r;for(_r of Te){const T=A(_r.params,ir);if(!(!T||or.restParam&&!T.restParam)){if(!T.hasAny){const X=h(T);if(or.types.some(pe=>!X.has(pe.name)))continue}Le.push(_r)}}if(Te=Le,Te.length===0)break}let De;for(De of Te)if(De.params.length<=we)return De;throw new TypeError("Signature not found (signature: "+(I.name||"unnamed")+"("+y(ve,", ")+"))")}function v(I,H,ie){return d(I,H,ie).implementation}function m(I,H){const ie=s(H);if(ie.test(I))return I;const ce=ie.conversionsTo;if(ce.length===0)throw new Error("There are no conversions to "+H+" defined.");for(let de=0;de<ce.length;de++)if(s(ce[de].from).test(I))return ce[de].convert(I);throw new Error("Cannot convert "+I+" to "+H)}function y(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return I.map(ie=>ie.name).join(H)}function g(I){const H=I.indexOf("...")===0,ce=(H?I.length>3?I.slice(3):"any":I).split("|").map(we=>s(we.trim()));let de=!1,ve=H?"...":"";return{types:ce.map(function(we){return de=we.isAny||de,ve+=we.name+"|",{name:we.name,typeIndex:we.index,test:we.test,isAny:we.isAny,conversion:null,conversionIndex:-1}}),name:ve.slice(0,-1),hasAny:de,hasConversion:!1,restParam:H}}function E(I){const H=I.types.map(Se=>Se.name),ie=O(H);let ce=I.hasAny,de=I.name;const ve=ie.map(function(Se){const we=s(Se.from);return ce=we.isAny||ce,de+="|"+Se.from,{name:Se.from,typeIndex:we.index,test:we.test,isAny:we.isAny,conversion:Se,conversionIndex:Se.index}});return{types:I.types.concat(ve),name:de,hasAny:ce,hasConversion:ve.length>0,restParam:I.restParam}}function h(I){return I.typeSet||(I.typeSet=new Set,I.types.forEach(H=>I.typeSet.add(H.name))),I.typeSet}function w(I){const H=[];if(typeof I!="string")throw new TypeError("Signatures must be strings");const ie=I.trim();if(ie==="")return H;const ce=ie.split(",");for(let de=0;de<ce.length;++de){const ve=g(ce[de].trim());if(ve.restParam&&de!==ce.length-1)throw new SyntaxError('Unexpected rest parameter "'+ce[de]+'": only allowed for the last parameter');if(ve.types.length===0)return null;H.push(ve)}return H}function x(I){const H=te(I);return H?H.restParam:!1}function b(I){if(!I||I.types.length===0)return Rv;if(I.types.length===1)return s(I.types[0].name).test;if(I.types.length===2){const H=s(I.types[0].name).test,ie=s(I.types[1].name).test;return function(de){return H(de)||ie(de)}}else{const H=I.types.map(function(ie){return s(ie.name).test});return function(ce){for(let de=0;de<H.length;de++)if(H[de](ce))return!0;return!1}}}function D(I){let H,ie,ce;if(x(I)){H=se(I).map(b);const de=H.length,ve=b(te(I)),Se=function(we){for(let Te=de;Te<we.length;Te++)if(!ve(we[Te]))return!1;return!0};return function(Te){for(let De=0;De<H.length;De++)if(!H[De](Te[De]))return!1;return Se(Te)&&Te.length>=de+1}}else return I.length===0?function(ve){return ve.length===0}:I.length===1?(ie=b(I[0]),function(ve){return ie(ve[0])&&ve.length===1}):I.length===2?(ie=b(I[0]),ce=b(I[1]),function(ve){return ie(ve[0])&&ce(ve[1])&&ve.length===2}):(H=I.map(b),function(ve){for(let Se=0;Se<H.length;Se++)if(!H[Se](ve[Se]))return!1;return ve.length===H.length})}function A(I,H){return H<I.length?I[H]:x(I)?te(I):null}function S(I,H){const ie=A(I,H);return ie?h(ie):new Set}function C(I){return I.conversion===null||I.conversion===void 0}function M(I,H){const ie=new Set;return I.forEach(ce=>{const de=S(ce.params,H);let ve;for(ve of de)ie.add(ve)}),ie.has("any")?["any"]:Array.from(ie)}function $(I,H,ie){let ce,de;const ve=I||"unnamed";let Se=ie,we;for(we=0;we<H.length;we++){const or=[];if(Se.forEach(Le=>{const _r=A(Le.params,we),T=b(_r);(we<Le.params.length||x(Le.params))&&T(H[we])&&or.push(Le)}),or.length===0){if(de=M(Se,we),de.length>0){const Le=f(H[we]);return ce=new TypeError("Unexpected type of argument in function "+ve+" (expected: "+de.join(" or ")+", actual: "+Le.join(" | ")+", index: "+we+")"),ce.data={category:"wrongType",fn:ve,index:we,actual:Le,expected:de},ce}}else Se=or}const Te=Se.map(function(or){return x(or.params)?1/0:or.params.length});if(H.length<Math.min.apply(null,Te))return de=M(Se,we),ce=new TypeError("Too few arguments in function "+ve+" (expected: "+de.join(" or ")+", index: "+H.length+")"),ce.data={category:"tooFewArgs",fn:ve,index:H.length,expected:de},ce;const De=Math.max.apply(null,Te);if(H.length>De)return ce=new TypeError("Too many arguments in function "+ve+" (expected: "+De+", actual: "+H.length+")"),ce.data={category:"tooManyArgs",fn:ve,index:H.length,expectedLength:De},ce;const ir=[];for(let or=0;or<H.length;++or)ir.push(f(H[or]).join("|"));return ce=new TypeError('Arguments of type "'+ir.join(", ")+'" do not match any of the defined signatures of function '+ve+"."),ce.data={category:"mismatch",actual:ir},ce}function B(I){let H=a.length+1;for(let ie=0;ie<I.types.length;ie++)C(I.types[ie])&&(H=Math.min(H,I.types[ie].typeIndex));return H}function P(I){let H=i+1;for(let ie=0;ie<I.types.length;ie++)C(I.types[ie])||(H=Math.min(H,I.types[ie].conversionIndex));return H}function R(I,H){if(I.hasAny){if(!H.hasAny)return 1}else if(H.hasAny)return-1;if(I.restParam){if(!H.restParam)return 1}else if(H.restParam)return-1;if(I.hasConversion){if(!H.hasConversion)return 1}else if(H.hasConversion)return-1;const ie=B(I)-B(H);if(ie<0)return-1;if(ie>0)return 1;const ce=P(I)-P(H);return ce<0?-1:ce>0?1:0}function N(I,H){const ie=I.params,ce=H.params,de=te(ie),ve=te(ce),Se=x(ie),we=x(ce);if(Se&&de.hasAny){if(!we||!ve.hasAny)return 1}else if(we&&ve.hasAny)return-1;let Te=0,De=0,ir;for(ir of ie)ir.hasAny&&++Te,ir.hasConversion&&++De;let or=0,Le=0;for(ir of ce)ir.hasAny&&++or,ir.hasConversion&&++Le;if(Te!==or)return Te-or;if(Se&&de.hasConversion){if(!we||!ve.hasConversion)return 1}else if(we&&ve.hasConversion)return-1;if(De!==Le)return De-Le;if(Se){if(!we)return 1}else if(we)return-1;const _r=(ie.length-ce.length)*(Se?-1:1);if(_r!==0)return _r;const T=[];let X=0;for(let Ae=0;Ae<ie.length;++Ae){const qe=R(ie[Ae],ce[Ae]);T.push(qe),X+=qe}if(X!==0)return X;let pe;for(pe of T)if(pe!==0)return pe;return 0}function O(I){if(I.length===0)return[];const H=I.map(s);I.length>1&&H.sort((de,ve)=>de.index-ve.index);let ie=H[0].conversionsTo;if(I.length===1)return ie;ie=ie.concat([]);const ce=new Set(I);for(let de=1;de<H.length;++de){let ve;for(ve of H[de].conversionsTo)ce.has(ve.from)||(ie.push(ve),ce.add(ve.from))}return ie}function U(I,H){let ie=H;if(I.some(de=>de.hasConversion)){const de=x(I),ve=I.map(F);ie=function(){const we=[],Te=de?arguments.length-1:arguments.length;for(let De=0;De<Te;De++)we[De]=ve[De](arguments[De]);return de&&(we[Te]=arguments[Te].map(ve[Te])),H.apply(this,we)}}let ce=ie;if(x(I)){const de=I.length-1;ce=function(){return ie.apply(this,ae(arguments,0,de).concat([ae(arguments,de)]))}}return ce}function F(I){let H,ie,ce,de;const ve=[],Se=[];switch(I.types.forEach(function(we){we.conversion&&(ve.push(s(we.conversion.from).test),Se.push(we.conversion.convert))}),Se.length){case 0:return function(Te){return Te};case 1:return H=ve[0],ce=Se[0],function(Te){return H(Te)?ce(Te):Te};case 2:return H=ve[0],ie=ve[1],ce=Se[0],de=Se[1],function(Te){return H(Te)?ce(Te):ie(Te)?de(Te):Te};default:return function(Te){for(let De=0;De<Se.length;De++)if(ve[De](Te))return Se[De](Te);return Te}}}function q(I){function H(ie,ce,de){if(ce<ie.length){const ve=ie[ce];let Se=[];if(ve.restParam){const we=ve.types.filter(C);we.length<ve.types.length&&Se.push({types:we,name:"..."+we.map(Te=>Te.name).join("|"),hasAny:we.some(Te=>Te.isAny),hasConversion:!1,restParam:!0}),Se.push(ve)}else Se=ve.types.map(function(we){return{types:[we],name:we.name,hasAny:we.isAny,hasConversion:we.conversion,restParam:!1}});return ne(Se,function(we){return H(ie,ce+1,de.concat([we]))})}else return[de]}return H(I,0,[])}function Y(I,H){const ie=Math.max(I.length,H.length);for(let we=0;we<ie;we++){const Te=S(I,we),De=S(H,we);let ir=!1,or;for(or of De)if(Te.has(or)){ir=!0;break}if(!ir)return!1}const ce=I.length,de=H.length,ve=x(I),Se=x(H);return ve?Se?ce===de:de>=ce:Se?ce>=de:ce===de}function G(I){return I.map(H=>ue(H)?k(H.referToSelf.callback):W(H)?$e(H.referTo.references,H.referTo.callback):H)}function z(I,H,ie){const ce=[];let de;for(de of I){let ve=ie[de];if(typeof ve!="number")throw new TypeError('No definition for referenced signature "'+de+'"');if(ve=H[ve],typeof ve!="function")return!1;ce.push(ve)}return ce}function J(I,H,ie){const ce=G(I),de=new Array(ce.length).fill(!1);let ve=!0;for(;ve;){ve=!1;let Se=!0;for(let we=0;we<ce.length;++we){if(de[we])continue;const Te=ce[we];if(ue(Te))ce[we]=Te.referToSelf.callback(ie),ce[we].referToSelf=Te.referToSelf,de[we]=!0,Se=!1;else if(W(Te)){const De=z(Te.referTo.references,ce,H);De?(ce[we]=Te.referTo.callback.apply(this,De),ce[we].referTo=Te.referTo,de[we]=!0,Se=!1):ve=!0}}if(Se&&ve)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return ce}function le(I){const H=/\bthis(\(|\.signatures\b)/;Object.keys(I).forEach(ie=>{const ce=I[ie];if(H.test(ce.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Q(I,H){if(o.createCount++,Object.keys(H).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&le(H);const ie=[],ce=[],de={},ve=[];let Se;for(Se in H){if(!Object.prototype.hasOwnProperty.call(H,Se))continue;const sr=w(Se);if(!sr)continue;ie.forEach(function(qi){if(Y(qi,sr))throw new TypeError('Conflicting signatures "'+y(qi)+'" and "'+y(sr)+'".')}),ie.push(sr);const yt=ce.length;ce.push(H[Se]);const c3=sr.map(E);let Io;for(Io of q(c3)){const qi=y(Io);ve.push({params:Io,name:qi,fn:yt}),Io.every(f3=>!f3.hasConversion)&&(de[qi]=yt)}}ve.sort(N);const we=J(ce,de,$n);let Te;for(Te in de)Object.prototype.hasOwnProperty.call(de,Te)&&(de[Te]=we[de[Te]]);const De=[],ir=new Map;for(Te of ve)ir.has(Te.name)||(Te.fn=we[Te.fn],De.push(Te),ir.set(Te.name,Te));const or=De[0]&&De[0].params.length<=2&&!x(De[0].params),Le=De[1]&&De[1].params.length<=2&&!x(De[1].params),_r=De[2]&&De[2].params.length<=2&&!x(De[2].params),T=De[3]&&De[3].params.length<=2&&!x(De[3].params),X=De[4]&&De[4].params.length<=2&&!x(De[4].params),pe=De[5]&&De[5].params.length<=2&&!x(De[5].params),Ae=or&&Le&&_r&&T&&X&&pe;for(let sr=0;sr<De.length;++sr)De[sr].test=D(De[sr].params);const qe=or?b(De[0].params[0]):$t,Ge=Le?b(De[1].params[0]):$t,Xr=_r?b(De[2].params[0]):$t,Na=T?b(De[3].params[0]):$t,Wu=X?b(De[4].params[0]):$t,Bo=pe?b(De[5].params[0]):$t,Zu=or?b(De[0].params[1]):$t,Ro=Le?b(De[1].params[1]):$t,Po=_r?b(De[2].params[1]):$t,Yu=T?b(De[3].params[1]):$t,Xu=X?b(De[4].params[1]):$t,zo=pe?b(De[5].params[1]):$t;for(let sr=0;sr<De.length;++sr)De[sr].implementation=U(De[sr].params,De[sr].fn);const Ku=or?De[0].implementation:Ma,Ju=Le?De[1].implementation:Ma,Qu=_r?De[2].implementation:Ma,el=T?De[3].implementation:Ma,ee=X?De[4].implementation:Ma,Oe=pe?De[5].implementation:Ma,Be=or?De[0].params.length:-1,Ve=Le?De[1].params.length:-1,gr=_r?De[2].params.length:-1,Sr=T?De[3].params.length:-1,pr=X?De[4].params.length:-1,lr=pe?De[5].params.length:-1,Kr=Ae?6:0,Pr=De.length,Ir=De.map(sr=>sr.test),gt=De.map(sr=>sr.implementation),_n=function(){for(let yt=Kr;yt<Pr;yt++)if(Ir[yt](arguments))return gt[yt].apply(this,arguments);return o.onMismatch(I,arguments,De)};function $n(sr,yt){return arguments.length===Be&&qe(sr)&&Zu(yt)?Ku.apply(this,arguments):arguments.length===Ve&&Ge(sr)&&Ro(yt)?Ju.apply(this,arguments):arguments.length===gr&&Xr(sr)&&Po(yt)?Qu.apply(this,arguments):arguments.length===Sr&&Na(sr)&&Yu(yt)?el.apply(this,arguments):arguments.length===pr&&Wu(sr)&&Xu(yt)?ee.apply(this,arguments):arguments.length===lr&&Bo(sr)&&zo(yt)?Oe.apply(this,arguments):_n.apply(this,arguments)}try{Object.defineProperty($n,"name",{value:I})}catch{}return $n.signatures=de,$n._typedFunctionData={signatures:De,signatureMap:ir},$n}function re(I,H,ie){throw $(I,H,ie)}function se(I){return ae(I,0,I.length-1)}function te(I){return I[I.length-1]}function ae(I,H,ie){return Array.prototype.slice.call(I,H,ie)}function fe(I,H){for(let ie=0;ie<I.length;ie++)if(H(I[ie]))return I[ie]}function ne(I,H){return Array.prototype.concat.apply([],I.map(H))}function xe(){const I=se(arguments).map(ie=>y(w(ie))),H=te(arguments);if(typeof H!="function")throw new TypeError("Callback function expected as last argument");return $e(I,H)}function $e(I,H){return{referTo:{references:I,callback:H}}}function k(I){if(typeof I!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:I}}}function W(I){return I&&typeof I.referTo=="object"&&Array.isArray(I.referTo.references)&&typeof I.referTo.callback=="function"}function ue(I){return I&&typeof I.referToSelf=="object"&&typeof I.referToSelf.callback=="function"}function j(I,H){if(!I)return H;if(H&&H!==I){const ie=new Error("Function names do not match (expected: "+I+", actual: "+H+")");throw ie.data={actual:H,expected:I},ie}return I}function K(I){let H;for(const ie in I)Object.prototype.hasOwnProperty.call(I,ie)&&(p(I[ie])||typeof I[ie].signature=="string")&&(H=j(H,I[ie].name));return H}function oe(I,H){let ie;for(ie in H)if(Object.prototype.hasOwnProperty.call(H,ie)){if(ie in I&&H[ie]!==I[ie]){const ce=new Error('Signature "'+ie+'" is defined twice');throw ce.data={signature:ie,sourceFunction:H[ie],destFunction:I[ie]},ce}I[ie]=H[ie]}}const he=o;o=function(I){const H=typeof I=="string",ie=H?1:0;let ce=H?I:"";const de={};for(let ve=ie;ve<arguments.length;++ve){const Se=arguments[ve];let we={},Te;if(typeof Se=="function"?(Te=Se.name,typeof Se.signature=="string"?we[Se.signature]=Se:p(Se)&&(we=Se.signatures)):e(Se)&&(we=Se,H||(Te=K(Se))),Object.keys(we).length===0){const De=new TypeError("Argument to 'typed' at index "+ve+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw De.data={index:ve,argument:Se},De}H||(ce=j(ce,Te)),oe(de,we)}return Q(ce||"",de)},o.create=w2,o.createCount=he.createCount,o.onMismatch=re,o.throwMismatchError=re,o.createError=$,o.clear=l,o.clearConversions=c,o.addTypes=u,o._findType=s,o.referTo=xe,o.referToSelf=k,o.convert=m,o.findSignature=d,o.find=v,o.isTypedFunction=p,o.warnAgainstDeprecatedThis=!0,o.addType=function(I,H){let ie="any";H!==!1&&n.has("Object")&&(ie="Object"),o.addTypes([I],ie)};function me(I){if(!I||typeof I.from!="string"||typeof I.to!="string"||typeof I.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(I.to===I.from)throw new SyntaxError('Illegal to define conversion from "'+I.from+'" to itself.')}return o.addConversion=function(I){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};me(I);const ie=s(I.to),ce=ie.conversionsTo.find(de=>de.from===I.from);if(ce)if(H&&H.override)o.removeConversion({from:ce.from,to:I.to,convert:ce.convert});else throw new Error('There is already a conversion from "'+I.from+'" to "'+ie.name+'"');ie.conversionsTo.push({from:I.from,convert:I.convert,index:i++})},o.addConversions=function(I,H){I.forEach(ie=>o.addConversion(ie,H))},o.removeConversion=function(I){me(I);const H=s(I.to),ie=fe(H.conversionsTo,de=>de.from===I.from);if(!ie)throw new Error("Attempt to remove nonexistent conversion from "+I.from+" to "+I.to);if(ie.convert!==I.convert)throw new Error("Conversion to remove does not match existing conversion");const ce=H.conversionsTo.indexOf(ie);H.conversionsTo.splice(ce,1)},o.resolve=function(I,H){if(!p(I))throw new TypeError(Pv);const ie=I._typedFunctionData.signatures;for(let ce=0;ce<ie.length;++ce)if(ie[ce].test(H))return ie[ce];return null},o}const Ya=w2();function ze(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function Vz(e){return/^-?\d+$/.test(e)}function jn(e,r){return r.number==="bigint"&&!Vz(e)?r.numberFallback:r.number}var Pn=Math.sign||function(e){return e>0?1:e<0?-1:0},Gz=Math.log2||function(r){return Math.log(r)/Math.LN2},Wz=Math.log10||function(r){return Math.log(r)/Math.LN10},Zz=Math.log1p||function(e){return Math.log(e+1)},Yz=Math.cbrt||function(r){if(r===0)return r;var t=r<0,n;return t&&(r=-r),isFinite(r)?(n=Math.exp(Math.log(r)/3),n=(r/(n*n)+2*n)/3):n=r,t?-n:n},Xz=Math.expm1||function(r){return r>=2e-4||r<=-2e-4?Math.exp(r)-1:r+r*r/2+r*r*r/6};function yl(e,r,t){var n={2:"0b",8:"0o",16:"0x"},a=n[r],i="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!ze(t))throw new Error("size must be an integer");if(e>2**(t-1)-1||e<-(2**(t-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!ze(e))throw new Error("Value must be an integer");e<0&&(e=e+2**t),i="i".concat(t)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(r)).concat(i)}function ta(e,r){if(typeof r=="function")return r(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:t,precision:n,wordSize:a}=E2(r);switch(t){case"fixed":return S2(e,n);case"exponential":return A2(e,n);case"engineering":return Kz(e,n);case"bin":return yl(e,2,a);case"oct":return yl(e,8,a);case"hex":return yl(e,16,a);case"auto":return Jz(e,n,r).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function E2(e){var r="auto",t,n;if(e!==void 0)if(Je(e))t=e;else if(Qe(e))t=e.toNumber();else if(wu(e))e.precision!==void 0&&(t=zv(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=zv(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(r=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:r,precision:t,wordSize:n}}function Do(e){var r=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!r)throw new SyntaxError("Invalid number "+e);var t=r[1],n=r[2],a=parseFloat(r[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(s){return a-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return o.length===0&&(o.push(0),a++),{sign:t,coefficients:o,exponent:a}}function Kz(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Do(e),n=Su(t,r),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(Je(r))for(;r>i.length||a-o+1>i.length;)i.push(0);else for(var s=Math.abs(a-o)-(i.length-1),u=0;u<s;u++)i.push(0);for(var l=Math.abs(a-o),c=1;l>0;)c++,l--;var f=i.slice(c).join(""),p=Je(r)&&f.length||f.match(/[1-9]/)?"."+f:"",d=i.slice(0,c).join("")+p+"e"+(a>=0?"+":"")+o.toString();return n.sign+d}function S2(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Do(e),n=typeof r=="number"?Su(t,t.exponent+1+r):t,a=n.coefficients,i=n.exponent+1,o=i+(r||0);return a.length<o&&(a=a.concat(Qa(o-a.length))),i<0&&(a=Qa(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function A2(e,r){if(isNaN(e)||!isFinite(e))return String(e);var t=Do(e),n=r?Su(t,r):t,a=n.coefficients,i=n.exponent;a.length<r&&(a=a.concat(Qa(r-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function Jz(e,r,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Iv(t==null?void 0:t.lowerExp,-3),a=Iv(t==null?void 0:t.upperExp,5),i=Do(e),o=r?Su(i,r):i;if(o.exponent<n||o.exponent>=a)return A2(e,r);var s=o.coefficients,u=o.exponent;s.length<r&&(s=s.concat(Qa(r-s.length))),s=s.concat(Qa(u-s.length+1+(s.length<r?r-s.length:0))),s=Qa(-u).concat(s);var l=u>0?u:0;return l<s.length-1&&s.splice(l+1,0,"."),o.sign+s.join("")}function Su(e,r){for(var t={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=t.coefficients;r<=0;)n.unshift(0),t.exponent++,r++;if(n.length>r){var a=n.splice(r,n.length-r);if(a[0]>=5){var i=r-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),t.exponent++,i++),i--,n[i]++}}return t}function Qa(e){for(var r=[],t=0;t<e;t++)r.push(0);return r}function Qz(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function rt(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-8,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(t<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return isNaN(e)||isNaN(r)?!1:!isFinite(e)||!isFinite(r)?e===r:e===r?!0:Math.abs(e-r)<=Math.max(t*Math.max(Math.abs(e),Math.abs(r)),n)}var eI=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},rI=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},tI=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},nI=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},aI=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},iI=Math.tanh||function(e){var r=Math.exp(2*e);return(r-1)/(r+1)};function oI(e,r){var t=!0,n=r>0?!0:r<0?!1:1/r===1/0;return t^n?-e:e}function zv(e,r){if(Je(e))return e;if(Qe(e))return e.toNumber();r()}function Iv(e,r){return Je(e)?e:Qe(e)?e.toNumber():r}function L(e,r,t,n){function a(i){var o=Uz(i,r.map(lI));return sI(e,r,i),t(o)}return a.isFactory=!0,a.fn=e,a.dependencies=r.slice().sort(),n&&(a.meta=n),a}function sI(e,r,t){var n=r.filter(i=>!uI(i)).every(i=>t[i]!==void 0);if(!n){var a=r.filter(i=>t[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function uI(e){return e&&e[0]==="?"}function lI(e){return e&&e[0]==="?"?e.slice(1):e}function ct(e,r){if(C2(e)&&D2(e,r))return e[r];throw typeof e[r]=="function"&&Tf(e,r)?new Error('Cannot access method "'+r+'" as a property'):new Error('No access to property "'+r+'"')}function ni(e,r,t){if(C2(e)&&D2(e,r))return e[r]=t,t;throw new Error('No access to property "'+r+'"')}function cI(e,r){return r in e}function D2(e,r){return!e||typeof e!="object"?!1:Re(pI,r)?!0:!(r in Object.prototype||r in Function.prototype)}function fI(e,r){if(!Tf(e,r))throw new Error('No access to method "'+r+'"');return e[r]}function Tf(e,r){return e==null||typeof e[r]!="function"||Re(e,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(e)?!1:Re(dI,r)?!0:!(r in Object.prototype||r in Function.prototype)}function C2(e){return typeof e=="object"&&e&&e.constructor===Object}var pI={length:!0,name:!0},dI={toString:!0,valueOf:!0,toLocaleString:!0};class Au{constructor(r){this.wrappedObject=r,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).values()}get(r){return ct(this.wrappedObject,r)}set(r,t){return ni(this.wrappedObject,r,t),this}has(r){return cI(this.wrappedObject,r)}entries(){return M2(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){delete this.wrappedObject[r]}clear(){for(var r of this.keys())this.delete(r)}get size(){return Object.keys(this.wrappedObject).length}}class N2{constructor(r,t,n){this.a=r,this.b=t,this.bKeys=n,this[Symbol.iterator]=this.entries}get(r){return this.bKeys.has(r)?this.b.get(r):this.a.get(r)}set(r,t){return this.bKeys.has(r)?this.b.set(r,t):this.a.set(r,t),this}has(r){return this.b.has(r)||this.a.has(r)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return M2(this.keys(),r=>[r,this.get(r)])}forEach(r){for(var t of this.keys())r(this.get(t),t,this)}delete(r){return this.bKeys.has(r)?this.b.delete(r):this.a.delete(r)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function M2(e,r){return{next:()=>{var t=e.next();return t.done?t:{value:r(t.value),done:!1}}}}function io(){return new Map}function ei(e){if(!e)return io();if(T2(e))return e;if(wu(e))return new Au(e);throw new Error("createMap can create maps from objects or Maps")}function vI(e){if(e instanceof Au)return e.wrappedObject;var r={};for(var t of e.keys()){var n=e.get(t);ni(r,t,n)}return r}function T2(e){return e?e instanceof Map||e instanceof Au||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var O2=function(){return O2=Ya.create,Ya},mI=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],hI=L("typed",mI,function(r){var{BigNumber:t,Complex:n,DenseMatrix:a,Fraction:i}=r,o=O2();return o.clear(),o.addTypes([{name:"number",test:Je},{name:"Complex",test:bn},{name:"BigNumber",test:Qe},{name:"bigint",test:Nz},{name:"Fraction",test:So},{name:"Unit",test:Rt},{name:"identifier",test:s=>it&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:it},{name:"Chain",test:b2},{name:"Array",test:hr},{name:"Matrix",test:Ue},{name:"DenseMatrix",test:Os},{name:"SparseMatrix",test:ea},{name:"Range",test:Mf},{name:"Index",test:xu},{name:"boolean",test:Mz},{name:"ResultSet",test:Tz},{name:"Help",test:y2},{name:"function",test:Oz},{name:"Date",test:_z},{name:"RegExp",test:$z},{name:"null",test:Fz},{name:"undefined",test:Bz},{name:"AccessorNode",test:oa},{name:"ArrayNode",test:Bt},{name:"AssignmentNode",test:Rz},{name:"BlockNode",test:Pz},{name:"ConditionalNode",test:zz},{name:"ConstantNode",test:cr},{name:"FunctionNode",test:qn},{name:"FunctionAssignmentNode",test:Ao},{name:"IndexNode",test:Ai},{name:"Node",test:Er},{name:"ObjectNode",test:Eu},{name:"OperatorNode",test:kr},{name:"ParenthesisNode",test:En},{name:"RangeNode",test:Iz},{name:"RelationalNode",test:Lz},{name:"SymbolNode",test:Zr},{name:"Map",test:T2},{name:"Object",test:wu}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(t||Go(u),Qz(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new t(u)}},{from:"number",to:"Complex",convert:function(u){return n||Wo(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||Wo(u),new n(u.toNumber(),0)}},{from:"bigint",to:"number",convert:function(u){if(u>Number.MAX_SAFE_INTEGER)throw new TypeError("Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: "+u+")");return Number(u)}},{from:"bigint",to:"BigNumber",convert:function(u){return t||Go(u),new t(u.toString())}},{from:"bigint",to:"Fraction",convert:function(u){return i||Zo(u),new i(u.toString())}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return n||Wo(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||Zo(u);var l=new i(u);if(l.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(u){var l=Number(u);if(isNaN(l))throw new Error('Cannot convert "'+u+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(u){t||Go(u);try{return new t(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"bigint",convert:function(u){try{return BigInt(u)}catch{throw new Error('Cannot convert "'+u+'" to BigInt')}}},{from:"string",to:"Fraction",convert:function(u){i||Zo(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||Wo(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return t||Go(u),new t(+u)}},{from:"boolean",to:"bigint",convert:function(u){return BigInt(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||Zo(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||gI(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Ht(u[0])&&l.some(p=>!p.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&Ht(u[0])&&l.some(p=>!p.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o});function Go(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Wo(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function gI(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function Zo(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var yI="ResultSet",bI=[],xI=L(yI,bI,()=>{function e(r){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=r||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(r){return new e(r.entries)},e},{isClass:!0});/*!
|
|
78
|
+
* decimal.js v10.4.3
|
|
79
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
80
|
+
* https://github.com/MikeMcl/decimal.js
|
|
81
|
+
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
82
|
+
* MIT Licence
|
|
83
|
+
*/var Xa=9e15,Vn=1e9,Jl="0123456789abcdef",_s="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$s="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ql={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xa,maxE:Xa,crypto:!1},_2,gn,Ze=!0,Du="[DecimalError] ",kn=Du+"Invalid argument: ",$2=Du+"Precision limit exceeded",F2=Du+"crypto unavailable",B2="[object Decimal]",st=Math.floor,Ur=Math.pow,wI=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,EI=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,SI=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,R2=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Kt=1e7,He=7,AI=9007199254740991,DI=_s.length-1,ec=$s.length-1,Ee={toStringTag:B2};Ee.absoluteValue=Ee.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),ke(e)};Ee.ceil=function(){return ke(new this.constructor(this),this.e+1,2)};Ee.clampedTo=Ee.clamp=function(e,r){var t,n=this,a=n.constructor;if(e=new a(e),r=new a(r),!e.s||!r.s)return new a(NaN);if(e.gt(r))throw Error(kn+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new a(n)};Ee.comparedTo=Ee.cmp=function(e){var r,t,n,a,i=this,o=i.d,s=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!o||!s)return!u||!l?NaN:u!==l?u:o===s?0:!o^u<0?1:-1;if(!o[0]||!s[0])return o[0]?u:s[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=s.length,r=0,t=n<a?n:a;r<t;++r)if(o[r]!==s[r])return o[r]>s[r]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};Ee.cosine=Ee.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+He,n.rounding=1,t=CI(n,q2(n,t)),n.precision=e,n.rounding=r,ke(gn==2||gn==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};Ee.cubeRoot=Ee.cbrt=function(){var e,r,t,n,a,i,o,s,u,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(Ze=!1,i=c.s*Ur(c.s*c,1/3),!i||Math.abs(i)==1/0?(t=Qr(c.d),e=c.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Ur(t,1/3),e=st((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t),n.s=c.s):n=new f(i.toString()),o=(e=f.precision)+3;;)if(s=n,u=s.times(s).times(s),l=u.plus(c),n=Tr(l.plus(c).times(s),l.plus(u),o+2,1),Qr(s.d).slice(0,o)===(t=Qr(n.d)).slice(0,o))if(t=t.slice(o-3,o+1),t=="9999"||!a&&t=="4999"){if(!a&&(ke(s,e+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(ke(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return Ze=!0,ke(n,e,f.rounding,r)};Ee.decimalPlaces=Ee.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-st(this.e/He))*He,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};Ee.dividedBy=Ee.div=function(e){return Tr(this,new this.constructor(e))};Ee.dividedToIntegerBy=Ee.divToInt=function(e){var r=this,t=r.constructor;return ke(Tr(r,new t(e),0,1,1),t.precision,t.rounding)};Ee.equals=Ee.eq=function(e){return this.cmp(e)===0};Ee.floor=function(){return ke(new this.constructor(this),this.e+1,3)};Ee.greaterThan=Ee.gt=function(e){return this.cmp(e)>0};Ee.greaterThanOrEqualTo=Ee.gte=function(e){var r=this.cmp(e);return r==1||r===0};Ee.hyperbolicCosine=Ee.cosh=function(){var e,r,t,n,a,i=this,o=i.constructor,s=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return s;t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),r=(1/Nu(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),i=ai(o,1,i.times(r),new o(1),!0);for(var u,l=e,c=new o(8);l--;)u=i.times(i),i=s.minus(u.times(c.minus(u.times(c))));return ke(i,o.precision=t,o.rounding=n,!0)};Ee.hyperbolicSine=Ee.sinh=function(){var e,r,t,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(r=i.precision,t=i.rounding,i.precision=r+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=ai(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Nu(5,e)),a=ai(i,2,a,a,!0);for(var o,s=new i(5),u=new i(16),l=new i(20);e--;)o=a.times(a),a=a.times(s.plus(o.times(u.times(o).plus(l))))}return i.precision=r,i.rounding=t,ke(a,r,t,!0)};Ee.hyperbolicTangent=Ee.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,Tr(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};Ee.inverseCosine=Ee.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),a=t.precision,i=t.rounding;return n!==-1?n===0?r.isNeg()?Xt(t,a,i):new t(0):new t(NaN):r.isZero()?Xt(t,a+4,i).times(.5):(t.precision=a+6,t.rounding=1,r=r.asin(),e=Xt(t,a+4,i).times(.5),t.precision=a,t.rounding=i,e.minus(r))};Ee.inverseHyperbolicCosine=Ee.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Ze=!1,t=t.times(t).minus(1).sqrt().plus(t),Ze=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};Ee.inverseHyperbolicSine=Ee.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Ze=!1,t=t.times(t).plus(1).sqrt().plus(t),Ze=!0,n.precision=e,n.rounding=r,t.ln())};Ee.inverseHyperbolicTangent=Ee.atanh=function(){var e,r,t,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,r=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?ke(new i(a),e,r,!0):(i.precision=t=n-a.e,a=Tr(a.plus(1),new i(1).minus(a),t+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=r,a.times(.5))):new i(NaN)};Ee.inverseSine=Ee.asin=function(){var e,r,t,n,a=this,i=a.constructor;return a.isZero()?new i(a):(r=a.abs().cmp(1),t=i.precision,n=i.rounding,r!==-1?r===0?(e=Xt(i,t+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,a.times(2)))};Ee.inverseTangent=Ee.atan=function(){var e,r,t,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,p=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=ec)return o=Xt(c,f+4,p).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=ec)return o=Xt(c,f+4,p).times(.5),o.s=l.s,o}for(c.precision=s=f+10,c.rounding=1,t=Math.min(28,s/He+2|0),e=t;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ze=!1,r=Math.ceil(s/He),n=1,u=l.times(l),o=new c(l),a=l;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[r]!==void 0)for(e=r;o.d[e]===i.d[e]&&e--;);return t&&(o=o.times(2<<t-1)),Ze=!0,ke(o,c.precision=f,c.rounding=p,!0)};Ee.isFinite=function(){return!!this.d};Ee.isInteger=Ee.isInt=function(){return!!this.d&&st(this.e/He)>this.d.length-2};Ee.isNaN=function(){return!this.s};Ee.isNegative=Ee.isNeg=function(){return this.s<0};Ee.isPositive=Ee.isPos=function(){return this.s>0};Ee.isZero=function(){return!!this.d&&this.d[0]===0};Ee.lessThan=Ee.lt=function(e){return this.cmp(e)<0};Ee.lessThanOrEqualTo=Ee.lte=function(e){return this.cmp(e)<1};Ee.logarithm=Ee.log=function(e){var r,t,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,p=c.rounding,d=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new c(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)i=!0;else{for(a=t[0];a%10===0;)a/=10;i=a!==1}if(Ze=!1,s=f+d,o=zn(l,s),n=r?Fs(c,s+10):zn(e,s),u=Tr(o,n,s,1),oo(u.d,a=f,p))do if(s+=10,o=zn(l,s),n=r?Fs(c,s+10):zn(e,s),u=Tr(o,n,s,1),!i){+Qr(u.d).slice(a+1,a+15)+1==1e14&&(u=ke(u,f+1,0));break}while(oo(u.d,a+=10,p));return Ze=!0,ke(u,f,p)};Ee.minus=Ee.sub=function(e){var r,t,n,a,i,o,s,u,l,c,f,p,d=this,v=d.constructor;if(e=new v(e),!d.d||!e.d)return!d.s||!e.s?e=new v(NaN):d.d?e.s=-e.s:e=new v(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,p=e.d,s=v.precision,u=v.rounding,!l[0]||!p[0]){if(p[0])e.s=-e.s;else if(l[0])e=new v(d);else return new v(u===3?-0:0);return Ze?ke(e,s,u):e}if(t=st(e.e/He),c=st(d.e/He),l=l.slice(),i=c-t,i){for(f=i<0,f?(r=l,i=-i,o=p.length):(r=p,t=c,o=l.length),n=Math.max(Math.ceil(s/He),o)+2,i>n&&(i=n,r.length=1),r.reverse(),n=i;n--;)r.push(0);r.reverse()}else{for(n=l.length,o=p.length,f=n<o,f&&(o=n),n=0;n<o;n++)if(l[n]!=p[n]){f=l[n]<p[n];break}i=0}for(f&&(r=l,l=p,p=r,e.s=-e.s),o=l.length,n=p.length-o;n>0;--n)l[o++]=0;for(n=p.length;n>i;){if(l[--n]<p[n]){for(a=n;a&&l[--a]===0;)l[a]=Kt-1;--l[a],l[n]+=Kt}l[n]-=p[n]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(e.d=l,e.e=Cu(l,t),Ze?ke(e,s,u):e):new v(u===3?-0:0)};Ee.modulo=Ee.mod=function(e){var r,t=this,n=t.constructor;return e=new n(e),!t.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||t.d&&!t.d[0]?ke(new n(t),n.precision,n.rounding):(Ze=!1,n.modulo==9?(r=Tr(t,e.abs(),0,3,1),r.s*=e.s):r=Tr(t,e,0,n.modulo,1),r=r.times(e),Ze=!0,t.minus(r))};Ee.naturalExponential=Ee.exp=function(){return rc(this)};Ee.naturalLogarithm=Ee.ln=function(){return zn(this)};Ee.negated=Ee.neg=function(){var e=new this.constructor(this);return e.s=-e.s,ke(e)};Ee.plus=Ee.add=function(e){var r,t,n,a,i,o,s,u,l,c,f=this,p=f.constructor;if(e=new p(e),!f.d||!e.d)return!f.s||!e.s?e=new p(NaN):f.d||(e=new p(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,s=p.precision,u=p.rounding,!l[0]||!c[0])return c[0]||(e=new p(f)),Ze?ke(e,s,u):e;if(i=st(f.e/He),n=st(e.e/He),l=l.slice(),a=i-n,a){for(a<0?(t=l,a=-a,o=c.length):(t=c,n=i,o=l.length),i=Math.ceil(s/He),o=i>o?i+1:o+1,a>o&&(a=o,t.length=1),t.reverse();a--;)t.push(0);t.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,t=c,c=l,l=t),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/Kt|0,l[a]%=Kt;for(r&&(l.unshift(r),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=Cu(l,n),Ze?ke(e,s,u):e};Ee.precision=Ee.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(kn+e);return t.d?(r=P2(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};Ee.round=function(){var e=this,r=e.constructor;return ke(new r(e),e.e+1,r.rounding)};Ee.sine=Ee.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+He,n.rounding=1,t=MI(n,q2(n,t)),n.precision=e,n.rounding=r,ke(gn>2?t.neg():t,e,r,!0)):new n(NaN)};Ee.squareRoot=Ee.sqrt=function(){var e,r,t,n,a,i,o=this,s=o.d,u=o.e,l=o.s,c=o.constructor;if(l!==1||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(Ze=!1,l=Math.sqrt(+o),l==0||l==1/0?(r=Qr(s),(r.length+u)%2==0&&(r+="0"),l=Math.sqrt(r),u=st((u+1)/2)-(u<0||u%2),l==1/0?r="5e"+u:(r=l.toExponential(),r=r.slice(0,r.indexOf("e")+1)+u),n=new c(r)):n=new c(l.toString()),t=(u=c.precision)+3;;)if(i=n,n=i.plus(Tr(o,i,t+2,1)).times(.5),Qr(i.d).slice(0,t)===(r=Qr(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!a&&r=="4999"){if(!a&&(ke(i,u+1,0),i.times(i).eq(o))){n=i;break}t+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(ke(n,u+1,1),e=!n.times(n).eq(o));break}return Ze=!0,ke(n,u,c.rounding,e)};Ee.tangent=Ee.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=Tr(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,ke(gn==2||gn==4?t.neg():t,e,r,!0)):new n(NaN)};Ee.times=Ee.mul=function(e){var r,t,n,a,i,o,s,u,l,c=this,f=c.constructor,p=c.d,d=(e=new f(e)).d;if(e.s*=c.s,!p||!p[0]||!d||!d[0])return new f(!e.s||p&&!p[0]&&!d||d&&!d[0]&&!p?NaN:!p||!d?e.s/0:e.s*0);for(t=st(c.e/He)+st(e.e/He),u=p.length,l=d.length,u<l&&(i=p,p=d,d=i,o=u,u=l,l=o),i=[],o=u+l,n=o;n--;)i.push(0);for(n=l;--n>=0;){for(r=0,a=u+n;a>n;)s=i[a]+d[n]*p[a-n-1]+r,i[a--]=s%Kt|0,r=s/Kt|0;i[a]=(i[a]+r)%Kt|0}for(;!i[--o];)i.pop();return r?++t:i.shift(),e.d=i,e.e=Cu(i,t),Ze?ke(e,f.precision,f.rounding):e};Ee.toBinary=function(e,r){return Of(this,2,e,r)};Ee.toDecimalPlaces=Ee.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(xt(e,0,Vn),r===void 0?r=n.rounding:xt(r,0,8),ke(t,e+t.e+1,r))};Ee.toExponential=function(e,r){var t,n=this,a=n.constructor;return e===void 0?t=un(n,!0):(xt(e,0,Vn),r===void 0?r=a.rounding:xt(r,0,8),n=ke(new a(n),e+1,r),t=un(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ee.toFixed=function(e,r){var t,n,a=this,i=a.constructor;return e===void 0?t=un(a):(xt(e,0,Vn),r===void 0?r=i.rounding:xt(r,0,8),n=ke(new i(a),e+a.e+1,r),t=un(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+t:t};Ee.toFraction=function(e){var r,t,n,a,i,o,s,u,l,c,f,p,d=this,v=d.d,m=d.constructor;if(!v)return new m(d);if(l=t=new m(1),n=u=new m(0),r=new m(n),i=r.e=P2(v)-d.e-1,o=i%He,r.d[0]=Ur(10,o<0?He+o:o),e==null)e=i>0?r:l;else{if(s=new m(e),!s.isInt()||s.lt(l))throw Error(kn+s);e=s.gt(r)?i>0?r:l:s}for(Ze=!1,s=new m(Qr(v)),c=m.precision,m.precision=i=v.length*He*2;f=Tr(s,r,0,1,1),a=t.plus(f.times(n)),a.cmp(e)!=1;)t=n,n=a,a=l,l=u.plus(f.times(a)),u=a,a=r,r=s.minus(f.times(a)),s=a;return a=Tr(e.minus(t),n,0,1,1),u=u.plus(a.times(l)),t=t.plus(a.times(n)),u.s=l.s=d.s,p=Tr(l,n,i,1).minus(d).abs().cmp(Tr(u,t,i,1).minus(d).abs())<1?[l,n]:[u,t],m.precision=c,Ze=!0,p};Ee.toHexadecimal=Ee.toHex=function(e,r){return Of(this,16,e,r)};Ee.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:xt(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(Ze=!1,t=Tr(t,e,0,r,1).times(e),Ze=!0,ke(t)):(e.s=t.s,t=e),t};Ee.toNumber=function(){return+this};Ee.toOctal=function(e,r){return Of(this,8,e,r)};Ee.toPower=Ee.pow=function(e){var r,t,n,a,i,o,s=this,u=s.constructor,l=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(Ur(+s,l));if(s=new u(s),s.eq(1))return s;if(n=u.precision,i=u.rounding,e.eq(1))return ke(s,n,i);if(r=st(e.e/He),r>=e.d.length-1&&(t=l<0?-l:l)<=AI)return a=z2(u,s,t,n),e.s<0?new u(1).div(a):ke(a,n,i);if(o=s.s,o<0){if(r<e.d.length-1)return new u(NaN);if(e.d[r]&1||(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return t=Ur(+s,l),r=t==0||!isFinite(t)?st(l*(Math.log("0."+Qr(s.d))/Math.LN10+s.e+1)):new u(t+"").e,r>u.maxE+1||r<u.minE-1?new u(r>0?o/0:0):(Ze=!1,u.rounding=s.s=1,t=Math.min(12,(r+"").length),a=rc(e.times(zn(s,n+t)),n),a.d&&(a=ke(a,n+5,1),oo(a.d,n,i)&&(r=n+10,a=ke(rc(e.times(zn(s,r+t)),r),r+5,1),+Qr(a.d).slice(n+1,n+15)+1==1e14&&(a=ke(a,n+1,0)))),a.s=o,Ze=!0,u.rounding=i,ke(a,n,i))};Ee.toPrecision=function(e,r){var t,n=this,a=n.constructor;return e===void 0?t=un(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(xt(e,1,Vn),r===void 0?r=a.rounding:xt(r,0,8),n=ke(new a(n),e,r),t=un(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};Ee.toSignificantDigits=Ee.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(xt(e,1,Vn),r===void 0?r=n.rounding:xt(r,0,8)),ke(new n(t),e,r)};Ee.toString=function(){var e=this,r=e.constructor,t=un(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};Ee.truncated=Ee.trunc=function(){return ke(new this.constructor(this),this.e+1,1)};Ee.valueOf=Ee.toJSON=function(){var e=this,r=e.constructor,t=un(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function Qr(e){var r,t,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,r=1;r<a;r++)n=e[r]+"",t=He-n.length,t&&(i+=Bn(t)),i+=n;o=e[r],n=o+"",t=He-n.length,t&&(i+=Bn(t))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function xt(e,r,t){if(e!==~~e||e<r||e>t)throw Error(kn+e)}function oo(e,r,t,n){var a,i,o,s;for(i=e[0];i>=10;i/=10)--r;return--r<0?(r+=He,a=0):(a=Math.ceil((r+1)/He),r%=He),i=Ur(10,He-r),s=e[a]%i|0,n==null?r<3?(r==0?s=s/100|0:r==1&&(s=s/10|0),o=t<4&&s==99999||t>3&&s==49999||s==5e4||s==0):o=(t<4&&s+1==i||t>3&&s+1==i/2)&&(e[a+1]/i/100|0)==Ur(10,r-2)-1||(s==i/2||s==0)&&(e[a+1]/i/100|0)==0:r<4?(r==0?s=s/1e3|0:r==1?s=s/100|0:r==2&&(s=s/10|0),o=(n||t<4)&&s==9999||!n&&t>3&&s==4999):o=((n||t<4)&&s+1==i||!n&&t>3&&s+1==i/2)&&(e[a+1]/i/1e3|0)==Ur(10,r-3)-1,o}function ds(e,r,t){for(var n,a=[0],i,o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=r;for(a[0]+=Jl.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>t-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/t|0,a[n]%=t)}return a.reverse()}function CI(e,r){var t,n,a;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),a=(1/Nu(4,t)).toString()):(t=16,a="2.3283064365386962890625e-10"),e.precision+=t,r=ai(e,1,r.times(a),new e(1));for(var i=t;i--;){var o=r.times(r);r=o.times(o).minus(o).times(8).plus(1)}return e.precision-=t,r}var Tr=function(){function e(n,a,i){var o,s=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+s,n[u]=o%i|0,s=o/i|0;return s&&n.unshift(s),n}function r(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function t(n,a,i,o){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*o+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o,s,u){var l,c,f,p,d,v,m,y,g,E,h,w,x,b,D,A,S,C,M,$,B=n.constructor,P=n.s==a.s?1:-1,R=n.d,N=a.d;if(!R||!R[0]||!N||!N[0])return new B(!n.s||!a.s||(R?N&&R[0]==N[0]:!N)?NaN:R&&R[0]==0||!N?P*0:P/0);for(u?(d=1,c=n.e-a.e):(u=Kt,d=He,c=st(n.e/d)-st(a.e/d)),M=N.length,S=R.length,g=new B(P),E=g.d=[],f=0;N[f]==(R[f]||0);f++);if(N[f]>(R[f]||0)&&c--,i==null?(b=i=B.precision,o=B.rounding):s?b=i+(n.e-a.e)+1:b=i,b<0)E.push(1),v=!0;else{if(b=b/d+2|0,f=0,M==1){for(p=0,N=N[0],b++;(f<S||p)&&b--;f++)D=p*u+(R[f]||0),E[f]=D/N|0,p=D%N|0;v=p||f<S}else{for(p=u/(N[0]+1)|0,p>1&&(N=e(N,p,u),R=e(R,p,u),M=N.length,S=R.length),A=M,h=R.slice(0,M),w=h.length;w<M;)h[w++]=0;$=N.slice(),$.unshift(0),C=N[0],N[1]>=u/2&&++C;do p=0,l=r(N,h,M,w),l<0?(x=h[0],M!=w&&(x=x*u+(h[1]||0)),p=x/C|0,p>1?(p>=u&&(p=u-1),m=e(N,p,u),y=m.length,w=h.length,l=r(m,h,y,w),l==1&&(p--,t(m,M<y?$:N,y,u))):(p==0&&(l=p=1),m=N.slice()),y=m.length,y<w&&m.unshift(0),t(h,m,w,u),l==-1&&(w=h.length,l=r(N,h,M,w),l<1&&(p++,t(h,M<w?$:N,w,u))),w=h.length):l===0&&(p++,h=[0]),E[f++]=p,l&&h[0]?h[w++]=R[A]||0:(h=[R[A]],w=1);while((A++<S||h[0]!==void 0)&&b--);v=h[0]!==void 0}E[0]||E.shift()}if(d==1)g.e=c,_2=v;else{for(f=1,p=E[0];p>=10;p/=10)f++;g.e=f+c*d-1,ke(g,s?i+g.e+1:i,o,v)}return g}}();function ke(e,r,t,n){var a,i,o,s,u,l,c,f,p,d=e.constructor;e:if(r!=null){if(f=e.d,!f)return e;for(a=1,s=f[0];s>=10;s/=10)a++;if(i=r-a,i<0)i+=He,o=r,c=f[p=0],u=c/Ur(10,a-o-1)%10|0;else if(p=Math.ceil((i+1)/He),s=f.length,p>=s)if(n){for(;s++<=p;)f.push(0);c=u=0,a=1,i%=He,o=i-He+1}else break e;else{for(c=s=f[p],a=1;s>=10;s/=10)a++;i%=He,o=i-He+a,u=o<0?0:c/Ur(10,a-o-1)%10|0}if(n=n||r<0||f[p+1]!==void 0||(o<0?c:c%Ur(10,a-o-1)),l=t<4?(u||n)&&(t==0||t==(e.s<0?3:2)):u>5||u==5&&(t==4||n||t==6&&(i>0?o>0?c/Ur(10,a-o):0:f[p-1])%10&1||t==(e.s<0?8:7)),r<1||!f[0])return f.length=0,l?(r-=e.e+1,f[0]=Ur(10,(He-r%He)%He),e.e=-r||0):f[0]=e.e=0,e;if(i==0?(f.length=p,s=1,p--):(f.length=p+1,s=Ur(10,He-i),f[p]=o>0?(c/Ur(10,a-o)%Ur(10,o)|0)*s:0),l)for(;;)if(p==0){for(i=1,o=f[0];o>=10;o/=10)i++;for(o=f[0]+=s,s=1;o>=10;o/=10)s++;i!=s&&(e.e++,f[0]==Kt&&(f[0]=1));break}else{if(f[p]+=s,f[p]!=Kt)break;f[p--]=0,s=1}for(i=f.length;f[--i]===0;)f.pop()}return Ze&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function un(e,r,t){if(!e.isFinite())return L2(e);var n,a=e.e,i=Qr(e.d),o=i.length;return r?(t&&(n=t-o)>0?i=i.charAt(0)+"."+i.slice(1)+Bn(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+Bn(-a-1)+i,t&&(n=t-o)>0&&(i+=Bn(n))):a>=o?(i+=Bn(a+1-o),t&&(n=t-a-1)>0&&(i=i+"."+Bn(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-o)>0&&(a+1===o&&(i+="."),i+=Bn(n))),i}function Cu(e,r){var t=e[0];for(r*=He;t>=10;t/=10)r++;return r}function Fs(e,r,t){if(r>DI)throw Ze=!0,t&&(e.precision=t),Error($2);return ke(new e(_s),r,1,!0)}function Xt(e,r,t){if(r>ec)throw Error($2);return ke(new e($s),r,t,!0)}function P2(e){var r=e.length-1,t=r*He+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Bn(e){for(var r="";e--;)r+="0";return r}function z2(e,r,t,n){var a,i=new e(1),o=Math.ceil(n/He+4);for(Ze=!1;;){if(t%2&&(i=i.times(r),qv(i.d,o)&&(a=!0)),t=st(t/2),t===0){t=i.d.length-1,a&&i.d[t]===0&&++i.d[t];break}r=r.times(r),qv(r.d,o)}return Ze=!0,i}function Lv(e){return e.d[e.d.length-1]&1}function I2(e,r,t){for(var n,a=new e(r[0]),i=0;++i<r.length;)if(n=new e(r[i]),n.s)a[t](n)&&(a=n);else{a=n;break}return a}function rc(e,r){var t,n,a,i,o,s,u,l=0,c=0,f=0,p=e.constructor,d=p.rounding,v=p.precision;if(!e.d||!e.d[0]||e.e>17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(Ze=!1,u=v):u=r,s=new p(.03125);e.e>-2;)e=e.times(s),f+=5;for(n=Math.log(Ur(2,f))/Math.LN10*2+5|0,u+=n,t=i=o=new p(1),p.precision=u;;){if(i=ke(i.times(e),u,1),t=t.times(++c),s=o.plus(Tr(i,t,u,1)),Qr(s.d).slice(0,u)===Qr(o.d).slice(0,u)){for(a=f;a--;)o=ke(o.times(o),u,1);if(r==null)if(l<3&&oo(o.d,u-n,d,l))p.precision=u+=10,t=i=s=new p(1),c=0,l++;else return ke(o,p.precision=v,d,Ze=!0);else return p.precision=v,o}o=s}}function zn(e,r){var t,n,a,i,o,s,u,l,c,f,p,d=1,v=10,m=e,y=m.d,g=m.constructor,E=g.rounding,h=g.precision;if(m.s<0||!y||!y[0]||!m.e&&y[0]==1&&y.length==1)return new g(y&&!y[0]?-1/0:m.s!=1?NaN:y?0:m);if(r==null?(Ze=!1,c=h):c=r,g.precision=c+=v,t=Qr(y),n=t.charAt(0),Math.abs(i=m.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)m=m.times(e),t=Qr(m.d),n=t.charAt(0),d++;i=m.e,n>1?(m=new g("0."+t),i++):m=new g(n+"."+t.slice(1))}else return l=Fs(g,c+2,h).times(i+""),m=zn(new g(n+"."+t.slice(1)),c-v).plus(l),g.precision=h,r==null?ke(m,h,E,Ze=!0):m;for(f=m,u=o=m=Tr(m.minus(1),m.plus(1),c,1),p=ke(m.times(m),c,1),a=3;;){if(o=ke(o.times(p),c,1),l=u.plus(Tr(o,new g(a),c,1)),Qr(l.d).slice(0,c)===Qr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Fs(g,c+2,h).times(i+""))),u=Tr(u,new g(d),c,1),r==null)if(oo(u.d,c-v,E,s))g.precision=c+=v,l=o=m=Tr(f.minus(1),f.plus(1),c,1),p=ke(m.times(m),c,1),a=s=1;else return ke(u,g.precision=h,E,Ze=!0);else return g.precision=h,u;u=l,a+=2}}function L2(e){return String(e.s*e.s/0)}function tc(e,r){var t,n,a;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(a=r.length;r.charCodeAt(a-1)===48;--a);if(r=r.slice(n,a),r){if(a-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%He,t<0&&(n+=He),n<a){for(n&&e.d.push(+r.slice(0,n)),a-=He;n<a;)e.d.push(+r.slice(n,n+=He));r=r.slice(n),n=He-r.length}else n-=a;for(;n--;)r+="0";e.d.push(+r),Ze&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function NI(e,r){var t,n,a,i,o,s,u,l,c;if(r.indexOf("_")>-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),R2.test(r))return tc(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(EI.test(r))t=16,r=r.toLowerCase();else if(wI.test(r))t=2;else if(SI.test(r))t=8;else throw Error(kn+r);for(i=r.search(/p/i),i>0?(u=+r.slice(i+1),r=r.substring(2,i)):r=r.slice(2),i=r.indexOf("."),o=i>=0,n=e.constructor,o&&(r=r.replace(".",""),s=r.length,i=s-i,a=z2(n,new n(t),i,i*2)),l=ds(r,t,Kt),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=Cu(l,c),e.d=l,Ze=!1,o&&(e=Tr(e,a,s*4)),u&&(e=e.times(Math.abs(u)<54?Ur(2,u):Un.pow(2,u))),Ze=!0,e)}function MI(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:ai(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/Nu(5,t)),r=ai(e,2,r,r);for(var a,i=new e(5),o=new e(16),s=new e(20);t--;)a=r.times(r),r=r.times(i.plus(a.times(o.times(a).minus(s))));return r}function ai(e,r,t,n,a){var i,o,s,u,l=e.precision,c=Math.ceil(l/He);for(Ze=!1,u=t.times(t),s=new e(n);;){if(o=Tr(s.times(u),new e(r++*r++),l,1),s=a?n.plus(o):n.minus(o),n=Tr(o.times(u),new e(r++*r++),l,1),o=s.plus(n),o.d[c]!==void 0){for(i=c;o.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=n,n=o,o=i}return Ze=!0,o.d.length=c+1,o}function Nu(e,r){for(var t=e;--r;)t*=e;return t}function q2(e,r){var t,n=r.s<0,a=Xt(e,e.precision,1),i=a.times(.5);if(r=r.abs(),r.lte(i))return gn=n?4:1,r;if(t=r.divToInt(a),t.isZero())gn=n?3:2;else{if(r=r.minus(t.times(a)),r.lte(i))return gn=Lv(t)?n?2:3:n?4:1,r;gn=Lv(t)?n?1:4:n?3:2}return r.minus(a).abs()}function Of(e,r,t,n){var a,i,o,s,u,l,c,f,p,d=e.constructor,v=t!==void 0;if(v?(xt(t,1,Vn),n===void 0?n=d.rounding:xt(n,0,8)):(t=d.precision,n=d.rounding),!e.isFinite())c=L2(e);else{for(c=un(e),o=c.indexOf("."),v?(a=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):a=r,o>=0&&(c=c.replace(".",""),p=new d(1),p.e=c.length-o,p.d=ds(un(p),10,a),p.e=p.d.length),f=ds(c,10,a),i=u=f.length;f[--u]==0;)f.pop();if(!f[0])c=v?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=f,e.e=i,e=Tr(e,p,t,n,0,a),f=e.d,i=e.e,l=_2),o=f[t],s=a/2,l=l||f[t+1]!==void 0,l=n<4?(o!==void 0||l)&&(n===0||n===(e.s<0?3:2)):o>s||o===s&&(n===4||l||n===6&&f[t-1]&1||n===(e.s<0?8:7)),f.length=t,l)for(;++f[--t]>a-1;)f[t]=0,t||(++i,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";o<u;o++)c+=Jl.charAt(f[o]);if(v){if(u>1)if(r==16||r==8){for(o=r==16?4:3,--u;u%o;u++)c+="0";for(f=ds(c,a,r),u=f.length;!f[u-1];--u);for(o=1,c="1.";o<u;o++)c+=Jl.charAt(f[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(r==16?"0x":r==2?"0b":r==8?"0o":"")+c}return e.s<0?"-"+c:c}function qv(e,r){if(e.length>r)return e.length=r,!0}function TI(e){return new this(e).abs()}function OI(e){return new this(e).acos()}function _I(e){return new this(e).acosh()}function $I(e,r){return new this(e).plus(r)}function FI(e){return new this(e).asin()}function BI(e){return new this(e).asinh()}function RI(e){return new this(e).atan()}function PI(e){return new this(e).atanh()}function zI(e,r){e=new this(e),r=new this(r);var t,n=this.precision,a=this.rounding,i=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=Xt(this,i,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?Xt(this,n,a):new this(0),t.s=e.s):!e.d||r.isZero()?(t=Xt(this,i,1).times(.5),t.s=e.s):r.s<0?(this.precision=i,this.rounding=1,t=this.atan(Tr(e,r,i,1)),r=Xt(this,i,1),this.precision=n,this.rounding=a,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(Tr(e,r,i,1)),t}function II(e){return new this(e).cbrt()}function LI(e){return ke(e=new this(e),e.e+1,2)}function qI(e,r,t){return new this(e).clamp(r,t)}function kI(e){if(!e||typeof e!="object")throw Error(Du+"Object expected");var r,t,n,a=e.defaults===!0,i=["precision",1,Vn,"rounding",0,8,"toExpNeg",-Xa,0,"toExpPos",0,Xa,"maxE",0,Xa,"minE",-Xa,0,"modulo",0,9];for(r=0;r<i.length;r+=3)if(t=i[r],a&&(this[t]=Ql[t]),(n=e[t])!==void 0)if(st(n)===n&&n>=i[r+1]&&n<=i[r+2])this[t]=n;else throw Error(kn+t+": "+n);if(t="crypto",a&&(this[t]=Ql[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(F2);else this[t]=!1;else throw Error(kn+t+": "+n);return this}function UI(e){return new this(e).cos()}function HI(e){return new this(e).cosh()}function k2(e){var r,t,n;function a(i){var o,s,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,kv(i)){l.s=i.s,Ze?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,s=i;s>=10;s/=10)o++;Ze?o>a.maxE?(l.e=NaN,l.d=null):o<a.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return tc(l,i.toString())}else if(u!=="string")throw Error(kn+i);return(s=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(s===43&&(i=i.slice(1)),l.s=1),R2.test(i)?tc(l,i):NI(l,i)}if(a.prototype=Ee,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=kI,a.clone=k2,a.isDecimal=kv,a.abs=TI,a.acos=OI,a.acosh=_I,a.add=$I,a.asin=FI,a.asinh=BI,a.atan=RI,a.atanh=PI,a.atan2=zI,a.cbrt=II,a.ceil=LI,a.clamp=qI,a.cos=UI,a.cosh=HI,a.div=jI,a.exp=VI,a.floor=GI,a.hypot=WI,a.ln=ZI,a.log=YI,a.log10=KI,a.log2=XI,a.max=JI,a.min=QI,a.mod=eL,a.mul=rL,a.pow=tL,a.random=nL,a.round=aL,a.sign=iL,a.sin=oL,a.sinh=sL,a.sqrt=uL,a.sub=lL,a.sum=cL,a.tan=fL,a.tanh=pL,a.trunc=dL,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<n.length;)e.hasOwnProperty(t=n[r++])||(e[t]=this[t]);return a.config(e),a}function jI(e,r){return new this(e).div(r)}function VI(e){return new this(e).exp()}function GI(e){return ke(e=new this(e),e.e+1,3)}function WI(){var e,r,t=new this(0);for(Ze=!1,e=0;e<arguments.length;)if(r=new this(arguments[e++]),r.d)t.d&&(t=t.plus(r.times(r)));else{if(r.s)return Ze=!0,new this(1/0);t=r}return Ze=!0,t.sqrt()}function kv(e){return e instanceof Un||e&&e.toStringTag===B2||!1}function ZI(e){return new this(e).ln()}function YI(e,r){return new this(e).log(r)}function XI(e){return new this(e).log(2)}function KI(e){return new this(e).log(10)}function JI(){return I2(this,arguments,"lt")}function QI(){return I2(this,arguments,"gt")}function eL(e,r){return new this(e).mod(r)}function rL(e,r){return new this(e).mul(r)}function tL(e,r){return new this(e).pow(r)}function nL(e){var r,t,n,a,i=0,o=new this(1),s=[];if(e===void 0?e=this.precision:xt(e,1,Vn),n=Math.ceil(e/He),this.crypto)if(crypto.getRandomValues)for(r=crypto.getRandomValues(new Uint32Array(n));i<n;)a=r[i],a>=429e7?r[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=a%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);i<n;)a=r[i]+(r[i+1]<<8)+(r[i+2]<<16)+((r[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(r,i):(s.push(a%1e7),i+=4);i=n/4}else throw Error(F2);else for(;i<n;)s[i++]=Math.random()*1e7|0;for(n=s[--i],e%=He,n&&e&&(a=Ur(10,He-e),s[i]=(n/a|0)*a);s[i]===0;i--)s.pop();if(i<0)t=0,s=[0];else{for(t=-1;s[0]===0;t-=He)s.shift();for(n=1,a=s[0];a>=10;a/=10)n++;n<He&&(t-=He-n)}return o.e=t,o.d=s,o}function aL(e){return ke(e=new this(e),e.e+1,this.rounding)}function iL(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function oL(e){return new this(e).sin()}function sL(e){return new this(e).sinh()}function uL(e){return new this(e).sqrt()}function lL(e,r){return new this(e).sub(r)}function cL(){var e=0,r=arguments,t=new this(r[e]);for(Ze=!1;t.s&&++e<r.length;)t=t.plus(r[e]);return Ze=!0,ke(t,this.precision,this.rounding)}function fL(e){return new this(e).tan()}function pL(e){return new this(e).tanh()}function dL(e){return ke(e=new this(e),e.e+1,1)}Ee[Symbol.for("nodejs.util.inspect.custom")]=Ee.toString;Ee[Symbol.toStringTag]="Decimal";var Un=Ee.constructor=k2(Ql);_s=new Un(_s);$s=new Un($s);var vL="BigNumber",mL=["?on","config"],hL=L(vL,mL,e=>{var{on:r,config:t}=e,n=Un.clone({precision:t.precision,modulo:Un.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},r&&r("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0}),U2={exports:{}};/**
|
|
84
|
+
* @license Complex.js v2.1.1 12/05/2020
|
|
85
|
+
*
|
|
86
|
+
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
|
|
87
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
88
|
+
**/(function(e,r){(function(t){var n=Math.cosh||function(f){return Math.abs(f)<1e-9?1-f:(Math.exp(f)+Math.exp(-f))*.5},a=Math.sinh||function(f){return Math.abs(f)<1e-9?f:(Math.exp(f)-Math.exp(-f))*.5},i=function(f){var p=Math.PI/4;if(-p>f||f>p)return Math.cos(f)-1;var d=f*f;return d*(d*(d*(d*(d*(d*(d*(d/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},o=function(f,p){var d=Math.abs(f),v=Math.abs(p);return d<3e3&&v<3e3?Math.sqrt(d*d+v*v):(d<v?(d=v,v=f/p):v=p/f,d*Math.sqrt(1+v*v))},s=function(){throw SyntaxError("Invalid Param")};function u(f,p){var d=Math.abs(f),v=Math.abs(p);return f===0?Math.log(v):p===0?Math.log(d):d<3e3&&v<3e3?Math.log(f*f+p*p)*.5:(f=f/2,p=p/2,.5*Math.log(f*f+p*p)+Math.LN2)}var l=function(f,p){var d={re:0,im:0};if(f==null)d.re=d.im=0;else if(p!==void 0)d.re=f,d.im=p;else switch(typeof f){case"object":if("im"in f&&"re"in f)d.re=f.re,d.im=f.im;else if("abs"in f&&"arg"in f){if(!Number.isFinite(f.abs)&&Number.isFinite(f.arg))return c.INFINITY;d.re=f.abs*Math.cos(f.arg),d.im=f.abs*Math.sin(f.arg)}else if("r"in f&&"phi"in f){if(!Number.isFinite(f.r)&&Number.isFinite(f.phi))return c.INFINITY;d.re=f.r*Math.cos(f.phi),d.im=f.r*Math.sin(f.phi)}else f.length===2?(d.re=f[0],d.im=f[1]):s();break;case"string":d.im=d.re=0;var v=f.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),m=1,y=0;v===null&&s();for(var g=0;g<v.length;g++){var E=v[g];E===" "||E===" "||E===`
|
|
89
|
+
`||(E==="+"?m++:E==="-"?y++:E==="i"||E==="I"?(m+y===0&&s(),v[g+1]!==" "&&!isNaN(v[g+1])?(d.im+=parseFloat((y%2?"-":"")+v[g+1]),g++):d.im+=parseFloat((y%2?"-":"")+"1"),m=y=0):((m+y===0||isNaN(E))&&s(),v[g+1]==="i"||v[g+1]==="I"?(d.im+=parseFloat((y%2?"-":"")+E),g++):d.re+=parseFloat((y%2?"-":"")+E),m=y=0))}m+y>0&&s();break;case"number":d.im=0,d.re=f;break;default:s()}return isNaN(d.re)||isNaN(d.im),d};function c(f,p){if(!(this instanceof c))return new c(f,p);var d=l(f,p);this.re=d.re,this.im=d.im}c.prototype={re:0,im:0,sign:function(){var f=this.abs();return new c(this.re/f,this.im/f)},add:function(f,p){var d=new c(f,p);return this.isInfinite()&&d.isInfinite()?c.NAN:this.isInfinite()||d.isInfinite()?c.INFINITY:new c(this.re+d.re,this.im+d.im)},sub:function(f,p){var d=new c(f,p);return this.isInfinite()&&d.isInfinite()?c.NAN:this.isInfinite()||d.isInfinite()?c.INFINITY:new c(this.re-d.re,this.im-d.im)},mul:function(f,p){var d=new c(f,p);return this.isInfinite()&&d.isZero()||this.isZero()&&d.isInfinite()?c.NAN:this.isInfinite()||d.isInfinite()?c.INFINITY:d.im===0&&this.im===0?new c(this.re*d.re,0):new c(this.re*d.re-this.im*d.im,this.re*d.im+this.im*d.re)},div:function(f,p){var d=new c(f,p);if(this.isZero()&&d.isZero()||this.isInfinite()&&d.isInfinite())return c.NAN;if(this.isInfinite()||d.isZero())return c.INFINITY;if(this.isZero()||d.isInfinite())return c.ZERO;f=this.re,p=this.im;var v=d.re,m=d.im,y,g;return m===0?new c(f/v,p/v):Math.abs(v)<Math.abs(m)?(g=v/m,y=v*g+m,new c((f*g+p)/y,(p*g-f)/y)):(g=m/v,y=m*g+v,new c((f+p*g)/y,(p-f*g)/y))},pow:function(f,p){var d=new c(f,p);if(f=this.re,p=this.im,d.isZero())return c.ONE;if(d.im===0){if(p===0&&f>0)return new c(Math.pow(f,d.re),0);if(f===0)switch((d.re%4+4)%4){case 0:return new c(Math.pow(p,d.re),0);case 1:return new c(0,Math.pow(p,d.re));case 2:return new c(-Math.pow(p,d.re),0);case 3:return new c(0,-Math.pow(p,d.re))}}if(f===0&&p===0&&d.re>0&&d.im>=0)return c.ZERO;var v=Math.atan2(p,f),m=u(f,p);return f=Math.exp(d.re*m-d.im*v),p=d.im*m+d.re*v,new c(f*Math.cos(p),f*Math.sin(p))},sqrt:function(){var f=this.re,p=this.im,d=this.abs(),v,m;if(f>=0){if(p===0)return new c(Math.sqrt(f),0);v=.5*Math.sqrt(2*(d+f))}else v=Math.abs(p)/Math.sqrt(2*(d-f));return f<=0?m=.5*Math.sqrt(2*(d-f)):m=Math.abs(p)/Math.sqrt(2*(d+f)),new c(v,p<0?-m:m)},exp:function(){var f=Math.exp(this.re);return this.im,new c(f*Math.cos(this.im),f*Math.sin(this.im))},expm1:function(){var f=this.re,p=this.im;return new c(Math.expm1(f)*Math.cos(p)+i(p),Math.exp(f)*Math.sin(p))},log:function(){var f=this.re,p=this.im;return new c(u(f,p),Math.atan2(p,f))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var f=this.re,p=this.im;return new c(Math.sin(f)*n(p),Math.cos(f)*a(p))},cos:function(){var f=this.re,p=this.im;return new c(Math.cos(f)*n(p),-Math.sin(f)*a(p))},tan:function(){var f=2*this.re,p=2*this.im,d=Math.cos(f)+n(p);return new c(Math.sin(f)/d,a(p)/d)},cot:function(){var f=2*this.re,p=2*this.im,d=Math.cos(f)-n(p);return new c(-Math.sin(f)/d,a(p)/d)},sec:function(){var f=this.re,p=this.im,d=.5*n(2*p)+.5*Math.cos(2*f);return new c(Math.cos(f)*n(p)/d,Math.sin(f)*a(p)/d)},csc:function(){var f=this.re,p=this.im,d=.5*n(2*p)-.5*Math.cos(2*f);return new c(Math.sin(f)*n(p)/d,-Math.cos(f)*a(p)/d)},asin:function(){var f=this.re,p=this.im,d=new c(p*p-f*f+1,-2*f*p).sqrt(),v=new c(d.re-p,d.im+f).log();return new c(v.im,-v.re)},acos:function(){var f=this.re,p=this.im,d=new c(p*p-f*f+1,-2*f*p).sqrt(),v=new c(d.re-p,d.im+f).log();return new c(Math.PI/2-v.im,v.re)},atan:function(){var f=this.re,p=this.im;if(f===0){if(p===1)return new c(0,1/0);if(p===-1)return new c(0,-1/0)}var d=f*f+(1-p)*(1-p),v=new c((1-p*p-f*f)/d,-2*f/d).log();return new c(-.5*v.im,.5*v.re)},acot:function(){var f=this.re,p=this.im;if(p===0)return new c(Math.atan2(1,f),0);var d=f*f+p*p;return d!==0?new c(f/d,-p/d).atan():new c(f!==0?f/0:0,p!==0?-p/0:0).atan()},asec:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(0,1/0);var d=f*f+p*p;return d!==0?new c(f/d,-p/d).acos():new c(f!==0?f/0:0,p!==0?-p/0:0).acos()},acsc:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(Math.PI/2,1/0);var d=f*f+p*p;return d!==0?new c(f/d,-p/d).asin():new c(f!==0?f/0:0,p!==0?-p/0:0).asin()},sinh:function(){var f=this.re,p=this.im;return new c(a(f)*Math.cos(p),n(f)*Math.sin(p))},cosh:function(){var f=this.re,p=this.im;return new c(n(f)*Math.cos(p),a(f)*Math.sin(p))},tanh:function(){var f=2*this.re,p=2*this.im,d=n(f)+Math.cos(p);return new c(a(f)/d,Math.sin(p)/d)},coth:function(){var f=2*this.re,p=2*this.im,d=n(f)-Math.cos(p);return new c(a(f)/d,-Math.sin(p)/d)},csch:function(){var f=this.re,p=this.im,d=Math.cos(2*p)-n(2*f);return new c(-2*a(f)*Math.cos(p)/d,2*n(f)*Math.sin(p)/d)},sech:function(){var f=this.re,p=this.im,d=Math.cos(2*p)+n(2*f);return new c(2*n(f)*Math.cos(p)/d,-2*a(f)*Math.sin(p)/d)},asinh:function(){var f=this.im;this.im=-this.re,this.re=f;var p=this.asin();return this.re=-this.im,this.im=f,f=p.re,p.re=-p.im,p.im=f,p},acosh:function(){var f=this.acos();if(f.im<=0){var p=f.re;f.re=-f.im,f.im=p}else{var p=f.im;f.im=-f.re,f.re=p}return f},atanh:function(){var f=this.re,p=this.im,d=f>1&&p===0,v=1-f,m=1+f,y=v*v+p*p,g=y!==0?new c((m*v-p*p)/y,(p*v+m*p)/y):new c(f!==-1?f/0:0,p!==0?p/0:0),E=g.re;return g.re=u(g.re,g.im)/2,g.im=Math.atan2(g.im,E)/2,d&&(g.im=-g.im),g},acoth:function(){var f=this.re,p=this.im;if(f===0&&p===0)return new c(0,Math.PI/2);var d=f*f+p*p;return d!==0?new c(f/d,-p/d).atanh():new c(f!==0?f/0:0,p!==0?-p/0:0).atanh()},acsch:function(){var f=this.re,p=this.im;if(p===0)return new c(f!==0?Math.log(f+Math.sqrt(f*f+1)):1/0,0);var d=f*f+p*p;return d!==0?new c(f/d,-p/d).asinh():new c(f!==0?f/0:0,p!==0?-p/0:0).asinh()},asech:function(){var f=this.re,p=this.im;if(this.isZero())return c.INFINITY;var d=f*f+p*p;return d!==0?new c(f/d,-p/d).acosh():new c(f!==0?f/0:0,p!==0?-p/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var f=this.re,p=this.im,d=f*f+p*p;return new c(f/d,-p/d)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(f){return f=Math.pow(10,f||0),new c(Math.ceil(this.re*f)/f,Math.ceil(this.im*f)/f)},floor:function(f){return f=Math.pow(10,f||0),new c(Math.floor(this.re*f)/f,Math.floor(this.im*f)/f)},round:function(f){return f=Math.pow(10,f||0),new c(Math.round(this.re*f)/f,Math.round(this.im*f)/f)},equals:function(f,p){var d=new c(f,p);return Math.abs(d.re-this.re)<=c.EPSILON&&Math.abs(d.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var f=this.re,p=this.im,d="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(f)<c.EPSILON&&(f=0),Math.abs(p)<c.EPSILON&&(p=0),p===0?d+f:(f!==0?(d+=f,d+=" ",p<0?(p=-p,d+="-"):d+="+",d+=" "):p<0&&(p=-p,d+="-"),p!==1&&(d+=p),d+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},c.ZERO=new c(0,0),c.ONE=new c(1,0),c.I=new c(0,1),c.PI=new c(Math.PI,0),c.E=new c(Math.E,0),c.INFINITY=new c(1/0,1/0),c.NAN=new c(NaN,NaN),c.EPSILON=1e-15,Object.defineProperty(c,"__esModule",{value:!0}),c.default=c,c.Complex=c,e.exports=c})()})(U2);var gL=U2.exports;const Jr=ye.getDefaultExportFromCjs(gL);var yL="Complex",bL=[],xL=L(yL,bL,()=>(Object.defineProperty(Jr,"name",{value:"Complex"}),Jr.prototype.constructor=Jr,Jr.prototype.type="Complex",Jr.prototype.isComplex=!0,Jr.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Jr.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Jr.prototype.format=function(e){var r="",t=this.im,n=this.re,a=ta(this.re,e),i=ta(this.im,e),o=Je(e)?e:e?e.precision:null;if(o!==null){var s=Math.pow(10,-o);Math.abs(n/t)<s&&(n=0),Math.abs(t/n)<s&&(t=0)}return t===0?r=a:n===0?t===1?r="i":t===-1?r="-i":r=i+"i":t<0?t===-1?r=a+" - i":r=a+" - "+i.substring(1)+"i":t===1?r=a+" + i":r=a+" + "+i+"i",r},Jr.fromPolar=function(e){switch(arguments.length){case 1:{var r=arguments[0];if(typeof r=="object")return Jr(r);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var t=arguments[0],n=arguments[1];if(Je(t)){if(Rt(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),Je(n))return new Jr({r:t,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},Jr.prototype.valueOf=Jr.prototype.toString,Jr.fromJSON=function(e){return new Jr(e)},Jr.compare=function(e,r){return e.re>r.re?1:e.re<r.re?-1:e.im>r.im?1:e.im<r.im?-1:0},Jr),{isClass:!0});/**
|
|
90
|
+
* @license Fraction.js v4.3.7 31/08/2023
|
|
91
|
+
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) 2023, Robert Eisele (robert@raw.org)
|
|
94
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
95
|
+
**/var wL=2e3,Pe={s:1,n:0,d:1};function mn(e,r){if(isNaN(e=parseInt(e,10)))throw vs();return e*r}function zr(e,r){if(r===0)throw _f();var t=Object.create(at.prototype);t.s=e<0?-1:1,e=e<0?-e:e;var n=Ka(e,r);return t.n=e/n,t.d=r/n,t}function Uv(e){for(var r={},t=e,n=2,a=4;a<=t;){for(;t%n===0;)t/=n,r[n]=(r[n]||0)+1;a+=1+2*n++}return t!==e?t>1&&(r[t]=(r[t]||0)+1):r[e]=(r[e]||0)+1,r}var Ct=function(e,r){var t=0,n=1,a=1,i=0,o=0,s=0,u=1,l=1,c=0,f=1,p=1,d=1,v=1e7,m;if(e!=null)if(r!==void 0){if(t=e,n=r,a=t*n,t%1!==0||n%1!==0)throw DL()}else switch(typeof e){case"object":{if("d"in e&&"n"in e)t=e.n,n=e.d,"s"in e&&(t*=e.s);else if(0 in e)t=e[0],1 in e&&(n=e[1]);else throw vs();a=t*n;break}case"number":{if(e<0&&(a=e,e=-e),e%1===0)t=e;else if(e>0){for(e>=1&&(l=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=l);f<=v&&d<=v;)if(m=(c+p)/(f+d),e===m){f+d<=v?(t=c+p,n=f+d):d>f?(t=p,n=d):(t=c,n=f);break}else e>m?(c+=p,f+=d):(p+=c,d+=f),f>v?(t=p,n=d):(t=c,n=f);t*=l}else(isNaN(e)||isNaN(r))&&(n=t=NaN);break}case"string":{if(f=e.match(/\d+|./g),f===null)throw vs();if(f[c]==="-"?(a=-1,c++):f[c]==="+"&&c++,f.length===c+1?o=mn(f[c++],a):f[c+1]==="."||f[c]==="."?(f[c]!=="."&&(i=mn(f[c++],a)),c++,(c+1===f.length||f[c+1]==="("&&f[c+3]===")"||f[c+1]==="'"&&f[c+3]==="'")&&(o=mn(f[c],a),u=Math.pow(10,f[c].length),c++),(f[c]==="("&&f[c+2]===")"||f[c]==="'"&&f[c+2]==="'")&&(s=mn(f[c+1],a),l=Math.pow(10,f[c+1].length)-1,c+=3)):f[c+1]==="/"||f[c+1]===":"?(o=mn(f[c],a),u=mn(f[c+2],1),c+=3):f[c+3]==="/"&&f[c+1]===" "&&(i=mn(f[c],a),o=mn(f[c+2],a),u=mn(f[c+4],1),c+=5),f.length<=c){n=u*l,a=t=s+n*i+l*o;break}}default:throw vs()}if(n===0)throw _f();Pe.s=a<0?-1:1,Pe.n=Math.abs(t),Pe.d=Math.abs(n)};function EL(e,r,t){for(var n=1;r>0;e=e*e%t,r>>=1)r&1&&(n=n*e%t);return n}function SL(e,r){for(;r%2===0;r/=2);for(;r%5===0;r/=5);if(r===1)return 0;for(var t=10%r,n=1;t!==1;n++)if(t=t*10%r,n>wL)return 0;return n}function AL(e,r,t){for(var n=1,a=EL(10,t,r),i=0;i<300;i++){if(n===a)return i;n=n*10%r,a=a*10%r}return 0}function Ka(e,r){if(!e)return r;if(!r)return e;for(;;){if(e%=r,!e)return r;if(r%=e,!r)return e}}function at(e,r){if(Ct(e,r),this instanceof at)e=Ka(Pe.d,Pe.n),this.s=Pe.s,this.n=Pe.n/e,this.d=Pe.d/e;else return zr(Pe.s*Pe.n,Pe.d)}var _f=function(){return new Error("Division by Zero")},vs=function(){return new Error("Invalid argument")},DL=function(){return new Error("Parameters must be integer")};at.prototype={s:1,n:0,d:1,abs:function(){return zr(this.n,this.d)},neg:function(){return zr(-this.s*this.n,this.d)},add:function(e,r){return Ct(e,r),zr(this.s*this.n*Pe.d+Pe.s*this.d*Pe.n,this.d*Pe.d)},sub:function(e,r){return Ct(e,r),zr(this.s*this.n*Pe.d-Pe.s*this.d*Pe.n,this.d*Pe.d)},mul:function(e,r){return Ct(e,r),zr(this.s*Pe.s*this.n*Pe.n,this.d*Pe.d)},div:function(e,r){return Ct(e,r),zr(this.s*Pe.s*this.n*Pe.d,this.d*Pe.n)},clone:function(){return zr(this.s*this.n,this.d)},mod:function(e,r){if(isNaN(this.n)||isNaN(this.d))return new at(NaN);if(e===void 0)return zr(this.s*this.n%this.d,1);if(Ct(e,r),Pe.n===0&&this.d===0)throw _f();return zr(this.s*(Pe.d*this.n)%(Pe.n*this.d),Pe.d*this.d)},gcd:function(e,r){return Ct(e,r),zr(Ka(Pe.n,this.n)*Ka(Pe.d,this.d),Pe.d*this.d)},lcm:function(e,r){return Ct(e,r),Pe.n===0&&this.n===0?zr(0,1):zr(Pe.n*this.n,Ka(Pe.n,this.n)*Ka(Pe.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new at(NaN):zr(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new at(NaN):zr(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new at(NaN):zr(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,r){return Ct(e,r),zr(this.s*Math.round(this.n*Pe.d/(this.d*Pe.n))*Pe.n,Pe.d)},inverse:function(){return zr(this.s*this.d,this.n)},pow:function(e,r){if(Ct(e,r),Pe.d===1)return Pe.s<0?zr(Math.pow(this.s*this.d,Pe.n),Math.pow(this.n,Pe.n)):zr(Math.pow(this.s*this.n,Pe.n),Math.pow(this.d,Pe.n));if(this.s<0)return null;var t=Uv(this.n),n=Uv(this.d),a=1,i=1;for(var o in t)if(o!=="1"){if(o==="0"){a=0;break}if(t[o]*=Pe.n,t[o]%Pe.d===0)t[o]/=Pe.d;else return null;a*=Math.pow(o,t[o])}for(var o in n)if(o!=="1"){if(n[o]*=Pe.n,n[o]%Pe.d===0)n[o]/=Pe.d;else return null;i*=Math.pow(o,n[o])}return Pe.s<0?zr(i,a):zr(a,i)},equals:function(e,r){return Ct(e,r),this.s*this.n*Pe.d===Pe.s*Pe.n*this.d},compare:function(e,r){Ct(e,r);var t=this.s*this.n*Pe.d-Pe.s*Pe.n*this.d;return(0<t)-(t<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var r=this.abs(),t=r.toContinued(),n=1;n<t.length;n++){for(var a=zr(t[n-1],1),i=n-2;i>=0;i--)a=a.inverse().add(t[i]);if(Math.abs(a.sub(r).valueOf())<e)return a.mul(this.s)}return this},divisible:function(e,r){return Ct(e,r),!(!(Pe.n*this.d)||this.n*Pe.d%(Pe.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var r,t="",n=this.n,a=this.d;return this.s<0&&(t+="-"),a===1?t+=n:(e&&(r=Math.floor(n/a))>0&&(t+=r,t+=" ",n%=a),t+=n,t+="/",t+=a),t},toLatex:function(e){var r,t="",n=this.n,a=this.d;return this.s<0&&(t+="-"),a===1?t+=n:(e&&(r=Math.floor(n/a))>0&&(t+=r,n%=a),t+="\\frac{",t+=n,t+="}{",t+=a,t+="}"),t},toContinued:function(){var e,r=this.n,t=this.d,n=[];if(isNaN(r)||isNaN(t))return n;do n.push(Math.floor(r/t)),e=r%t,r=t,t=e;while(r!==1);return n},toString:function(e){var r=this.n,t=this.d;if(isNaN(r)||isNaN(t))return"NaN";e=e||15;var n=SL(r,t),a=AL(r,t,n),i=this.s<0?"-":"";if(i+=r/t|0,r%=t,r*=10,r&&(i+="."),n){for(var o=a;o--;)i+=r/t|0,r%=t,r*=10;i+="(";for(var o=n;o--;)i+=r/t|0,r%=t,r*=10;i+=")"}else for(var o=e;r&&o--;)i+=r/t|0,r%=t,r*=10;return i}};var CL="Fraction",NL=[],ML=L(CL,NL,()=>(Object.defineProperty(at,"name",{value:"Fraction"}),at.prototype.constructor=at,at.prototype.type="Fraction",at.prototype.isFraction=!0,at.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},at.fromJSON=function(e){return new at(e)},at),{isClass:!0}),TL="Range",OL=[],_L=L(TL,OL,()=>{function e(r,t,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=r!=null,i=t!=null,o=n!=null;if(a){if(Qe(r))r=r.toNumber();else if(typeof r!="number")throw new TypeError("Parameter start must be a number")}if(i){if(Qe(t))t=t.toNumber();else if(typeof t!="number")throw new TypeError("Parameter end must be a number")}if(o){if(Qe(n))n=n.toNumber();else if(typeof n!="number")throw new TypeError("Parameter step must be a number")}this.start=a?parseFloat(r):0,this.end=i?parseFloat(t):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(r){if(typeof r!="string")return null;var t=r.split(":"),n=t.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var r=0,t=this.start,n=this.step,a=this.end,i=a-t;return Pn(n)===Pn(i)?r=Math.ceil(i/n):i===0&&(r=0),isNaN(r)&&(r=0),[r]},e.prototype.min=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start:this.start+(r-1)*this.step},e.prototype.max=function(){var r=this.size()[0];if(r>0)return this.step>0?this.start+(r-1)*this.step:this.start},e.prototype.forEach=function(r){var t=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;t<a;)r(t,[i],this),t+=n,i++;else if(n<0)for(;t>a;)r(t,[i],this),t+=n,i++},e.prototype.map=function(r){var t=[];return this.forEach(function(n,a,i){t[a[0]]=r(n,a,i)}),t},e.prototype.toArray=function(){var r=[];return this.forEach(function(t,n){r[n[0]]=t}),r},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(r){var t=ta(this.start,r);return this.step!==1&&(t+=":"+ta(this.step,r)),t+=":"+ta(this.end,r),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(r){return new e(r.start,r.end,r.step)},e},{isClass:!0}),$L="Matrix",FL=[],BL=L($L,FL,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(r,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(r,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(r){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(r,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(r,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(r,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(r,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(r){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(r){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function bl(e,r,t){var n=e.constructor,a=new n(2),i="";if(t){if(t<1)throw new Error("size must be in greater than 0");if(!ze(t))throw new Error("size must be an integer");if(e.greaterThan(a.pow(t-1).sub(1))||e.lessThan(a.pow(t-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(t-1,", 2^").concat(t-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(t))),i="i".concat(t)}switch(r){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(r," not supported "))}}function RL(e,r){if(typeof r=="function")return r(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:t,precision:n,wordSize:a}=E2(r);switch(t){case"fixed":return zL(e,n);case"exponential":return Hv(e,n);case"engineering":return PL(e,n);case"bin":return bl(e,2,a);case"oct":return bl(e,8,a);case"hex":return bl(e,16,a);case"auto":{var i=jv(r==null?void 0:r.lowerExp,-3),o=jv(r==null?void 0:r.upperExp,5);if(e.isZero())return"0";var s,u=e.toSignificantDigits(n),l=u.e;return l>=i&&l<o?s=u.toFixed():s=Hv(e,n),s.replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],f=arguments[4];return c!=="."?c+f:f})}default:throw new Error('Unknown notation "'+t+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function PL(e,r){var t=e.e,n=t%3===0?t:t<0?t-3-t%3:t-t%3,a=e.mul(Math.pow(10,-n)),i=a.toPrecision(r);if(i.includes("e")){var o=e.constructor;i=new o(i).toFixed()}return i+"e"+(t>=0?"+":"")+n.toString()}function Hv(e,r){return r!==void 0?e.toExponential(r-1):e.toExponential()}function zL(e,r){return e.toFixed(r)}function jv(e,r){return Je(e)?e:Qe(e)?e.toNumber():r}function IL(e,r){var t=e.length-r.length,n=e.length;return e.substring(t,n)===r}function tr(e,r){var t=LL(e,r);return r&&typeof r=="object"&&"truncate"in r&&t.length>r.truncate?t.substring(0,r.truncate-3)+"...":t}function LL(e,r){if(typeof e=="number")return ta(e,r);if(Qe(e))return RL(e,r);if(qL(e))return!r||r.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return H2(e,r);if(it(e))return Ja(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(r);if(e&&e.toString(r)!=={}.toString())return e.toString(r);var t=Object.keys(e).map(n=>Ja(n)+": "+tr(e[n],r));return"{"+t.join(", ")+"}"}return String(e)}function Ja(e){for(var r=String(e),t="",n=0;n<r.length;){var a=r.charAt(n);t+=a in Vv?Vv[a]:a,n++}return'"'+t+'"'}var Vv={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function zt(e){var r=String(e);return r=r.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),r}function H2(e,r){if(Array.isArray(e)){for(var t="[",n=e.length,a=0;a<n;a++)a!==0&&(t+=", "),t+=H2(e[a],r);return t+="]",t}else return tr(e,r)}function qL(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function nc(e,r){if(!it(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Cr(e)+", index: 0)");if(!it(r))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Cr(r)+", index: 1)");return e===r?0:e>r?1:-1}function nr(e,r,t){if(!(this instanceof nr))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=r,this.relation=t,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(r)?"["+r.join(", ")+"]":r)+")",this.stack=new Error().stack}nr.prototype=new RangeError;nr.prototype.constructor=RangeError;nr.prototype.name="DimensionError";nr.prototype.isDimensionError=!0;function en(e,r,t){if(!(this instanceof en))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=r):(this.min=r,this.max=t),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}en.prototype=new RangeError;en.prototype.constructor=RangeError;en.prototype.name="IndexError";en.prototype.isIndexError=!0;function Ke(e){for(var r=[];Array.isArray(e);)r.push(e.length),e=e[0];return r}function j2(e,r,t){var n,a=e.length;if(a!==r[t])throw new nr(a,r[t]);if(t<r.length-1){var i=t+1;for(n=0;n<a;n++){var o=e[n];if(!Array.isArray(o))throw new nr(r.length-1,r.length,"<");j2(e[n],r,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new nr(r.length+1,r.length,">")}function Gv(e,r){var t=r.length===0;if(t){if(Array.isArray(e))throw new nr(e.length,0)}else j2(e,r,0)}function Bs(e,r){var t=e.isMatrix?e._size:Ke(e),n=r._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==t[i])throw new nr(a,t[i])})}function Ar(e,r){if(e!==void 0){if(!Je(e)||!ze(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof r=="number"&&e>=r)throw new en(e,r)}}function ii(e){for(var r=0;r<e._dimensions.length;++r){var t=e._dimensions[r];if(t._data&&hr(t._data)){if(t._size[0]===0)return!0}else if(t.isRange){if(t.start===t.end)return!0}else if(it(t)&&t.length===0)return!0}return!1}function oi(e,r,t){if(!Array.isArray(r))throw new TypeError("Array expected");if(r.length===0)throw new Error("Resizing to scalar is not supported");r.forEach(function(a){if(!Je(a)||!ze(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+tr(r)+")")}),(Je(e)||Qe(e))&&(e=[e]);var n=t!==void 0?t:0;return ac(e,r,0,n),e}function ac(e,r,t,n){var a,i,o=e.length,s=r[t],u=Math.min(o,s);if(e.length=s,t<r.length-1){var l=t+1;for(a=0;a<u;a++)i=e[a],Array.isArray(i)||(i=[i],e[a]=i),ac(i,r,l,n);for(a=u;a<s;a++)i=[],e[a]=i,ac(i,r,l,n)}else{for(a=0;a<u;a++)for(;Array.isArray(e[a]);)e[a]=e[a][0];for(a=u;a<s;a++)e[a]=n}}function $f(e,r){var t=mr(e),n=t.length;if(!Array.isArray(e)||!Array.isArray(r))throw new TypeError("Array expected");if(r.length===0)throw new nr(0,n,"!=");r=Ff(r,n);var a=V2(r);if(n!==a)throw new nr(a,n,"!=");try{return kL(t,r)}catch(i){throw i instanceof nr?new nr(a,n,"!="):i}}function Ff(e,r){var t=V2(e),n=e.slice(),a=-1,i=e.indexOf(a),o=e.indexOf(a,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var s=i>=0,u=r%t===0;if(s)if(u)n[i]=-r/t;else throw new Error("Could not replace wildcard, since "+r+" is no multiple of "+-t);return n}function V2(e){return e.reduce((r,t)=>r*t,1)}function kL(e,r){for(var t=e,n,a=r.length-1;a>0;a--){var i=r[a];n=[];for(var o=t.length/i,s=0;s<o;s++)n.push(t.slice(s*i,(s+1)*i));t=n}return t}function Rs(e,r){for(var t=Ke(e);Array.isArray(e)&&e.length===1;)e=e[0],t.shift();for(var n=t.length;t[n-1]===1;)n--;return n<t.length&&(e=G2(e,n,0),t.length=n),e}function G2(e,r,t){var n,a;if(t<r){var i=t+1;for(n=0,a=e.length;n<a;n++)e[n]=G2(e[n],r,i)}else for(;Array.isArray(e);)e=e[0];return e}function W2(e,r,t,n){var a=n||Ke(e);if(t)for(var i=0;i<t;i++)e=[e],a.unshift(1);for(e=Z2(e,r,0);a.length<r;)a.push(1);return e}function Z2(e,r,t){var n,a;if(Array.isArray(e)){var i=t+1;for(n=0,a=e.length;n<a;n++)e[n]=Z2(e[n],r,i)}else for(var o=t;o<r;o++)e=[e];return e}function mr(e){if(!Array.isArray(e))return e;var r=[];return e.forEach(function t(n){Array.isArray(n)?n.forEach(t):r.push(n)}),r}function xn(e,r){return Array.prototype.map.call(e,r)}function Mu(e,r){Array.prototype.forEach.call(e,r)}function Y2(e,r){if(Ke(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r)}function Ps(e,r){if(Ke(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t=>r.test(t))}function Wv(e,r){return Array.prototype.join.call(e,r)}function si(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var r=[],t=0;r[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?t++:t=0,r.push({value:e[n],identifier:t});return r}function zs(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;for(var r=[],t=0;t<e.length;t++)r.push(e[t].value);return r}function so(e,r){for(var t,n=0,a=0;a<e.length;a++){var i=e[a],o=Array.isArray(i);if(a===0&&o&&(n=i.length),o&&i.length!==n)return;var s=o?so(i,r):r(i);if(t===void 0)t=s;else if(t!==s)return"mixed"}return t}function X2(e,r,t,n){if(n<t){if(e.length!==r.length)throw new nr(e.length,r.length);for(var a=[],i=0;i<e.length;i++)a[i]=X2(e[i],r[i],t,n+1);return a}else return e.concat(r)}function K2(){var e=Array.prototype.slice.call(arguments,0,-1),r=Array.prototype.slice.call(arguments,-1);if(e.length===1)return e[0];if(e.length>1)return e.slice(1).reduce(function(t,n){return X2(t,n,r,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function J2(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];for(var n=r.map(p=>p.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;o<r.length;o++)for(var s=r[o],u=n[o],l=0;l<u;l++){var c=a-u+l;s[l]>i[c]&&(i[c]=s[l])}for(var f=0;f<r.length;f++)Q2(r[f],i);return i}function Q2(e,r){for(var t=r.length,n=e.length,a=0;a<n;a++){var i=t-n+a;if(e[a]<r[i]&&e[a]>1||e[a]>r[i])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(r[i]))}}function ic(e,r){var t=Ke(e);if(Sn(t,r))return e;Q2(t,r);var n=J2(t,r),a=n.length,i=[...Array(a-t.length).fill(1),...t],o=HL(e);t.length<a&&(o=$f(o,i),t=Ke(o));for(var s=0;s<a;s++)t[s]<n[s]&&(o=UL(o,n[s],s),t=Ke(o));return o}function UL(e,r,t){return K2(...Array(r).fill(e),t)}function HL(e){return Hr([],e)}function jL(e){var r=0,t=1,n=Object.create(null),a=Object.create(null),i=0,o=function(u){var l=a[u];if(l&&(delete n[l],delete a[u],--r,t===l)){if(!r){i=0,t=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++t););}};return e=Math.abs(e),{hit:function(u){var l=a[u],c=++i;if(n[c]=u,a[u]=c,!l)return++r,r<=e?void 0:(u=n[t],o(u),u);if(delete n[l],t===l)for(;!Object.prototype.hasOwnProperty.call(n,++t););},delete:o,clear:function(){r=i=0,t=1,n=Object.create(null),a=Object.create(null)}}}function Co(e){var{hasher:r,limit:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t=t??Number.POSITIVE_INFINITY,r=r??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:jL(t||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=r(a);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var s=e.apply(e,a);return n.cache.values.set(o,s),n.cache.values.delete(n.cache.lru.hit(o)),s}}function eb(e){return Object.keys(e.signatures||{}).reduce(function(r,t){var n=(t.match(/,/g)||[]).length+1;return Math.max(r,n)},-1)}var VL="DenseMatrix",GL=["Matrix"],WL=L(VL,GL,e=>{var{Matrix:r}=e;function t(c,f){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!it(f))throw new Error("Invalid datatype: "+f);if(Ue(c))c.type==="DenseMatrix"?(this._data=We(c._data),this._size=We(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&hr(c.data)&&hr(c.size))this._data=c.data,this._size=c.size,Gv(this._data,this._size),this._datatype=f||c.datatype;else if(hr(c))this._data=l(c),this._size=Ke(this._data),Gv(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+Cr(c)+")");this._data=[],this._size=[0],this._datatype=f}}t.prototype=new r,t.prototype.createDenseMatrix=function(c,f){return new t(c,f)},Object.defineProperty(t,"name",{value:"DenseMatrix"}),t.prototype.constructor=t,t.prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return so(this._data,Cr)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(c,f){return new t(c,f)},t.prototype.subset=function(c,f,p){switch(arguments.length){case 1:return n(this,c);case 2:case 3:return i(this,c,f,p);default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(c){if(!hr(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new nr(c.length,this._size.length);for(var f=0;f<c.length;f++)Ar(c[f],this._size[f]);for(var p=this._data,d=0,v=c.length;d<v;d++){var m=c[d];Ar(m,p.length),p=p[m]}return p},t.prototype.set=function(c,f,p){if(!hr(c))throw new TypeError("Array expected");if(c.length<this._size.length)throw new nr(c.length,this._size.length,"<");var d,v,m,y=c.map(function(E){return E+1});u(this,y,p);var g=this._data;for(d=0,v=c.length-1;d<v;d++)m=c[d],Ar(m,g.length),g=g[m];return m=c[c.length-1],Ar(m,g.length),g[m]=f,this};function n(c,f){if(!xu(f))throw new TypeError("Invalid index");var p=f.isScalar();if(p)return c.get(f.min());var d=f.size();if(d.length!==c._size.length)throw new nr(d.length,c._size.length);for(var v=f.min(),m=f.max(),y=0,g=c._size.length;y<g;y++)Ar(v[y],c._size[y]),Ar(m[y],c._size[y]);return new t(a(c._data,f,d.length,0),c._datatype)}function a(c,f,p,d){var v=d===p-1,m=f.dimension(d);return v?m.map(function(y){return Ar(y,c.length),c[y]}).valueOf():m.map(function(y){Ar(y,c.length);var g=c[y];return a(g,f,p,d+1)}).valueOf()}function i(c,f,p,d){if(!f||f.isIndex!==!0)throw new TypeError("Invalid index");var v=f.size(),m=f.isScalar(),y;if(Ue(p)?(y=p.size(),p=p.valueOf()):y=Ke(p),m){if(y.length!==0)throw new TypeError("Scalar expected");c.set(f.min(),p,d)}else{if(!Sn(y,v))try{y.length===0?p=ic([p],v):p=ic(p,v),y=Ke(p)}catch{}if(v.length<c._size.length)throw new nr(v.length,c._size.length,"<");if(y.length<v.length){for(var g=0,E=0;v[g]===1&&y[g]===1;)g++;for(;v[g]===1;)E++,g++;p=W2(p,v.length,E,y)}if(!Sn(v,y))throw new nr(v,y,">");var h=f.max().map(function(b){return b+1});u(c,h,d);var w=v.length,x=0;o(c._data,f,p,w,x)}return c}function o(c,f,p,d,v){var m=v===d-1,y=f.dimension(v);m?y.forEach(function(g,E){Ar(g),c[g]=p[E[0]]}):y.forEach(function(g,E){Ar(g),o(c[g],f,p[E[0]],d,v+1)})}t.prototype.resize=function(c,f,p){if(!Ht(c))throw new TypeError("Array or Matrix expected");var d=c.valueOf().map(m=>Array.isArray(m)&&m.length===1?m[0]:m),v=p?this.clone():this;return s(v,d,f)};function s(c,f,p){if(f.length===0){for(var d=c._data;hr(d);)d=d[0];return d}return c._size=f.slice(0),c._data=oi(c._data,c._size,p),c}t.prototype.reshape=function(c,f){var p=f?this.clone():this;p._data=$f(p._data,c);var d=p._size.reduce((v,m)=>v*m);return p._size=Ff(c,d),p};function u(c,f,p){for(var d=c._size.slice(0),v=!1;d.length<f.length;)d.push(0),v=!0;for(var m=0,y=f.length;m<y;m++)f[m]>d[m]&&(d[m]=f[m],v=!0);v&&s(c,d,p)}t.prototype.clone=function(){var c=new t({data:We(this._data),size:We(this._size),datatype:this._datatype});return c},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(c){var f=this,p=eb(c),d=function y(g,E){return hr(g)?g.map(function(h,w){return y(h,E.concat(w))}):p===1?c(g):p===2?c(g,E):c(g,E,f)},v=d(this._data,[]),m=this._datatype!==void 0?so(v,Cr):void 0;return new t(v,m)},t.prototype.forEach=function(c){var f=this,p=function d(v,m){hr(v)?v.forEach(function(y,g){d(y,m.concat(g))}):c(v,m,f)};p(this._data,[])},t.prototype[Symbol.iterator]=function*(){var c=function*f(p,d){if(hr(p))for(var v=0;v<p.length;v++)yield*f(p[v],d.concat(v));else yield{value:p,index:d}};yield*c(this._data,[])},t.prototype.rows=function(){var c=[],f=this.size();if(f.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var p=this._data;for(var d of p)c.push(new t([d],this._datatype));return c},t.prototype.columns=function(){var c=this,f=[],p=this.size();if(p.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,v=function(g){var E=d.map(h=>[h[g]]);f.push(new t(E,c._datatype))},m=0;m<p[1];m++)v(m);return f},t.prototype.toArray=function(){return We(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(c){return tr(this._data,c)},t.prototype.toString=function(){return tr(this._data)},t.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(c){if(c){if(Qe(c)&&(c=c.toNumber()),!Je(c)||!ze(c))throw new TypeError("The parameter k must be an integer number")}else c=0;for(var f=c>0?c:0,p=c<0?-c:0,d=this._size[0],v=this._size[1],m=Math.min(d-p,v-f),y=[],g=0;g<m;g++)y[g]=this._data[g+p][g+f];return new t({data:y,size:[m],datatype:this._datatype})},t.diagonal=function(c,f,p,d){if(!hr(c))throw new TypeError("Array expected, size parameter");if(c.length!==2)throw new Error("Only two dimensions matrix are supported");if(c=c.map(function(D){if(Qe(D)&&(D=D.toNumber()),!Je(D)||!ze(D)||D<1)throw new Error("Size values must be positive integers");return D}),p){if(Qe(p)&&(p=p.toNumber()),!Je(p)||!ze(p))throw new TypeError("The parameter k must be an integer number")}else p=0;var v=p>0?p:0,m=p<0?-p:0,y=c[0],g=c[1],E=Math.min(y-m,g-v),h;if(hr(f)){if(f.length!==E)throw new Error("Invalid value array length");h=function(A){return f[A]}}else if(Ue(f)){var w=f.size();if(w.length!==1||w[0]!==E)throw new Error("Invalid matrix length");h=function(A){return f.get([A])}}else h=function(){return f};d||(d=Qe(h(0))?h(0).mul(0):0);var x=[];if(c.length>0){x=oi(x,c,d);for(var b=0;b<E;b++)x[b+m][b+v]=h(b)}return new t({data:x,size:[y,g]})},t.fromJSON=function(c){return new t(c)},t.prototype.swapRows=function(c,f){if(!Je(c)||!ze(c)||!Je(f)||!ze(f))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Ar(c,this._size[0]),Ar(f,this._size[0]),t._swapRows(c,f,this._data),this},t._swapRows=function(c,f,p){var d=p[c];p[c]=p[f],p[f]=d};function l(c){return Ue(c)?l(c.valueOf()):hr(c)?c.map(l):c}return t},{isClass:!0}),Zv="clone",ZL=["typed"],YL=L(Zv,ZL,e=>{var{typed:r}=e;return r(Zv,{any:We})});function rb(e){var r=e.length,t=e[0].length,n,a,i=[];for(a=0;a<t;a++){var o=[];for(n=0;n<r;n++)o.push(e[n][a]);i.push(o)}return i}function Di(e){for(var r=0;r<e.length;r++)if(Ht(e[r]))return!0;return!1}function An(e,r){Ue(e)&&(e=e.valueOf());for(var t=0,n=e.length;t<n;t++){var a=e[t];Array.isArray(a)?An(a,r):r(a)}}function rr(e,r,t){return e&&typeof e.map=="function"?e.map(function(n){return rr(n,r)}):r(e)}function Tu(e,r,t){var n=Array.isArray(e)?Ke(e):e.size();if(r<0||r>=n.length)throw new en(r,n.length);return Ue(e)?e.create(Is(e.valueOf(),r,t)):Is(e,r,t)}function Is(e,r,t){var n,a,i,o;if(r<=0)if(Array.isArray(e[0])){for(o=rb(e),a=[],n=0;n<o.length;n++)a[n]=Is(o[n],r-1,t);return a}else{for(i=e[0],n=1;n<e.length;n++)i=t(i,e[n]);return i}else{for(a=[],n=0;n<e.length;n++)a[n]=Is(e[n],r-1,t);return a}}function Yv(e,r,t,n,a,i,o,s,u,l,c){var f=e._values,p=e._index,d=e._ptr,v,m,y,g;if(n)for(m=d[r],y=d[r+1],v=m;v<y;v++)g=p[v],t[g]!==i?(t[g]=i,o.push(g),n[g]=f[v]):(n[g]=s(n[g],f[v]),a[g]=i);else for(m=d[r],y=d[r+1],v=m;v<y;v++)g=p[v],t[g]!==i?(t[g]=i,o.push(g)):a[g]=i}var Xv="isInteger",XL=["typed"],KL=L(Xv,XL,e=>{var{typed:r}=e;return r(Xv,{number:ze,BigNumber:function(n){return n.isInt()},bigint:function(n){return!0},Fraction:function(n){return n.d===1&&isFinite(n.n)},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),rn="number",Ci="number, number";function tb(e){return Math.abs(e)}tb.signature=rn;function nb(e,r){return e+r}nb.signature=Ci;function ab(e,r){return e-r}ab.signature=Ci;function ib(e,r){return e*r}ib.signature=Ci;function ob(e){return-e}ob.signature=rn;function sb(e){return e}sb.signature=rn;function Ji(e){return Yz(e)}Ji.signature=rn;function ub(e){return e*e*e}ub.signature=rn;function lb(e){return Math.exp(e)}lb.signature=rn;function cb(e){return Xz(e)}cb.signature=rn;function fb(e,r){if(!ze(e)||!ze(r))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||r===0)return 0;for(var t,n=e*r;r!==0;)t=r,r=e%t,e=t;return Math.abs(n/e)}fb.signature=Ci;function JL(e,r){return Math.log(e)}function pb(e){return Wz(e)}pb.signature=rn;function db(e){return Gz(e)}db.signature=rn;function Kv(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,t=r<0;if(t&&(r=-r),r===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(r)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return t?1/0:0;if(!isFinite(e))return t?0:e;var n=Math.pow(Math.abs(e),1/r);return n=e<0?-n:n,t?1/n:n}function oc(e){return Pn(e)}oc.signature=rn;function vb(e){return e*e}vb.signature=rn;function mb(e,r){var t,n,a,i=0,o=1,s=1,u=0;if(!ze(e)||!ze(r))throw new Error("Parameters in function xgcd must be integer numbers");for(;r;)n=Math.floor(e/r),a=e-n*r,t=i,i=o-n*i,o=t,t=s,s=u-n*s,u=t,e=r,r=a;var l;return e<0?l=[-e,-o,-u]:l=[e,e?o:0,u],l}mb.signature=Ci;function hb(e,r){return e*e<1&&r===1/0||e*e>1&&r===-1/0?0:Math.pow(e,r)}hb.signature=Ci;function Gi(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!ze(r)||r<0||r>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(S2(e,r))}var QL="number",Ni="number, number";function gb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function bitAnd");return e&r}gb.signature=Ni;function yb(e){if(!ze(e))throw new Error("Integer expected in function bitNot");return~e}yb.signature=QL;function bb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function bitOr");return e|r}bb.signature=Ni;function xb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function bitXor");return e^r}xb.signature=Ni;function wb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function leftShift");return e<<r}wb.signature=Ni;function Eb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function rightArithShift");return e>>r}Eb.signature=Ni;function Sb(e,r){if(!ze(e)||!ze(r))throw new Error("Integers expected in function rightLogShift");return e>>>r}Sb.signature=Ni;function yn(e,r){if(r<e)return 1;if(r===e)return r;var t=r+e>>1;return yn(e,t)*yn(t+1,r)}function Ab(e,r){if(!ze(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ze(r)||r<0)throw new TypeError("Positive integer value expected in function combinations");if(r>e)throw new TypeError("k must be less than or equal to n");for(var t=e-r,n=1,a=r<t?t+1:r+1,i=2,o=r<t?r:t,s=a;s<=e;++s)for(n*=s;i<=o&&n%i===0;)n/=i,++i;return i<=o&&(n/=yn(i,o)),n}Ab.signature="number, number";var eq=Math.PI,rq=2*Math.PI,tq=Math.E,nq=1.618033988749895,aq="number",Bf="number, number";function Db(e){return!e}Db.signature=aq;function sc(e,r){return!!(e||r)}sc.signature=Bf;function uc(e,r){return!!e!=!!r}uc.signature=Bf;function lc(e,r){return!!(e&&r)}lc.signature=Bf;function Ls(e){var r;if(ze(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:yn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Ls(1-e));if(e>=171.35)return 1/0;if(e>85){var t=e*e,n=t*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*t)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,r=ri[0];for(var o=1;o<ri.length;++o)r+=ri[o]/(e+o);var s=e+Cb+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*r}Ls.signature="number";var Cb=4.7421875,ri=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],Nb=.9189385332046728,iq=5,oq=7,Jv=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function qs(e){if(e<0)return NaN;if(e===0)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-qs(1-e);e=e-1;for(var r=e+iq+.5,t=Jv[0],n=oq-1;n>=1;n--)t+=Jv[n]/(e+n);return Nb+(e+.5)*Math.log(r)-r+Math.log(t)}qs.signature="number";var ut="number";function Mb(e){return eI(e)}Mb.signature=ut;function Tb(e){return Math.atan(1/e)}Tb.signature=ut;function Ob(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}Ob.signature=ut;function _b(e){return Math.asin(1/e)}_b.signature=ut;function $b(e){var r=1/e;return Math.log(r+Math.sqrt(r*r+1))}$b.signature=ut;function Fb(e){return Math.acos(1/e)}Fb.signature=ut;function Bb(e){var r=1/e,t=Math.sqrt(r*r-1);return Math.log(t+r)}Bb.signature=ut;function Rb(e){return rI(e)}Rb.signature=ut;function Pb(e){return tI(e)}Pb.signature=ut;function zb(e){return 1/Math.tan(e)}zb.signature=ut;function Ib(e){var r=Math.exp(2*e);return(r+1)/(r-1)}Ib.signature=ut;function Lb(e){return 1/Math.sin(e)}Lb.signature=ut;function qb(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*Pn(e)}qb.signature=ut;function kb(e){return 1/Math.cos(e)}kb.signature=ut;function Ub(e){return 2/(Math.exp(e)+Math.exp(-e))}Ub.signature=ut;function Hb(e){return aI(e)}Hb.signature=ut;var Rf="number";function jb(e){return e<0}jb.signature=Rf;function Vb(e){return e>0}Vb.signature=Rf;function Gb(e){return Number.isNaN(e)}Gb.signature=Rf;function wt(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-9,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(t<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return e.isNaN()||r.isNaN()?!1:!e.isFinite()||!r.isFinite()?e.eq(r):e.eq(r)?!0:e.minus(r).abs().lte(e.constructor.max(e.constructor.max(e.abs(),r.abs()).mul(t),n))}var Qv="isNegative",sq=["typed","config"],uq=L(Qv,sq,e=>{var{typed:r,config:t}=e;return r(Qv,{number:n=>rt(n,0,t.relTol,t.absTol)?!1:jb(n),BigNumber:n=>wt(n,new n.constructor(0),t.relTol,t.absTol)?!1:n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n<0n,Fraction:n=>n.s<0,Unit:r.referToSelf(n=>a=>r.find(n,a.valueType())(a.value)),"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),em="isNumeric",lq=["typed"],cq=L(em,lq,e=>{var{typed:r}=e;return r(em,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),rm="hasNumericValue",fq=["typed","isNumeric"],pq=L(rm,fq,e=>{var{typed:r,isNumeric:t}=e;return r(rm,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return t(a)}})}),tm="isPositive",dq=["typed","config"],vq=L(tm,dq,e=>{var{typed:r,config:t}=e;return r(tm,{number:n=>rt(n,0,t.relTol,t.absTol)?!1:Vb(n),BigNumber:n=>wt(n,new n.constructor(0),t.relTol,t.absTol)?!1:!n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n>0n,Fraction:n=>n.s>0&&n.n>0,Unit:r.referToSelf(n=>a=>r.find(n,a.valueType())(a.value)),"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),nm="isZero",mq=["typed","equalScalar"],hq=L(nm,mq,e=>{var{typed:r,equalScalar:t}=e;return r(nm,{"number | BigNumber | Complex | Fraction":n=>t(n,0),bigint:n=>n===0n,Unit:r.referToSelf(n=>a=>r.find(n,a.valueType())(a.value)),"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),am="isNaN",gq=["typed"],yq=L(am,gq,e=>{var{typed:r}=e;return r(am,{number:Gb,BigNumber:function(n){return n.isNaN()},bigint:function(n){return!1},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),im="typeOf",bq=["typed"],xq=L(im,bq,e=>{var{typed:r}=e;return r(im,{any:Cr})});function wq(e,r,t,n){return rt(e.re,r.re,t,n)&&rt(e.im,r.im,t,n)}var Mi=L("compareUnits",["typed"],e=>{var{typed:r}=e;return{"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return r.find(t,[n.valueType(),a.valueType()])(n.value,a.value)})}}),ks="equalScalar",Eq=["typed","config"],Sq=L(ks,Eq,e=>{var{typed:r,config:t}=e,n=Mi({typed:r});return r(ks,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return rt(i,o,t.relTol,t.absTol)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||wt(i,o,t.relTol,t.absTol)},"bigint, bigint":function(i,o){return i===o},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return wq(i,o,t.relTol,t.absTol)}},n)});L(ks,["typed","config"],e=>{var{typed:r,config:t}=e;return r(ks,{"number, number":function(a,i){return rt(a,i,t.relTol,t.absTol)}})});var Aq="SparseMatrix",Dq=["typed","equalScalar","Matrix"],Cq=L(Aq,Dq,e=>{var{typed:r,equalScalar:t,Matrix:n}=e;function a(m,y){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!it(y))throw new Error("Invalid datatype: "+y);if(Ue(m))i(this,m,y);else if(m&&hr(m.index)&&hr(m.ptr)&&hr(m.size))this._values=m.values,this._index=m.index,this._ptr=m.ptr,this._size=m.size,this._datatype=y||m.datatype;else if(hr(m))o(this,m,y);else{if(m)throw new TypeError("Unsupported type of data ("+Cr(m)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function i(m,y,g){y.type==="SparseMatrix"?(m._values=y._values?We(y._values):void 0,m._index=We(y._index),m._ptr=We(y._ptr),m._size=We(y._size),m._datatype=g||y._datatype):o(m,y.valueOf(),g||y._datatype)}function o(m,y,g){m._values=[],m._index=[],m._ptr=[],m._datatype=g;var E=y.length,h=0,w=t,x=0;if(it(g)&&(w=r.find(t,[g,g])||t,x=r.convert(0,g)),E>0){var b=0;do{m._ptr.push(m._index.length);for(var D=0;D<E;D++){var A=y[D];if(hr(A)){if(b===0&&h<A.length&&(h=A.length),b<A.length){var S=A[b];w(S,x)||(m._values.push(S),m._index.push(D))}}else b===0&&h<1&&(h=1),w(A,x)||(m._values.push(A),m._index.push(D))}b++}while(b<h)}m._ptr.push(m._index.length),m._size=[E,h]}a.prototype=new n,a.prototype.createSparseMatrix=function(m,y){return new a(m,y)},Object.defineProperty(a,"name",{value:"SparseMatrix"}),a.prototype.constructor=a,a.prototype.type="SparseMatrix",a.prototype.isSparseMatrix=!0,a.prototype.getDataType=function(){return so(this._values,Cr)},a.prototype.storage=function(){return"sparse"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(m,y){return new a(m,y)},a.prototype.density=function(){var m=this._size[0],y=this._size[1];return m!==0&&y!==0?this._index.length/(m*y):0},a.prototype.subset=function(m,y,g){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return s(this,m);case 2:case 3:return u(this,m,y,g);default:throw new SyntaxError("Wrong number of arguments")}};function s(m,y){if(!xu(y))throw new TypeError("Invalid index");var g=y.isScalar();if(g)return m.get(y.min());var E=y.size();if(E.length!==m._size.length)throw new nr(E.length,m._size.length);var h,w,x,b,D=y.min(),A=y.max();for(h=0,w=m._size.length;h<w;h++)Ar(D[h],m._size[h]),Ar(A[h],m._size[h]);var S=m._values,C=m._index,M=m._ptr,$=y.dimension(0),B=y.dimension(1),P=[],R=[];$.forEach(function(F,q){R[F]=q[0],P[F]=!0});var N=S?[]:void 0,O=[],U=[];return B.forEach(function(F){for(U.push(O.length),x=M[F],b=M[F+1];x<b;x++)h=C[x],P[h]===!0&&(O.push(R[h]),N&&N.push(S[x]))}),U.push(O.length),new a({values:N,index:O,ptr:U,size:E,datatype:m._datatype})}function u(m,y,g,E){if(!y||y.isIndex!==!0)throw new TypeError("Invalid index");var h=y.size(),w=y.isScalar(),x;if(Ue(g)?(x=g.size(),g=g.toArray()):x=Ke(g),w){if(x.length!==0)throw new TypeError("Scalar expected");m.set(y.min(),g,E)}else{if(h.length!==1&&h.length!==2)throw new nr(h.length,m._size.length,"<");if(x.length<h.length){for(var b=0,D=0;h[b]===1&&x[b]===1;)b++;for(;h[b]===1;)D++,b++;g=W2(g,h.length,D,x)}if(!Sn(h,x))throw new nr(h,x,">");if(h.length===1){var A=y.dimension(0);A.forEach(function(M,$){Ar(M),m.set([M,0],g[$[0]],E)})}else{var S=y.dimension(0),C=y.dimension(1);S.forEach(function(M,$){Ar(M),C.forEach(function(B,P){Ar(B),m.set([M,B],g[$[0]][P[0]],E)})})}}return m}a.prototype.get=function(m){if(!hr(m))throw new TypeError("Array expected");if(m.length!==this._size.length)throw new nr(m.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=m[0],g=m[1];Ar(y,this._size[0]),Ar(g,this._size[1]);var E=l(y,this._ptr[g],this._ptr[g+1],this._index);return E<this._ptr[g+1]&&this._index[E]===y?this._values[E]:0},a.prototype.set=function(m,y,g){if(!hr(m))throw new TypeError("Array expected");if(m.length!==this._size.length)throw new nr(m.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var E=m[0],h=m[1],w=this._size[0],x=this._size[1],b=t,D=0;it(this._datatype)&&(b=r.find(t,[this._datatype,this._datatype])||t,D=r.convert(0,this._datatype)),(E>w-1||h>x-1)&&(p(this,Math.max(E+1,w),Math.max(h+1,x),g),w=this._size[0],x=this._size[1]),Ar(E,w),Ar(h,x);var A=l(E,this._ptr[h],this._ptr[h+1],this._index);return A<this._ptr[h+1]&&this._index[A]===E?b(y,D)?c(A,h,this._values,this._index,this._ptr):this._values[A]=y:b(y,D)||f(A,E,h,y,this._values,this._index,this._ptr),this};function l(m,y,g,E){if(g-y===0)return g;for(var h=y;h<g;h++)if(E[h]===m)return h;return y}function c(m,y,g,E,h){g.splice(m,1),E.splice(m,1);for(var w=y+1;w<h.length;w++)h[w]--}function f(m,y,g,E,h,w,x){h.splice(m,0,E),w.splice(m,0,y);for(var b=g+1;b<x.length;b++)x[b]++}a.prototype.resize=function(m,y,g){if(!Ht(m))throw new TypeError("Array or Matrix expected");var E=m.valueOf().map(w=>Array.isArray(w)&&w.length===1?w[0]:w);if(E.length!==2)throw new Error("Only two dimensions matrix are supported");E.forEach(function(w){if(!Je(w)||!ze(w)||w<0)throw new TypeError("Invalid size, must contain positive integers (size: "+tr(E)+")")});var h=g?this.clone():this;return p(h,E[0],E[1],y)};function p(m,y,g,E){var h=E||0,w=t,x=0;it(m._datatype)&&(w=r.find(t,[m._datatype,m._datatype])||t,x=r.convert(0,m._datatype),h=r.convert(h,m._datatype));var b=!w(h,x),D=m._size[0],A=m._size[1],S,C,M;if(g>A){for(C=A;C<g;C++)if(m._ptr[C]=m._values.length,b)for(S=0;S<D;S++)m._values.push(h),m._index.push(S);m._ptr[g]=m._values.length}else g<A&&(m._ptr.splice(g+1,A-g),m._values.splice(m._ptr[g],m._values.length),m._index.splice(m._ptr[g],m._index.length));if(A=g,y>D){if(b){var $=0;for(C=0;C<A;C++){m._ptr[C]=m._ptr[C]+$,M=m._ptr[C+1]+$;var B=0;for(S=D;S<y;S++,B++)m._values.splice(M+B,0,h),m._index.splice(M+B,0,S),$++}m._ptr[A]=m._values.length}}else if(y<D){var P=0;for(C=0;C<A;C++){m._ptr[C]=m._ptr[C]-P;var R=m._ptr[C],N=m._ptr[C+1]-P;for(M=R;M<N;M++)S=m._index[M],S>y-1&&(m._values.splice(M,1),m._index.splice(M,1),P++)}m._ptr[C]=m._values.length}return m._size[0]=y,m._size[1]=g,m}a.prototype.reshape=function(m,y){if(!hr(m))throw new TypeError("Array expected");if(m.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");m.forEach(function(F){if(!Je(F)||!ze(F)||F<=-2||F===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+tr(m)+")")});var g=this._size[0]*this._size[1];m=Ff(m,g);var E=m[0]*m[1];if(g!==E)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var h=y?this.clone():this;if(this._size[0]===m[0]&&this._size[1]===m[1])return h;for(var w=[],x=0;x<h._ptr.length;x++)for(var b=0;b<h._ptr[x+1]-h._ptr[x];b++)w.push(x);for(var D=h._values.slice(),A=h._index.slice(),S=0;S<h._index.length;S++){var C=A[S],M=w[S],$=C*h._size[1]+M;w[S]=$%m[1],A[S]=Math.floor($/m[1])}h._values.length=0,h._index.length=0,h._ptr.length=m[1]+1,h._size=m.slice();for(var B=0;B<h._ptr.length;B++)h._ptr[B]=0;for(var P=0;P<D.length;P++){var R=A[P],N=w[P],O=D[P],U=l(R,h._ptr[N],h._ptr[N+1],h._index);f(U,R,N,O,h._values,h._index,h._ptr)}return h},a.prototype.clone=function(){var m=new a({values:this._values?We(this._values):void 0,index:We(this._index),ptr:We(this._ptr),size:We(this._size),datatype:this._datatype});return m},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(m,y){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var g=this,E=this._size[0],h=this._size[1],w=eb(m),x=function(D,A,S){return w===1?m(D):w===2?m(D,[A,S]):m(D,[A,S],g)};return d(this,0,E-1,0,h-1,x,y)};function d(m,y,g,E,h,w,x){var b=[],D=[],A=[],S=t,C=0;it(m._datatype)&&(S=r.find(t,[m._datatype,m._datatype])||t,C=r.convert(0,m._datatype));for(var M=function(z,J,le){z=w(z,J,le),S(z,C)||(b.push(z),D.push(J))},$=E;$<=h;$++){A.push(b.length);var B=m._ptr[$],P=m._ptr[$+1];if(x)for(var R=B;R<P;R++){var N=m._index[R];N>=y&&N<=g&&M(m._values[R],N-y,$-E)}else{for(var O={},U=B;U<P;U++){var F=m._index[U];O[F]=m._values[U]}for(var q=y;q<=g;q++){var Y=q in O?O[q]:0;M(Y,q-y,$-E)}}}return A.push(b.length),new a({values:b,index:D,ptr:A,size:[g-y+1,h-E+1]})}a.prototype.forEach=function(m,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var g=this,E=this._size[0],h=this._size[1],w=0;w<h;w++){var x=this._ptr[w],b=this._ptr[w+1];if(y)for(var D=x;D<b;D++){var A=this._index[D];m(this._values[D],[A,w],g)}else{for(var S={},C=x;C<b;C++){var M=this._index[C];S[M]=this._values[C]}for(var $=0;$<E;$++){var B=$ in S?S[$]:0;m(B,[$,w],g)}}}},a.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var m=this._size[1],y=0;y<m;y++)for(var g=this._ptr[y],E=this._ptr[y+1],h=g;h<E;h++){var w=this._index[h];yield{value:this._values[h],index:[w,y]}}},a.prototype.toArray=function(){return v(this._values,this._index,this._ptr,this._size,!0)},a.prototype.valueOf=function(){return v(this._values,this._index,this._ptr,this._size,!1)};function v(m,y,g,E,h){var w=E[0],x=E[1],b=[],D,A;for(D=0;D<w;D++)for(b[D]=[],A=0;A<x;A++)b[D][A]=0;for(A=0;A<x;A++)for(var S=g[A],C=g[A+1],M=S;M<C;M++)D=y[M],b[D][A]=m?h?We(m[M]):m[M]:1;return b}return a.prototype.format=function(m){for(var y=this._size[0],g=this._size[1],E=this.density(),h="Sparse Matrix ["+tr(y,m)+" x "+tr(g,m)+"] density: "+tr(E,m)+`
|
|
96
|
+
`,w=0;w<g;w++)for(var x=this._ptr[w],b=this._ptr[w+1],D=x;D<b;D++){var A=this._index[D];h+=`
|
|
97
|
+
(`+tr(A,m)+", "+tr(w,m)+") ==> "+(this._values?tr(this._values[D],m):"X")}return h},a.prototype.toString=function(){return tr(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(m){if(m){if(Qe(m)&&(m=m.toNumber()),!Je(m)||!ze(m))throw new TypeError("The parameter k must be an integer number")}else m=0;var y=m>0?m:0,g=m<0?-m:0,E=this._size[0],h=this._size[1],w=Math.min(E-g,h-y),x=[],b=[],D=[];D[0]=0;for(var A=y;A<h&&x.length<w;A++)for(var S=this._ptr[A],C=this._ptr[A+1],M=S;M<C;M++){var $=this._index[M];if($===A-y+g){x.push(this._values[M]),b[x.length-1]=$-g;break}}return D.push(x.length),new a({values:x,index:b,ptr:D,size:[w,1]})},a.fromJSON=function(m){return new a(m)},a.diagonal=function(m,y,g,E,h){if(!hr(m))throw new TypeError("Array expected, size parameter");if(m.length!==2)throw new Error("Only two dimensions matrix are supported");if(m=m.map(function(F){if(Qe(F)&&(F=F.toNumber()),!Je(F)||!ze(F)||F<1)throw new Error("Size values must be positive integers");return F}),g){if(Qe(g)&&(g=g.toNumber()),!Je(g)||!ze(g))throw new TypeError("The parameter k must be an integer number")}else g=0;var w=t,x=0;it(h)&&(w=r.find(t,[h,h])||t,x=r.convert(0,h));var b=g>0?g:0,D=g<0?-g:0,A=m[0],S=m[1],C=Math.min(A-D,S-b),M;if(hr(y)){if(y.length!==C)throw new Error("Invalid value array length");M=function(q){return y[q]}}else if(Ue(y)){var $=y.size();if($.length!==1||$[0]!==C)throw new Error("Invalid matrix length");M=function(q){return y.get([q])}}else M=function(){return y};for(var B=[],P=[],R=[],N=0;N<S;N++){R.push(B.length);var O=N-b;if(O>=0&&O<C){var U=M(O);w(U,x)||(P.push(O+D),B.push(U))}}return R.push(B.length),new a({values:B,index:P,ptr:R,size:[A,S]})},a.prototype.swapRows=function(m,y){if(!Je(m)||!ze(m)||!Je(y)||!ze(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Ar(m,this._size[0]),Ar(y,this._size[0]),a._swapRows(m,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(m,y,g,E,h){for(var w=E[m],x=E[m+1],b=w;b<x;b++)h(g[b],y[b])},a._swapRows=function(m,y,g,E,h,w){for(var x=0;x<g;x++){var b=w[x],D=w[x+1],A=l(m,b,D,h),S=l(y,b,D,h);if(A<D&&S<D&&h[A]===m&&h[S]===y){if(E){var C=E[A];E[A]=E[S],E[S]=C}continue}if(A<D&&h[A]===m&&(S>=D||h[S]!==y)){var M=E?E[A]:void 0;h.splice(S,0,y),E&&E.splice(S,0,M),h.splice(S<=A?A+1:A,1),E&&E.splice(S<=A?A+1:A,1);continue}if(S<D&&h[S]===y&&(A>=D||h[A]!==m)){var $=E?E[S]:void 0;h.splice(A,0,m),E&&E.splice(A,0,$),h.splice(A<=S?S+1:S,1),E&&E.splice(A<=S?S+1:S,1)}}},a},{isClass:!0}),Nq="number",Mq=["typed"];function Tq(e){var r=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(r){var t={"0b":2,"0o":8,"0x":16}[r[1]],n=r[2],a=r[3];return{input:e,radix:t,integerPart:n,fractionalPart:a}}else return null}function Oq(e){for(var r=parseInt(e.integerPart,e.radix),t=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);t+=a/Math.pow(e.radix,n+1)}var i=r+t;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var _q=L(Nq,Mq,e=>{var{typed:r}=e,t=r("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=Tq(a);if(i)return Oq(i);var o=0,s=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),a=s[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(s){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},bigint:function(a){return Number(a)},Fraction:function(a){return a.valueOf()},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))});return t.fromJSON=function(n){return parseFloat(n.value)},t}),$q="bigint",Fq=["typed"],Bq=L($q,Fq,e=>{var{typed:r}=e,t=r("bigint",{"":function(){return 0n},bigint:function(a){return a},number:function(a){return BigInt(a.toFixed())},BigNumber:function(a){return BigInt(a.round().toString())},Fraction:function(a){return BigInt(a.valueOf().toFixed())},"string | boolean":function(a){return BigInt(a)},null:function(a){return 0n},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))});return t.fromJSON=function(n){return BigInt(n.value)},t}),om="string",Rq=["typed"],Pq=L(om,Rq,e=>{var{typed:r}=e;return r(om,{"":function(){return""},number:ta,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t)),any:function(n){return String(n)}})}),sm="boolean",zq=["typed"],Iq=L(sm,zq,e=>{var{typed:r}=e;return r(sm,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Lq="bignumber",qq=["typed","BigNumber"],kq=L(Lq,qq,e=>{var{typed:r,BigNumber:t}=e;return r("bignumber",{"":function(){return new t(0)},number:function(a){return new t(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],s=t(i[1]),u=new t(2).pow(Number(o));if(s.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var l=new t(2).pow(Number(o)-1);return s.gte(l)?s.sub(u):s}return new t(a)},BigNumber:function(a){return a},bigint:function(a){return new t(a.toString())},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new t(a.n).div(a.d).times(a.s)},null:function(a){return new t(0)},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),Uq="complex",Hq=["typed","Complex"],jq=L(Uq,Hq,e=>{var{typed:r,Complex:t}=e;return r("complex",{"":function(){return t.ZERO},number:function(a){return new t(a,0)},"number, number":function(a,i){return new t(a,i)},"BigNumber, BigNumber":function(a,i){return new t(a.toNumber(),i.toNumber())},Fraction:function(a){return new t(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return t(a)},null:function(a){return t(0)},Object:function(a){if("re"in a&&"im"in a)return new t(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new t(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),Vq="fraction",Gq=["typed","Fraction"],Wq=L(Vq,Gq,e=>{var{typed:r,Fraction:t}=e;return r("fraction",{number:function(a){if(!isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new t(a)},string:function(a){return new t(a)},"number, number":function(a,i){return new t(a,i)},null:function(a){return new t(0)},BigNumber:function(a){return new t(a.toString())},bigint:function(a){return new t(a.toString())},Fraction:function(a){return a},Unit:r.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new t(a)},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),um="matrix",Zq=["typed","Matrix","DenseMatrix","SparseMatrix"],Yq=L(um,Zq,e=>{var{typed:r,Matrix:t,DenseMatrix:n,SparseMatrix:a}=e;return r(um,{"":function(){return i([])},string:function(s){return i([],s)},"string, string":function(s,u){return i([],s,u)},Array:function(s){return i(s)},Matrix:function(s){return i(s,s.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,s,u){if(s==="dense"||s==="default"||s===void 0)return new n(o,u);if(s==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),lm="matrixFromFunction",Xq=["typed","matrix","isZero"],Kq=L(lm,Xq,e=>{var{typed:r,matrix:t,isZero:n}=e;return r(lm,{"Array | Matrix, function, string, string":function(o,s,u,l){return a(o,s,u,l)},"Array | Matrix, function, string":function(o,s,u){return a(o,s,u)},"Matrix, function":function(o,s){return a(o,s,"dense")},"Array, function":function(o,s){return a(o,s,"dense").toArray()},"Array | Matrix, string, function":function(o,s,u){return a(o,u,s)},"Array | Matrix, string, string, function":function(o,s,u,l){return a(o,l,s,u)}});function a(i,o,s,u){var l;return u!==void 0?l=t(s,u):l=t(s),l.resize(i),l.forEach(function(c,f){var p=o(f);n(p)||l.set(f,p)}),l}}),cm="matrixFromRows",Jq=["typed","matrix","flatten","size"],Qq=L(cm,Jq,e=>{var{typed:r,matrix:t,flatten:n,size:a}=e;return r(cm,{"...Array":function(u){return i(u)},"...Matrix":function(u){return t(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(s[0]),l=[];for(var c of s){var f=o(c);if(f!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(f|0));l.push(n(c))}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),fm="matrixFromColumns",ek=["typed","matrix","flatten","size"],rk=L(fm,ek,e=>{var{typed:r,matrix:t,flatten:n,size:a}=e;return r(fm,{"...Array":function(u){return i(u)},"...Matrix":function(u){return t(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(s[0]),l=[],c=0;c<u;c++)l[c]=[];for(var f of s){var p=o(f);if(p!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(p|0));for(var d=n(f),v=0;v<u;v++)l[v].push(d[v])}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),pm="splitUnit",tk=["typed"],nk=L(pm,tk,e=>{var{typed:r}=e;return r(pm,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),dm="unaryMinus",ak=["typed"],ik=L(dm,ak,e=>{var{typed:r}=e;return r(dm,{number:ob,"Complex | BigNumber | Fraction":t=>t.neg(),bigint:t=>-t,Unit:r.referToSelf(t=>n=>{var a=n.clone();return a.value=r.find(t,a.valueType())(n.value),a}),"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),vm="unaryPlus",ok=["typed","config","numeric"],sk=L(vm,ok,e=>{var{typed:r,config:t,numeric:n}=e;return r(vm,{number:sb,Complex:function(i){return i},BigNumber:function(i){return i},bigint:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":r.referToSelf(a=>i=>rr(i,a)),boolean:function(i){return n(i?1:0,t.number)},string:function(i){return n(i,jn(i,t))}})}),mm="abs",uk=["typed"],lk=L(mm,uk,e=>{var{typed:r}=e;return r(mm,{number:tb,"Complex | BigNumber | Fraction | Unit":t=>t.abs(),bigint:t=>t<0n?-t:t,"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),hm="apply",ck=["typed","isInteger"],Pf=L(hm,ck,e=>{var{typed:r,isInteger:t}=e;return r(hm,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!t(i))throw new TypeError("Integer number expected for dimension");var s=Array.isArray(a)?Ke(a):a.size();if(i<0||i>=s.length)throw new en(i,s.length);return Ue(a)?a.create(Us(a.valueOf(),i,o)):Us(a,i,o)}})});function Us(e,r,t){var n,a,i;if(r<=0)if(Array.isArray(e[0])){for(i=fk(e),a=[],n=0;n<i.length;n++)a[n]=Us(i[n],r-1,t);return a}else return t(e);else{for(a=[],n=0;n<e.length;n++)a[n]=Us(e[n],r-1,t);return a}}function fk(e){var r=e.length,t=e[0].length,n,a,i=[];for(a=0;a<t;a++){var o=[];for(n=0;n<r;n++)o.push(e[n][a]);i.push(o)}return i}var gm="addScalar",pk=["typed"],dk=L(gm,pk,e=>{var{typed:r}=e;return r(gm,{"number, number":nb,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"bigint, bigint":function(n,a){return n+a},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=r.find(t,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),ym="subtractScalar",vk=["typed"],mk=L(ym,vk,e=>{var{typed:r}=e;return r(ym,{"number, number":ab,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"bigint, bigint":function(n,a){return n-a},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":r.referToSelf(t=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=r.find(t,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),bm="cbrt",hk=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],gk=L(bm,hk,e=>{var{config:r,typed:t,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:s,Fraction:u}=e;return t(bm,{number:Ji,Complex:l,"Complex, boolean":l,BigNumber:function(p){return p.cbrt()},Unit:c});function l(f,p){var d=f.arg()/3,v=f.abs(),m=new o(Ji(v),0).mul(new o(0,d).exp());if(p){var y=[m,new o(Ji(v),0).mul(new o(0,d+Math.PI*2/3).exp()),new o(Ji(v),0).mul(new o(0,d-Math.PI*2/3).exp())];return r.matrix==="Array"?y:i(y)}else return m}function c(f){if(f.value&&bn(f.value)){var p=f.clone();return p.value=1,p=p.pow(1/3),p.value=l(f.value),p}else{var d=n(f.value);d&&(f.value=a(f.value));var v;Qe(f.value)?v=new s(1).div(3):So(f.value)?v=new u(1,3):v=1/3;var m=f.pow(v);return d&&(m.value=a(m.value)),m}}}),yk="matAlgo11xS0s",bk=["typed","equalScalar"],tt=L(yk,bk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],v=f[1],m,y=t,g=0,E=o;typeof p=="string"&&(m=p,y=r.find(t,[m,m]),g=r.convert(0,m),i=r.convert(i,m),E=r.find(o,[m,m]));for(var h=[],w=[],x=[],b=0;b<v;b++){x[b]=w.length;for(var D=c[b],A=c[b+1],S=D;S<A;S++){var C=l[S],M=s?E(i,u[S]):E(u[S],i);y(M,g)||(w.push(C),h.push(M))}}return x[v]=w.length,a.createSparseMatrix({values:h,index:w,ptr:x,size:[d,v],datatype:m})}}),xk="matAlgo12xSfs",wk=["typed","DenseMatrix"],Vr=L(xk,wk,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],v=f[1],m,y=o;typeof p=="string"&&(m=p,i=r.convert(i,m),y=r.find(o,[m,m]));for(var g=[],E=[],h=[],w=0;w<v;w++){for(var x=w+1,b=c[w],D=c[w+1],A=b;A<D;A++){var S=l[A];E[S]=u[A],h[S]=x}for(var C=0;C<d;C++)w===0&&(g[C]=[]),h[C]===x?g[C][w]=s?y(i,E[C]):y(E[C],i):g[C][w]=s?y(i,0):y(0,i)}return new t({data:g,size:[d,v],datatype:m})}}),Ek="matAlgo14xDs",Sk=["typed"],tn=L(Ek,Sk,e=>{var{typed:r}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype,f,p=o;typeof c=="string"&&(f=c,i=r.convert(i,f),p=r.find(o,[f,f]));var d=l.length>0?t(p,0,l,l[0],u,i,s):[];return a.createDenseMatrix({data:d,size:We(l),datatype:f})};function t(n,a,i,o,s,u,l){var c=[];if(a===i.length-1)for(var f=0;f<o;f++)c[f]=l?n(u,s[f]):n(s[f],u);else for(var p=0;p<o;p++)c[p]=t(n,a+1,i,i[a+1],s[p],u,l);return c}}),cc="ceil",Ak=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],Dk=L(cc,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(cc,{number:function(i){return rt(i,n(i),t.relTol,t.absTol)?n(i):Math.ceil(i)},"number, number":function(i,o){if(rt(i,n(i,o),t.relTol,t.absTol))return n(i,o);var[s,u]="".concat(i,"e").split("e"),l=Math.ceil(Number("".concat(s,"e").concat(Number(u)+o)));return[s,u]="".concat(l,"e").split("e"),Number("".concat(s,"e").concat(Number(u)-o))}})}),Ck=L(cc,Ak,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=tt({typed:r,equalScalar:i}),l=Vr({typed:r,DenseMatrix:s}),c=tn({typed:r}),f=Dk({typed:r,config:t,round:n});return r("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(d){return d.ceil()},"Complex, number":function(d,v){return d.ceil(v)},"Complex, BigNumber":function(d,v){return d.ceil(v.toNumber())},BigNumber:function(d){return wt(d,n(d),t.relTol,t.absTol)?n(d):d.ceil()},"BigNumber, BigNumber":function(d,v){return wt(d,n(d,v),t.relTol,t.absTol)?n(d,v):d.toDecimalPlaces(v.toNumber(),Un.ROUND_CEIL)},Fraction:function(d){return d.ceil()},"Fraction, number":function(d,v){return d.ceil(v)},"Fraction, BigNumber":function(d,v){return d.ceil(v.toNumber())},"Array | Matrix":r.referToSelf(p=>d=>rr(d,p)),"Array, number | BigNumber":r.referToSelf(p=>(d,v)=>rr(d,m=>p(m,v))),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>u(d,v,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>c(d,v,p,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(d,v)=>c(a(v),d,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(d,v)=>i(d,0)?o(v.size(),v.storage()):v.storage()==="dense"?c(v,d,p,!0):l(v,d,p,!0))})}),xm="cube",Nk=["typed"],Mk=L(xm,Nk,e=>{var{typed:r}=e;return r(xm,{number:ub,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},bigint:function(n){return n*n*n},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})}),wm="exp",Tk=["typed"],Ok=L(wm,Tk,e=>{var{typed:r}=e;return r(wm,{number:lb,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),Em="expm1",_k=["typed","Complex"],$k=L(Em,_k,e=>{var{typed:r,Complex:t}=e;return r(Em,{number:cb,Complex:function(a){var i=Math.exp(a.re);return new t(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})}),fc="fix",Fk=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],Bk=L(fc,["typed","ceil","floor"],e=>{var{typed:r,ceil:t,floor:n}=e;return r(fc,{number:function(i){return i>0?n(i):t(i)},"number, number":function(i,o){return i>0?n(i,o):t(i,o)}})}),Rk=L(fc,Fk,e=>{var{typed:r,Complex:t,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:s,DenseMatrix:u}=e,l=Vr({typed:r,DenseMatrix:u}),c=tn({typed:r}),f=Bk({typed:r,ceil:a,floor:i});return r("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(d){return new t(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,v){return new t(d.re>0?i(d.re,v):a(d.re,v),d.im>0?i(d.im,v):a(d.im,v))},"Complex, BigNumber":function(d,v){var m=v.toNumber();return new t(d.re>0?i(d.re,m):a(d.re,m),d.im>0?i(d.im,m):a(d.im,m))},BigNumber:function(d){return d.isNegative()?a(d):i(d)},"BigNumber, number | BigNumber":function(d,v){return d.isNegative()?a(d,v):i(d,v)},Fraction:function(d){return d.s<0?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,v){return d.s<0?a(d,v):i(d,v)},"Array | Matrix":r.referToSelf(p=>d=>rr(d,p)),"Array | Matrix, number | BigNumber":r.referToSelf(p=>(d,v)=>rr(d,m=>p(m,v))),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(d,v)=>c(n(v),d,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(d,v)=>o(d,0)?s(v.size(),v.storage()):v.storage()==="dense"?c(v,d,p,!0):l(v,d,p,!0))})}),pc="floor",Pk=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],zk=L(pc,["typed","config","round"],e=>{var{typed:r,config:t,round:n}=e;return r(pc,{number:function(i){return rt(i,n(i),t.relTol,t.absTol)?n(i):Math.floor(i)},"number, number":function(i,o){if(rt(i,n(i,o),t.relTol,t.absTol))return n(i,o);var[s,u]="".concat(i,"e").split("e"),l=Math.floor(Number("".concat(s,"e").concat(Number(u)+o)));return[s,u]="".concat(l,"e").split("e"),Number("".concat(s,"e").concat(Number(u)-o))}})}),Wb=L(pc,Pk,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=tt({typed:r,equalScalar:i}),l=Vr({typed:r,DenseMatrix:s}),c=tn({typed:r}),f=zk({typed:r,config:t,round:n});return r("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(d){return d.floor()},"Complex, number":function(d,v){return d.floor(v)},"Complex, BigNumber":function(d,v){return d.floor(v.toNumber())},BigNumber:function(d){return wt(d,n(d),t.relTol,t.absTol)?n(d):d.floor()},"BigNumber, BigNumber":function(d,v){return wt(d,n(d,v),t.relTol,t.absTol)?n(d,v):d.toDecimalPlaces(v.toNumber(),Un.ROUND_FLOOR)},Fraction:function(d){return d.floor()},"Fraction, number":function(d,v){return d.floor(v)},"Fraction, BigNumber":function(d,v){return d.floor(v.toNumber())},"Array | Matrix":r.referToSelf(p=>d=>rr(d,p)),"Array, number | BigNumber":r.referToSelf(p=>(d,v)=>rr(d,m=>p(m,v))),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>u(d,v,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>c(d,v,p,!1)),"number | Complex | Fraction | BigNumber, Array":r.referToSelf(p=>(d,v)=>c(a(v),d,p,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":r.referToSelf(p=>(d,v)=>i(d,0)?o(v.size(),v.storage()):v.storage()==="dense"?c(v,d,p,!0):l(v,d,p,!0))})}),Ik="matAlgo02xDS0",Lk=["typed","equalScalar"],nn=L(Ik,Lk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype||a.getDataType(),f=i._values,p=i._index,d=i._ptr,v=i._size,m=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(l.length!==v.length)throw new nr(l.length,v.length);if(l[0]!==v[0]||l[1]!==v[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+v+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=l[0],g=l[1],E,h=t,w=0,x=o;typeof c=="string"&&c===m&&c!=="mixed"&&(E=c,h=r.find(t,[E,E]),w=r.convert(0,E),x=r.find(o,[E,E]));for(var b=[],D=[],A=[],S=0;S<g;S++){A[S]=D.length;for(var C=d[S],M=d[S+1],$=C;$<M;$++){var B=p[$],P=s?x(f[$],u[B][S]):x(u[B][S],f[$]);h(P,w)||(D.push(B),b.push(P))}}return A[g]=D.length,i.createSparseMatrix({values:b,index:D,ptr:A,size:[y,g],datatype:c===a._datatype&&m===i._datatype?E:void 0})}}),qk="matAlgo03xDSf",kk=["typed"],vt=L(qk,kk,e=>{var{typed:r}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,p=a._ptr,d=a._size,v=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new nr(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=u[0],y=u[1],g,E=0,h=i;typeof l=="string"&&l===v&&l!=="mixed"&&(g=l,E=r.convert(0,g),h=r.find(i,[g,g]));for(var w=[],x=0;x<m;x++)w[x]=[];for(var b=[],D=[],A=0;A<y;A++){for(var S=A+1,C=p[A],M=p[A+1],$=C;$<M;$++){var B=f[$];b[B]=o?h(c[$],s[B][A]):h(s[B][A],c[$]),D[B]=S}for(var P=0;P<m;P++)D[P]===S?w[P][A]=b[P]:w[P][A]=o?h(E,s[P][A]):h(s[P][A],E)}return n.createDenseMatrix({data:w,size:[m,y],datatype:l===n._datatype&&v===a._datatype?g:void 0})}}),Uk="matAlgo05xSfSf",Hk=["typed","equalScalar"],Ou=L(Uk,Hk,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,d=i._index,v=i._ptr,m=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==m.length)throw new nr(c.length,m.length);if(c[0]!==m[0]||c[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+m+")");var g=c[0],E=c[1],h,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(h=f,w=r.find(t,[h,h]),x=r.convert(0,h),b=r.find(o,[h,h]));var D=s&&p?[]:void 0,A=[],S=[],C=D?[]:void 0,M=D?[]:void 0,$=[],B=[],P,R,N,O;for(R=0;R<E;R++){S[R]=A.length;var U=R+1;for(N=l[R],O=l[R+1];N<O;N++)P=u[N],A.push(P),$[P]=U,C&&(C[P]=s[N]);for(N=v[R],O=v[R+1];N<O;N++)P=d[N],$[P]!==U&&A.push(P),B[P]=U,M&&(M[P]=p[N]);if(D)for(N=S[R];N<A.length;){P=A[N];var F=$[P],q=B[P];if(F===U||q===U){var Y=F===U?C[P]:x,G=q===U?M[P]:x,z=b(Y,G);w(z,x)?A.splice(N,1):(D.push(z),N++)}}}return S[E]=A.length,a.createSparseMatrix({values:D,index:A,ptr:S,size:[g,E],datatype:f===a._datatype&&y===i._datatype?h:void 0})}}),jk="matAlgo13xDD",Vk=["typed"],Gk=L(jk,Vk,e=>{var{typed:r}=e;return function(a,i,o){var s=a._data,u=a._size,l=a._datatype,c=i._data,f=i._size,p=i._datatype,d=[];if(u.length!==f.length)throw new nr(u.length,f.length);for(var v=0;v<u.length;v++){if(u[v]!==f[v])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");d[v]=u[v]}var m,y=o;typeof l=="string"&&l===p&&(m=l,y=r.find(o,[m,m]));var g=d.length>0?t(y,0,d,d[0],s,c):[];return a.createDenseMatrix({data:g,size:d,datatype:m})};function t(n,a,i,o,s,u){var l=[];if(a===i.length-1)for(var c=0;c<o;c++)l[c]=n(s[c],u[c]);else for(var f=0;f<o;f++)l[f]=t(n,a+1,i,i[a+1],s[f],u[f]);return l}});function Wr(e,r){if(Sn(e.size(),r.size()))return[e,r];var t=J2(e.size(),r.size());return[e,r].map(n=>Wk(n,t))}function Wk(e,r){return Sn(e.size(),r)?e:e.create(ic(e.valueOf(),r),e.datatype())}var Zk="matrixAlgorithmSuite",Yk=["typed","matrix"],Mr=L(Zk,Yk,e=>{var{typed:r,matrix:t}=e,n=Gk({typed:r}),a=tn({typed:r});return function(o){var s=o.elop,u=o.SD||o.DS,l;s?(l={"DenseMatrix, DenseMatrix":(d,v)=>n(...Wr(d,v),s),"Array, Array":(d,v)=>n(...Wr(t(d),t(v)),s).valueOf(),"Array, DenseMatrix":(d,v)=>n(...Wr(t(d),v),s),"DenseMatrix, Array":(d,v)=>n(...Wr(d,t(v)),s)},o.SS&&(l["SparseMatrix, SparseMatrix"]=(d,v)=>o.SS(...Wr(d,v),s,!1)),o.DS&&(l["DenseMatrix, SparseMatrix"]=(d,v)=>o.DS(...Wr(d,v),s,!1),l["Array, SparseMatrix"]=(d,v)=>o.DS(...Wr(t(d),v),s,!1)),u&&(l["SparseMatrix, DenseMatrix"]=(d,v)=>u(...Wr(v,d),s,!0),l["SparseMatrix, Array"]=(d,v)=>u(...Wr(t(v),d),s,!0))):(l={"DenseMatrix, DenseMatrix":r.referToSelf(d=>(v,m)=>n(...Wr(v,m),d)),"Array, Array":r.referToSelf(d=>(v,m)=>n(...Wr(t(v),t(m)),d).valueOf()),"Array, DenseMatrix":r.referToSelf(d=>(v,m)=>n(...Wr(t(v),m),d)),"DenseMatrix, Array":r.referToSelf(d=>(v,m)=>n(...Wr(v,t(m)),d))},o.SS&&(l["SparseMatrix, SparseMatrix"]=r.referToSelf(d=>(v,m)=>o.SS(...Wr(v,m),d,!1))),o.DS&&(l["DenseMatrix, SparseMatrix"]=r.referToSelf(d=>(v,m)=>o.DS(...Wr(v,m),d,!1)),l["Array, SparseMatrix"]=r.referToSelf(d=>(v,m)=>o.DS(...Wr(t(v),m),d,!1))),u&&(l["SparseMatrix, DenseMatrix"]=r.referToSelf(d=>(v,m)=>u(...Wr(m,v),d,!0)),l["SparseMatrix, Array"]=r.referToSelf(d=>(v,m)=>u(...Wr(t(m),v),d,!0))));var c=o.scalar||"any",f=o.Ds||o.Ss;f&&(s?(l["DenseMatrix,"+c]=(d,v)=>a(d,v,s,!1),l[c+", DenseMatrix"]=(d,v)=>a(v,d,s,!0),l["Array,"+c]=(d,v)=>a(t(d),v,s,!1).valueOf(),l[c+", Array"]=(d,v)=>a(t(v),d,s,!0).valueOf()):(l["DenseMatrix,"+c]=r.referToSelf(d=>(v,m)=>a(v,m,d,!1)),l[c+", DenseMatrix"]=r.referToSelf(d=>(v,m)=>a(m,v,d,!0)),l["Array,"+c]=r.referToSelf(d=>(v,m)=>a(t(v),m,d,!1).valueOf()),l[c+", Array"]=r.referToSelf(d=>(v,m)=>a(t(m),v,d,!0).valueOf())));var p=o.sS!==void 0?o.sS:o.Ss;return s?(o.Ss&&(l["SparseMatrix,"+c]=(d,v)=>o.Ss(d,v,s,!1)),p&&(l[c+", SparseMatrix"]=(d,v)=>p(v,d,s,!0))):(o.Ss&&(l["SparseMatrix,"+c]=r.referToSelf(d=>(v,m)=>o.Ss(v,m,d,!1))),p&&(l[c+", SparseMatrix"]=r.referToSelf(d=>(v,m)=>p(m,v,d,!0)))),s&&s.signatures&&x2(l,s.signatures),l}}),Sm="mod",Xk=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],Zb=L(Sm,Xk,e=>{var{typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s,concat:u}=e,l=Wb({typed:r,config:t,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}),c=nn({typed:r,equalScalar:i}),f=vt({typed:r}),p=Ou({typed:r,equalScalar:i}),d=tt({typed:r,equalScalar:i}),v=Vr({typed:r,DenseMatrix:s}),m=Mr({typed:r,matrix:a,concat:u});return r(Sm,{"number, number":y,"BigNumber, BigNumber":function(E,h){return h.isZero()?E:E.sub(h.mul(l(E.div(h))))},"bigint, bigint":function(E,h){if(h===0n)return E;if(E<0){var w=E%h;return w===0n?w:w+h}return E%h},"Fraction, Fraction":function(E,h){return h.equals(0)?E:E.sub(h.mul(l(E.div(h))))}},m({SS:p,DS:f,SD:c,Ss:d,sS:v}));function y(g,E){return E===0?g:g-E*l(g/E)}}),Kk="matAlgo01xDSid",Jk=["typed"],Gn=L(Kk,Jk,e=>{var{typed:r}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,p=a._ptr,d=a._size,v=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new nr(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=u[0],y=u[1],g=typeof l=="string"&&l!=="mixed"&&l===v?l:void 0,E=g?r.find(i,[g,g]):i,h,w,x=[];for(h=0;h<m;h++)x[h]=[];var b=[],D=[];for(w=0;w<y;w++){for(var A=w+1,S=p[w],C=p[w+1],M=S;M<C;M++)h=f[M],b[h]=o?E(c[M],s[h][w]):E(s[h][w],c[M]),D[h]=A;for(h=0;h<m;h++)D[h]===A?x[h][w]=b[h]:x[h][w]=s[h][w]}return n.createDenseMatrix({data:x,size:[m,y],datatype:l===n._datatype&&v===a._datatype?g:void 0})}}),Qk="matAlgo04xSidSid",eU=["typed","equalScalar"],zf=L(Qk,eU,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,d=i._index,v=i._ptr,m=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==m.length)throw new nr(c.length,m.length);if(c[0]!==m[0]||c[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+m+")");var g=c[0],E=c[1],h,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(h=f,w=r.find(t,[h,h]),x=r.convert(0,h),b=r.find(o,[h,h]));var D=s&&p?[]:void 0,A=[],S=[],C=s&&p?[]:void 0,M=s&&p?[]:void 0,$=[],B=[],P,R,N,O,U;for(R=0;R<E;R++){S[R]=A.length;var F=R+1;for(O=l[R],U=l[R+1],N=O;N<U;N++)P=u[N],A.push(P),$[P]=F,C&&(C[P]=s[N]);for(O=v[R],U=v[R+1],N=O;N<U;N++)if(P=d[N],$[P]===F){if(C){var q=b(C[P],p[N]);w(q,x)?$[P]=null:C[P]=q}}else A.push(P),B[P]=F,M&&(M[P]=p[N]);if(C&&M)for(N=S[R];N<A.length;)P=A[N],$[P]===F?(D[N]=C[P],N++):B[P]===F?(D[N]=M[P],N++):A.splice(N,1)}return S[E]=A.length,a.createSparseMatrix({values:D,index:A,ptr:S,size:[g,E],datatype:f===a._datatype&&y===i._datatype?h:void 0})}}),rU="matAlgo10xSids",tU=["typed","DenseMatrix"],ma=L(rU,tU,e=>{var{typed:r,DenseMatrix:t}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,p=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],v=f[1],m,y=o;typeof p=="string"&&(m=p,i=r.convert(i,m),y=r.find(o,[m,m]));for(var g=[],E=[],h=[],w=0;w<v;w++){for(var x=w+1,b=c[w],D=c[w+1],A=b;A<D;A++){var S=l[A];E[S]=u[A],h[S]=x}for(var C=0;C<d;C++)w===0&&(g[C]=[]),h[C]===x?g[C][w]=s?y(i,E[C]):y(E[C],i):g[C][w]=i}return new t({data:g,size:[d,v],datatype:m})}});function ha(e,r,t,n){if(!(this instanceof ha))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=r,this.min=t,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+r+" provided, "+t+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}ha.prototype=new Error;ha.prototype.constructor=Error;ha.prototype.name="ArgumentsError";ha.prototype.isArgumentsError=!0;var Am="gcd",nU=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],xl="number | BigNumber | Fraction | Matrix | Array",aU="".concat(xl,", ").concat(xl,", ...").concat(xl);function Dm(e){return!e.some(r=>Array.isArray(r))}var iU=L(Am,nU,e=>{var{typed:r,matrix:t,config:n,round:a,equalScalar:i,zeros:o,BigNumber:s,DenseMatrix:u,concat:l}=e,c=Zb({typed:r,config:n,round:a,matrix:t,equalScalar:i,zeros:o,DenseMatrix:u,concat:l}),f=Gn({typed:r}),p=zf({typed:r,equalScalar:i}),d=ma({typed:r,DenseMatrix:u}),v=Mr({typed:r,matrix:t,concat:l});return r(Am,{"number, number":m,"BigNumber, BigNumber":y,"Fraction, Fraction":(g,E)=>g.gcd(E)},v({SS:p,DS:f,Ss:d}),{[aU]:r.referToSelf(g=>(E,h,w)=>{for(var x=g(E,h),b=0;b<w.length;b++)x=g(x,w[b]);return x}),Array:r.referToSelf(g=>E=>{if(E.length===1&&Array.isArray(E[0])&&Dm(E[0]))return g(...E[0]);if(Dm(E))return g(...E);throw new ha("gcd() supports only 1d matrices!")}),Matrix:r.referToSelf(g=>E=>g(E.toArray()))});function m(g,E){if(!ze(g)||!ze(E))throw new Error("Parameters in function gcd must be integer numbers");for(var h;E!==0;)h=c(g,E),g=E,E=h;return g<0?-g:g}function y(g,E){if(!g.isInt()||!E.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var h=new s(0);!E.isZero();){var w=c(g,E);g=E,E=w}return g.lt(h)?g.neg():g}}),oU="matAlgo06xS0S0",sU=["typed","equalScalar"],_u=L(oU,sU,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var s=a._values,u=a._size,l=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,f=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==f.length)throw new nr(u.length,f.length);if(u[0]!==f[0]||u[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");var d=u[0],v=u[1],m,y=t,g=0,E=o;typeof l=="string"&&l===p&&l!=="mixed"&&(m=l,y=r.find(t,[m,m]),g=r.convert(0,m),E=r.find(o,[m,m]));for(var h=s&&c?[]:void 0,w=[],x=[],b=h?[]:void 0,D=[],A=[],S=0;S<v;S++){x[S]=w.length;var C=S+1;if(Yv(a,S,D,b,A,C,w,E),Yv(i,S,D,b,A,C,w,E),b)for(var M=x[S];M<w.length;){var $=w[M];if(A[$]===C){var B=b[$];y(B,g)?w.splice(M,1):(h.push(B),M++)}else w.splice(M,1)}else for(var P=x[S];P<w.length;){var R=w[P];A[R]!==C?w.splice(P,1):P++}}return x[v]=w.length,a.createSparseMatrix({values:h,index:w,ptr:x,size:[d,v],datatype:l===a._datatype&&p===i._datatype?m:void 0})}}),Cm="lcm",uU=["typed","matrix","equalScalar","concat"],lU=L(Cm,uU,e=>{var{typed:r,matrix:t,equalScalar:n,concat:a}=e,i=nn({typed:r,equalScalar:n}),o=_u({typed:r,equalScalar:n}),s=tt({typed:r,equalScalar:n}),u=Mr({typed:r,matrix:t,concat:a}),l="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(l,", ").concat(l,", ...").concat(l)]=r.referToSelf(p=>(d,v,m)=>{for(var y=p(d,v),g=0;g<m.length;g++)y=p(y,m[g]);return y}),r(Cm,{"number, number":fb,"BigNumber, BigNumber":f,"Fraction, Fraction":(p,d)=>p.lcm(d)},u({SS:o,DS:i,Ss:s}),c);function f(p,d){if(!p.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(p.isZero())return p;if(d.isZero())return d;for(var v=p.times(d);!d.isZero();){var m=d;d=p.mod(m),p=m}return v.div(p).abs()}}),Nm="log10",cU=["typed","config","Complex"],fU=L(Nm,cU,e=>{var{typed:r,config:t,Complex:n}=e;return r(Nm,{number:function(i){return i>=0||t.predictable?pb(i):new n(i,0).log().div(Math.LN10)},Complex:function(i){return new n(i).log().div(Math.LN10)},BigNumber:function(i){return!i.isNegative()||t.predictable?i.log():new n(i.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":r.referToSelf(a=>i=>rr(i,a))})}),Mm="log2",pU=["typed","config","Complex"],dU=L(Mm,pU,e=>{var{typed:r,config:t,Complex:n}=e;return r(Mm,{number:function(o){return o>=0||t.predictable?db(o):a(new n(o,0))},Complex:a,BigNumber:function(o){return!o.isNegative()||t.predictable?o.log(2):a(new n(o.toNumber(),0))},"Array | Matrix":r.referToSelf(i=>o=>rr(o,i))});function a(i){var o=Math.sqrt(i.re*i.re+i.im*i.im);return new n(Math.log2?Math.log2(o):Math.log(o)/Math.LN2,Math.atan2(i.im,i.re)/Math.LN2)}}),vU="multiplyScalar",mU=["typed"],hU=L(vU,mU,e=>{var{typed:r}=e;return r("multiplyScalar",{"number, number":ib,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"bigint, bigint":function(n,a){return n*a},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(t,n)=>n.multiply(t),"Unit, number | Fraction | BigNumber | Complex | Unit":(t,n)=>t.multiply(n)})}),Tm="multiply",gU=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],yU=L(Tm,gU,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,s=tt({typed:r,equalScalar:i}),u=tn({typed:r});function l(x,b){switch(x.length){case 1:switch(b.length){case 1:if(x[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(x[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+x[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(x[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+x[1]+") must match Vector length ("+b[0]+")");break;case 2:if(x[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+x[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+x.length+" dimensions)")}}function c(x,b,D){if(D===0)throw new Error("Cannot multiply two empty vectors");return o(x,b)}function f(x,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return p(x,b)}function p(x,b){var D=x._data,A=x._size,S=x._datatype||x.getDataType(),C=b._data,M=b._size,$=b._datatype||b.getDataType(),B=A[0],P=M[1],R,N=n,O=a;S&&$&&S===$&&typeof S=="string"&&S!=="mixed"&&(R=S,N=r.find(n,[R,R]),O=r.find(a,[R,R]));for(var U=[],F=0;F<P;F++){for(var q=O(D[0],C[0][F]),Y=1;Y<B;Y++)q=N(q,O(D[Y],C[Y][F]));U[F]=q}return x.createDenseMatrix({data:U,size:[P],datatype:S===x._datatype&&$===b._datatype?R:void 0})}var d=r("_multiplyMatrixVector",{"DenseMatrix, any":m,"SparseMatrix, any":E}),v=r("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":y,"DenseMatrix, SparseMatrix":g,"SparseMatrix, DenseMatrix":h,"SparseMatrix, SparseMatrix":w});function m(x,b){var D=x._data,A=x._size,S=x._datatype||x.getDataType(),C=b._data,M=b._datatype||b.getDataType(),$=A[0],B=A[1],P,R=n,N=a;S&&M&&S===M&&typeof S=="string"&&S!=="mixed"&&(P=S,R=r.find(n,[P,P]),N=r.find(a,[P,P]));for(var O=[],U=0;U<$;U++){for(var F=D[U],q=N(F[0],C[0]),Y=1;Y<B;Y++)q=R(q,N(F[Y],C[Y]));O[U]=q}return x.createDenseMatrix({data:O,size:[$],datatype:S===x._datatype&&M===b._datatype?P:void 0})}function y(x,b){var D=x._data,A=x._size,S=x._datatype||x.getDataType(),C=b._data,M=b._size,$=b._datatype||b.getDataType(),B=A[0],P=A[1],R=M[1],N,O=n,U=a;S&&$&&S===$&&typeof S=="string"&&S!=="mixed"&&S!=="mixed"&&(N=S,O=r.find(n,[N,N]),U=r.find(a,[N,N]));for(var F=[],q=0;q<B;q++){var Y=D[q];F[q]=[];for(var G=0;G<R;G++){for(var z=U(Y[0],C[0][G]),J=1;J<P;J++)z=O(z,U(Y[J],C[J][G]));F[q][G]=z}}return x.createDenseMatrix({data:F,size:[B,R],datatype:S===x._datatype&&$===b._datatype?N:void 0})}function g(x,b){var D=x._data,A=x._size,S=x._datatype||x.getDataType(),C=b._values,M=b._index,$=b._ptr,B=b._size,P=b._datatype||b._data===void 0?b._datatype:b.getDataType();if(!C)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var R=A[0],N=B[1],O,U=n,F=a,q=i,Y=0;S&&P&&S===P&&typeof S=="string"&&S!=="mixed"&&(O=S,U=r.find(n,[O,O]),F=r.find(a,[O,O]),q=r.find(i,[O,O]),Y=r.convert(0,O));for(var G=[],z=[],J=[],le=b.createSparseMatrix({values:G,index:z,ptr:J,size:[R,N],datatype:S===x._datatype&&P===b._datatype?O:void 0}),Q=0;Q<N;Q++){J[Q]=z.length;var re=$[Q],se=$[Q+1];if(se>re)for(var te=0,ae=0;ae<R;ae++){for(var fe=ae+1,ne=void 0,xe=re;xe<se;xe++){var $e=M[xe];te!==fe?(ne=F(D[ae][$e],C[xe]),te=fe):ne=U(ne,F(D[ae][$e],C[xe]))}te===fe&&!q(ne,Y)&&(z.push(ae),G.push(ne))}}return J[N]=z.length,le}function E(x,b){var D=x._values,A=x._index,S=x._ptr,C=x._datatype||x._data===void 0?x._datatype:x.getDataType();if(!D)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var M=b._data,$=b._datatype||b.getDataType(),B=x._size[0],P=b._size[0],R=[],N=[],O=[],U,F=n,q=a,Y=i,G=0;C&&$&&C===$&&typeof C=="string"&&C!=="mixed"&&(U=C,F=r.find(n,[U,U]),q=r.find(a,[U,U]),Y=r.find(i,[U,U]),G=r.convert(0,U));var z=[],J=[];O[0]=0;for(var le=0;le<P;le++){var Q=M[le];if(!Y(Q,G))for(var re=S[le],se=S[le+1],te=re;te<se;te++){var ae=A[te];J[ae]?z[ae]=F(z[ae],q(Q,D[te])):(J[ae]=!0,N.push(ae),z[ae]=q(Q,D[te]))}}for(var fe=N.length,ne=0;ne<fe;ne++){var xe=N[ne];R[ne]=z[xe]}return O[1]=N.length,x.createSparseMatrix({values:R,index:N,ptr:O,size:[B,1],datatype:C===x._datatype&&$===b._datatype?U:void 0})}function h(x,b){var D=x._values,A=x._index,S=x._ptr,C=x._datatype||x._data===void 0?x._datatype:x.getDataType();if(!D)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var M=b._data,$=b._datatype||b.getDataType(),B=x._size[0],P=b._size[0],R=b._size[1],N,O=n,U=a,F=i,q=0;C&&$&&C===$&&typeof C=="string"&&C!=="mixed"&&(N=C,O=r.find(n,[N,N]),U=r.find(a,[N,N]),F=r.find(i,[N,N]),q=r.convert(0,N));for(var Y=[],G=[],z=[],J=x.createSparseMatrix({values:Y,index:G,ptr:z,size:[B,R],datatype:C===x._datatype&&$===b._datatype?N:void 0}),le=[],Q=[],re=0;re<R;re++){z[re]=G.length;for(var se=re+1,te=0;te<P;te++){var ae=M[te][re];if(!F(ae,q))for(var fe=S[te],ne=S[te+1],xe=fe;xe<ne;xe++){var $e=A[xe];Q[$e]!==se?(Q[$e]=se,G.push($e),le[$e]=U(ae,D[xe])):le[$e]=O(le[$e],U(ae,D[xe]))}}for(var k=z[re],W=G.length,ue=k;ue<W;ue++){var j=G[ue];Y[ue]=le[j]}}return z[R]=G.length,J}function w(x,b){var D=x._values,A=x._index,S=x._ptr,C=x._datatype||x._data===void 0?x._datatype:x.getDataType(),M=b._values,$=b._index,B=b._ptr,P=b._datatype||b._data===void 0?b._datatype:b.getDataType(),R=x._size[0],N=b._size[1],O=D&&M,U,F=n,q=a;C&&P&&C===P&&typeof C=="string"&&C!=="mixed"&&(U=C,F=r.find(n,[U,U]),q=r.find(a,[U,U]));for(var Y=O?[]:void 0,G=[],z=[],J=x.createSparseMatrix({values:Y,index:G,ptr:z,size:[R,N],datatype:C===x._datatype&&P===b._datatype?U:void 0}),le=O?[]:void 0,Q=[],re,se,te,ae,fe,ne,xe,$e,k=0;k<N;k++){z[k]=G.length;var W=k+1;for(fe=B[k],ne=B[k+1],ae=fe;ae<ne;ae++)if($e=$[ae],O)for(se=S[$e],te=S[$e+1],re=se;re<te;re++)xe=A[re],Q[xe]!==W?(Q[xe]=W,G.push(xe),le[xe]=q(M[ae],D[re])):le[xe]=F(le[xe],q(M[ae],D[re]));else for(se=S[$e],te=S[$e+1],re=se;re<te;re++)xe=A[re],Q[xe]!==W&&(Q[xe]=W,G.push(xe));if(O)for(var ue=z[k],j=G.length,K=ue;K<j;K++){var oe=G[K];Y[K]=le[oe]}}return z[N]=G.length,J}return r(Tm,a,{"Array, Array":r.referTo("Matrix, Matrix",x=>(b,D)=>{l(Ke(b),Ke(D));var A=x(t(b),t(D));return Ue(A)?A.valueOf():A}),"Matrix, Matrix":function(b,D){var A=b.size(),S=D.size();return l(A,S),A.length===1?S.length===1?c(b,D,A[0]):f(b,D):S.length===1?d(b,D):v(b,D)},"Matrix, Array":r.referTo("Matrix,Matrix",x=>(b,D)=>x(b,t(D))),"Array, Matrix":r.referToSelf(x=>(b,D)=>x(t(b,D.storage()),D)),"SparseMatrix, any":function(b,D){return s(b,D,a,!1)},"DenseMatrix, any":function(b,D){return u(b,D,a,!1)},"any, SparseMatrix":function(b,D){return s(D,b,a,!0)},"any, DenseMatrix":function(b,D){return u(D,b,a,!0)},"Array, any":function(b,D){return u(t(b),D,a,!1).valueOf()},"any, Array":function(b,D){return u(t(D),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":r.referToSelf(x=>(b,D,A)=>{for(var S=x(b,D),C=0;C<A.length;C++)S=x(S,A[C]);return S})})}),Om="nthRoot",bU=["typed","matrix","equalScalar","BigNumber","concat"],xU=L(Om,bU,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:a,concat:i}=e,o=Gn({typed:r}),s=nn({typed:r,equalScalar:n}),u=_u({typed:r,equalScalar:n}),l=tt({typed:r,equalScalar:n}),c=Mr({typed:r,matrix:t,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return r(Om,{number:Kv,"number, number":Kv,BigNumber:d=>p(d,new a(2)),"BigNumber, BigNumber":p,Complex:f,"Complex, number":f,Array:r.referTo("DenseMatrix,number",d=>v=>d(t(v),2).valueOf()),DenseMatrix:r.referTo("DenseMatrix,number",d=>v=>d(v,2)),SparseMatrix:r.referTo("SparseMatrix,number",d=>v=>d(v,2)),"SparseMatrix, SparseMatrix":r.referToSelf(d=>(v,m)=>{if(m.density()===1)return u(v,m,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":r.referToSelf(d=>(v,m)=>{if(m.density()===1)return o(v,m,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":r.referTo("DenseMatrix,SparseMatrix",d=>(v,m)=>d(t(v),m)),"number | BigNumber, SparseMatrix":r.referToSelf(d=>(v,m)=>{if(m.density()===1)return l(m,v,d,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:s,Ss:l,sS:!1}));function p(d,v){var m=a.precision,y=a.clone({precision:m+2}),g=new a(0),E=new y(1),h=v.isNegative();if(h&&(v=v.neg()),v.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!v.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return h?new y(1/0):0;if(!d.isFinite())return h?g:d;var w=d.abs().pow(E.div(v));return w=d.isNeg()?w.neg():w,new a((h?E.div(w):w).toPrecision(m))}}),_m="sign",wU=["typed","BigNumber","Fraction","complex"],EU=L(_m,wU,e=>{var{typed:r,BigNumber:t,complex:n,Fraction:a}=e;return r(_m,{number:oc,Complex:function(o){return o.im===0?n(oc(o.re)):o.sign()},BigNumber:function(o){return new t(o.cmp(0))},bigint:function(o){return o>0n?1n:o<0n?-1n:0n},Fraction:function(o){return new a(o.s,1)},"Array | Matrix":r.referToSelf(i=>o=>rr(o,i)),Unit:r.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return r.find(i,o.valueType())(o.value)})})}),SU="sqrt",AU=["config","typed","Complex"],DU=L(SU,AU,e=>{var{config:r,typed:t,Complex:n}=e;return t("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||r.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||r.predictable?Math.sqrt(i):new n(i,0).sqrt()}}),$m="square",CU=["typed"],NU=L($m,CU,e=>{var{typed:r}=e;return r($m,{number:vb,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},bigint:function(n){return n*n},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})}),Fm="subtract",MU=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],TU=L(Fm,MU,e=>{var{typed:r,matrix:t,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:s}=e,u=Gn({typed:r}),l=vt({typed:r}),c=Ou({typed:r,equalScalar:n}),f=ma({typed:r,DenseMatrix:o}),p=Vr({typed:r,DenseMatrix:o}),d=Mr({typed:r,matrix:t,concat:s});return r(Fm,{"any, any":a},d({elop:a,SS:c,DS:u,SD:l,Ss:p,sS:f}))}),Bm="xgcd",OU=["typed","config","matrix","BigNumber"],_U=L(Bm,OU,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r(Bm,{"number, number":function(s,u){var l=mb(s,u);return t.matrix==="Array"?l:n(l)},"BigNumber, BigNumber":i});function i(o,s){var u,l,c,f=new a(0),p=new a(1),d=f,v=p,m=p,y=f;if(!o.isInt()||!s.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!s.isZero();)l=o.div(s).floor(),c=o.mod(s),u=d,d=v.minus(l.times(d)),v=u,u=m,m=y.minus(l.times(m)),y=u,o=s,s=c;var g;return o.lt(f)?g=[o.neg(),v.neg(),y.neg()]:g=[o,o.isZero()?0:v,y],t.matrix==="Array"?g:n(g)}}),Rm="invmod",$U=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],FU=L(Rm,$U,e=>{var{typed:r,config:t,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:s,add:u,isInteger:l}=e;return r(Rm,{"number, number":c,"BigNumber, BigNumber":c});function c(f,p){if(!l(f)||!l(p))throw new Error("Parameters in function invmod must be integer numbers");if(f=s(f,p),i(p,0))throw new Error("Divisor must be non zero");var d=a(f,p);d=d.valueOf();var[v,m]=d;return i(v,n(1))?(m=s(m,p),o(m,n(0))&&(m=u(m,p)),m):NaN}}),BU="matAlgo09xS0Sf",RU=["typed","equalScalar"],Yb=L(BU,RU,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,d=i._index,v=i._ptr,m=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==m.length)throw new nr(c.length,m.length);if(c[0]!==m[0]||c[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+m+")");var g=c[0],E=c[1],h,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(h=f,w=r.find(t,[h,h]),x=r.convert(0,h),b=r.find(o,[h,h]));var D=s&&p?[]:void 0,A=[],S=[],C=D?[]:void 0,M=[],$,B,P,R,N;for(B=0;B<E;B++){S[B]=A.length;var O=B+1;if(C)for(R=v[B],N=v[B+1],P=R;P<N;P++)$=d[P],M[$]=O,C[$]=p[P];for(R=l[B],N=l[B+1],P=R;P<N;P++)if($=u[P],C){var U=M[$]===O?C[$]:x,F=b(s[P],U);w(F,x)||(A.push($),D.push(F))}else A.push($)}return S[E]=A.length,a.createSparseMatrix({values:D,index:A,ptr:S,size:[g,E],datatype:f===a._datatype&&y===i._datatype?h:void 0})}}),Pm="dotMultiply",PU=["typed","matrix","equalScalar","multiplyScalar","concat"],zU=L(Pm,PU,e=>{var{typed:r,matrix:t,equalScalar:n,multiplyScalar:a,concat:i}=e,o=nn({typed:r,equalScalar:n}),s=Yb({typed:r,equalScalar:n}),u=tt({typed:r,equalScalar:n}),l=Mr({typed:r,matrix:t,concat:i});return r(Pm,l({elop:a,SS:s,DS:o,Ss:u}))});function IU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitAnd");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero()||r.eq(-1)||e.eq(r))return e;if(r.isZero()||e.eq(-1))return r;if(!e.isFinite()||!r.isFinite()){if(!e.isFinite()&&!r.isFinite())return e.isNegative()===r.isNegative()?e:new t(0);if(!e.isFinite())return r.isNegative()?e:e.isNegative()?new t(0):r;if(!r.isFinite())return e.isNegative()?r:r.isNegative()?new t(0):e}return If(e,r,function(n,a){return n&a})}function uo(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var r=e.constructor,t=r.precision;r.config({precision:1e9});var n=e.plus(new r(1));return n.s=-n.s||null,r.config({precision:t}),n}function LU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitOr");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);var n=new t(-1);return e.isZero()||r.eq(n)||e.eq(r)?r:r.isZero()||e.eq(n)?e:!e.isFinite()||!r.isFinite()?!e.isFinite()&&!e.isNegative()&&r.isNegative()||e.isNegative()&&!r.isNegative()&&!r.isFinite()?n:e.isNegative()&&r.isNegative()?e.isFinite()?e:r:e.isFinite()?r:e:If(e,r,function(a,i){return a|i})}function If(e,r,t){var n=e.constructor,a,i,o=+(e.s<0),s=+(r.s<0);if(o){a=Yo(uo(e));for(var u=0;u<a.length;++u)a[u]^=1}else a=Yo(e);if(s){i=Yo(uo(r));for(var l=0;l<i.length;++l)i[l]^=1}else i=Yo(r);var c,f,p;a.length<=i.length?(c=a,f=i,p=o):(c=i,f=a,p=s);var d=c.length,v=f.length,m=t(o,s)^1,y=new n(m^1),g=new n(1),E=new n(2),h=n.precision;for(n.config({precision:1e9});d>0;)t(c[--d],f[--v])===m&&(y=y.plus(g)),g=g.times(E);for(;v>0;)t(p,f[--v])===m&&(y=y.plus(g)),g=g.times(E);return n.config({precision:h}),m===0&&(y.s=-y.s),y}function Yo(e){for(var r=e.d,t=r[0]+"",n=1;n<r.length;++n){for(var a=r[n]+"",i=7-a.length;i--;)a="0"+a;t+=a}for(var o=t.length;t.charAt(o)==="0";)o--;var s=e.e,u=t.slice(0,o+1||1),l=u.length;if(s>0)if(++s>l)for(s-=l;s--;)u+="0";else s<l&&(u=u.slice(0,s)+"."+u.slice(s));for(var c=[0],f=0;f<u.length;){for(var p=c.length;p--;)c[p]*=10;c[0]+=parseInt(u.charAt(f++));for(var d=0;d<c.length;++d)c[d]>1&&((c[d+1]===null||c[d+1]===void 0)&&(c[d+1]=0),c[d+1]+=c[d]>>1,c[d]&=1)}return c.reverse()}function qU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function bitXor");var t=e.constructor;if(e.isNaN()||r.isNaN())return new t(NaN);if(e.isZero())return r;if(r.isZero())return e;if(e.eq(r))return new t(0);var n=new t(-1);return e.eq(n)?uo(r):r.eq(n)?uo(e):!e.isFinite()||!r.isFinite()?!e.isFinite()&&!r.isFinite()?n:new t(e.isNegative()===r.isNegative()?1/0:-1/0):If(e,r,function(a,i){return a^i})}function kU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function leftShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:!e.isFinite()&&!r.isFinite()?new t(NaN):r.lt(55)?e.times(Math.pow(2,r.toNumber())+""):e.times(new t(2).pow(r))}function UU(e,r){if(e.isFinite()&&!e.isInteger()||r.isFinite()&&!r.isInteger())throw new Error("Integers expected in function rightArithShift");var t=e.constructor;return e.isNaN()||r.isNaN()||r.isNegative()&&!r.isZero()?new t(NaN):e.isZero()||r.isZero()?e:r.isFinite()?r.lt(55)?e.div(Math.pow(2,r.toNumber())+"").floor():e.div(new t(2).pow(r)).floor():e.isNegative()?new t(-1):e.isFinite()?new t(0):new t(NaN)}var zm="bitAnd",HU=["typed","matrix","equalScalar","concat"],Xb=L(zm,HU,e=>{var{typed:r,matrix:t,equalScalar:n,concat:a}=e,i=nn({typed:r,equalScalar:n}),o=_u({typed:r,equalScalar:n}),s=tt({typed:r,equalScalar:n}),u=Mr({typed:r,matrix:t,concat:a});return r(zm,{"number, number":gb,"BigNumber, BigNumber":IU,"bigint, bigint":(l,c)=>l&c},u({SS:o,DS:i,Ss:s}))}),Im="bitNot",jU=["typed"],VU=L(Im,jU,e=>{var{typed:r}=e;return r(Im,{number:yb,BigNumber:uo,bigint:t=>~t,"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Lm="bitOr",GU=["typed","matrix","equalScalar","DenseMatrix","concat"],Kb=L(Lm,GU,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Gn({typed:r}),s=zf({typed:r,equalScalar:n}),u=ma({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:t,concat:i});return r(Lm,{"number, number":bb,"BigNumber, BigNumber":LU,"bigint, bigint":(c,f)=>c|f},l({SS:s,DS:o,Ss:u}))}),WU="matAlgo07xSSf",ZU=["typed","DenseMatrix"],cn=L(WU,ZU,e=>{var{typed:r,DenseMatrix:t}=e;return function(i,o,s){var u=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new nr(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var p=u[0],d=u[1],v,m=0,y=s;typeof l=="string"&&l===f&&l!=="mixed"&&(v=l,m=r.convert(0,v),y=r.find(s,[v,v]));var g,E,h=[];for(g=0;g<p;g++)h[g]=[];var w=[],x=[],b=[],D=[];for(E=0;E<d;E++){var A=E+1;for(n(i,E,b,w,A),n(o,E,D,x,A),g=0;g<p;g++){var S=b[g]===A?w[g]:m,C=D[g]===A?x[g]:m;h[g][E]=y(S,C)}}return new t({data:h,size:[p,d],datatype:l===i._datatype&&f===o._datatype?v:void 0})};function n(a,i,o,s,u){for(var l=a._values,c=a._index,f=a._ptr,p=f[i],d=f[i+1];p<d;p++){var v=c[p];o[v]=u,s[v]=l[p]}}}),qm="bitXor",YU=["typed","matrix","DenseMatrix","concat"],XU=L(qm,YU,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:a}=e,i=vt({typed:r}),o=cn({typed:r,DenseMatrix:n}),s=Vr({typed:r,DenseMatrix:n}),u=Mr({typed:r,matrix:t,concat:a});return r(qm,{"number, number":xb,"BigNumber, BigNumber":qU,"bigint, bigint":(l,c)=>l^c},u({SS:o,DS:i,Ss:s}))}),km="arg",KU=["typed"],JU=L(km,KU,e=>{var{typed:r}=e;return r(km,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Um="conj",QU=["typed"],eH=L(Um,QU,e=>{var{typed:r}=e;return r(Um,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.conjugate(),"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Hm="im",rH=["typed"],tH=L(Hm,rH,e=>{var{typed:r}=e;return r(Hm,{number:()=>0,"BigNumber | Fraction":t=>t.mul(0),Complex:t=>t.im,"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),jm="re",nH=["typed"],aH=L(jm,nH,e=>{var{typed:r}=e;return r(jm,{"number | BigNumber | Fraction":t=>t,Complex:t=>t.re,"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Vm="not",iH=["typed"],oH=L(Vm,iH,e=>{var{typed:r}=e;return r(Vm,{"null | undefined":()=>!0,number:Db,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},bigint:t=>!t,Unit:r.referToSelf(t=>n=>r.find(t,n.valueType())(n.value)),"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Gm="or",sH=["typed","matrix","equalScalar","DenseMatrix","concat"],Jb=L(Gm,sH,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=Ou({typed:r,equalScalar:n}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:t,concat:i});return r(Gm,{"number, number":sc,"Complex, Complex":function(f,p){return f.re!==0||f.im!==0||p.re!==0||p.im!==0},"BigNumber, BigNumber":function(f,p){return!f.isZero()&&!f.isNaN()||!p.isZero()&&!p.isNaN()},"bigint, bigint":sc,"Unit, Unit":r.referToSelf(c=>(f,p)=>c(f.value||0,p.value||0))},l({SS:s,DS:o,Ss:u}))}),Wm="xor",uH=["typed","matrix","DenseMatrix","concat"],lH=L(Wm,uH,e=>{var{typed:r,matrix:t,DenseMatrix:n,concat:a}=e,i=vt({typed:r}),o=cn({typed:r,DenseMatrix:n}),s=Vr({typed:r,DenseMatrix:n}),u=Mr({typed:r,matrix:t,concat:a});return r(Wm,{"number, number":uc,"Complex, Complex":function(c,f){return(c.re!==0||c.im!==0)!=(f.re!==0||f.im!==0)},"bigint, bigint":uc,"BigNumber, BigNumber":function(c,f){return(!c.isZero()&&!c.isNaN())!=(!f.isZero()&&!f.isNaN())},"Unit, Unit":r.referToSelf(l=>(c,f)=>l(c.value||0,f.value||0))},u({SS:o,DS:i,Ss:s}))}),Zm="concat",cH=["typed","matrix","isInteger"],Qb=L(Zm,cH,e=>{var{typed:r,matrix:t,isInteger:n}=e;return r(Zm,{"...Array | Matrix | number | BigNumber":function(i){var o,s=i.length,u=-1,l,c=!1,f=[];for(o=0;o<s;o++){var p=i[o];if(Ue(p)&&(c=!0),Je(p)||Qe(p)){if(o!==s-1)throw new Error("Dimension must be specified as last argument");if(l=u,u=p.valueOf(),!n(u))throw new TypeError("Integer number expected for dimension");if(u<0||o>0&&u>l)throw new en(u,l+1)}else{var d=We(p).valueOf(),v=Ke(d);if(f[o]=d,l=u,u=v.length-1,o>0&&u!==l)throw new nr(l+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var m=f.shift();f.length;)m=K2(m,f.shift(),u);return c?t(m):m},"...string":function(i){return i.join("")}})}),Ym="column",fH=["typed","Index","matrix","range"],ex=L(Ym,fH,e=>{var{typed:r,Index:t,matrix:n,range:a}=e;return r(Ym,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Ar(s,o.size()[1]);var u=a(0,o.size()[0]),l=new t(u,s),c=o.subset(l);return Ue(c)?c:n([[c]])}}),Xm="count",pH=["typed","size","prod"],dH=L(Xm,pH,e=>{var{typed:r,size:t,prod:n}=e;return r(Xm,{string:function(i){return i.length},"Matrix | Array":function(i){return n(t(i))}})}),Km="cross",vH=["typed","matrix","subtract","multiply"],mH=L(Km,vH,e=>{var{typed:r,matrix:t,subtract:n,multiply:a}=e;return r(Km,{"Matrix, Matrix":function(s,u){return t(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return t(i(s.toArray(),u))},"Array, Matrix":function(s,u){return t(i(s,u.toArray()))},"Array, Array":i});function i(o,s){var u=Math.max(Ke(o).length,Ke(s).length);o=Rs(o),s=Rs(s);var l=Ke(o),c=Ke(s);if(l.length!==1||c.length!==1||l[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+l.join(", ")+"], B = ["+c.join(", ")+"])");var f=[n(a(o[1],s[2]),a(o[2],s[1])),n(a(o[2],s[0]),a(o[0],s[2])),n(a(o[0],s[1]),a(o[1],s[0]))];return u>1?[f]:f}}),Jm="diag",hH=["typed","matrix","DenseMatrix","SparseMatrix"],gH=L(Jm,hH,e=>{var{typed:r,matrix:t,DenseMatrix:n,SparseMatrix:a}=e;return r(Jm,{Array:function(l){return i(l,0,Ke(l),null)},"Array, number":function(l,c){return i(l,c,Ke(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Ke(l),null)},"Array, string":function(l,c){return i(l,0,Ke(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Ke(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Ke(l),f)},Matrix:function(l){return i(l,0,l.size(),l.storage())},"Matrix, number":function(l,c){return i(l,c,l.size(),l.storage())},"Matrix, BigNumber":function(l,c){return i(l,c.toNumber(),l.size(),l.storage())},"Matrix, string":function(l,c){return i(l,0,l.size(),c)},"Matrix, number, string":function(l,c,f){return i(l,c,l.size(),f)},"Matrix, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),l.size(),f)}});function i(u,l,c,f){if(!ze(l))throw new TypeError("Second parameter in function diag must be an integer");var p=l>0?l:0,d=l<0?-l:0;switch(c.length){case 1:return o(u,l,f,c[0],d,p);case 2:return s(u,l,f,c,d,p)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,l,c,f,p,d){var v=[f+p,f+d];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var m=c==="sparse"?a.diagonal(v,u,l):n.diagonal(v,u,l);return c!==null?m:m.valueOf()}function s(u,l,c,f,p,d){if(Ue(u)){var v=u.diagonal(l);return c!==null?c!==v.storage()?t(v,c):v:v.valueOf()}for(var m=Math.min(f[0]-p,f[1]-d),y=[],g=0;g<m;g++)y[g]=u[g+p][g+d];return c!==null?t(y):y}});function Ti(e,r,t,n,a){if(Ya.isTypedFunction(e)){var i=[r,t,n],o=Ya.resolve(e,i);if(o)return f(o.implementation,i);var s=[r,t],u=Ya.resolve(e,s);if(u)return f(u.implementation,s);var l=[r],c=Ya.resolve(e,l);return c?f(c.implementation,l):f(e,i)}else return e(r,t,n);function f(p,d){try{return p.apply(p,d)}catch(y){var v;if(y instanceof TypeError&&((v=y.data)===null||v===void 0?void 0:v.category)==="wrongType"){var m=[];throw m.push("value: ".concat(Cr(r))),d.length>=2&&m.push("index: ".concat(Cr(t))),d.length>=3&&m.push("array: ".concat(Cr(n))),new TypeError("Function ".concat(a," cannot apply callback arguments ")+"".concat(e.name,"(").concat(m.join(", "),") at index ").concat(JSON.stringify(t)))}else throw new TypeError("Function ".concat(a," cannot apply callback arguments ")+"to function ".concat(e.name,": ").concat(y.message))}}}var yH="filter",bH=["typed"],xH=L(yH,bH,e=>{var{typed:r}=e;return r("filter",{"Array, function":Qm,"Matrix, function":function(n,a){return n.create(Qm(n.toArray(),a))},"Array, RegExp":Ps,"Matrix, RegExp":function(n,a){return n.create(Ps(n.toArray(),a))}})});function Qm(e,r){return Y2(e,function(t,n,a){return Ti(r,t,[n],a,"filter")})}var eh="flatten",wH=["typed","matrix"],EH=L(eh,wH,e=>{var{typed:r,matrix:t}=e;return r(eh,{Array:function(a){return mr(a)},Matrix:function(a){var i=mr(a.toArray());return t(i)}})}),rh="forEach",SH=["typed"],AH=L(rh,SH,e=>{var{typed:r}=e;return r(rh,{"Array, function":DH,"Matrix, function":function(n,a){n.forEach(a)}})});function DH(e,r){var t=function n(a,i){if(Array.isArray(a))Mu(a,function(o,s){n(o,i.concat(s))});else return Ti(r,a,i,e,"forEach")};t(e,[])}var th="getMatrixDataType",CH=["typed"],NH=L(th,CH,e=>{var{typed:r}=e;return r(th,{Array:function(n){return so(n,Cr)},Matrix:function(n){return n.getDataType()}})}),nh="identity",MH=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],TH=L(nh,MH,e=>{var{typed:r,config:t,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return r(nh,{"":function(){return t.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return u(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return u(c,f,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,p){return u(c,f,p)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(l,c){switch(l.length){case 0:return c?n(c):[];case 1:return u(l[0],l[0],c);case 2:return u(l[0],l[1],c);default:throw new Error("Vector containing two values expected")}}function u(l,c,f){var p=Qe(l)||Qe(c)?a:null;if(Qe(l)&&(l=l.toNumber()),Qe(c)&&(c=c.toNumber()),!ze(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!ze(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var d=p?new a(1):1,v=p?new p(0):0,m=[l,c];if(f){if(f==="sparse")return o.diagonal(m,d,0,v);if(f==="dense")return i.diagonal(m,d,0,v);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var y=oi([],m,v),g=l<c?l:c,E=0;E<g;E++)y[E][E]=d;return y}}),ah="kron",OH=["typed","matrix","multiplyScalar"],_H=L(ah,OH,e=>{var{typed:r,matrix:t,multiplyScalar:n}=e;return r(ah,{"Matrix, Matrix":function(o,s){return t(a(o.toArray(),s.toArray()))},"Matrix, Array":function(o,s){return t(a(o.toArray(),s))},"Array, Matrix":function(o,s){return t(a(o,s.toArray()))},"Array, Array":a});function a(i,o){if(Ke(i).length===1&&(i=[i]),Ke(o).length===1&&(o=[o]),Ke(i).length>2||Ke(o).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(i.length)+", y = "+JSON.stringify(o.length)+")");var s=[],u=[];return i.map(function(l){return o.map(function(c){return u=[],s.push(u),l.map(function(f){return c.map(function(p){return u.push(n(f,p))})})})})&&s}}),ih="map",$H=["typed"],FH=L(ih,$H,e=>{var{typed:r}=e;return r(ih,{"Array, function":BH,"Matrix, function":function(n,a){return n.map(a)}})});function BH(e,r){var t=function n(a,i){return Array.isArray(a)?a.map(function(o,s){return n(o,i.concat(s))}):Ti(r,a,i,e,"map")};return t(e,[])}var oh="diff",RH=["typed","matrix","subtract","number"],rx=L(oh,RH,e=>{var{typed:r,matrix:t,subtract:n,number:a}=e;return r(oh,{"Array | Matrix":function(c){return Ue(c)?t(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!ze(f))throw new RangeError("Dimension must be a whole number");return Ue(c)?t(i(c.toArray(),f)):i(c,f)},"Array, BigNumber":r.referTo("Array,number",l=>(c,f)=>l(c,a(f))),"Matrix, BigNumber":r.referTo("Matrix,number",l=>(c,f)=>l(c,a(f)))});function i(l,c){if(Ue(l)&&(l=l.toArray()),!Array.isArray(l))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return l.forEach(p=>{f.push(i(p,c-1))}),f}else{if(c===0)return o(l);throw RangeError("Cannot have negative dimension")}}function o(l){for(var c=[],f=l.length,p=1;p<f;p++)c.push(s(l[p-1],l[p]));return c}function s(l,c){Ue(l)&&(l=l.toArray()),Ue(c)&&(c=c.toArray());var f=Array.isArray(l),p=Array.isArray(c);if(f&&p)return u(l,c);if(!f&&!p)return n(c,l);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function u(l,c){if(l.length!==c.length)throw RangeError("Not all sub-arrays have the same length");for(var f=[],p=l.length,d=0;d<p;d++)f.push(s(l[d],c[d]));return f}}),PH="ones",zH=["typed","config","matrix","BigNumber"],IH=L(PH,zH,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r("ones",{"":function(){return t.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return t.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(1):1;if(s(u),l){var p=n(l);return u.length>0?p.resize(u,f):p}else{var d=[];return u.length>0?oi(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,p){Qe(c)&&(l=!0,p[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ze(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function Lf(){throw new Error('No "bignumber" implementation available')}function tx(){throw new Error('No "fraction" implementation available')}function nx(){throw new Error('No "matrix" implementation available')}var sh="range",LH=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],ax=L(sh,LH,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c}=e;return r(sh,{string:p,"string, boolean":p,"number, number":function(y,g){return f(d(y,g,1,!1))},"number, number, number":function(y,g,E){return f(d(y,g,E,!1))},"number, number, boolean":function(y,g,E){return f(d(y,g,1,E))},"number, number, number, boolean":function(y,g,E,h){return f(d(y,g,E,h))},"BigNumber, BigNumber":function(y,g){var E=y.constructor;return f(d(y,g,new E(1),!1))},"BigNumber, BigNumber, BigNumber":function(y,g,E){return f(d(y,g,E,!1))},"BigNumber, BigNumber, boolean":function(y,g,E){var h=y.constructor;return f(d(y,g,new h(1),E))},"BigNumber, BigNumber, BigNumber, boolean":function(y,g,E,h){return f(d(y,g,E,h))},"Unit, Unit, Unit":function(y,g,E){return f(d(y,g,E,!1))},"Unit, Unit, Unit, boolean":function(y,g,E,h){return f(d(y,g,E,h))}});function f(m){return t.matrix==="Matrix"?n?n(m):nx():m}function p(m,y){var g=v(m);if(!g)throw new SyntaxError('String "'+m+'" is no valid range');return t.number==="BigNumber"?(a===void 0&&Lf(),f(d(a(g.start),a(g.end),a(g.step)))):f(d(g.start,g.end,g.step,y))}function d(m,y,g,E){for(var h=[],w=c(g)?E?o:i:E?u:s,x=m;w(x,y);)h.push(x),x=l(x,g);return h}function v(m){var y=m.split(":"),g=y.map(function(h){return Number(h)}),E=g.some(function(h){return isNaN(h)});if(E)return null;switch(g.length){case 2:return{start:g[0],end:g[1],step:1};case 3:return{start:g[0],end:g[2],step:g[1]};default:return null}}}),uh="reshape",qH=["typed","isInteger","matrix"],kH=L(uh,qH,e=>{var{typed:r,isInteger:t}=e;return r(uh,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!t(o))throw new TypeError("Invalid size for dimension: "+o)}),$f(a,i)}})}),UH="resize",HH=["config","matrix"],jH=L(UH,HH,e=>{var{config:r,matrix:t}=e;return function(i,o,s){if(arguments.length!==2&&arguments.length!==3)throw new ha("resize",arguments.length,2,3);if(Ue(o)&&(o=o.valueOf()),Qe(o[0])&&(o=o.map(function(c){return Qe(c)?c.toNumber():c})),Ue(i))return i.resize(o,s,!0);if(typeof i=="string")return n(i,o,s);var u=Array.isArray(i)?!1:r.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return We(i)}else{Array.isArray(i)||(i=[i]),i=We(i);var l=oi(i,o,s);return u?t(l):l}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new nr(i.length,1);var s=i[0];if(typeof s!="number"||!ze(s))throw new TypeError("Invalid size, must contain positive integers (size: "+tr(i)+")");if(a.length>s)return a.substring(0,s);if(a.length<s){for(var u=a,l=0,c=s-a.length;l<c;l++)u+=o;return u}else return a}}),lh="rotate",VH=["typed","multiply","rotationMatrix"],GH=L(lh,VH,e=>{var{typed:r,multiply:t,rotationMatrix:n}=e;return r(lh,{"Array , number | BigNumber | Complex | Unit":function(o,s){a(o,2);var u=t(n(s),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,s){return a(o,2),t(n(s),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){a(o,3);var l=t(n(s,u),o);return l},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){return a(o,3),t(n(s,u),o)}});function a(i,o){var s=Array.isArray(i)?Ke(i):i.size();if(s.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s.length===2&&s[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),ch="rotationMatrix",WH=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],ZH=L(ch,WH,e=>{var{typed:r,config:t,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:s,matrix:u,DenseMatrix:l,SparseMatrix:c,cos:f,sin:p}=e;return r(ch,{"":function(){return t.matrix==="Matrix"?u([]):[]},string:function(h){return u(h)},"number | BigNumber | Complex | Unit":function(h){return d(h,t.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(h,w){return d(h,w)},"number | BigNumber | Complex | Unit, Array":function(h,w){var x=u(w);return v(x),g(h,x,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(h,w){v(w);var x=w.storage()||(t.matrix==="Matrix"?"dense":void 0);return g(h,w,x)},"number | BigNumber | Complex | Unit, Array, string":function(h,w,x){var b=u(w);return v(b),g(h,b,x)},"number | BigNumber | Complex | Unit, Matrix, string":function(h,w,x){return v(w),g(h,w,x)}});function d(E,h){var w=Qe(E),x=w?new s(-1):-1,b=f(E),D=p(E),A=[[b,n(x,D)],[D,b]];return y(A,h)}function v(E){var h=E.size();if(h.length<1||h[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function m(E){return E.reduce((h,w)=>n(h,w))}function y(E,h){if(h){if(h==="sparse")return new c(E);if(h==="dense")return new l(E);throw new TypeError('Unknown matrix type "'.concat(h,'"'))}return E}function g(E,h,w){var x=o(h);if(x===0)throw new RangeError("Rotation around zero vector");var b=Qe(E)?s:null,D=b?new b(1):1,A=b?new b(-1):-1,S=b?new b(h.get([0])/x):h.get([0])/x,C=b?new b(h.get([1])/x):h.get([1])/x,M=b?new b(h.get([2])/x):h.get([2])/x,$=f(E),B=a(D,i($)),P=p(E),R=a($,m([S,S,B])),N=a(m([S,C,B]),m([A,M,P])),O=a(m([S,M,B]),m([C,P])),U=a(m([S,C,B]),m([M,P])),F=a($,m([C,C,B])),q=a(m([C,M,B]),m([A,S,P])),Y=a(m([S,M,B]),m([A,C,P])),G=a(m([C,M,B]),m([S,P])),z=a($,m([M,M,B])),J=[[R,N,O],[U,F,q],[Y,G,z]];return y(J,w)}}),fh="row",YH=["typed","Index","matrix","range"],ix=L(fh,YH,e=>{var{typed:r,Index:t,matrix:n,range:a}=e;return r(fh,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Ar(s,o.size()[0]);var u=a(0,o.size()[1]),l=new t(s,u),c=o.subset(l);return Ue(c)?c:n([[c]])}}),ph="size",XH=["typed","config","?matrix"],KH=L(ph,XH,e=>{var{typed:r,config:t,matrix:n}=e;return r(ph,{Matrix:function(i){return i.create(i.size())},Array:Ke,string:function(i){return t.matrix==="Array"?[i.length]:n([i.length])},"number | Complex | BigNumber | Unit | boolean | null":function(i){return t.matrix==="Array"?[]:n?n([]):nx()}})}),dh="squeeze",JH=["typed","matrix"],QH=L(dh,JH,e=>{var{typed:r,matrix:t}=e;return r(dh,{Array:function(a){return Rs(We(a))},Matrix:function(a){var i=Rs(a.toArray());return Array.isArray(i)?t(i):i},any:function(a){return We(a)}})}),vh="subset",ej=["typed","matrix","zeros","add"],ox=L(vh,ej,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e;return r(vh,{"Matrix, Index":function(s,u){return ii(u)?t():(Bs(s,u),s.subset(u))},"Array, Index":r.referTo("Matrix, Index",function(o){return function(s,u){var l=o(t(s),u);return u.isScalar()?l:l.valueOf()}}),"Object, Index":tj,"string, Index":rj,"Matrix, Index, any, any":function(s,u,l,c){return ii(u)?s:(Bs(s,u),s.clone().subset(u,i(l,u),c))},"Array, Index, any, any":r.referTo("Matrix, Index, any, any",function(o){return function(s,u,l,c){var f=o(t(s),u,l,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(t(s),u,l,void 0).valueOf()}}),"Matrix, Index, any":r.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(s,u,l,void 0)}}),"string, Index, string":mh,"string, Index, string, string":mh,"Object, Index, any":nj});function i(o,s){if(typeof o=="string")throw new Error("can't boradcast a string");if(s._isScalar)return o;var u=s.size();if(u.every(l=>l>0))try{return a(o,n(u))}catch{return o}else return o}});function rj(e,r){if(!xu(r))throw new TypeError("Index expected");if(ii(r))return"";if(Bs(Array.from(e),r),r.size().length!==1)throw new nr(r.size().length,1);var t=e.length;Ar(r.min()[0],t),Ar(r.max()[0],t);var n=r.dimension(0),a="";return n.forEach(function(i){a+=e.charAt(i)}),a}function mh(e,r,t,n){if(!r||r.isIndex!==!0)throw new TypeError("Index expected");if(ii(r))return e;if(Bs(Array.from(e),r),r.size().length!==1)throw new nr(r.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=r.dimension(0),i=a.size()[0];if(i!==t.length)throw new nr(a.size()[0],t.length);var o=e.length;Ar(r.min()[0]),Ar(r.max()[0]);for(var s=[],u=0;u<o;u++)s[u]=e.charAt(u);if(a.forEach(function(f,p){s[f]=t.charAt(p[0])}),s.length>o)for(var l=o-1,c=s.length;l<c;l++)s[l]||(s[l]=n);return s.join("")}function tj(e,r){if(!ii(r)){if(r.size().length!==1)throw new nr(r.size(),1);var t=r.dimension(0);if(typeof t!="string")throw new TypeError("String expected as index to retrieve an object property");return ct(e,t)}}function nj(e,r,t){if(ii(r))return e;if(r.size().length!==1)throw new nr(r.size(),1);var n=r.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=We(e);return ni(a,n,t),a}var hh="transpose",aj=["typed","matrix"],ij=L(hh,aj,e=>{var{typed:r,matrix:t}=e;return r(hh,{Array:o=>n(t(o)).valueOf(),Matrix:n,any:We});function n(o){var s=o.size(),u;switch(s.length){case 1:u=o.clone();break;case 2:{var l=s[0],c=s[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+tr(s)+")");switch(o.storage()){case"dense":u=a(o,l,c);break;case"sparse":u=i(o,l,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+tr(s)+")")}return u}function a(o,s,u){for(var l=o._data,c=[],f,p=0;p<u;p++){f=c[p]=[];for(var d=0;d<s;d++)f[d]=We(l[d][p])}return o.createDenseMatrix({data:c,size:[u,s],datatype:o._datatype})}function i(o,s,u){for(var l=o._values,c=o._index,f=o._ptr,p=l?[]:void 0,d=[],v=[],m=[],y=0;y<s;y++)m[y]=0;var g,E,h;for(g=0,E=c.length;g<E;g++)m[c[g]]++;for(var w=0,x=0;x<s;x++)v.push(w),w+=m[x],m[x]=v[x];for(v.push(w),h=0;h<u;h++)for(var b=f[h],D=f[h+1],A=b;A<D;A++){var S=m[c[A]]++;d[S]=h,l&&(p[S]=We(l[A]))}return o.createSparseMatrix({values:p,index:d,ptr:v,size:[u,s],datatype:o._datatype})}}),gh="ctranspose",oj=["typed","transpose","conj"],sj=L(gh,oj,e=>{var{typed:r,transpose:t,conj:n}=e;return r(gh,{any:function(i){return n(t(i))}})}),yh="zeros",uj=["typed","config","matrix","BigNumber"],lj=L(yh,uj,e=>{var{typed:r,config:t,matrix:n,BigNumber:a}=e;return r(yh,{"":function(){return t.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return t.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(0):0;if(s(u),l){var p=n(l);return u.length>0?p.resize(u,f):p}else{var d=[];return u.length>0?oi(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,p){Qe(c)&&(l=!0,p[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ze(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),bh="fft",cj=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],fj=L(bh,cj,e=>{var{typed:r,matrix:t,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:s,i:u,dotDivide:l,conj:c,pow:f,ceil:p,log2:d}=e;return r(bh,{Array:v,Matrix:function(h){return h.create(v(h.toArray()))}});function v(E){var h=Ke(E);return h.length===1?g(E,h[0]):m(E.map(w=>v(w,h.slice(1))),0)}function m(E,h){var w=Ke(E);if(h!==0)return new Array(w[0]).fill(0).map((b,D)=>m(E[D],h-1));if(w.length===1)return g(E);function x(b){var D=Ke(b);return new Array(D[1]).fill(0).map((A,S)=>new Array(D[0]).fill(0).map((C,M)=>b[M][S]))}return x(m(x(E),1))}function y(E){for(var h=E.length,w=o(i(a(-1,a(u,s)),h)),x=[],b=1-h;b<h;b++)x.push(f(w,i(f(b,2),2)));for(var D=f(2,p(d(h+h-1))),A=[...new Array(h).fill(0).map((N,O)=>a(E[O],x[h-1+O])),...new Array(D-h).fill(0)],S=[...new Array(h+h-1).fill(0).map((N,O)=>i(1,x[O])),...new Array(D-(h+h-1)).fill(0)],C=g(A),M=g(S),$=new Array(D).fill(0).map((N,O)=>a(C[O],M[O])),B=l(c(v(c($))),D),P=[],R=h-1;R<h+h-1;R++)P.push(a(B[R],x[R]));return P}function g(E){var h=E.length;if(h===1)return[E[0]];if(h%2===0){for(var w=[...g(E.filter((A,S)=>S%2===0)),...g(E.filter((A,S)=>S%2===1))],x=0;x<h/2;x++){var b=w[x],D=a(w[x+h/2],o(a(a(s,u),i(-x,h))));w[x]=n(b,D),w[x+h/2]=n(b,a(-1,D))}return w}else return y(E)}}),xh="ifft",pj=["typed","fft","dotDivide","conj"],dj=L(xh,pj,e=>{var{typed:r,fft:t,dotDivide:n,conj:a}=e;return r(xh,{"Array | Matrix":function(o){var s=Ue(o)?o.size():Ke(o);return n(a(t(a(o))),s.reduce((u,l)=>u*l,1))}})});function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lo(e)}function vj(e,r){if(lo(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function mj(e){var r=vj(e,"string");return lo(r)=="symbol"?r:r+""}function jr(e,r,t){return(r=mj(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function wh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function hj(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?wh(Object(t),!0).forEach(function(n){jr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var gj="solveODE",yj=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],bj=L(gj,yj,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,max:o,map:s,abs:u,isPositive:l,isNegative:c,larger:f,smaller:p,matrix:d,bignumber:v,unaryMinus:m}=e;function y(A){return function(S,C,M,$){var B=!(C.length===2&&(C.every(b)||C.every(Rt)));if(B)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var P=C[0],R=C[1],N=f(R,P),O=$.firstStep;if(O!==void 0&&!l(O))throw new Error('"firstStep" must be positive');var U=$.maxStep;if(U!==void 0&&!l(U))throw new Error('"maxStep" must be positive');var F=$.minStep;if(F&&c(F))throw new Error('"minStep" must be positive or zero');var q=[P,R,O,F,U].filter(I=>I!==void 0);if(!(q.every(b)||q.every(Rt)))throw new Error('Inconsistent type of "t" dependant variables');for(var Y=1,G=$.tol?$.tol:1e-4,z=$.minDelta?$.minDelta:.2,J=$.maxDelta?$.maxDelta:5,le=$.maxIter?$.maxIter:1e4,Q=[P,R,...M,U,F].some(Qe),[re,se,te,ae]=Q?[v(A.a),v(A.c),v(A.b),v(A.bp)]:[A.a,A.c,A.b,A.bp],fe=O?N?O:m(O):i(n(R,P),Y),ne=[P],xe=[M],$e=n(te,ae),k=0,W=0,ue=w(N),j=x(N);ue(ne[k],R);){var K=[];fe=j(ne[k],R,fe),K.push(S(ne[k],xe[k]));for(var oe=1;oe<se.length;++oe)K.push(S(t(ne[k],a(se[oe],fe)),t(xe[k],a(fe,re[oe],K))));var he=o(u(s(a($e,K),I=>Rt(I)?I.value:I)));he<G&&G/he>1/4&&(ne.push(t(ne[k],fe)),xe.push(t(xe[k],a(fe,te,K))),k++);var me=.84*(G/he)**(1/5);if(p(me,z)?me=z:f(me,J)&&(me=J),me=Q?v(me):me,fe=a(fe,me),U&&f(u(fe),U)?fe=N?U:m(U):F&&p(u(fe),F)&&(fe=N?F:m(F)),W++,W>le)throw new Error("Maximum number of iterations reached, try changing options")}return{t:ne,y:xe}}}function g(A,S,C,M){var $=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],B=[null,1/2,3/4,1],P=[2/9,1/3,4/9,0],R=[7/24,1/4,1/3,1/8],N={a:$,c:B,b:P,bp:R};return y(N)(A,S,C,M)}function E(A,S,C,M){var $=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],B=[null,1/5,3/10,4/5,8/9,1,1],P=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],R=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],N={a:$,c:B,b:P,bp:R};return y(N)(A,S,C,M)}function h(A,S,C,M){var $=M.method?M.method:"RK45",B={RK23:g,RK45:E};if($.toUpperCase()in B){var P=hj({},M);return delete P.method,B[$.toUpperCase()](A,S,C,P)}else{var R=Object.keys(B).map(O=>'"'.concat(O,'"')),N="".concat(R.slice(0,-1).join(", ")," and ").concat(R.slice(-1));throw new Error('Unavailable method "'.concat($,'". Available methods are ').concat(N))}}function w(A){return A?p:f}function x(A){var S=A?f:p;return function(C,M,$){var B=t(C,$);return S(B,M)?n(M,C):$}}function b(A){return Qe(A)||Je(A)}function D(A,S,C,M){var $=h(A,S.toArray(),C.toArray(),M);return{t:d($.t),y:d($.y)}}return r("solveODE",{"function, Array, Array, Object":h,"function, Matrix, Matrix, Object":D,"function, Array, Array":(A,S,C)=>h(A,S,C,{}),"function, Matrix, Matrix":(A,S,C)=>D(A,S,C,{}),"function, Array, number | BigNumber | Unit":(A,S,C)=>{var M=h(A,S,[C],{});return{t:M.t,y:M.y.map($=>$[0])}},"function, Matrix, number | BigNumber | Unit":(A,S,C)=>{var M=h(A,S.toArray(),[C],{});return{t:d(M.t),y:d(M.y.map($=>$[0]))}},"function, Array, number | BigNumber | Unit, Object":(A,S,C,M)=>{var $=h(A,S,[C],M);return{t:$.t,y:$.y.map(B=>B[0])}},"function, Matrix, number | BigNumber | Unit, Object":(A,S,C,M)=>{var $=h(A,S.toArray(),[C],M);return{t:d($.t),y:d($.y.map(B=>B[0]))}}})}),xj="erf",wj=["typed"],Ej=L(xj,wj,e=>{var{typed:r}=e;return r("name",{number:function(o){var s=Math.abs(o);return s>=Dj?Pn(o):s<=Sj?Pn(o)*t(s):s<=4?Pn(o)*(1-n(s)):Pn(o)*(1-a(s))},"Array | Matrix":r.referToSelf(i=>o=>rr(o,i))});function t(i){var o=i*i,s=hn[0][4]*o,u=o,l;for(l=0;l<3;l+=1)s=(s+hn[0][l])*o,u=(u+Ta[0][l])*o;return i*(s+hn[0][3])/(u+Ta[0][3])}function n(i){var o=hn[1][8]*i,s=i,u;for(u=0;u<7;u+=1)o=(o+hn[1][u])*i,s=(s+Ta[1][u])*i;var l=(o+hn[1][7])/(s+Ta[1][7]),c=parseInt(i*16)/16,f=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-f)*l}function a(i){var o=1/(i*i),s=hn[2][5]*o,u=o,l;for(l=0;l<4;l+=1)s=(s+hn[2][l])*o,u=(u+Ta[2][l])*o;var c=o*(s+hn[2][4])/(u+Ta[2][4]);c=(Aj-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),Sj=.46875,Aj=.5641895835477563,hn=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Ta=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Dj=Math.pow(2,53),Eh="zeta",Cj=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Nj=L(Eh,Cj,e=>{var{typed:r,config:t,multiply:n,pow:a,divide:i,factorial:o,equal:s,smallerEq:u,isNegative:l,gamma:c,sin:f,subtract:p,add:d,Complex:v,BigNumber:m,pi:y}=e;return r(Eh,{number:b=>g(b,D=>D,()=>20),BigNumber:b=>g(b,D=>new m(D),()=>Math.abs(Math.log10(t.relTol))),Complex:E});function g(b,D,A){return s(b,0)?D(-.5):s(b,1)?D(NaN):isFinite(b)?h(b,D,A,S=>S):l(b)?D(NaN):D(1)}function E(b){return b.re===0&&b.im===0?new v(-.5):b.re===1?new v(NaN,NaN):b.re===1/0&&b.im===0?new v(1):b.im===1/0||b.re===-1/0?new v(NaN,NaN):h(b,D=>D,D=>Math.round(1.3*15+.9*Math.abs(D.im)),D=>D.re)}function h(b,D,A,S){var C=A(b);if(S(b)>-(C-1)/2)return x(b,D(C),D);var M=n(a(2,b),a(D(y),p(b,1)));return M=n(M,f(n(i(D(y),2),b))),M=n(M,c(p(1,b))),n(M,h(p(1,b),D,A,S))}function w(b,D){for(var A=b,S=b;u(S,D);S=d(S,1)){var C=i(n(o(d(D,p(S,1))),a(4,S)),n(o(p(D,S)),o(n(2,S))));A=d(A,C)}return n(D,A)}function x(b,D,A){for(var S=i(1,n(w(A(0),D),p(1,a(2,p(1,b))))),C=A(0),M=A(1);u(M,D);M=d(M,1))C=d(C,i(n((-1)**(M-1),w(M,D)),a(M,b)));return n(S,C)}}),Sh="mode",Mj=["typed","isNaN","isNumeric"],Tj=L(Sh,Mj,e=>{var{typed:r,isNaN:t,isNumeric:n}=e;return r(Sh,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=mr(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var s={},u=[],l=0,c=0;c<i.length;c++){var f=i[c];if(n(f)&&t(f))throw new Error("Cannot calculate mode of an array containing NaN values");f in s||(s[f]=0),s[f]++,s[f]===l?u.push(f):s[f]>l&&(l=s[f],u=[f])}return u}});function dt(e,r,t){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+Cr(t)+", value: "+JSON.stringify(t)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+r+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+Cr(t)+", value: "+JSON.stringify(t)+")":"",new TypeError("Cannot calculate "+r+", no ordering relation is defined for complex numbers"+n)):e}var Ah="prod",Oj=["typed","config","multiplyScalar","numeric"],_j=L(Ah,Oj,e=>{var{typed:r,config:t,multiplyScalar:n,numeric:a}=e;return r(Ah,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(s,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(s){return i(s)}});function i(o){var s;if(An(o,function(u){try{s=s===void 0?u:n(s,u)}catch(l){throw dt(l,"prod",u)}}),typeof s=="string"&&(s=a(s,jn(s,t))),s===void 0)throw new Error("Cannot calculate prod of an empty array");return s}}),Dh="format",$j=["typed"],Fj=L(Dh,$j,e=>{var{typed:r}=e;return r(Dh,{any:tr,"any, Object | function | number | BigNumber":tr})}),Ch="bin",Bj=["typed","format"],Rj=L(Ch,Bj,e=>{var{typed:r,format:t}=e;return r(Ch,{"number | BigNumber":function(a){return t(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"bin",wordSize:i})}})}),Nh="oct",Pj=["typed","format"],zj=L(Nh,Pj,e=>{var{typed:r,format:t}=e;return r(Nh,{"number | BigNumber":function(a){return t(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"oct",wordSize:i})}})}),Mh="hex",Ij=["typed","format"],Lj=L(Mh,Ij,e=>{var{typed:r,format:t}=e;return r(Mh,{"number | BigNumber":function(a){return t(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return t(a,{notation:"hex",wordSize:i})}})}),sx=/\$([\w.]+)/g,Th="print",qj=["typed"],ux=L(Th,qj,e=>{var{typed:r}=e;return r(Th,{"string, Object | Array":Oh,"string, Object | Array, number | Object":Oh})});function Oh(e,r,t){return e.replace(sx,function(n,a){var i=a.split("."),o=r[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var s=i.shift();o=s?o[s]:o+"."}return o!==void 0?it(o)?o:tr(o,t):n})}var _h="to",kj=["typed","matrix","concat"],Uj=L(_h,kj,e=>{var{typed:r,matrix:t,concat:n}=e,a=Mr({typed:r,matrix:t,concat:n});return r(_h,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),$h="isPrime",Hj=["typed"],jj=L($h,Hj,e=>{var{typed:r}=e;return r($h,{number:function(n){if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},bigint:function(n){if(n<=3n)return n>1n;if(n%2n===0n||n%3n===0n)return!1;for(var a=5n;a*a<=n;a+=6n)if(n%a===0n||n%(a+2n)===0n)return!1;return!0},BigNumber:function(n){if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(E,h,w){for(var x=1;!h.eq(0);)h.mod(2).eq(0)?(h=h.div(2),E=E.mul(E).mod(w)):(h=h.sub(1),x=E.mul(x).mod(w));return x}var s=n.constructor.clone({precision:n.toFixed(0).length*2});n=new s(n);for(var u=0,l=n.sub(1);l.mod(2).eq(0);)l=l.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(E=>E<n);else{var f=Math.min(n.toNumber()-2,Math.floor(2*Math.pow(n.toFixed(0).length*Math.log(10),2)));c=[];for(var p=2;p<=f;p+=1)c.push(f)}for(var d=0;d<c.length;d+=1){var v=c[d],m=o(n.sub(n).add(v),l,n);if(!m.eq(1)){for(var y=0,g=m;!g.eq(n.sub(1));y+=1,g=g.mul(g).mod(n))if(y===u-1)return!1}}return!0},"Array | Matrix":r.referToSelf(t=>n=>rr(n,t))})}),Vj="numeric",Gj=["number","?bignumber","?fraction"],Wj=L(Vj,Gj,e=>{var{number:r,bignumber:t,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>r(o),BigNumber:t?o=>t(o):Lf,bigint:o=>BigInt(o),Fraction:n?o=>n(o):tx};return function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",l=arguments.length>2?arguments[2]:void 0;if(l!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=Cr(s);if(!(c in a))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+s+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?s:i[u](s)}}),Fh="divideScalar",Zj=["typed","numeric"],Yj=L(Fh,Zj,e=>{var{typed:r,numeric:t}=e;return r(Fh,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"bigint, bigint":function(a,i){return a/i},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})}),Bh="pow",Xj=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],Kj=L(Bh,Xj,e=>{var{typed:r,config:t,identity:n,multiply:a,matrix:i,inv:o,number:s,fraction:u,Complex:l}=e;return r(Bh,{"number, number":c,"Complex, Complex":function(v,m){return v.pow(m)},"BigNumber, BigNumber":function(v,m){return m.isInteger()||v>=0||t.predictable?v.pow(m):new l(v.toNumber(),0).pow(m.toNumber(),0)},"bigint, bigint":(d,v)=>d**v,"Fraction, Fraction":function(v,m){var y=v.pow(m);if(y!=null)return y;if(t.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(v.valueOf(),m.valueOf())},"Array, number":f,"Array, BigNumber":function(v,m){return f(v,m.toNumber())},"Matrix, number":p,"Matrix, BigNumber":function(v,m){return p(v,m.toNumber())},"Unit, number | BigNumber":function(v,m){return v.pow(m)}});function c(d,v){if(t.predictable&&!ze(v)&&d<0)try{var m=u(v),y=s(m);if((v===y||Math.abs((v-y)/v)<1e-14)&&m.d%2===1)return(m.n%2===0?1:-1)*Math.pow(-d,v)}catch{}return t.predictable&&(d<-1&&v===1/0||d>-1&&d<0&&v===-1/0)?NaN:ze(v)||d>=0||t.predictable?hb(d,v):d*d<1&&v===1/0||d*d>1&&v===-1/0?0:new l(d,0).pow(v,0)}function f(d,v){if(!ze(v))throw new TypeError("For A^b, b must be an integer (value is "+v+")");var m=Ke(d);if(m.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+m.length+" dimensions)");if(m[0]!==m[1])throw new Error("For A^b, A must be square (size is "+m[0]+"x"+m[1]+")");if(v<0)try{return f(o(d),-v)}catch(E){throw E.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+v+")"):E}for(var y=n(m[0]).valueOf(),g=d;v>=1;)(v&1)===1&&(y=a(g,y)),v>>=1,g=a(g,g);return y}function p(d,v){return i(f(d.valueOf(),v))}}),Oa="Number of decimals in function round must be an integer",Rh="round",Jj=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],Qj=L(Rh,Jj,e=>{var{typed:r,config:t,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:s}=e,u=tt({typed:r,equalScalar:a}),l=Vr({typed:r,DenseMatrix:s}),c=tn({typed:r});function f(p){return Math.abs(Do(p).exponent)}return r(Rh,{number:function(d){var v=Gi(d,f(t.relTol)),m=rt(d,v,t.relTol,t.absTol)?v:d;return Gi(m)},"number, number":function(d,v){var m=f(t.relTol);if(v>=m)return Gi(d,v);var y=Gi(d,m),g=rt(d,y,t.relTol,t.absTol)?y:d;return Gi(g,v)},"number, BigNumber":function(d,v){if(!v.isInteger())throw new TypeError(Oa);return new o(d).toDecimalPlaces(v.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,v){if(v%1)throw new TypeError(Oa);return d.round(v)},"Complex, BigNumber":function(d,v){if(!v.isInteger())throw new TypeError(Oa);var m=v.toNumber();return d.round(m)},BigNumber:function(d){var v=new o(d).toDecimalPlaces(f(t.relTol)),m=wt(d,v,t.relTol,t.absTol)?v:d;return m.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,v){if(!v.isInteger())throw new TypeError(Oa);var m=f(t.relTol);if(v>=m)return d.toDecimalPlaces(v.toNumber());var y=d.toDecimalPlaces(m),g=wt(d,y,t.relTol,t.absTol)?y:d;return g.toDecimalPlaces(v.toNumber())},Fraction:function(d){return d.round()},"Fraction, number":function(d,v){if(v%1)throw new TypeError(Oa);return d.round(v)},"Fraction, BigNumber":function(d,v){if(!v.isInteger())throw new TypeError(Oa);return d.round(v.toNumber())},"Unit, number, Unit":r.referToSelf(p=>function(d,v,m){var y=d.toNumeric(m);return m.multiply(p(y,v))}),"Unit, BigNumber, Unit":r.referToSelf(p=>(d,v,m)=>p(d,v.toNumber(),m)),"Unit, Unit":r.referToSelf(p=>(d,v)=>p(d,0,v)),"Array | Matrix, number, Unit":r.referToSelf(p=>(d,v,m)=>rr(d,y=>p(y,v,m))),"Array | Matrix, BigNumber, Unit":r.referToSelf(p=>(d,v,m)=>p(d,v.toNumber(),m)),"Array | Matrix, Unit":r.referToSelf(p=>(d,v)=>p(d,0,v)),"Array | Matrix":r.referToSelf(p=>d=>rr(d,p)),"SparseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>u(d,v,p,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(p=>(d,v)=>c(d,v,p,!1)),"Array, number | BigNumber":r.referToSelf(p=>(d,v)=>c(n(d),v,p,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":r.referToSelf(p=>(d,v)=>a(d,0)?i(v.size(),v.storage()):l(v,d,p,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":r.referToSelf(p=>(d,v)=>a(d,0)?i(v.size(),v.storage()):c(v,d,p,!0)),"number | Complex | BigNumber | Fraction, Array":r.referToSelf(p=>(d,v)=>c(n(v),d,p,!0).valueOf())})}),Ph="log",eV=["config","typed","divideScalar","Complex"],rV=L(Ph,eV,e=>{var{typed:r,config:t,divideScalar:n,Complex:a}=e;return r(Ph,{number:function(o){return o>=0||t.predictable?JL(o):new a(o,0).log()},Complex:function(o){return o.log()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.ln():new a(o.toNumber(),0).log()},"any, any":r.referToSelf(i=>(o,s)=>n(i(o),i(s)))})}),zh="log1p",tV=["typed","config","divideScalar","log","Complex"],nV=L(zh,tV,e=>{var{typed:r,config:t,divideScalar:n,log:a,Complex:i}=e;return r(zh,{number:function(u){return u>=-1||t.predictable?Zz(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var l=u.plus(1);return!l.isNegative()||t.predictable?l.ln():o(new i(u.toNumber(),0))},"Array | Matrix":r.referToSelf(s=>u=>rr(u,s)),"any, any":r.referToSelf(s=>(u,l)=>n(s(u),a(l)))});function o(s){var u=s.re+1;return new i(Math.log(Math.sqrt(u*u+s.im*s.im)),Math.atan2(s.im,u))}}),Ih="nthRoots",aV=["config","typed","divideScalar","Complex"],iV=L(Ih,aV,e=>{var{typed:r,config:t,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(s,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(s===0||s.abs()===0)return[new a(0,0)];var l=typeof s=="number",c;(l||s.re===0||s.im===0)&&(l?c=2*+(s<0):s.im===0?c=2*+(s.re<0):c=2*+(s.im<0)+1);for(var f=s.arg(),p=s.abs(),d=[],v=Math.pow(p,1/u),m=0;m<u;m++){var y=(c+4*m)/u;if(y===Math.round(y)){d.push(i[y%4](v));continue}d.push(new a({r:v,phi:(f+2*Math.PI*m)/u}))}return d}return r(Ih,{Complex:function(u){return o(u,2)},"Complex, number":o})}),Lh="dotPow",oV=["typed","equalScalar","matrix","pow","DenseMatrix","concat"],sV=L(Lh,oV,e=>{var{typed:r,equalScalar:t,matrix:n,pow:a,DenseMatrix:i,concat:o}=e,s=vt({typed:r}),u=cn({typed:r,DenseMatrix:i}),l=tt({typed:r,equalScalar:t}),c=Vr({typed:r,DenseMatrix:i}),f=Mr({typed:r,matrix:n,concat:o}),p={};for(var d in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,d)&&!d.includes("Matrix")&&!d.includes("Array")&&(p[d]=a.signatures[d]);var v=r(p);return r(Lh,f({elop:v,SS:u,DS:s,Ss:l,sS:c}))}),qh="dotDivide",uV=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat"],lV=L(qh,uV,e=>{var{typed:r,matrix:t,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o}=e,s=nn({typed:r,equalScalar:n}),u=vt({typed:r}),l=cn({typed:r,DenseMatrix:i}),c=tt({typed:r,equalScalar:n}),f=Vr({typed:r,DenseMatrix:i}),p=Mr({typed:r,matrix:t,concat:o});return r(qh,p({elop:a,SS:l,DS:u,SD:s,Ss:c,sS:f}))});function No(e){var{DenseMatrix:r}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+tr(o)+")");var s=o[0],u=o[1];if(s!==u)throw new RangeError("Matrix must be square (size: "+tr(o)+")");var l=[];if(Ue(a)){var c=a.size(),f=a._data;if(c.length===1){if(c[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var p=0;p<s;p++)l[p]=[f[p]];return new r({data:l,size:[s,1],datatype:a._datatype})}if(c.length===2){if(c[0]!==s||c[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(Os(a)){if(i){l=[];for(var d=0;d<s;d++)l[d]=[f[d][0]];return new r({data:l,size:[s,1],datatype:a._datatype})}return a}if(ea(a)){for(var v=0;v<s;v++)l[v]=[0];for(var m=a._values,y=a._index,g=a._ptr,E=g[1],h=g[0];h<E;h++){var w=y[h];l[w][0]=m[h]}return new r({data:l,size:[s,1],datatype:a._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(hr(a)){var x=Ke(a);if(x.length===1){if(x[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var b=0;b<s;b++)l[b]=[a[b]];return new r({data:l,size:[s,1]})}if(x.length===2){if(x[0]!==s||x[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var D=0;D<s;D++)l[D]=[a[D][0]];return new r({data:l,size:[s,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var kh="lsolve",cV=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],fV=L(kh,cV,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=No({DenseMatrix:s});return r(kh,{"SparseMatrix, Array | Matrix":function(p,d){return c(p,d)},"DenseMatrix, Array | Matrix":function(p,d){return l(p,d)},"Array, Array | Matrix":function(p,d){var v=t(p),m=l(v,d);return m.valueOf()}});function l(f,p){p=u(f,p,!0);for(var d=p._data,v=f._size[0],m=f._size[1],y=[],g=f._data,E=0;E<m;E++){var h=d[E][0]||0,w=void 0;if(o(h,0))w=0;else{var x=g[E][E];if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");w=n(h,x);for(var b=E+1;b<v;b++)d[b]=[i(d[b][0]||0,a(w,g[b][E]))]}y[E]=[w]}return new s({data:y,size:[v,1]})}function c(f,p){p=u(f,p,!0);for(var d=p._data,v=f._size[0],m=f._size[1],y=f._values,g=f._index,E=f._ptr,h=[],w=0;w<m;w++){var x=d[w][0]||0;if(o(x,0))h[w]=[0];else{for(var b=0,D=[],A=[],S=E[w],C=E[w+1],M=S;M<C;M++){var $=g[M];$===w?b=y[M]:$>w&&(D.push(y[M]),A.push($))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var B=n(x,b),P=0,R=A.length;P<R;P++){var N=A[P];d[N]=[i(d[N][0]||0,a(B,D[P]))]}h[w]=[B]}}return new s({data:h,size:[v,1]})}}),Uh="usolve",pV=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],dV=L(Uh,pV,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=No({DenseMatrix:s});return r(Uh,{"SparseMatrix, Array | Matrix":function(p,d){return c(p,d)},"DenseMatrix, Array | Matrix":function(p,d){return l(p,d)},"Array, Array | Matrix":function(p,d){var v=t(p),m=l(v,d);return m.valueOf()}});function l(f,p){p=u(f,p,!0);for(var d=p._data,v=f._size[0],m=f._size[1],y=[],g=f._data,E=m-1;E>=0;E--){var h=d[E][0]||0,w=void 0;if(o(h,0))w=0;else{var x=g[E][E];if(o(x,0))throw new Error("Linear system cannot be solved since matrix is singular");w=n(h,x);for(var b=E-1;b>=0;b--)d[b]=[i(d[b][0]||0,a(w,g[b][E]))]}y[E]=[w]}return new s({data:y,size:[v,1]})}function c(f,p){p=u(f,p,!0);for(var d=p._data,v=f._size[0],m=f._size[1],y=f._values,g=f._index,E=f._ptr,h=[],w=m-1;w>=0;w--){var x=d[w][0]||0;if(o(x,0))h[w]=[0];else{for(var b=0,D=[],A=[],S=E[w],C=E[w+1],M=C-1;M>=S;M--){var $=g[M];$===w?b=y[M]:$<w&&(D.push(y[M]),A.push($))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var B=n(x,b),P=0,R=A.length;P<R;P++){var N=A[P];d[N]=[i(d[N][0],a(B,D[P]))]}h[w]=[B]}}return new s({data:h,size:[v,1]})}}),Hh="lsolveAll",vV=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],mV=L(Hh,vV,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=No({DenseMatrix:s});return r(Hh,{"SparseMatrix, Array | Matrix":function(p,d){return c(p,d)},"DenseMatrix, Array | Matrix":function(p,d){return l(p,d)},"Array, Array | Matrix":function(p,d){var v=t(p),m=l(v,d);return m.map(y=>y.valueOf())}});function l(f,p){for(var d=[u(f,p,!0)._data.map(A=>A[0])],v=f._data,m=f._size[0],y=f._size[1],g=0;g<y;g++)for(var E=d.length,h=0;h<E;h++){var w=d[h];if(o(v[g][g],0))if(o(w[g],0)){if(h===0){var b=[...w];b[g]=1;for(var D=g+1;D<y;D++)b[D]=i(b[D],v[D][g]);d.push(b)}}else{if(h===0)return[];d.splice(h,1),h-=1,E-=1}else{w[g]=n(w[g],v[g][g]);for(var x=g+1;x<y;x++)w[x]=i(w[x],a(w[g],v[x][g]))}}return d.map(A=>new s({data:A.map(S=>[S]),size:[m,1]}))}function c(f,p){for(var d=[u(f,p,!0)._data.map(Y=>Y[0])],v=f._size[0],m=f._size[1],y=f._values,g=f._index,E=f._ptr,h=0;h<m;h++)for(var w=d.length,x=0;x<w;x++){for(var b=d[x],D=[],A=[],S=E[h],C=E[h+1],M=0,$=S;$<C;$++){var B=g[$];B===h?M=y[$]:B>h&&(D.push(y[$]),A.push(B))}if(o(M,0))if(o(b[h],0)){if(x===0){var O=[...b];O[h]=1;for(var U=0,F=A.length;U<F;U++){var q=A[U];O[q]=i(O[q],D[U])}d.push(O)}}else{if(x===0)return[];d.splice(x,1),x-=1,w-=1}else{b[h]=n(b[h],M);for(var P=0,R=A.length;P<R;P++){var N=A[P];b[N]=i(b[N],a(b[h],D[P]))}}}return d.map(Y=>new s({data:Y.map(G=>[G]),size:[v,1]}))}}),jh="usolveAll",hV=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],gV=L(jh,hV,e=>{var{typed:r,matrix:t,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=No({DenseMatrix:s});return r(jh,{"SparseMatrix, Array | Matrix":function(p,d){return c(p,d)},"DenseMatrix, Array | Matrix":function(p,d){return l(p,d)},"Array, Array | Matrix":function(p,d){var v=t(p),m=l(v,d);return m.map(y=>y.valueOf())}});function l(f,p){for(var d=[u(f,p,!0)._data.map(A=>A[0])],v=f._data,m=f._size[0],y=f._size[1],g=y-1;g>=0;g--)for(var E=d.length,h=0;h<E;h++){var w=d[h];if(o(v[g][g],0))if(o(w[g],0)){if(h===0){var b=[...w];b[g]=1;for(var D=g-1;D>=0;D--)b[D]=i(b[D],v[D][g]);d.push(b)}}else{if(h===0)return[];d.splice(h,1),h-=1,E-=1}else{w[g]=n(w[g],v[g][g]);for(var x=g-1;x>=0;x--)w[x]=i(w[x],a(w[g],v[x][g]))}}return d.map(A=>new s({data:A.map(S=>[S]),size:[m,1]}))}function c(f,p){for(var d=[u(f,p,!0)._data.map(Y=>Y[0])],v=f._size[0],m=f._size[1],y=f._values,g=f._index,E=f._ptr,h=m-1;h>=0;h--)for(var w=d.length,x=0;x<w;x++){for(var b=d[x],D=[],A=[],S=E[h],C=E[h+1],M=0,$=C-1;$>=S;$--){var B=g[$];B===h?M=y[$]:B<h&&(D.push(y[$]),A.push(B))}if(o(M,0))if(o(b[h],0)){if(x===0){var O=[...b];O[h]=1;for(var U=0,F=A.length;U<F;U++){var q=A[U];O[q]=i(O[q],D[U])}d.push(O)}}else{if(x===0)return[];d.splice(x,1),x-=1,w-=1}else{b[h]=n(b[h],M);for(var P=0,R=A.length;P<R;P++){var N=A[P];b[N]=i(b[N],a(b[h],D[P]))}}}return d.map(Y=>new s({data:Y.map(G=>[G]),size:[v,1]}))}}),yV="matAlgo08xS0Sid",bV=["typed","equalScalar"],qf=L(yV,bV,e=>{var{typed:r,equalScalar:t}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),p=i._values,d=i._index,v=i._ptr,m=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==m.length)throw new nr(c.length,m.length);if(c[0]!==m[0]||c[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+m+")");if(!s||!p)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var g=c[0],E=c[1],h,w=t,x=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(h=f,w=r.find(t,[h,h]),x=r.convert(0,h),b=r.find(o,[h,h]));for(var D=[],A=[],S=[],C=[],M=[],$,B,P,R,N=0;N<E;N++){S[N]=A.length;var O=N+1;for(B=l[N],P=l[N+1],$=B;$<P;$++)R=u[$],M[R]=O,C[R]=s[$],A.push(R);for(B=v[N],P=v[N+1],$=B;$<P;$++)R=d[$],M[R]===O&&(C[R]=b(C[R],p[$]));for($=S[N];$<A.length;){R=A[$];var U=C[R];w(U,x)?A.splice($,1):(D.push(U),$++)}}return S[E]=A.length,a.createSparseMatrix({values:D,index:A,ptr:S,size:[g,E],datatype:f===a._datatype&&y===i._datatype?h:void 0})}}),kf=L("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:r,matrix:t}=e;return{"Array, number":r.referTo("DenseMatrix, number",n=>(a,i)=>n(t(a),i).valueOf()),"Array, BigNumber":r.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(t(a),i).valueOf()),"number, Array":r.referTo("number, DenseMatrix",n=>(a,i)=>n(a,t(i)).valueOf()),"BigNumber, Array":r.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,t(i)).valueOf())}}),Vh="leftShift",xV=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],wV=L(Vh,xV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=Gn({typed:r}),u=nn({typed:r,equalScalar:n}),l=qf({typed:r,equalScalar:n}),c=ma({typed:r,DenseMatrix:i}),f=tt({typed:r,equalScalar:n}),p=tn({typed:r}),d=Mr({typed:r,matrix:t,concat:o}),v=kf({typed:r,matrix:t});return r(Vh,{"number, number":wb,"BigNumber, BigNumber":kU,"bigint, bigint":(m,y)=>m<<y,"SparseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():f(y,g,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():p(y,g,m,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):c(g,y,m,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):p(g,y,m,!0))},v,d({SS:l,DS:s,SD:u}))}),Gh="rightArithShift",EV=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],SV=L(Gh,EV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=Gn({typed:r}),u=nn({typed:r,equalScalar:n}),l=qf({typed:r,equalScalar:n}),c=ma({typed:r,DenseMatrix:i}),f=tt({typed:r,equalScalar:n}),p=tn({typed:r}),d=Mr({typed:r,matrix:t,concat:o}),v=kf({typed:r,matrix:t});return r(Gh,{"number, number":Eb,"BigNumber, BigNumber":UU,"bigint, bigint":(m,y)=>m>>y,"SparseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():f(y,g,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():p(y,g,m,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):c(g,y,m,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):p(g,y,m,!0))},v,d({SS:l,DS:s,SD:u}))}),Wh="rightLogShift",AV=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],DV=L(Wh,AV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=Gn({typed:r}),u=nn({typed:r,equalScalar:n}),l=qf({typed:r,equalScalar:n}),c=ma({typed:r,DenseMatrix:i}),f=tt({typed:r,equalScalar:n}),p=tn({typed:r}),d=Mr({typed:r,matrix:t,concat:o}),v=kf({typed:r,matrix:t});return r(Wh,{"number, number":Sb,"SparseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():f(y,g,m,!1)),"DenseMatrix, number | BigNumber":r.referToSelf(m=>(y,g)=>n(g,0)?y.clone():p(y,g,m,!1)),"number | BigNumber, SparseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):c(g,y,m,!0)),"number | BigNumber, DenseMatrix":r.referToSelf(m=>(y,g)=>n(y,0)?a(g.size(),g.storage()):p(g,y,m,!0))},v,d({SS:l,DS:s,SD:u}))}),Zh="and",CV=["typed","matrix","equalScalar","zeros","not","concat"],lx=L(Zh,CV,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,s=nn({typed:r,equalScalar:n}),u=_u({typed:r,equalScalar:n}),l=tt({typed:r,equalScalar:n}),c=tn({typed:r}),f=Mr({typed:r,matrix:t,concat:o});return r(Zh,{"number, number":lc,"Complex, Complex":function(d,v){return(d.re!==0||d.im!==0)&&(v.re!==0||v.im!==0)},"BigNumber, BigNumber":function(d,v){return!d.isZero()&&!v.isZero()&&!d.isNaN()&&!v.isNaN()},"bigint, bigint":lc,"Unit, Unit":r.referToSelf(p=>(d,v)=>p(d.value||0,v.value||0)),"SparseMatrix, any":r.referToSelf(p=>(d,v)=>i(v)?a(d.size(),d.storage()):l(d,v,p,!1)),"DenseMatrix, any":r.referToSelf(p=>(d,v)=>i(v)?a(d.size(),d.storage()):c(d,v,p,!1)),"any, SparseMatrix":r.referToSelf(p=>(d,v)=>i(d)?a(d.size(),d.storage()):l(v,d,p,!0)),"any, DenseMatrix":r.referToSelf(p=>(d,v)=>i(d)?a(d.size(),d.storage()):c(v,d,p,!0)),"Array, any":r.referToSelf(p=>(d,v)=>p(t(d),v).valueOf()),"any, Array":r.referToSelf(p=>(d,v)=>p(d,t(v)).valueOf())},f({SS:u,DS:s}))}),Hs="compare",NV=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],MV=L(Hs,NV,e=>{var{typed:r,config:t,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:s,concat:u}=e,l=vt({typed:r}),c=Ou({typed:r,equalScalar:n}),f=Vr({typed:r,DenseMatrix:s}),p=Mr({typed:r,matrix:a,concat:u}),d=Mi({typed:r});return r(Hs,TV({typed:r,config:t}),{"boolean, boolean":function(m,y){return m===y?0:m>y?1:-1},"BigNumber, BigNumber":function(m,y){return wt(m,y,t.relTol,t.absTol)?new i(0):new i(m.cmp(y))},"bigint, bigint":function(m,y){return m===y?0n:m>y?1n:-1n},"Fraction, Fraction":function(m,y){return new o(m.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,p({SS:c,DS:l,Ss:f}))}),TV=L(Hs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Hs,{"number, number":function(a,i){return rt(a,i,t.relTol,t.absTol)?0:a>i?1:-1}})}),OV=function e(r,t){var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,s=/^0/,u=function(h){return e.insensitive&&(""+h).toLowerCase()||""+h},l=u(r).replace(a,"")||"",c=u(t).replace(a,"")||"",f=l.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(l.match(o),16)||f.length!==1&&l.match(i)&&Date.parse(l),v=parseInt(c.match(o),16)||d&&c.match(i)&&Date.parse(c)||null,m,y;if(v){if(d<v)return-1;if(d>v)return 1}for(var g=0,E=Math.max(f.length,p.length);g<E;g++){if(m=!(f[g]||"").match(s)&&parseFloat(f[g])||f[g]||0,y=!(p[g]||"").match(s)&&parseFloat(p[g])||p[g]||0,isNaN(m)!==isNaN(y))return isNaN(m)?1:-1;if(typeof m!=typeof y&&(m+="",y+=""),m<y)return-1;if(m>y)return 1}return 0};const _a=ye.getDefaultExportFromCjs(OV);var Yh="compareNatural",_V=["typed","compare"],$V=L(Yh,_V,e=>{var{typed:r,compare:t}=e,n=t.signatures["boolean,boolean"];return r(Yh,{"any, any":a});function a(u,l){var c=Cr(u),f=Cr(l),p;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return p=t(u,l),p.toString()!=="0"?p>0?1:-1:_a(c,f);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(c)||d.includes(f))return p=i(a,u,l),p!==0?p:_a(c,f);if(c!==f)return _a(c,f);if(c==="Complex")return FV(u,l);if(c==="Unit")return u.equalBase(l)?a(u.value,l.value):o(a,u.formatUnits(),l.formatUnits());if(c==="boolean")return n(u,l);if(c==="string")return _a(u,l);if(c==="Object")return s(a,u,l);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,l,c){return ea(l)&&ea(c)?o(u,l.toJSON().values,c.toJSON().values):ea(l)?i(u,l.toArray(),c):ea(c)?i(u,l,c.toArray()):Os(l)?i(u,l.toJSON().data,c):Os(c)?i(u,l,c.toJSON().data):Array.isArray(l)?Array.isArray(c)?o(u,l,c):i(u,l,[c]):i(u,[l],c)}function o(u,l,c){for(var f=0,p=Math.min(l.length,c.length);f<p;f++){var d=u(l[f],c[f]);if(d!==0)return d}return l.length>c.length?1:l.length<c.length?-1:0}function s(u,l,c){var f=Object.keys(l),p=Object.keys(c);f.sort(_a),p.sort(_a);var d=o(u,f,p);if(d!==0)return d;for(var v=0;v<f.length;v++){var m=u(l[f[v]],c[p[v]]);if(m!==0)return m}return 0}});function FV(e,r){return e.re>r.re?1:e.re<r.re?-1:e.im>r.im?1:e.im<r.im?-1:0}var Xh="compareText",BV=["typed","matrix","concat"];nc.signature="any, any";var RV=L(Xh,BV,e=>{var{typed:r,matrix:t,concat:n}=e,a=Mr({typed:r,matrix:t,concat:n});return r(Xh,nc,a({elop:nc,Ds:!0}))}),js="equal",PV=["typed","matrix","equalScalar","DenseMatrix","concat"],zV=L(js,PV,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=cn({typed:r,DenseMatrix:a}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:t,concat:i});return r(js,IV({typed:r,equalScalar:n}),l({elop:n,SS:s,DS:o,Ss:u}))}),IV=L(js,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(js,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:t(a,i)}})}),Kh="equalText",LV=["typed","compareText","isZero"],qV=L(Kh,LV,e=>{var{typed:r,compareText:t,isZero:n}=e;return r(Kh,{"any, any":function(i,o){return n(t(i,o))}})}),Vs="smaller",kV=["typed","config","matrix","DenseMatrix","concat"],UV=L(Vs,kV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=cn({typed:r,DenseMatrix:a}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:n,concat:i}),c=Mi({typed:r});return r(Vs,HV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f<p,"BigNumber, BigNumber":function(p,d){return p.lt(d)&&!wt(p,d,t.relTol,t.absTol)},"bigint, bigint":(f,p)=>f<p,"Fraction, Fraction":(f,p)=>f.compare(p)===-1,"Complex, Complex":function(p,d){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:s,DS:o,Ss:u}))}),HV=L(Vs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Vs,{"number, number":function(a,i){return a<i&&!rt(a,i,t.relTol,t.absTol)}})}),Gs="smallerEq",jV=["typed","config","matrix","DenseMatrix","concat"],VV=L(Gs,jV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=cn({typed:r,DenseMatrix:a}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:n,concat:i}),c=Mi({typed:r});return r(Gs,GV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f<=p,"BigNumber, BigNumber":function(p,d){return p.lte(d)||wt(p,d,t.relTol,t.absTol)},"bigint, bigint":(f,p)=>f<=p,"Fraction, Fraction":(f,p)=>f.compare(p)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:s,DS:o,Ss:u}))}),GV=L(Gs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Gs,{"number, number":function(a,i){return a<=i||rt(a,i,t.relTol,t.absTol)}})}),Ws="larger",WV=["typed","config","matrix","DenseMatrix","concat"],ZV=L(Ws,WV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=cn({typed:r,DenseMatrix:a}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:n,concat:i}),c=Mi({typed:r});return r(Ws,YV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f>p,"BigNumber, BigNumber":function(p,d){return p.gt(d)&&!wt(p,d,t.relTol,t.absTol)},"bigint, bigint":(f,p)=>f>p,"Fraction, Fraction":(f,p)=>f.compare(p)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:s,DS:o,Ss:u}))}),YV=L(Ws,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Ws,{"number, number":function(a,i){return a>i&&!rt(a,i,t.relTol,t.absTol)}})}),Zs="largerEq",XV=["typed","config","matrix","DenseMatrix","concat"],KV=L(Zs,XV,e=>{var{typed:r,config:t,matrix:n,DenseMatrix:a,concat:i}=e,o=vt({typed:r}),s=cn({typed:r,DenseMatrix:a}),u=Vr({typed:r,DenseMatrix:a}),l=Mr({typed:r,matrix:n,concat:i}),c=Mi({typed:r});return r(Zs,JV({typed:r,config:t}),{"boolean, boolean":(f,p)=>f>=p,"BigNumber, BigNumber":function(p,d){return p.gte(d)||wt(p,d,t.relTol,t.absTol)},"bigint, bigint":function(p,d){return p>=d},"Fraction, Fraction":(f,p)=>f.compare(p)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,l({SS:s,DS:o,Ss:u}))}),JV=L(Zs,["typed","config"],e=>{var{typed:r,config:t}=e;return r(Zs,{"number, number":function(a,i){return a>=i||rt(a,i,t.relTol,t.absTol)}})}),Jh="deepEqual",QV=["typed","equal"],eG=L(Jh,QV,e=>{var{typed:r,equal:t}=e;return r(Jh,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var s=0;s<o;s++)if(!n(a[s],i[s]))return!1;return!0}else return!1;else return Array.isArray(i)?!1:t(a,i)}}),Ys="unequal",rG=["typed","config","equalScalar","matrix","DenseMatrix","concat"],tG=L(Ys,rG,e=>{var{typed:r,config:t,equalScalar:n,matrix:a,DenseMatrix:i,concat:o}=e,s=vt({typed:r}),u=cn({typed:r,DenseMatrix:i}),l=Vr({typed:r,DenseMatrix:i}),c=Mr({typed:r,matrix:a,concat:o});return r(Ys,nG({typed:r,equalScalar:n}),c({elop:f,SS:u,DS:s,Ss:l}));function f(p,d){return!n(p,d)}}),nG=L(Ys,["typed","equalScalar"],e=>{var{typed:r,equalScalar:t}=e;return r(Ys,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!t(a,i)}})}),Qh="partitionSelect",aG=["typed","isNumeric","isNaN","compare"],iG=L(Qh,aG,e=>{var{typed:r,isNumeric:t,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return r(Qh,{"Array | Matrix, number":function(c,f){return s(c,f,i)},"Array | Matrix, number, string":function(c,f,p){if(p==="asc")return s(c,f,i);if(p==="desc")return s(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(l,c,f){if(!ze(c)||c<0)throw new Error("k must be a non-negative integer");if(Ue(l)){var p=l.size();if(p.length>1)throw new Error("Only one dimensional matrices supported");return u(l.valueOf(),c,f)}if(Array.isArray(l))return u(l,c,f)}function u(l,c,f){if(c>=l.length)throw new Error("k out of bounds");for(var p=0;p<l.length;p++)if(t(l[p])&&n(l[p]))return l[p];for(var d=0,v=l.length-1;d<v;){for(var m=d,y=v,g=l[Math.floor(Math.random()*(v-d+1))+d];m<y;)if(f(l[m],g)>=0){var E=l[y];l[y]=l[m],l[m]=E,--y}else++m;f(l[m],g)>0&&--m,c<=m?v=m:d=m+1}return l[c]}}),e0="sort",oG=["typed","matrix","compare","compareNatural"],sG=L(e0,oG,e=>{var{typed:r,matrix:t,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return r(e0,{Array:function(f){return u(f),f.sort(i)},Matrix:function(f){return l(f),t(f.toArray().sort(i),f.storage())},"Array, function":function(f,p){return u(f),f.sort(p)},"Matrix, function":function(f,p){return l(f),t(f.toArray().sort(p),f.storage())},"Array, string":function(f,p){return u(f),f.sort(s(p))},"Matrix, string":function(f,p){return l(f),t(f.toArray().sort(s(p)),f.storage())}});function s(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Ke(c).length!==1)throw new Error("One dimensional array expected")}function l(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),r0="max",uG=["typed","config","numeric","larger"],cx=L(r0,uG,e=>{var{typed:r,config:t,numeric:n,larger:a}=e;return r(r0,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,l){return Tu(u,l.valueOf(),i)},"...":function(u){if(Di(u))throw new TypeError("Scalar values expected in function max");return o(u)}});function i(s,u){try{return a(s,u)?s:u}catch(l){throw dt(l,"max",u)}}function o(s){var u;if(An(s,function(l){try{isNaN(l)&&typeof l=="number"?u=NaN:(u===void 0||a(l,u))&&(u=l)}catch(c){throw dt(c,"max",l)}}),u===void 0)throw new Error("Cannot calculate max of an empty array");return typeof u=="string"&&(u=n(u,jn(u,t))),u}}),t0="min",lG=["typed","config","numeric","smaller"],fx=L(t0,lG,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e;return r(t0,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(u,l){return Tu(u,l.valueOf(),i)},"...":function(u){if(Di(u))throw new TypeError("Scalar values expected in function min");return o(u)}});function i(s,u){try{return a(s,u)?s:u}catch(l){throw dt(l,"min",u)}}function o(s){var u;if(An(s,function(l){try{isNaN(l)&&typeof l=="number"?u=NaN:(u===void 0||a(l,u))&&(u=l)}catch(c){throw dt(c,"min",l)}}),u===void 0)throw new Error("Cannot calculate min of an empty array");return typeof u=="string"&&(u=n(u,jn(u,t))),u}}),cG="ImmutableDenseMatrix",fG=["smaller","DenseMatrix"],pG=L(cG,fG,e=>{var{smaller:r,DenseMatrix:t}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!it(i))throw new Error("Invalid datatype: "+i);if(Ue(a)||hr(a)){var o=new t(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&hr(a.data)&&hr(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+Cr(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new t,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=t.prototype.subset.call(this,a);return Ue(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:We(this._data),size:We(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||r(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||r(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0}),dG="Index",vG=["ImmutableDenseMatrix","getMatrixDataType"],mG=L(dG,vG,e=>{var{ImmutableDenseMatrix:r,getMatrixDataType:t}=e;function n(i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var o=0,s=arguments.length;o<s;o++){var u=arguments[o],l=hr(u),c=Ue(u),f=null;if(Mf(u))this._dimensions.push(u),this._isScalar=!1;else if(l||c){var p=void 0;t(u)==="boolean"?(l&&(p=a(n0(u).valueOf())),c&&(p=a(n0(u._data).valueOf())),f=u.valueOf().length):p=a(u.valueOf()),this._dimensions.push(p);var d=p.size();(d.length!==1||d[0]!==1||f!==null)&&(this._isScalar=!1)}else if(typeof u=="number")this._dimensions.push(a([u]));else if(typeof u=="string")this._dimensions.push(u);else throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._sourceSize.push(f)}}n.prototype.type="Index",n.prototype.isIndex=!0;function a(i){for(var o=0,s=i.length;o<s;o++)if(typeof i[o]!="number"||!ze(i[o]))throw new TypeError("Index parameters must be positive integer numbers");return new r(i)}return n.prototype.clone=function(){var i=new n;return i._dimensions=We(this._dimensions),i._isScalar=this._isScalar,i._sourceSize=this._sourceSize,i},n.create=function(i){var o=new n;return n.apply(o,i),o},n.prototype.size=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?1:u.size()[0]}return i},n.prototype.max=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?u:u.max()}return i},n.prototype.min=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=typeof u=="string"?u:u.min()}return i},n.prototype.forEach=function(i){for(var o=0,s=this._dimensions.length;o<s;o++)i(this._dimensions[o],o,this)},n.prototype.dimension=function(i){return this._dimensions[i]||null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&typeof this._dimensions[0]=="string"},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i.push(typeof u=="string"?u:u.toArray())}return i},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];typeof u=="string"?i.push(JSON.stringify(u)):i.push(u.toString())}return"["+i.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(i){return n.create(i.dimensions)},n},{isClass:!0});function n0(e){var r=[];return e.forEach((t,n)=>{t&&r.push(n)}),r}var hG="FibonacciHeap",gG=["smaller","larger"],yG=L(hG,gG,e=>{var{smaller:r,larger:t}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,f){var p={key:c,value:f,degree:0};if(this._minimum){var d=this._minimum;p.left=d,p.right=d.right,d.right=p,p.right.left=p,r(c,d.key)&&(this._minimum=p)}else p.left=p,p.right=p,this._minimum=p;return this._size++,p},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,p=c.degree,d=c.child;p>0;){var v=d.right;d.left.right=d.right,d.right.left=d.left,d.left=f,d.right=f.right,f.right=d,d.right.left=d,d.parent=null,d=v,p--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=l(f,this._size)),this._size--,this._minimum=f,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,f,p){f.key=p;var d=f.parent;return d&&r(f.key,d.key)&&(o(c,f,d),s(c,d)),r(f.key,c.key)&&(c=f),c}function o(c,f,p){f.left.right=f.right,f.right.left=f.left,p.degree--,p.child===f&&(p.child=f.right),p.degree===0&&(p.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function s(c,f){var p=f.parent;p&&(f.mark?(o(c,f,p),s(p)):f.mark=!0)}var u=function(f,p){f.left.right=f.right,f.right.left=f.left,f.parent=p,p.child?(f.left=p.child,f.right=p.child.right,p.child.right=f,f.right.left=f):(p.child=f,f.right=f,f.left=f),p.degree++,f.mark=!1};function l(c,f){var p=Math.floor(Math.log(f)*n)+1,d=new Array(p),v=0,m=c;if(m)for(v++,m=m.right;m!==c;)v++,m=m.right;for(var y;v>0;){for(var g=m.degree,E=m.right;y=d[g],!!y;){if(t(m.key,y.key)){var h=y;y=m,m=h}u(y,m),d[g]=null,g++}d[g]=m,m=E,v--}c=null;for(var w=0;w<p;w++)y=d[w],y&&(c?(y.left.right=y.right,y.right.left=y.left,y.left=c,y.right=c.right,c.right=y,y.right.left=y,r(y.key,c.key)&&(c=y)):c=y);return c}return a},{isClass:!0}),bG="Spa",xG=["addScalar","equalScalar","FibonacciHeap"],wG=L(bG,xG,e=>{var{addScalar:r,equalScalar:t,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var s=this._heap.insert(i,o);this._values[i]=s}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var s=this._values[i];s?s.value=r(s.value,o):(s=this._heap.insert(i,o),this._values[i]=s)},a.prototype.forEach=function(i,o,s){var u=this._heap,l=this._values,c=[],f=u.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=i&&(t(f.value,0)||s(f.key,f.value,this)),f=u.extractMinimum(),f&&c.push(f);for(var p=0;p<c.length;p++){var d=c[p];f=u.insert(d.key,d.value),l[f.key]=f}},a.prototype.swap=function(i,o){var s=this._values[i],u=this._values[o];if(!s&&u)s=this._heap.insert(i,u.value),this._heap.remove(u),this._values[i]=s,this._values[o]=void 0;else if(s&&!u)u=this._heap.insert(o,s.value),this._heap.remove(s),this._values[o]=u,this._values[i]=void 0;else if(s&&u){var l=s.value;s.value=u.value,u.value=l}},a},{isClass:!0}),EG=Co(function(e){return new e(1).exp()},{hasher:$u}),SG=Co(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:$u}),Uf=Co(function(e){return e.acos(-1)},{hasher:$u}),AG=Co(function(e){return Uf(e).times(2)},{hasher:$u});function $u(e){return e[0].precision}function a0(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function wl(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?a0(Object(t),!0).forEach(function(n){jr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var DG="Unit",CG=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],NG=L(DG,CG,e=>{var{on:r,config:t,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:s,abs:u,fix:l,round:c,equal:f,isNumeric:p,format:d,number:v,Complex:m,BigNumber:y,Fraction:g}=e,E=v;function h(k,W){if(!(this instanceof h))throw new Error("Constructor must be called with the new operator");if(!(k==null||p(k)||bn(k)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,W===void 0)this.units=[],this.dimensions=U.map(j=>0);else if(typeof W=="string"){var ue=h.parse(W);this.units=ue.units,this.dimensions=ue.dimensions}else if(Rt(W)&&W.value===null)this.fixPrefix=W.fixPrefix,this.skipAutomaticSimplification=W.skipAutomaticSimplification,this.dimensions=W.dimensions.slice(0),this.units=W.units.map(j=>Hr({},j));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(k)}Object.defineProperty(h,"name",{value:"Unit"}),h.prototype.constructor=h,h.prototype.type="Unit",h.prototype.isUnit=!0;var w,x,b;function D(){for(;b===" "||b===" ";)C()}function A(k){return k>="0"&&k<="9"||k==="."}function S(k){return k>="0"&&k<="9"}function C(){x++,b=w.charAt(x)}function M(k){x=k,b=w.charAt(x)}function $(){var k="",W=x;if(b==="+"?C():b==="-"&&(k+=b,C()),!A(b))return M(W),null;if(b==="."){if(k+=b,C(),!S(b))return M(W),null}else{for(;S(b);)k+=b,C();b==="."&&(k+=b,C())}for(;S(b);)k+=b,C();if(b==="E"||b==="e"){var ue="",j=x;if(ue+=b,C(),(b==="+"||b==="-")&&(ue+=b,C()),!S(b))return M(j),k;for(k=k+ue;S(b);)k+=b,C()}return k}function B(){for(var k="";S(b)||h.isValidAlpha(b);)k+=b,C();var W=k.charAt(0);return h.isValidAlpha(W)?k:null}function P(k){return b===k?(C(),k):null}h.parse=function(k,W){if(W=W||{},w=k,x=-1,b="",typeof w!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var ue=new h;ue.units=[];var j=1,K=!1;C(),D();var oe=$(),he=null;if(oe){if(t.number==="BigNumber")he=new y(oe);else if(t.number==="Fraction")try{he=new g(oe)}catch{he=parseFloat(oe)}else he=parseFloat(oe);D(),P("*")?(j=1,K=!0):P("/")&&(j=-1,K=!0)}for(var me=[],I=1;;){for(D();b==="(";)me.push(j),I*=j,j=1,C(),D();var H=void 0;if(b){var ie=b;if(H=B(),H===null)throw new SyntaxError('Unexpected "'+ie+'" in "'+w+'" at index '+x.toString())}else break;var ce=R(H);if(ce===null)throw new SyntaxError('Unit "'+H+'" not found.');var de=j*I;if(D(),P("^")){D();var ve=$();if(ve===null)throw new SyntaxError('In "'+k+'", "^" must be followed by a floating-point number');de*=ve}ue.units.push({unit:ce.unit,prefix:ce.prefix,power:de});for(var Se=0;Se<U.length;Se++)ue.dimensions[Se]+=(ce.unit.dimensions[Se]||0)*de;for(D();b===")";){if(me.length===0)throw new SyntaxError('Unmatched ")" in "'+w+'" at index '+x.toString());I/=me.pop(),C(),D()}if(K=!1,P("*")?(j=1,K=!0):P("/")?(j=-1,K=!0):j=1,ce.unit.base){var we=ce.unit.base.key;Q.auto[we]={unit:ce.unit,prefix:ce.prefix}}}if(D(),b)throw new SyntaxError('Could not parse: "'+k+'"');if(K)throw new SyntaxError('Trailing characters: "'+k+'"');if(me.length!==0)throw new SyntaxError('Unmatched "(" in "'+w+'"');if(ue.units.length===0&&!W.allowNoUnits)throw new SyntaxError('"'+k+'" contains no units');return ue.value=he!==void 0?ue._normalize(he):null,ue},h.prototype.clone=function(){var k=new h;k.fixPrefix=this.fixPrefix,k.skipAutomaticSimplification=this.skipAutomaticSimplification,k.value=We(this.value),k.dimensions=this.dimensions.slice(0),k.units=[];for(var W=0;W<this.units.length;W++){k.units[W]={};for(var ue in this.units[W])Re(this.units[W],ue)&&(k.units[W][ue]=this.units[W][ue])}return k},h.prototype.valueType=function(){return Cr(this.value)},h.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},h.prototype._normalize=function(k){if(k==null||this.units.length===0)return k;for(var W=k,ue=h._getNumberConverter(Cr(k)),j=0;j<this.units.length;j++){var K=ue(this.units[j].unit.value),oe=ue(this.units[j].prefix.value),he=ue(this.units[j].power);W=i(W,s(i(K,oe),he))}return W},h.prototype._denormalize=function(k,W){if(k==null||this.units.length===0)return k;for(var ue=k,j=h._getNumberConverter(Cr(k)),K=0;K<this.units.length;K++){var oe=j(this.units[K].unit.value),he=j(this.units[K].prefix.value),me=j(this.units[K].power);ue=o(ue,s(i(oe,he),me))}return ue};var R=Co(k=>{if(Re(z,k)){var W=z[k],ue=W.prefixes[""];return{unit:W,prefix:ue}}for(var j in z)if(Re(z,j)&&IL(k,j)){var K=z[j],oe=k.length-j.length,he=k.substring(0,oe),me=Re(K.prefixes,he)?K.prefixes[he]:void 0;if(me!==void 0)return{unit:K,prefix:me}}return null},{hasher:k=>k[0],limit:100});h.isValuelessUnit=function(k){return R(k)!==null},h.prototype.hasBase=function(k){if(typeof k=="string"&&(k=F[k]),!k)return!1;for(var W=0;W<U.length;W++)if(Math.abs((this.dimensions[W]||0)-(k.dimensions[W]||0))>1e-12)return!1;return!0},h.prototype.equalBase=function(k){for(var W=0;W<U.length;W++)if(Math.abs((this.dimensions[W]||0)-(k.dimensions[W]||0))>1e-12)return!1;return!0},h.prototype.equals=function(k){return this.equalBase(k)&&f(this.value,k.value)},h.prototype.multiply=function(k){for(var W=this.clone(),ue=Rt(k)?k:new h(k),j=0;j<U.length;j++)W.dimensions[j]=(this.dimensions[j]||0)+(ue.dimensions[j]||0);for(var K=0;K<ue.units.length;K++){var oe=wl({},ue.units[K]);W.units.push(oe)}if(this.value!==null||ue.value!==null){var he=this.value===null?this._normalize(1):this.value,me=ue.value===null?ue._normalize(1):ue.value;W.value=i(he,me)}else W.value=null;return Rt(k)&&(W.skipAutomaticSimplification=!1),N(W)},h.prototype.divideInto=function(k){return new h(k).divide(this)},h.prototype.divide=function(k){for(var W=this.clone(),ue=Rt(k)?k:new h(k),j=0;j<U.length;j++)W.dimensions[j]=(this.dimensions[j]||0)-(ue.dimensions[j]||0);for(var K=0;K<ue.units.length;K++){var oe=wl(wl({},ue.units[K]),{},{power:-ue.units[K].power});W.units.push(oe)}if(this.value!==null||ue.value!==null){var he=this.value===null?this._normalize(1):this.value,me=ue.value===null?ue._normalize(1):ue.value;W.value=o(he,me)}else W.value=null;return Rt(k)&&(W.skipAutomaticSimplification=!1),N(W)},h.prototype.pow=function(k){for(var W=this.clone(),ue=0;ue<U.length;ue++)W.dimensions[ue]=(this.dimensions[ue]||0)*k;for(var j=0;j<W.units.length;j++)W.units[j].power*=k;return W.value!==null?W.value=s(W.value,k):W.value=null,W.skipAutomaticSimplification=!1,N(W)};function N(k){return k.equalBase(F.NONE)&&k.value!==null&&!t.predictable?k.value:k}h.prototype.abs=function(){var k=this.clone();if(k.value!==null)if(k._isDerived()||k.units.length===0||k.units[0].unit.offset===0)k.value=u(k.value);else{var W=k._numberConverter(),ue=W(k.units[0].unit.value),j=W(k.units[0].unit.offset),K=i(ue,j);k.value=a(u(n(k.value,K)),K)}for(var oe in k.units)(k.units[oe].unit.name==="VA"||k.units[oe].unit.name==="VAR")&&(k.units[oe].unit=z.W);return k},h.prototype.to=function(k){var W=this.value===null?this._normalize(1):this.value,ue;if(typeof k=="string")ue=h.parse(k);else if(Rt(k))ue=k.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(ue))throw new Error("Units do not match ('".concat(ue.toString(),"' != '").concat(this.toString(),"')"));if(ue.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units.length===0||ue.units.length===0||this.units[0].unit.offset===ue.units[0].unit.offset)ue.value=We(W);else{var j=h._getNumberConverter(Cr(W)),K=this.units[0].unit.value,oe=this.units[0].unit.offset,he=i(K,oe),me=ue.units[0].unit.value,I=ue.units[0].unit.offset,H=i(me,I);ue.value=n(W,j(a(he,H)))}return ue.fixPrefix=!0,ue.skipAutomaticSimplification=!0,ue},h.prototype.toNumber=function(k){return E(this.toNumeric(k))},h.prototype.toNumeric=function(k){var W;return k?W=this.to(k):W=this.clone(),W._isDerived()||W.units.length===0?W._denormalize(W.value):W._denormalize(W.value,W.units[0].prefix.value)},h.prototype.toString=function(){return this.format()},h.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix}},h.fromJSON=function(k){var W,ue=new h(k.value,(W=k.unit)!==null&&W!==void 0?W:void 0);return ue.fixPrefix=k.fixPrefix||!1,ue},h.prototype.valueOf=h.prototype.toString,h.prototype.simplify=function(){var k=this.clone(),W=[],ue;for(var j in re)if(Re(re,j)&&k.hasBase(F[j])){ue=j;break}if(ue==="NONE")k.units=[];else{var K;if(ue&&Re(re,ue)&&(K=re[ue]),K)k.units=[{unit:K.unit,prefix:K.prefix,power:1}];else{for(var oe=!1,he=0;he<U.length;he++){var me=U[he];Math.abs(k.dimensions[he]||0)>1e-12&&(Re(re,me)?W.push({unit:re[me].unit,prefix:re[me].prefix,power:k.dimensions[he]||0}):oe=!0)}W.length<k.units.length&&!oe&&(k.units=W)}}return k},h.prototype.toSI=function(){for(var k=this.clone(),W=[],ue=0;ue<U.length;ue++){var j=U[ue];if(Math.abs(k.dimensions[ue]||0)>1e-12)if(Re(Q.si,j))W.push({unit:Q.si[j].unit,prefix:Q.si[j].prefix,power:k.dimensions[ue]||0});else throw new Error("Cannot express custom unit "+j+" in SI units")}return k.units=W,k.fixPrefix=!0,k.skipAutomaticSimplification=!0,this.value!==null?(k.value=null,this.to(k)):k},h.prototype.formatUnits=function(){for(var k="",W="",ue=0,j=0,K=0;K<this.units.length;K++)this.units[K].power>0?(ue++,k+=" "+this.units[K].prefix.name+this.units[K].unit.name,Math.abs(this.units[K].power-1)>1e-15&&(k+="^"+this.units[K].power)):this.units[K].power<0&&j++;if(j>0)for(var oe=0;oe<this.units.length;oe++)this.units[oe].power<0&&(ue>0?(W+=" "+this.units[oe].prefix.name+this.units[oe].unit.name,Math.abs(this.units[oe].power+1)>1e-15&&(W+="^"+-this.units[oe].power)):(W+=" "+this.units[oe].prefix.name+this.units[oe].unit.name,W+="^"+this.units[oe].power));k=k.substr(1),W=W.substr(1),ue>1&&j>0&&(k="("+k+")"),j>1&&ue>0&&(W="("+W+")");var he=k;return ue>0&&j>0&&(he+=" / "),he+=W,he},h.prototype.format=function(k){var W=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),ue=!1;typeof W.value<"u"&&W.value!==null&&bn(W.value)&&(ue=Math.abs(W.value.re)<1e-14);for(var j in W.units)Re(W.units,j)&&W.units[j].unit&&(W.units[j].unit.name==="VA"&&ue?W.units[j].unit=z.VAR:W.units[j].unit.name==="VAR"&&!ue&&(W.units[j].unit=z.VA));W.units.length===1&&!W.fixPrefix&&Math.abs(W.units[0].power-Math.round(W.units[0].power))<1e-14&&(W.units[0].prefix=W._bestPrefix());var K=W._denormalize(W.value),oe=W.value!==null?d(K,k||{}):"",he=W.formatUnits();return W.value&&bn(W.value)&&(oe="("+oe+")"),he.length>0&&oe.length>0&&(oe+=" "),oe+=he,oe},h.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var k=this.value!==null?u(this.value):0,W=u(this.units[0].unit.value),ue=this.units[0].prefix;if(k===0)return ue;var j=this.units[0].power,K=Math.log(k/Math.pow(ue.value*W,j))/Math.LN10-1.2;if(K>-2.200001&&K<1.800001)return ue;K=Math.abs(K);var oe=this.units[0].unit.prefixes;for(var he in oe)if(Re(oe,he)){var me=oe[he];if(me.scientific){var I=Math.abs(Math.log(k/Math.pow(me.value*W,j))/Math.LN10-1.2);(I<K||I===K&&me.name.length<ue.name.length)&&(ue=me,K=I)}}return ue},h.prototype.splitUnit=function(k){for(var W=this.clone(),ue=[],j=0;j<k.length&&(W=W.to(k[j]),j!==k.length-1);j++){var K=W.toNumeric(),oe=c(K),he=void 0,me=f(oe,K);me?he=oe:he=l(W.toNumeric());var I=new h(he,k[j].toString());ue.push(I),W=a(W,I)}for(var H=0,ie=0;ie<ue.length;ie++)H=n(H,ue[ie].value);return f(H,this.value)&&(W.value=0),ue.push(W),ue};var O={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},R:{name:"R",value:1e27,scientific:!0},Q:{name:"Q",value:1e30,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0},r:{name:"r",value:1e-27,scientific:!0},q:{name:"q",value:1e-30,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},ronna:{name:"ronna",value:1e27,scientific:!0},quetta:{name:"quetta",value:1e30,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0},ronto:{name:"ronto",value:1e-27,scientific:!0},quecto:{name:"quecto",value:1e-30,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},R:{name:"R",value:1e54,scientific:!0},Q:{name:"Q",value:1e60,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0},r:{name:"r",value:1e-54,scientific:!0},q:{name:"q",value:1e-60,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},R:{name:"R",value:1e81,scientific:!0},Q:{name:"Q",value:1e90,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0},r:{name:"r",value:1e-81,scientific:!0},q:{name:"q",value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};O.SHORTLONG=Hr({},O.SHORT,O.LONG),O.BINARY_SHORT=Hr({},O.BINARY_SHORT_SI,O.BINARY_SHORT_IEC),O.BINARY_LONG=Hr({},O.BINARY_LONG_SI,O.BINARY_LONG_IEC);var U=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],F={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var q in F)Re(F,q)&&(F[q].key=q);var Y={},G={name:"",base:Y,value:1,offset:0,dimensions:U.map(k=>0)},z={meter:{name:"meter",base:F.LENGTH,prefixes:O.LONG,value:1,offset:0},inch:{name:"inch",base:F.LENGTH,prefixes:O.NONE,value:.0254,offset:0},foot:{name:"foot",base:F.LENGTH,prefixes:O.NONE,value:.3048,offset:0},yard:{name:"yard",base:F.LENGTH,prefixes:O.NONE,value:.9144,offset:0},mile:{name:"mile",base:F.LENGTH,prefixes:O.NONE,value:1609.344,offset:0},link:{name:"link",base:F.LENGTH,prefixes:O.NONE,value:.201168,offset:0},rod:{name:"rod",base:F.LENGTH,prefixes:O.NONE,value:5.0292,offset:0},chain:{name:"chain",base:F.LENGTH,prefixes:O.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:F.LENGTH,prefixes:O.NONE,value:1e-10,offset:0},m:{name:"m",base:F.LENGTH,prefixes:O.SHORT,value:1,offset:0},in:{name:"in",base:F.LENGTH,prefixes:O.NONE,value:.0254,offset:0},ft:{name:"ft",base:F.LENGTH,prefixes:O.NONE,value:.3048,offset:0},yd:{name:"yd",base:F.LENGTH,prefixes:O.NONE,value:.9144,offset:0},mi:{name:"mi",base:F.LENGTH,prefixes:O.NONE,value:1609.344,offset:0},li:{name:"li",base:F.LENGTH,prefixes:O.NONE,value:.201168,offset:0},rd:{name:"rd",base:F.LENGTH,prefixes:O.NONE,value:5.02921,offset:0},ch:{name:"ch",base:F.LENGTH,prefixes:O.NONE,value:20.1168,offset:0},mil:{name:"mil",base:F.LENGTH,prefixes:O.NONE,value:254e-7,offset:0},m2:{name:"m2",base:F.SURFACE,prefixes:O.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:F.SURFACE,prefixes:O.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:F.SURFACE,prefixes:O.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:F.SURFACE,prefixes:O.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:F.SURFACE,prefixes:O.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:F.SURFACE,prefixes:O.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:F.SURFACE,prefixes:O.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:F.SURFACE,prefixes:O.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:F.SURFACE,prefixes:O.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:F.SURFACE,prefixes:O.NONE,value:1e4,offset:0},m3:{name:"m3",base:F.VOLUME,prefixes:O.CUBIC,value:1,offset:0},L:{name:"L",base:F.VOLUME,prefixes:O.SHORT,value:.001,offset:0},l:{name:"l",base:F.VOLUME,prefixes:O.SHORT,value:.001,offset:0},litre:{name:"litre",base:F.VOLUME,prefixes:O.LONG,value:.001,offset:0},cuin:{name:"cuin",base:F.VOLUME,prefixes:O.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:F.VOLUME,prefixes:O.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:F.VOLUME,prefixes:O.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:F.VOLUME,prefixes:O.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:F.VOLUME,prefixes:O.NONE,value:15e-6,offset:0},drop:{name:"drop",base:F.VOLUME,prefixes:O.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:F.VOLUME,prefixes:O.NONE,value:5e-8,offset:0},minim:{name:"minim",base:F.VOLUME,prefixes:O.NONE,value:61611519921875e-21,offset:0},fluiddram:{name:"fluiddram",base:F.VOLUME,prefixes:O.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:"fluidounce",base:F.VOLUME,prefixes:O.NONE,value:295735295625e-16,offset:0},gill:{name:"gill",base:F.VOLUME,prefixes:O.NONE,value:.00011829411825,offset:0},cc:{name:"cc",base:F.VOLUME,prefixes:O.NONE,value:1e-6,offset:0},cup:{name:"cup",base:F.VOLUME,prefixes:O.NONE,value:.0002365882365,offset:0},pint:{name:"pint",base:F.VOLUME,prefixes:O.NONE,value:.000473176473,offset:0},quart:{name:"quart",base:F.VOLUME,prefixes:O.NONE,value:.000946352946,offset:0},gallon:{name:"gallon",base:F.VOLUME,prefixes:O.NONE,value:.003785411784,offset:0},beerbarrel:{name:"beerbarrel",base:F.VOLUME,prefixes:O.NONE,value:.117347765304,offset:0},oilbarrel:{name:"oilbarrel",base:F.VOLUME,prefixes:O.NONE,value:.158987294928,offset:0},hogshead:{name:"hogshead",base:F.VOLUME,prefixes:O.NONE,value:.238480942392,offset:0},g:{name:"g",base:F.MASS,prefixes:O.SHORT,value:.001,offset:0},gram:{name:"gram",base:F.MASS,prefixes:O.LONG,value:.001,offset:0},ton:{name:"ton",base:F.MASS,prefixes:O.SHORT,value:907.18474,offset:0},t:{name:"t",base:F.MASS,prefixes:O.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:F.MASS,prefixes:O.LONG,value:1e3,offset:0},grain:{name:"grain",base:F.MASS,prefixes:O.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:F.MASS,prefixes:O.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:F.MASS,prefixes:O.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:F.MASS,prefixes:O.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:F.MASS,prefixes:O.NONE,value:45.359237,offset:0},stick:{name:"stick",base:F.MASS,prefixes:O.NONE,value:.115,offset:0},stone:{name:"stone",base:F.MASS,prefixes:O.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:F.MASS,prefixes:O.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:F.MASS,prefixes:O.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:F.MASS,prefixes:O.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:F.MASS,prefixes:O.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:F.MASS,prefixes:O.NONE,value:45.359237,offset:0},s:{name:"s",base:F.TIME,prefixes:O.SHORT,value:1,offset:0},min:{name:"min",base:F.TIME,prefixes:O.NONE,value:60,offset:0},h:{name:"h",base:F.TIME,prefixes:O.NONE,value:3600,offset:0},second:{name:"second",base:F.TIME,prefixes:O.LONG,value:1,offset:0},sec:{name:"sec",base:F.TIME,prefixes:O.LONG,value:1,offset:0},minute:{name:"minute",base:F.TIME,prefixes:O.NONE,value:60,offset:0},hour:{name:"hour",base:F.TIME,prefixes:O.NONE,value:3600,offset:0},day:{name:"day",base:F.TIME,prefixes:O.NONE,value:86400,offset:0},week:{name:"week",base:F.TIME,prefixes:O.NONE,value:7*86400,offset:0},month:{name:"month",base:F.TIME,prefixes:O.NONE,value:2629800,offset:0},year:{name:"year",base:F.TIME,prefixes:O.NONE,value:31557600,offset:0},decade:{name:"decade",base:F.TIME,prefixes:O.NONE,value:315576e3,offset:0},century:{name:"century",base:F.TIME,prefixes:O.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:F.TIME,prefixes:O.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:F.FREQUENCY,prefixes:O.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:F.FREQUENCY,prefixes:O.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:F.ANGLE,prefixes:O.SHORT,value:1,offset:0},radian:{name:"radian",base:F.ANGLE,prefixes:O.LONG,value:1,offset:0},deg:{name:"deg",base:F.ANGLE,prefixes:O.SHORT,value:null,offset:0},degree:{name:"degree",base:F.ANGLE,prefixes:O.LONG,value:null,offset:0},grad:{name:"grad",base:F.ANGLE,prefixes:O.SHORT,value:null,offset:0},gradian:{name:"gradian",base:F.ANGLE,prefixes:O.LONG,value:null,offset:0},cycle:{name:"cycle",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:F.ANGLE,prefixes:O.NONE,value:null,offset:0},A:{name:"A",base:F.CURRENT,prefixes:O.SHORT,value:1,offset:0},ampere:{name:"ampere",base:F.CURRENT,prefixes:O.LONG,value:1,offset:0},K:{name:"K",base:F.TEMPERATURE,prefixes:O.SHORT,value:1,offset:0},degC:{name:"degC",base:F.TEMPERATURE,prefixes:O.SHORT,value:1,offset:273.15},degF:{name:"degF",base:F.TEMPERATURE,prefixes:O.SHORT,value:new g(5,9),offset:459.67},degR:{name:"degR",base:F.TEMPERATURE,prefixes:O.SHORT,value:new g(5,9),offset:0},kelvin:{name:"kelvin",base:F.TEMPERATURE,prefixes:O.LONG,value:1,offset:0},celsius:{name:"celsius",base:F.TEMPERATURE,prefixes:O.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:F.TEMPERATURE,prefixes:O.LONG,value:new g(5,9),offset:459.67},rankine:{name:"rankine",base:F.TEMPERATURE,prefixes:O.LONG,value:new g(5,9),offset:0},mol:{name:"mol",base:F.AMOUNT_OF_SUBSTANCE,prefixes:O.SHORT,value:1,offset:0},mole:{name:"mole",base:F.AMOUNT_OF_SUBSTANCE,prefixes:O.LONG,value:1,offset:0},cd:{name:"cd",base:F.LUMINOUS_INTENSITY,prefixes:O.SHORT,value:1,offset:0},candela:{name:"candela",base:F.LUMINOUS_INTENSITY,prefixes:O.LONG,value:1,offset:0},N:{name:"N",base:F.FORCE,prefixes:O.SHORT,value:1,offset:0},newton:{name:"newton",base:F.FORCE,prefixes:O.LONG,value:1,offset:0},dyn:{name:"dyn",base:F.FORCE,prefixes:O.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:F.FORCE,prefixes:O.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:F.FORCE,prefixes:O.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:F.FORCE,prefixes:O.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:F.FORCE,prefixes:O.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:F.FORCE,prefixes:O.NONE,value:9.80665,offset:0},J:{name:"J",base:F.ENERGY,prefixes:O.SHORT,value:1,offset:0},joule:{name:"joule",base:F.ENERGY,prefixes:O.LONG,value:1,offset:0},erg:{name:"erg",base:F.ENERGY,prefixes:O.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:F.ENERGY,prefixes:O.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:F.ENERGY,prefixes:O.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:F.ENERGY,prefixes:O.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:F.ENERGY,prefixes:O.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:F.POWER,prefixes:O.SHORT,value:1,offset:0},watt:{name:"watt",base:F.POWER,prefixes:O.LONG,value:1,offset:0},hp:{name:"hp",base:F.POWER,prefixes:O.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:F.POWER,prefixes:O.SHORT,value:m.I,offset:0},VA:{name:"VA",base:F.POWER,prefixes:O.SHORT,value:1,offset:0},Pa:{name:"Pa",base:F.PRESSURE,prefixes:O.SHORT,value:1,offset:0},psi:{name:"psi",base:F.PRESSURE,prefixes:O.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:F.PRESSURE,prefixes:O.NONE,value:101325,offset:0},bar:{name:"bar",base:F.PRESSURE,prefixes:O.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:F.PRESSURE,prefixes:O.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:F.PRESSURE,prefixes:O.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:F.PRESSURE,prefixes:O.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:F.PRESSURE,prefixes:O.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:F.ELECTRIC_CHARGE,prefixes:O.LONG,value:1,offset:0},C:{name:"C",base:F.ELECTRIC_CHARGE,prefixes:O.SHORT,value:1,offset:0},farad:{name:"farad",base:F.ELECTRIC_CAPACITANCE,prefixes:O.LONG,value:1,offset:0},F:{name:"F",base:F.ELECTRIC_CAPACITANCE,prefixes:O.SHORT,value:1,offset:0},volt:{name:"volt",base:F.ELECTRIC_POTENTIAL,prefixes:O.LONG,value:1,offset:0},V:{name:"V",base:F.ELECTRIC_POTENTIAL,prefixes:O.SHORT,value:1,offset:0},ohm:{name:"ohm",base:F.ELECTRIC_RESISTANCE,prefixes:O.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:F.ELECTRIC_INDUCTANCE,prefixes:O.LONG,value:1,offset:0},H:{name:"H",base:F.ELECTRIC_INDUCTANCE,prefixes:O.SHORT,value:1,offset:0},siemens:{name:"siemens",base:F.ELECTRIC_CONDUCTANCE,prefixes:O.LONG,value:1,offset:0},S:{name:"S",base:F.ELECTRIC_CONDUCTANCE,prefixes:O.SHORT,value:1,offset:0},weber:{name:"weber",base:F.MAGNETIC_FLUX,prefixes:O.LONG,value:1,offset:0},Wb:{name:"Wb",base:F.MAGNETIC_FLUX,prefixes:O.SHORT,value:1,offset:0},tesla:{name:"tesla",base:F.MAGNETIC_FLUX_DENSITY,prefixes:O.LONG,value:1,offset:0},T:{name:"T",base:F.MAGNETIC_FLUX_DENSITY,prefixes:O.SHORT,value:1,offset:0},b:{name:"b",base:F.BIT,prefixes:O.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:F.BIT,prefixes:O.BINARY_LONG,value:1,offset:0},B:{name:"B",base:F.BIT,prefixes:O.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:F.BIT,prefixes:O.BINARY_LONG,value:8,offset:0}},J={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fldr:"fluiddram",fluiddrams:"fluiddram",floz:"fluidounce",fluidounces:"fluidounce",gi:"gill",gills:"gill",cp:"cup",cups:"cup",pt:"pint",pints:"pint",qt:"quart",quarts:"quart",gal:"gallon",gallons:"gallon",bbl:"beerbarrel",beerbarrels:"beerbarrel",obl:"oilbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function le(k){if(k.number==="BigNumber"){var W=Uf(y);z.rad.value=new y(1),z.deg.value=W.div(180),z.grad.value=W.div(200),z.cycle.value=W.times(2),z.arcsec.value=W.div(648e3),z.arcmin.value=W.div(10800)}else z.rad.value=1,z.deg.value=Math.PI/180,z.grad.value=Math.PI/200,z.cycle.value=Math.PI*2,z.arcsec.value=Math.PI/648e3,z.arcmin.value=Math.PI/10800;z.radian.value=z.rad.value,z.degree.value=z.deg.value,z.gradian.value=z.grad.value}le(t),r&&r("config",function(k,W){k.number!==W.number&&le(k)});var Q={si:{NONE:{unit:G,prefix:O.NONE[""]},LENGTH:{unit:z.m,prefix:O.SHORT[""]},MASS:{unit:z.g,prefix:O.SHORT.k},TIME:{unit:z.s,prefix:O.SHORT[""]},CURRENT:{unit:z.A,prefix:O.SHORT[""]},TEMPERATURE:{unit:z.K,prefix:O.SHORT[""]},LUMINOUS_INTENSITY:{unit:z.cd,prefix:O.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:z.mol,prefix:O.SHORT[""]},ANGLE:{unit:z.rad,prefix:O.SHORT[""]},BIT:{unit:z.bits,prefix:O.SHORT[""]},FORCE:{unit:z.N,prefix:O.SHORT[""]},ENERGY:{unit:z.J,prefix:O.SHORT[""]},POWER:{unit:z.W,prefix:O.SHORT[""]},PRESSURE:{unit:z.Pa,prefix:O.SHORT[""]},ELECTRIC_CHARGE:{unit:z.C,prefix:O.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:z.F,prefix:O.SHORT[""]},ELECTRIC_POTENTIAL:{unit:z.V,prefix:O.SHORT[""]},ELECTRIC_RESISTANCE:{unit:z.ohm,prefix:O.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:z.H,prefix:O.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:z.S,prefix:O.SHORT[""]},MAGNETIC_FLUX:{unit:z.Wb,prefix:O.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:z.T,prefix:O.SHORT[""]},FREQUENCY:{unit:z.Hz,prefix:O.SHORT[""]}}};Q.cgs=JSON.parse(JSON.stringify(Q.si)),Q.cgs.LENGTH={unit:z.m,prefix:O.SHORT.c},Q.cgs.MASS={unit:z.g,prefix:O.SHORT[""]},Q.cgs.FORCE={unit:z.dyn,prefix:O.SHORT[""]},Q.cgs.ENERGY={unit:z.erg,prefix:O.NONE[""]},Q.us=JSON.parse(JSON.stringify(Q.si)),Q.us.LENGTH={unit:z.ft,prefix:O.NONE[""]},Q.us.MASS={unit:z.lbm,prefix:O.NONE[""]},Q.us.TEMPERATURE={unit:z.degF,prefix:O.NONE[""]},Q.us.FORCE={unit:z.lbf,prefix:O.NONE[""]},Q.us.ENERGY={unit:z.BTU,prefix:O.BTU[""]},Q.us.POWER={unit:z.hp,prefix:O.NONE[""]},Q.us.PRESSURE={unit:z.psi,prefix:O.NONE[""]},Q.auto=JSON.parse(JSON.stringify(Q.si));var re=Q.auto;h.setUnitSystem=function(k){if(Re(Q,k))re=Q[k];else throw new Error("Unit system "+k+" does not exist. Choices are: "+Object.keys(Q).join(", "))},h.getUnitSystem=function(){for(var k in Q)if(Re(Q,k)&&Q[k]===re)return k},h.typeConverters={BigNumber:function(W){return W!=null&&W.isFraction?new y(W.n).div(W.d).times(W.s):new y(W+"")},Fraction:function(W){return new g(W)},Complex:function(W){return W},number:function(W){return W!=null&&W.isFraction?v(W):W}},h.prototype._numberConverter=function(){var k=h.typeConverters[this.valueType()];if(k)return k;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},h._getNumberConverter=function(k){if(!h.typeConverters[k])throw new TypeError('Unsupported type "'+k+'"');return h.typeConverters[k]};for(var se in z)if(Re(z,se)){var te=z[se];te.dimensions=te.base.dimensions}for(var ae in J)if(Re(J,ae)){var fe=z[J[ae]],ne={};for(var xe in fe)Re(fe,xe)&&(ne[xe]=fe[xe]);ne.name=ae,z[ae]=ne}h.isValidAlpha=function(W){return/^[a-zA-Z]$/.test(W)};function $e(k){for(var W=0;W<k.length;W++){if(b=k.charAt(W),W===0&&!h.isValidAlpha(b))throw new Error('Invalid unit name (must begin with alpha character): "'+k+'"');if(W>0&&!(h.isValidAlpha(b)||S(b)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+k+'"')}}return h.createUnit=function(k,W){if(typeof k!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(W&&W.override){for(var ue in k)if(Re(k,ue)&&h.deleteUnit(ue),k[ue].aliases)for(var j=0;j<k[ue].aliases.length;j++)h.deleteUnit(k[ue].aliases[j])}var K;for(var oe in k)Re(k,oe)&&(K=h.createUnitSingle(oe,k[oe]));return K},h.createUnitSingle=function(k,W){if((typeof W>"u"||W===null)&&(W={}),typeof k!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Re(z,k))throw new Error('Cannot create unit "'+k+'": a unit with that name already exists');$e(k);var ue=null,j=[],K=0,oe,he,me;if(W&&W.type==="Unit")ue=W.clone();else if(typeof W=="string")W!==""&&(oe=W);else if(typeof W=="object")oe=W.definition,he=W.prefixes,K=W.offset,me=W.baseName,W.aliases&&(j=W.aliases.valueOf());else throw new TypeError('Cannot create unit "'+k+'" from "'+W.toString()+'": expecting "string" or "Unit" or "Object"');if(j){for(var I=0;I<j.length;I++)if(Re(z,j[I]))throw new Error('Cannot create alias "'+j[I]+'": a unit with that name already exists')}if(oe&&typeof oe=="string"&&!ue)try{ue=h.parse(oe,{allowNoUnits:!0})}catch(T){throw T.message='Could not create unit "'+k+'" from "'+oe+'": '+T.message,T}else oe&&oe.type==="Unit"&&(ue=oe.clone());j=j||[],K=K||0,he&&he.toUpperCase?he=O[he.toUpperCase()]||O.NONE:he=O.NONE;var H={};if(ue){H={name:k,value:ue.value,dimensions:ue.dimensions.slice(0),prefixes:he,offset:K};var ve=!1;for(var Se in F)if(Re(F,Se)){for(var we=!0,Te=0;Te<U.length;Te++)if(Math.abs((H.dimensions[Te]||0)-(F[Se].dimensions[Te]||0))>1e-12){we=!1;break}if(we){ve=!0,H.base=F[Se];break}}if(!ve){me=me||k+"_STUFF";var De={dimensions:ue.dimensions.slice(0)};De.key=me,F[me]=De,re[me]={unit:H,prefix:O.NONE[""]},H.base=F[me]}}else{if(me=me||k+"_STUFF",U.indexOf(me)>=0)throw new Error('Cannot create new base unit "'+k+'": a base unit with that name already exists (and cannot be overridden)');U.push(me);for(var ie in F)Re(F,ie)&&(F[ie].dimensions[U.length-1]=0);for(var ce={dimensions:[]},de=0;de<U.length;de++)ce.dimensions[de]=0;ce.dimensions[U.length-1]=1,ce.key=me,F[me]=ce,H={name:k,value:1,dimensions:F[me].dimensions.slice(0),prefixes:he,offset:K,base:F[me]},re[me]={unit:H,prefix:O.NONE[""]}}h.UNITS[k]=H;for(var ir=0;ir<j.length;ir++){var or=j[ir],Le={};for(var _r in H)Re(H,_r)&&(Le[_r]=H[_r]);Le.name=or,h.UNITS[or]=Le}return delete R.cache,new h(null,k)},h.deleteUnit=function(k){delete h.UNITS[k],delete R.cache},h.PREFIXES=O,h.BASE_DIMENSIONS=U,h.BASE_UNITS=F,h.UNIT_SYSTEMS=Q,h.UNITS=z,h},{isClass:!0}),i0="unit",MG=["typed","Unit"],TG=L(i0,MG,e=>{var{typed:r,Unit:t}=e;return r(i0,{Unit:function(a){return a.clone()},string:function(a){return t.isValuelessUnit(a)?new t(null,a):t.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new t(a,i)},"number | BigNumber | Fraction":function(a){return new t(a)},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),o0="sparse",OG=["typed","SparseMatrix"],_G=L(o0,OG,e=>{var{typed:r,SparseMatrix:t}=e;return r(o0,{"":function(){return new t([])},string:function(a){return new t([],a)},"Array | Matrix":function(a){return new t(a)},"Array | Matrix, string":function(a,i){return new t(a,i)}})}),s0="createUnit",$G=["typed","Unit"],FG=L(s0,$G,e=>{var{typed:r,Unit:t}=e;return r(s0,{"Object, Object":function(a,i){return t.createUnit(a,i)},Object:function(a){return t.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var s={};return s[a]=i,t.createUnit(s,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,t.createUnit(o,{})},string:function(a){var i={};return i[a]={},t.createUnit(i,{})}})}),u0="acos",BG=["typed","config","Complex"],RG=L(u0,BG,e=>{var{typed:r,config:t,Complex:n}=e;return r(u0,{number:function(i){return i>=-1&&i<=1||t.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})}),l0="acosh",PG=["typed","config","Complex"],zG=L(l0,PG,e=>{var{typed:r,config:t,Complex:n}=e;return r(l0,{number:function(i){return i>=1||t.predictable?Mb(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})}),c0="acot",IG=["typed","BigNumber"],LG=L(c0,IG,e=>{var{typed:r,BigNumber:t}=e;return r(c0,{number:Tb,Complex:function(a){return a.acot()},BigNumber:function(a){return new t(1).div(a).atan()}})}),f0="acoth",qG=["typed","config","Complex","BigNumber"],kG=L(f0,qG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(f0,{number:function(o){return o>=1||o<=-1||t.predictable?Ob(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),p0="acsc",UG=["typed","config","Complex","BigNumber"],HG=L(p0,UG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(p0,{number:function(o){return o<=-1||o>=1||t.predictable?_b(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),d0="acsch",jG=["typed","BigNumber"],VG=L(d0,jG,e=>{var{typed:r,BigNumber:t}=e;return r(d0,{number:$b,Complex:function(a){return a.acsch()},BigNumber:function(a){return new t(1).div(a).asinh()}})}),v0="asec",GG=["typed","config","Complex","BigNumber"],WG=L(v0,GG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(v0,{number:function(o){return o<=-1||o>=1||t.predictable?Fb(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),m0="asech",ZG=["typed","config","Complex","BigNumber"],YG=L(m0,ZG,e=>{var{typed:r,config:t,Complex:n,BigNumber:a}=e;return r(m0,{number:function(o){if(o<=1&&o>=-1||t.predictable){var s=1/o;if(s>0||t.predictable)return Bb(o);var u=Math.sqrt(s*s-1);return new n(Math.log(u-s),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})}),h0="asin",XG=["typed","config","Complex"],KG=L(h0,XG,e=>{var{typed:r,config:t,Complex:n}=e;return r(h0,{number:function(i){return i>=-1&&i<=1||t.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})}),JG="asinh",QG=["typed"],eW=L(JG,QG,e=>{var{typed:r}=e;return r("asinh",{number:Rb,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),rW="atan",tW=["typed"],nW=L(rW,tW,e=>{var{typed:r}=e;return r("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})}),g0="atan2",aW=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],iW=L(g0,aW,e=>{var{typed:r,matrix:t,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,s=nn({typed:r,equalScalar:n}),u=vt({typed:r}),l=Yb({typed:r,equalScalar:n}),c=tt({typed:r,equalScalar:n}),f=Vr({typed:r,DenseMatrix:i}),p=Mr({typed:r,matrix:t,concat:o});return r(g0,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,v)=>a.atan2(d,v)},p({scalar:"number | BigNumber",SS:l,DS:u,SD:s,Ss:c,sS:f}))}),y0="atanh",oW=["typed","config","Complex"],sW=L(y0,oW,e=>{var{typed:r,config:t,Complex:n}=e;return r(y0,{number:function(i){return i<=1&&i>=-1||t.predictable?Pb(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),Oi=L("trigUnit",["typed"],e=>{var{typed:r}=e;return{Unit:r.referToSelf(t=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return r.find(t,n.valueType())(n.value)})}}),b0="cos",uW=["typed"],lW=L(b0,uW,e=>{var{typed:r}=e,t=Oi({typed:r});return r(b0,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},t)}),x0="cosh",cW=["typed"],fW=L(x0,cW,e=>{var{typed:r}=e;return r(x0,{number:nI,"Complex | BigNumber":t=>t.cosh()})}),w0="cot",pW=["typed","BigNumber"],dW=L(w0,pW,e=>{var{typed:r,BigNumber:t}=e,n=Oi({typed:r});return r(w0,{number:zb,Complex:a=>a.cot(),BigNumber:a=>new t(1).div(a.tan())},n)}),E0="coth",vW=["typed","BigNumber"],mW=L(E0,vW,e=>{var{typed:r,BigNumber:t}=e;return r(E0,{number:Ib,Complex:n=>n.coth(),BigNumber:n=>new t(1).div(n.tanh())})}),S0="csc",hW=["typed","BigNumber"],gW=L(S0,hW,e=>{var{typed:r,BigNumber:t}=e,n=Oi({typed:r});return r(S0,{number:Lb,Complex:a=>a.csc(),BigNumber:a=>new t(1).div(a.sin())},n)}),A0="csch",yW=["typed","BigNumber"],bW=L(A0,yW,e=>{var{typed:r,BigNumber:t}=e;return r(A0,{number:qb,Complex:n=>n.csch(),BigNumber:n=>new t(1).div(n.sinh())})}),D0="sec",xW=["typed","BigNumber"],wW=L(D0,xW,e=>{var{typed:r,BigNumber:t}=e,n=Oi({typed:r});return r(D0,{number:kb,Complex:a=>a.sec(),BigNumber:a=>new t(1).div(a.cos())},n)}),C0="sech",EW=["typed","BigNumber"],SW=L(C0,EW,e=>{var{typed:r,BigNumber:t}=e;return r(C0,{number:Ub,Complex:n=>n.sech(),BigNumber:n=>new t(1).div(n.cosh())})}),N0="sin",AW=["typed"],DW=L(N0,AW,e=>{var{typed:r}=e,t=Oi({typed:r});return r(N0,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},t)}),M0="sinh",CW=["typed"],NW=L(M0,CW,e=>{var{typed:r}=e;return r(M0,{number:Hb,"Complex | BigNumber":t=>t.sinh()})}),T0="tan",MW=["typed"],TW=L(T0,MW,e=>{var{typed:r}=e,t=Oi({typed:r});return r(T0,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},t)}),OW="tanh",_W=["typed"],$W=L(OW,_W,e=>{var{typed:r}=e;return r("tanh",{number:iI,"Complex | BigNumber":t=>t.tanh()})}),O0="setCartesian",FW=["typed","size","subset","compareNatural","Index","DenseMatrix"],BW=L(O0,FW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(O0,{"Array | Matrix, Array | Matrix":function(u,l){var c=[];if(n(t(u),new i(0))!==0&&n(t(l),new i(0))!==0){var f=mr(Array.isArray(u)?u:u.toArray()).sort(a),p=mr(Array.isArray(l)?l:l.toArray()).sort(a);c=[];for(var d=0;d<f.length;d++)for(var v=0;v<p.length;v++)c.push([f[d],p[v]])}return Array.isArray(u)&&Array.isArray(l)?c:new o(c)}})}),_0="setDifference",RW=["typed","size","subset","compareNatural","Index","DenseMatrix"],PW=L(_0,RW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(_0,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(t(u),new i(0))===0)c=[];else{if(n(t(l),new i(0))===0)return mr(u.toArray());var f=si(mr(Array.isArray(u)?u:u.toArray()).sort(a)),p=si(mr(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d,v=0;v<f.length;v++){d=!1;for(var m=0;m<p.length;m++)if(a(f[v].value,p[m].value)===0&&f[v].identifier===p[m].identifier){d=!0;break}d||c.push(f[v])}}return Array.isArray(u)&&Array.isArray(l)?zs(c):new o(zs(c))}})}),$0="setDistinct",zW=["typed","size","subset","compareNatural","Index","DenseMatrix"],IW=L($0,zW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r($0,{"Array | Matrix":function(u){var l;if(n(t(u),new i(0))===0)l=[];else{var c=mr(Array.isArray(u)?u:u.toArray()).sort(a);l=[],l.push(c[0]);for(var f=1;f<c.length;f++)a(c[f],c[f-1])!==0&&l.push(c[f])}return Array.isArray(u)?l:new o(l)}})}),F0="setIntersect",LW=["typed","size","subset","compareNatural","Index","DenseMatrix"],qW=L(F0,LW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return r(F0,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(t(u),new i(0))===0||n(t(l),new i(0))===0)c=[];else{var f=si(mr(Array.isArray(u)?u:u.toArray()).sort(a)),p=si(mr(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d=0;d<f.length;d++)for(var v=0;v<p.length;v++)if(a(f[d].value,p[v].value)===0&&f[d].identifier===p[v].identifier){c.push(f[d]);break}}return Array.isArray(u)&&Array.isArray(l)?zs(c):new o(zs(c))}})}),B0="setIsSubset",kW=["typed","size","subset","compareNatural","Index"],UW=L(B0,kW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(B0,{"Array | Matrix, Array | Matrix":function(s,u){if(n(t(s),new i(0))===0)return!0;if(n(t(u),new i(0))===0)return!1;for(var l=si(mr(Array.isArray(s)?s:s.toArray()).sort(a)),c=si(mr(Array.isArray(u)?u:u.toArray()).sort(a)),f,p=0;p<l.length;p++){f=!1;for(var d=0;d<c.length;d++)if(a(l[p].value,c[d].value)===0&&l[p].identifier===c[d].identifier){f=!0;break}if(f===!1)return!1}return!0}})}),R0="setMultiplicity",HW=["typed","size","subset","compareNatural","Index"],jW=L(R0,HW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(R0,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(s,u){if(n(t(u),new i(0))===0)return 0;for(var l=mr(Array.isArray(u)?u:u.toArray()),c=0,f=0;f<l.length;f++)a(l[f],s)===0&&c++;return c}})}),P0="setPowerset",VW=["typed","size","subset","compareNatural","Index"],GW=L(P0,VW,e=>{var{typed:r,size:t,subset:n,compareNatural:a,Index:i}=e;return r(P0,{"Array | Matrix":function(l){if(n(t(l),new i(0))===0)return[];for(var c=mr(Array.isArray(l)?l:l.toArray()).sort(a),f=[],p=0;p.toString(2).length<=c.length;)f.push(o(c,p.toString(2).split("").reverse())),p++;return s(f)}});function o(u,l){for(var c=[],f=0;f<l.length;f++)l[f]==="1"&&c.push(u[f]);return c}function s(u){for(var l=[],c=u.length-1;c>0;c--)for(var f=0;f<c;f++)u[f].length>u[f+1].length&&(l=u[f],u[f]=u[f+1],u[f+1]=l);return u}}),z0="setSize",WW=["typed","compareNatural"],ZW=L(z0,WW,e=>{var{typed:r,compareNatural:t}=e;return r(z0,{"Array | Matrix":function(a){return Array.isArray(a)?mr(a).length:mr(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?mr(a).length:mr(a.toArray()).length;for(var o=mr(Array.isArray(a)?a:a.toArray()).sort(t),s=1,u=1;u<o.length;u++)t(o[u],o[u-1])!==0&&s++;return s}})}),I0="setSymDifference",YW=["typed","size","concat","subset","setDifference","Index"],XW=L(I0,YW,e=>{var{typed:r,size:t,concat:n,subset:a,setDifference:i,Index:o}=e;return r(I0,{"Array | Matrix, Array | Matrix":function(u,l){if(a(t(u),new o(0))===0)return mr(l);if(a(t(l),new o(0))===0)return mr(u);var c=mr(u),f=mr(l);return n(i(c,f),i(f,c))}})}),L0="setUnion",KW=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],JW=L(L0,KW,e=>{var{typed:r,size:t,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:s}=e;return r(L0,{"Array | Matrix, Array | Matrix":function(l,c){if(a(t(l),new s(0))===0)return mr(c);if(a(t(c),new s(0))===0)return mr(l);var f=mr(l),p=mr(c);return n(o(f,p),i(f,p))}})}),q0="add",QW=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],eZ=L(q0,QW,e=>{var{typed:r,matrix:t,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:s}=e,u=Gn({typed:r}),l=zf({typed:r,equalScalar:a}),c=ma({typed:r,DenseMatrix:i}),f=Mr({typed:r,matrix:t,concat:s});return r(q0,{"any, any":n,"any, any, ...any":r.referToSelf(p=>(d,v,m)=>{for(var y=p(d,v),g=0;g<m.length;g++)y=p(y,m[g]);return y})},f({elop:n,DS:u,SS:l,Ss:c}))}),k0="hypot",rZ=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],tZ=L(k0,rZ,e=>{var{typed:r,abs:t,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:s,isPositive:u}=e;return r(k0,{"... number | BigNumber":l,Array:l,Matrix:c=>l(mr(c.toArray()))});function l(c){for(var f=0,p=0,d=0;d<c.length;d++){if(bn(c[d]))throw new TypeError("Unexpected type of argument to hypot");var v=t(c[d]);s(p,v)?(f=i(f,i(a(p,v),a(p,v))),f=n(f,1),p=v):f=n(f,u(v)?i(a(v,p),a(v,p)):v)}return i(p,o(f))}}),U0="norm",nZ=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],aZ=L(U0,nZ,e=>{var{typed:r,abs:t,add:n,pow:a,conj:i,sqrt:o,multiply:s,equalScalar:u,larger:l,smaller:c,matrix:f,ctranspose:p,eigs:d}=e;return r(U0,{number:Math.abs,Complex:function(A){return A.abs()},BigNumber:function(A){return A.abs()},boolean:function(A){return Math.abs(A)},Array:function(A){return b(f(A),2)},Matrix:function(A){return b(A,2)},"Array, number | BigNumber | string":function(A,S){return b(f(A),S)},"Matrix, number | BigNumber | string":function(A,S){return b(A,S)}});function v(D){var A=0;return D.forEach(function(S){var C=t(S);l(C,A)&&(A=C)},!0),A}function m(D){var A;return D.forEach(function(S){var C=t(S);(!A||c(C,A))&&(A=C)},!0),A||0}function y(D,A){if(A===Number.POSITIVE_INFINITY||A==="inf")return v(D);if(A===Number.NEGATIVE_INFINITY||A==="-inf")return m(D);if(A==="fro")return b(D,2);if(typeof A=="number"&&!isNaN(A)){if(!u(A,0)){var S=0;return D.forEach(function(C){S=n(a(t(C),A),S)},!0),a(S,1/A)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function g(D){var A=0;return D.forEach(function(S,C){A=n(A,s(S,i(S)))}),t(o(A))}function E(D){var A=[],S=0;return D.forEach(function(C,M){var $=M[1],B=n(A[$]||0,t(C));l(B,S)&&(S=B),A[$]=B},!0),S}function h(D){var A=D.size();if(A[0]!==A[1])throw new RangeError("Invalid matrix dimensions");var S=p(D),C=s(S,D),M=d(C).values.toArray(),$=M[M.length-1];return t(o($))}function w(D){var A=[],S=0;return D.forEach(function(C,M){var $=M[0],B=n(A[$]||0,t(C));l(B,S)&&(S=B),A[$]=B},!0),S}function x(D,A){if(A===1)return E(D);if(A===Number.POSITIVE_INFINITY||A==="inf")return w(D);if(A==="fro")return g(D);if(A===2)return h(D);throw new Error("Unsupported parameter value "+A)}function b(D,A){var S=D.size();if(S.length===1)return y(D,A);if(S.length===2){if(S[0]&&S[1])return x(D,A);throw new RangeError("Invalid matrix dimensions")}}}),H0="dot",iZ=["typed","addScalar","multiplyScalar","conj","size"],oZ=L(H0,iZ,e=>{var{typed:r,addScalar:t,multiplyScalar:n,conj:a,size:i}=e;return r(H0,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":u});function o(c,f){var p=l(c),d=l(f),v,m;if(p.length===1)v=p[0];else if(p.length===2&&p[1]===1)v=p[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+p.join(", ")+")");if(d.length===1)m=d[0];else if(d.length===2&&d[1]===1)m=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(v!==m)throw new RangeError("Vectors must have equal length ("+v+" != "+m+")");if(v===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return v}function s(c,f){var p=o(c,f),d=Ue(c)?c._data:c,v=Ue(c)?c._datatype||c.getDataType():void 0,m=Ue(f)?f._data:f,y=Ue(f)?f._datatype||f.getDataType():void 0,g=l(c).length===2,E=l(f).length===2,h=t,w=n;if(v&&y&&v===y&&typeof v=="string"&&v!=="mixed"){var x=v;h=r.find(t,[x,x]),w=r.find(n,[x,x])}if(!g&&!E){for(var b=w(a(d[0]),m[0]),D=1;D<p;D++)b=h(b,w(a(d[D]),m[D]));return b}if(!g&&E){for(var A=w(a(d[0]),m[0][0]),S=1;S<p;S++)A=h(A,w(a(d[S]),m[S][0]));return A}if(g&&!E){for(var C=w(a(d[0][0]),m[0]),M=1;M<p;M++)C=h(C,w(a(d[M][0]),m[M]));return C}if(g&&E){for(var $=w(a(d[0][0]),m[0][0]),B=1;B<p;B++)$=h($,w(a(d[B][0]),m[B][0]));return $}}function u(c,f){o(c,f);for(var p=c._index,d=c._values,v=f._index,m=f._values,y=0,g=t,E=n,h=0,w=0;h<p.length&&w<v.length;){var x=p[h],b=v[w];if(x<b){h++;continue}if(x>b){w++;continue}x===b&&(y=g(y,E(d[h],m[w])),h++,w++)}return y}function l(c){return Ue(c)?c.size():i(c)}}),sZ="trace",uZ=["typed","matrix","add"],lZ=L(sZ,uZ,e=>{var{typed:r,matrix:t,add:n}=e;return r("trace",{Array:function(s){return a(t(s))},SparseMatrix:i,DenseMatrix:a,any:We});function a(o){var s=o._size,u=o._data;switch(s.length){case 1:if(s[0]===1)return We(u[0]);throw new RangeError("Matrix must be square (size: "+tr(s)+")");case 2:{var l=s[0],c=s[1];if(l===c){for(var f=0,p=0;p<l;p++)f=n(f,u[p][p]);return f}else throw new RangeError("Matrix must be square (size: "+tr(s)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+tr(s)+")")}}function i(o){var s=o._values,u=o._index,l=o._ptr,c=o._size,f=c[0],p=c[1];if(f===p){var d=0;if(s.length>0)for(var v=0;v<p;v++)for(var m=l[v],y=l[v+1],g=m;g<y;g++){var E=u[g];if(E===v){d=n(d,s[g]);break}if(E>v)break}return d}throw new RangeError("Matrix must be square (size: "+tr(c)+")")}}),j0="index",cZ=["typed","Index"],fZ=L(j0,cZ,e=>{var{typed:r,Index:t}=e;return r(j0,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(s){return Qe(s)?s.toNumber():hr(s)||Ue(s)?s.map(function(u){return Qe(u)?u.toNumber():u}):s}),o=new t;return t.apply(o,i),o}})}),px=new Set(["end"]),pZ="Node",dZ=["mathWithTransform"],vZ=L(pZ,dZ,e=>{var{mathWithTransform:r}=e;function t(a){for(var i of[...px])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(r,{}),o={},s=null;function u(l){var c=ei(l);return t(c),i(c,o,s)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!Er(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(s,u){s.forEach(function(l,c,f){u(l,c,f),o(l,u)})}o(this,i)}transform(i){function o(s,u,l){var c=i(s,u,l);return c!==s?c:s.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(s,u,l){i(s,u,l)&&o.push(s)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Sn(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function mt(e){return e&&e.isIndexError?new en(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function dx(e){var{subset:r}=e;return function(n,a){try{if(Array.isArray(n))return r(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return r(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return ct(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw mt(i)}}}var Xo="AccessorNode",mZ=["subset","Node"],hZ=L(Xo,mZ,e=>{var{subset:r,Node:t}=e,n=dx({subset:r});function a(o){return!(oa(o)||Bt(o)||cr(o)||qn(o)||Eu(o)||En(o)||Zr(o))}class i extends t{constructor(s,u){if(super(),!Er(s))throw new TypeError('Node expected for parameter "object"');if(!Ai(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=s,this.index=u}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Xo}get isAccessorNode(){return!0}_compile(s,u){var l=this.object._compile(s,u),c=this.index._compile(s,u);if(this.index.isObjectProperty()){var f=this.index.getObjectProperty();return function(d,v,m){return ct(l(d,v,m),f)}}else return function(d,v,m){var y=l(d,v,m),g=c(d,v,y);return n(y,g)}}forEach(s){s(this.object,"object",this),s(this.index,"index",this)}map(s){return new i(this._ifNode(s(this.object,"object",this)),this._ifNode(s(this.index,"index",this)))}clone(){return new i(this.object,this.index)}_toString(s){var u=this.object.toString(s);return a(this.object)&&(u="("+u+")"),u+this.index.toString(s)}_toHTML(s){var u=this.object.toHTML(s);return a(this.object)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+this.index.toHTML(s)}_toTex(s){var u=this.object.toTex(s);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(s)}toJSON(){return{mathjs:Xo,object:this.object,index:this.index}}static fromJSON(s){return new i(s.object,s.index)}}return jr(i,"name",Xo),i},{isClass:!0,isNode:!0}),Ko="ArrayNode",gZ=["Node"],yZ=L(Ko,gZ,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(Er))throw new TypeError("Array containing Nodes expected")}get type(){return Ko}get isArrayNode(){return!0}_compile(a,i){var o=xn(this.items,function(l){return l._compile(a,i)}),s=a.config.matrix!=="Array";if(s){var u=a.matrix;return function(c,f,p){return u(xn(o,function(d){return d(c,f,p)}))}}else return function(c,f,p){return xn(o,function(d){return d(c,f,p)})}}forEach(a){for(var i=0;i<this.items.length;i++){var o=this.items[i];a(o,"items["+i+"]",this)}}map(a){for(var i=[],o=0;o<this.items.length;o++)i[o]=this._ifNode(a(this.items[o],"items["+o+"]",this));return new t(i)}clone(){return new t(this.items.slice(0))}_toString(a){var i=this.items.map(function(o){return o.toString(a)});return"["+i.join(", ")+"]"}toJSON(){return{mathjs:Ko,items:this.items}}static fromJSON(a){return new t(a.items)}_toHTML(a){var i=this.items.map(function(o){return o.toHTML(a)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(a){function i(o,s){var u=o.some(Bt)&&!o.every(Bt),l=s||u,c=l?"&":"\\\\",f=o.map(function(p){return p.items?i(p.items,!s):p.toTex(a)}).join(c);return u||!l||l&&!s?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return i(this.items,!1)}}return jr(t,"name",Ko),t},{isClass:!0,isNode:!0});function bZ(e){var{subset:r,matrix:t}=e;return function(a,i,o){try{if(Array.isArray(a)){var s=t(a).subset(i,o).valueOf();return s.forEach((u,l)=>{a[l]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return r(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ni(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw mt(u)}}}var Zt=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function Jo(e,r){if(!r||r!=="auto")return e;for(var t=e;En(t);)t=t.content;return t}function Dr(e,r,t,n){var a=e;r!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,s=0;s<Zt.length;s++)if(i in Zt[s]){o=s;break}if(i==="OperatorNode:multiply"&&a.implicit&&t!=="show"){var u=Jo(a.args[0],r);!(cr(u)&&n&&n.getIdentifier()==="OperatorNode:divide"&&Kl(Jo(n.args[0],r)))&&!(u.getIdentifier()==="OperatorNode:divide"&&Kl(Jo(u.args[0],r))&&cr(Jo(u.args[1])))&&(o+=1)}return o}function Wi(e,r){var t=e;r!=="keep"&&(t=e.getContent());var n=t.getIdentifier(),a=Dr(t,r);if(a===null)return null;var i=Zt[a][n];if(Re(i,"associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function El(e,r,t){var n=t!=="keep"?e.getContent():e,a=t!=="keep"?e.getContent():r,i=n.getIdentifier(),o=a.getIdentifier(),s=Dr(n,t);if(s===null)return null;var u=Zt[s][i];if(Re(u,"associativeWith")&&u.associativeWith instanceof Array){for(var l=0;l<u.associativeWith.length;l++)if(u.associativeWith[l]===o)return!0;return!1}return null}function xZ(e){var r="OperatorNode:"+e;for(var t of Zt)if(r in t)return t[r].op;return null}var Qo="AssignmentNode",wZ=["subset","?matrix","Node"],EZ=L(Qo,wZ,e=>{var{subset:r,matrix:t,Node:n}=e,a=dx({subset:r}),i=bZ({subset:r,matrix:t});function o(u,l,c){l||(l="keep");var f=Dr(u,l,c),p=Dr(u.value,l,c);return l==="all"||p!==null&&p<=f}class s extends n{constructor(l,c,f){if(super(),this.object=l,this.index=f?c:null,this.value=f||c,!Zr(l)&&!oa(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Zr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!Ai(this.index))throw new TypeError('IndexNode expected as "index"');if(!Er(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return Qo}get isAssignmentNode(){return!0}_compile(l,c){var f=this.object._compile(l,c),p=this.index?this.index._compile(l,c):null,d=this.value._compile(l,c),v=this.object.name;if(this.index)if(this.index.isObjectProperty()){var m=this.index.getObjectProperty();return function(w,x,b){var D=f(w,x,b),A=d(w,x,b);return ni(D,m,A),A}}else{if(Zr(this.object))return function(w,x,b){var D=f(w,x,b),A=d(w,x,b),S=p(w,x,D);return w.set(v,i(D,S,A)),A};var y=this.object.object._compile(l,c);if(this.object.index.isObjectProperty()){var g=this.object.index.getObjectProperty();return function(w,x,b){var D=y(w,x,b),A=ct(D,g),S=p(w,x,A),C=d(w,x,b);return ni(D,g,i(A,S,C)),C}}else{var E=this.object.index._compile(l,c);return function(w,x,b){var D=y(w,x,b),A=E(w,x,D),S=a(D,A),C=p(w,x,S),M=d(w,x,b);return i(D,A,i(S,C,M)),M}}}else{if(!Zr(this.object))throw new TypeError("SymbolNode expected as object");return function(w,x,b){var D=d(w,x,b);return w.set(v,D),D}}}forEach(l){l(this.object,"object",this),this.index&&l(this.index,"index",this),l(this.value,"value",this)}map(l){var c=this._ifNode(l(this.object,"object",this)),f=this.index?this._ifNode(l(this.index,"index",this)):null,p=this._ifNode(l(this.value,"value",this));return new s(c,f,p)}clone(){return new s(this.object,this.index,this.value)}_toString(l){var c=this.object.toString(l),f=this.index?this.index.toString(l):"",p=this.value.toString(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p="("+p+")"),c+f+" = "+p}toJSON(){return{mathjs:Qo,object:this.object,index:this.index,value:this.value}}static fromJSON(l){return new s(l.object,l.index,l.value)}_toHTML(l){var c=this.object.toHTML(l),f=this.index?this.index.toHTML(l):"",p=this.value.toHTML(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p='<span class="math-paranthesis math-round-parenthesis">(</span>'+p+'<span class="math-paranthesis math-round-parenthesis">)</span>'),c+f+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+p}_toTex(l){var c=this.object.toTex(l),f=this.index?this.index.toTex(l):"",p=this.value.toTex(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(p="\\left(".concat(p,"\\right)")),c+f+"="+p}}return jr(s,"name",Qo),s},{isClass:!0,isNode:!0}),es="BlockNode",SZ=["ResultSet","Node"],AZ=L(es,SZ,e=>{var{ResultSet:r,Node:t}=e;class n extends t{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var s=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!Er(s))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:s,visible:u}})}get type(){return es}get isBlockNode(){return!0}_compile(i,o){var s=xn(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(l,c,f){var p=[];return Mu(s,function(v){var m=v.evaluate(l,c,f);v.visible&&p.push(m)}),new r(p)}}forEach(i){for(var o=0;o<this.blocks.length;o++)i(this.blocks[o].node,"blocks["+o+"].node",this)}map(i){for(var o=[],s=0;s<this.blocks.length;s++){var u=this.blocks[s],l=this._ifNode(i(u.node,"blocks["+s+"].node",this));o[s]={node:l,visible:u.visible}}return new n(o)}clone(){var i=this.blocks.map(function(o){return{node:o.node,visible:o.visible}});return new n(i)}_toString(i){return this.blocks.map(function(o){return o.node.toString(i)+(o.visible?"":";")}).join(`
|
|
98
|
+
`)}toJSON(){return{mathjs:es,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\;
|
|
99
|
+
`)}}return jr(n,"name",es),n},{isClass:!0,isNode:!0}),rs="ConditionalNode",DZ=["Node"],CZ=L(rs,DZ,e=>{var{Node:r}=e;function t(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Qe(a))return!a.isZero();if(bn(a))return!!(a.re||a.im);if(Rt(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+Cr(a)+'"')}class n extends r{constructor(i,o,s){if(super(),!Er(i))throw new TypeError("Parameter condition must be a Node");if(!Er(o))throw new TypeError("Parameter trueExpr must be a Node");if(!Er(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=s}get type(){return rs}get isConditionalNode(){return!0}_compile(i,o){var s=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),l=this.falseExpr._compile(i,o);return function(f,p,d){return t(s(f,p,d))?u(f,p,d):l(f,p,d)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Dr(this,o,i&&i.implicit),u=this.condition.toString(i),l=Dr(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u="("+u+")");var c=this.trueExpr.toString(i),f=Dr(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var p=this.falseExpr.toString(i),d=Dr(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(p="("+p+")"),u+" ? "+c+" : "+p}toJSON(){return{mathjs:rs,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Dr(this,o,i&&i.implicit),u=this.condition.toHTML(i),l=Dr(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),f=Dr(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var p=this.falseExpr.toHTML(i),d=Dr(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+p}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return jr(n,"name",rs),n},{isClass:!0,isNode:!0}),dc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},NZ={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},MZ={"–":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},TZ=function(r,t){return dc({},r,t)},OZ=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.preserveFormatting,n=t===void 0?!1:t,a=r.escapeMapFn,i=a===void 0?TZ:a,o=String(e),s="",u=i(dc({},NZ),n?dc({},MZ):{}),l=Object.keys(u),c=function(){var p=!1;l.forEach(function(d,v){p||o.length>=d.length&&o.slice(0,d.length)===d&&(s+=u[l[v]],o=o.slice(d.length,o.length),p=!0)}),p||(s+=o.slice(0,1),o=o.slice(1,o.length))};o;)c();return s};const _Z=ye.getDefaultExportFromCjs(OZ);var vc={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},dr={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},V0={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(dr.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(dr.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(dr.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(dr.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(dr.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(dr.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(dr.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(dr.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(dr.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(dr.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(dr.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(dr.bitAnd,"${args[1]}\\right)")},bitNot:{1:dr.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(dr.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(dr.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(dr.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(dr.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(dr.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(dr.and,"${args[1]}\\right)")},not:{1:dr.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(dr.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(dr.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(dr.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(dr.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(dr.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(dr.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(dr.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(dr.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(dr.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(dr.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(dr.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(dr.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(dr.to,"${args[1]}\\right)")},numeric:function(r,t){return r.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},bigint:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(vc.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},$Z="\\mathrm{${name}}\\left(${args}\\right)",G0={deg:"^\\circ"};function mc(e){return _Z(e,{preserveFormatting:!0})}function vx(e,r){return r=typeof r>"u"?!1:r,r?Re(G0,e)?G0[e]:"\\mathrm{"+mc(e)+"}":Re(vc,e)?vc[e]:mc(e)}var ts="ConstantNode",FZ=["Node"],BZ=L(ts,FZ,e=>{var{Node:r}=e;class t extends r{constructor(a){super(),this.value=a}get type(){return ts}get isConstantNode(){return!0}_compile(a,i){var o=this.value;return function(){return o}}forEach(a){}map(a){return this.clone()}clone(){return new t(this.value)}_toString(a){return tr(this.value,a)}_toHTML(a){var i=this._toString(a);switch(Cr(this.value)){case"number":case"bigint":case"BigNumber":case"Fraction":return'<span class="math-number">'+i+"</span>";case"string":return'<span class="math-string">'+i+"</span>";case"boolean":return'<span class="math-boolean">'+i+"</span>";case"null":return'<span class="math-null-symbol">'+i+"</span>";case"undefined":return'<span class="math-undefined">'+i+"</span>";default:return'<span class="math-symbol">'+i+"</span>"}}toJSON(){return{mathjs:ts,value:this.value}}static fromJSON(a){return new t(a.value)}_toTex(a){var i=this._toString(a),o=Cr(this.value);switch(o){case"string":return"\\mathtt{"+mc(i)+"}";case"number":case"BigNumber":{var s=o==="BigNumber"?this.value.isFinite():isFinite(this.value);if(!s)return this.value.valueOf()<0?"-\\infty":"\\infty";var u=i.toLowerCase().indexOf("e");return u!==-1?i.substring(0,u)+"\\cdot10^{"+i.substring(u+1)+"}":i}case"bigint":return i.toString();case"Fraction":return this.value.toLatex();default:return i}}}return jr(t,"name",ts),t},{isClass:!0,isNode:!0}),ns="FunctionAssignmentNode",RZ=["typed","Node"],PZ=L(ns,RZ,e=>{var{typed:r,Node:t}=e;function n(i,o,s){var u=Dr(i,o,s),l=Dr(i.expr,o,s);return o==="all"||l!==null&&l<=u}class a extends t{constructor(o,s,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(s))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Er(u))throw new TypeError('Node expected for parameter "expr"');if(px.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var l=new Set;for(var c of s){var f=typeof c=="string"?c:c.name;if(l.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));l.add(f)}this.name=o,this.params=s.map(function(p){return p&&p.name||p}),this.types=s.map(function(p){return p&&p.type||"any"}),this.expr=u}get type(){return ns}get isFunctionAssignmentNode(){return!0}_compile(o,s){var u=Object.create(s);Mu(this.params,function(v){u[v]=!0});var l=this.expr._compile(o,u),c=this.name,f=this.params,p=Wv(this.types,","),d=c+"("+Wv(this.params,", ")+")";return function(m,y,g){var E={};E[p]=function(){for(var w=Object.create(y),x=0;x<f.length;x++)w[f[x]]=arguments[x];return l(m,w,g)};var h=r(c,E);return h.syntax=d,m.set(c,h),h}}forEach(o){o(this.expr,"expr",this)}map(o){var s=this._ifNode(o(this.expr,"expr",this));return new a(this.name,this.params.slice(0),s)}clone(){return new a(this.name,this.params.slice(0),this.expr)}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toString(o);return n(this,s,o&&o.implicit)&&(u="("+u+")"),this.name+"("+this.params.join(", ")+") = "+u}toJSON(){var o=this.types;return{mathjs:ns,name:this.name,params:this.params.map(function(s,u){return{name:s,type:o[u]}}),expr:this.expr}}static fromJSON(o){return new a(o.name,o.params,o.expr)}_toHTML(o){for(var s=o&&o.parenthesis?o.parenthesis:"keep",u=[],l=0;l<this.params.length;l++)u.push('<span class="math-symbol math-parameter">'+zt(this.params[l])+"</span>");var c=this.expr.toHTML(o);return n(this,s,o&&o.implicit)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+zt(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+c}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,s,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(vx).join(",")+"\\right)="+u}}return jr(a,"name",ns),a},{isClass:!0,isNode:!0}),as="IndexNode",zZ=["Node","size"],IZ=L(as,zZ,e=>{var{Node:r,size:t}=e;class n extends r{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(Er))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return as}get isIndexNode(){return!0}_compile(i,o){var s=xn(this.dimensions,function(l,c){var f=l.filter(v=>v.isSymbolNode&&v.name==="end").length>0;if(f){var p=Object.create(o);p.end=!0;var d=l._compile(i,p);return function(m,y,g){if(!Ue(g)&&!hr(g)&&!it(g))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+Cr(g));var E=t(g).valueOf(),h=Object.create(y);return h.end=E[c],d(m,h,g)}}else return l._compile(i,o)}),u=ct(i,"index");return function(c,f,p){var d=xn(s,function(v){return v(c,f,p)});return u(...d)}}forEach(i){for(var o=0;o<this.dimensions.length;o++)i(this.dimensions[o],"dimensions["+o+"]",this)}map(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this._ifNode(i(this.dimensions[s],"dimensions["+s+"]",this));return new n(o,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&&cr(this.dimensions[0])&&typeof this.dimensions[0].value=="string"}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(i){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:as,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(i){return new n(i.dimensions,i.dotNotation)}_toHTML(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this.dimensions[s].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+zt(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+o.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(i){var o=this.dimensions.map(function(s){return s.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return jr(n,"name",as),n},{isClass:!0,isNode:!0}),is="ObjectNode",LZ=["Node"],qZ=L(is,LZ,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return Er(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return is}get isObjectNode(){return!0}_compile(a,i){var o={};for(var s in this.properties)if(Re(this.properties,s)){var u=Ja(s),l=JSON.parse(u),c=ct(this.properties,s);o[l]=c._compile(a,i)}return function(p,d,v){var m={};for(var y in o)Re(o,y)&&(m[y]=o[y](p,d,v));return m}}forEach(a){for(var i in this.properties)Re(this.properties,i)&&a(this.properties[i],"properties["+Ja(i)+"]",this)}map(a){var i={};for(var o in this.properties)Re(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+Ja(o)+"]",this)));return new t(i)}clone(){var a={};for(var i in this.properties)Re(this.properties,i)&&(a[i]=this.properties[i]);return new t(a)}_toString(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push(Ja(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:is,properties:this.properties}}static fromJSON(a){return new t(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push('<span class="math-symbol math-property">'+zt(o)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[o].toHTML(a));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(a){var i=[];for(var o in this.properties)Re(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var s="\\left\\{\\begin{array}{ll}"+i.join(`
|
|
100
|
+
`)+"\\end{array}\\right\\}";return s}}return jr(t,"name",is),t},{isClass:!0,isNode:!0});function Qi(e,r){return new N2(e,new Au(r),new Set(Object.keys(r)))}var os="OperatorNode",kZ=["Node"],UZ=L(os,kZ,e=>{var{Node:r}=e;function t(i,o){var s=i;if(o==="auto")for(;En(s);)s=s.content;return cr(s)?!0:kr(s)?t(s.args[0],o):!1}function n(i,o,s,u,l){var c=Dr(i,o,s),f=Wi(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(C){switch(C.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var p;switch(u.length){case 0:p=[];break;case 1:{var d=Dr(u[0],o,s,i);if(l&&d!==null){var v,m;if(o==="keep"?(v=u[0].getIdentifier(),m=i.getIdentifier()):(v=u[0].getContent().getIdentifier(),m=i.getContent().getIdentifier()),Zt[c][m].latexLeftParens===!1){p=[!1];break}if(Zt[d][v].latexParens===!1){p=[!1];break}}if(d===null){p=[!1];break}if(d<=c){p=[!0];break}p=[!1]}break;case 2:{var y,g=Dr(u[0],o,s,i),E=El(i,u[0],o);g===null?y=!1:g===c&&f==="right"&&!E||g<c?y=!0:y=!1;var h,w=Dr(u[1],o,s,i),x=El(i,u[1],o);if(w===null?h=!1:w===c&&f==="left"&&!x||w<c?h=!0:h=!1,l){var b,D,A;o==="keep"?(b=i.getIdentifier(),D=i.args[0].getIdentifier(),A=i.args[1].getIdentifier()):(b=i.getContent().getIdentifier(),D=i.args[0].getContent().getIdentifier(),A=i.args[1].getContent().getIdentifier()),g!==null&&(Zt[c][b].latexLeftParens===!1&&(y=!1),Zt[g][D].latexParens===!1&&(y=!1)),w!==null&&(Zt[c][b].latexRightParens===!1&&(h=!1),Zt[w][A].latexParens===!1&&(h=!1))}p=[y,h]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(p=u.map(function(C){var M=Dr(C,o,s,i),$=El(i,C,o),B=Wi(C,o);return M===null?!1:c===M&&f===B&&!$?!0:M<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&s==="hide")for(var S=1;S<p.length;++S)t(u[S],o)&&!p[S-1]&&(o!=="keep"||!En(u[S-1]))&&(p[S]=!0);return p}class a extends r{constructor(o,s,u,l,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof s!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(Er))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=l===!0,this.isPercentage=c===!0,this.op=o,this.fn=s,this.args=u||[]}get type(){return os}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!Tf(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=ct(o,this.fn),l=xn(this.args,function(v){return v._compile(o,s)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(m,y,g){return u(c,o,Qi(m,y))}}else if(l.length===1){var f=l[0];return function(m,y,g){return u(f(m,y,g))}}else if(l.length===2){var p=l[0],d=l[1];return function(m,y,g){return u(p(m,y,g),d(m,y,g))}}else return function(m,y,g){return u.apply(null,xn(l,function(E){return E(m,y,g)}))}}forEach(o){for(var s=0;s<this.args.length;s++)o(this.args[s],"args["+s+"]",this)}map(o){for(var s=[],u=0;u<this.args.length;u++)s[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,s,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Wi(this,s),p=l[0].toString(o);c[0]&&(p="("+p+")");var d=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(d?" ":"")+p:f==="left"?p+(d?" ":"")+this.op:p+this.op}else if(l.length===2){var v=l[0].toString(o),m=l[1].toString(o);return c[0]&&(v="("+v+")"),c[1]&&(m="("+m+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?v+" "+m:v+" "+this.op+" "+m}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=l.map(function(g,E){return g=g.toString(o),c[E]&&(g="("+g+")"),g});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:os,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Wi(this,s),p=l[0].toHTML(o);return c[0]&&(p='<span class="math-parenthesis math-round-parenthesis">(</span>'+p+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+zt(this.op)+"</span>"+p:p+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+zt(this.op)+"</span>"}else if(l.length===2){var d=l[0].toHTML(o),v=l[1].toHTML(o);return c[0]&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),c[1]&&(v='<span class="math-parenthesis math-round-parenthesis">(</span>'+v+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+v:d+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+zt(this.op)+"</span>"+v}else{var m=l.map(function(y,g){return y=y.toHTML(o),c[g]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?m.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):m.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+zt(this.op)+"</span>"):'<span class="math-function">'+zt(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+m.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!0),f=dr[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var p=Wi(this,s),d=l[0].toTex(o);return c[0]&&(d="\\left(".concat(d,"\\right)")),p==="right"?f+d:d+f}else if(l.length===2){var v=l[0],m=v.toTex(o);c[0]&&(m="\\left(".concat(m,"\\right)"));var y=l[1],g=y.toTex(o);c[1]&&(g="\\left(".concat(g,"\\right)"));var E;switch(s==="keep"?E=v.getIdentifier():E=v.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+m+"}{"+g+"}";case"OperatorNode:pow":switch(m="{"+m+"}",g="{"+g+"}",E){case"ConditionalNode":case"OperatorNode:divide":m="\\left(".concat(m,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return m+"~"+g}return m+f+g}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var h=l.map(function(w,x){return w=w.toTex(o),c[x]&&(w="\\left(".concat(w,"\\right)")),w});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?h.join("~"):h.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+l.map(function(w){return w.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return jr(a,"name",os),a},{isClass:!0,isNode:!0}),ss="ParenthesisNode",HZ=["Node"],jZ=L(ss,HZ,e=>{var{Node:r}=e;class t extends r{constructor(a){if(super(),!Er(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return ss}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new t(i)}clone(){return new t(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:ss,content:this.content}}static fromJSON(a){return new t(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(a)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return jr(t,"name",ss),t},{isClass:!0,isNode:!0}),us="RangeNode",VZ=["Node"],GZ=L(us,VZ,e=>{var{Node:r}=e;function t(a,i,o){var s=Dr(a,i,o),u={},l=Dr(a.start,i,o);if(u.start=l!==null&&l<=s||i==="all",a.step){var c=Dr(a.step,i,o);u.step=c!==null&&c<=s||i==="all"}var f=Dr(a.end,i,o);return u.end=f!==null&&f<=s||i==="all",u}class n extends r{constructor(i,o,s){if(super(),!Er(i))throw new TypeError("Node expected");if(!Er(o))throw new TypeError("Node expected");if(s&&!Er(s))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=s||null}get type(){return us}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return Zr(o)&&o.name==="end"});return i.length>0}_compile(i,o){var s=i.range,u=this.start._compile(i,o),l=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(p,d,v){return s(u(p,d,v),l(p,d,v),c(p,d,v))}}else return function(p,d,v){return s(u(p,d,v),l(p,d,v))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=t(this,o,i&&i.implicit),u,l=this.start.toString(i);if(s.start&&(l="("+l+")"),u=l,this.step){var c=this.step.toString(i);s.step&&(c="("+c+")"),u+=":"+c}var f=this.end.toString(i);return s.end&&(f="("+f+")"),u+=":"+f,u}toJSON(){return{mathjs:us,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=t(this,o,i&&i.implicit),u,l=this.start.toHTML(i);if(s.start&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u=l,this.step){var c=this.step.toHTML(i);s.step&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+c}var f=this.end.toHTML(i);return s.end&&(f='<span class="math-parenthesis math-round-parenthesis">(</span>'+f+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+f,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=t(this,o,i&&i.implicit),u=this.start.toTex(i);if(s.start&&(u="\\left(".concat(u,"\\right)")),this.step){var l=this.step.toTex(i);s.step&&(l="\\left(".concat(l,"\\right)")),u+=":"+l}var c=this.end.toTex(i);return s.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return jr(n,"name",us),n},{isClass:!0,isNode:!0}),ls="RelationalNode",WZ=["Node"],ZZ=L(ls,WZ,e=>{var{Node:r}=e,t={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends r{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return ls}get isRelationalNode(){return!0}_compile(i,o){var s=this,u=this.params.map(l=>l._compile(i,o));return function(c,f,p){for(var d,v=u[0](c,f,p),m=0;m<s.conditionals.length;m++){d=v,v=u[m+1](c,f,p);var y=ct(i,s.conditionals[m]);if(!y(d,v))return!1}return!0}}forEach(i){this.params.forEach((o,s)=>i(o,"params["+s+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,s)=>this._ifNode(i(o,"params["+s+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Dr(this,o,i&&i.implicit),u=this.params.map(function(f,p){var d=Dr(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"("+f.toString(i)+")":f.toString(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=" "+t[this.conditionals[c]],l+=" "+u[c+1];return l}toJSON(){return{mathjs:ls,conditionals:this.conditionals,params:this.params}}static fromJSON(i){return new n(i.conditionals,i.params)}_toHTML(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Dr(this,o,i&&i.implicit),u=this.params.map(function(f,p){var d=Dr(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?'<span class="math-parenthesis math-round-parenthesis">(</span>'+f.toHTML(i)+'<span class="math-parenthesis math-round-parenthesis">)</span>':f.toHTML(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+zt(t[this.conditionals[c]])+"</span>"+u[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Dr(this,o,i&&i.implicit),u=this.params.map(function(f,p){var d=Dr(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"\\left("+f.toTex(i)+"\right)":f.toTex(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=dr[this.conditionals[c]]+u[c+1];return l}}return jr(n,"name",ls),n},{isClass:!0,isNode:!0}),YZ="SymbolNode",XZ=["math","?Unit","Node"],KZ=L(YZ,XZ,e=>{var{math:r,Unit:t,Node:n}=e;function a(o){return t?t.isValuelessUnit(o):!1}class i extends n{constructor(s){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');this.name=s}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(s,u){var l=this.name;if(u[l]===!0)return function(f,p,d){return ct(p,l)};if(l in s)return function(f,p,d){return f.has(l)?f.get(l):ct(s,l)};var c=a(l);return function(f,p,d){return f.has(l)?f.get(l):c?new t(null,l):i.onUndefinedSymbol(l)}}forEach(s){}map(s){return this.clone()}static onUndefinedSymbol(s){throw new Error("Undefined symbol "+s)}clone(){return new i(this.name)}_toString(s){return this.name}_toHTML(s){var u=zt(this.name);return u==="true"||u==="false"?'<span class="math-symbol math-boolean">'+u+"</span>":u==="i"?'<span class="math-symbol math-imaginary-symbol">'+u+"</span>":u==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+u+"</span>":u==="NaN"?'<span class="math-symbol math-nan-symbol">'+u+"</span>":u==="null"?'<span class="math-symbol math-null-symbol">'+u+"</span>":u==="undefined"?'<span class="math-symbol math-undefined-symbol">'+u+"</span>":'<span class="math-symbol">'+u+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(s){return new i(s.name)}_toTex(s){var u=!1;typeof r[this.name]>"u"&&a(this.name)&&(u=!0);var l=vx(this.name,u);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),cs="FunctionNode",JZ=["math","Node","SymbolNode"],QZ=L(cs,JZ,e=>{var r,{math:t,Node:n,SymbolNode:a}=e,i=u=>tr(u,{truncate:78});function o(u,l,c){for(var f="",p=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,d=0,v;(v=p.exec(u))!==null;)if(f+=u.substring(d,v.index),d=v.index,v[0]==="$$")f+="$",d++;else{d+=v[0].length;var m=l[v[1]];if(!m)throw new ReferenceError("Template: Property "+v[1]+" does not exist.");if(v[2]===void 0)switch(typeof m){case"string":f+=m;break;case"object":if(Er(m))f+=m.toTex(c);else if(Array.isArray(m))f+=m.map(function(y,g){if(Er(y))return y.toTex(c);throw new TypeError("Template: "+v[1]+"["+g+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+v[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+v[1]+" has to be a Node, String or array of Nodes")}else if(Er(m[v[2]]&&m[v[2]]))f+=m[v[2]].toTex(c);else throw new TypeError("Template: "+v[1]+"["+v[2]+"] is not a Node.")}return f+=u.slice(d),f}class s extends n{constructor(l,c){if(super(),typeof l=="string"&&(l=new a(l)),!Er(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(Er))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=l,this.args=c||[]}get name(){return this.fn.name||""}get type(){return cs}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(A=>A._compile(l,c));if(Zr(this.fn)){var p=this.fn.name;if(c[p]){var g=this.args;return function(S,C,M){var $=ct(C,p);if(typeof $!="function")throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i($)));if($.rawArgs)return $(g,l,Qi(S,C));var B=f.map(P=>P(S,C,M));return $.apply($,B)}}else{var d=p in l?ct(l,p):void 0,v=typeof d=="function"&&d.rawArgs===!0,m=A=>{var S;if(A.has(p))S=A.get(p);else if(p in l)S=ct(l,p);else return s.onUndefinedFunction(p);if(typeof S=="function")return S;throw new TypeError("'".concat(p,`' is not a function; its value is:
|
|
101
|
+
`).concat(i(S)))};if(v){var y=this.args;return function(S,C,M){var $=m(S);return $(y,l,Qi(S,C))}}else switch(f.length){case 0:return function(S,C,M){var $=m(S);return $()};case 1:return function(S,C,M){var $=m(S),B=f[0];return $(B(S,C,M))};case 2:return function(S,C,M){var $=m(S),B=f[0],P=f[1];return $(B(S,C,M),P(S,C,M))};default:return function(S,C,M){var $=m(S),B=f.map(P=>P(S,C,M));return $(...B)}}}}else if(oa(this.fn)&&Ai(this.fn.index)&&this.fn.index.isObjectProperty()){var E=this.fn.object._compile(l,c),h=this.fn.index.getObjectProperty(),w=this.args;return function(S,C,M){var $=E(S,C,M),B=fI($,h);if(B!=null&&B.rawArgs)return B(w,l,Qi(S,C));var P=f.map(R=>R(S,C,M));return B.apply($,P)}}else{var x=this.fn.toString(),b=this.fn._compile(l,c),D=this.args;return function(S,C,M){var $=b(S,C,M);if(typeof $!="function")throw new TypeError("Expression '".concat(x,"' did not evaluate to a function; value is:")+`
|
|
102
|
+
`.concat(i($)));if($.rawArgs)return $(D,l,Qi(S,C));var B=f.map(P=>P(S,C,M));return $.apply($,B)}}}forEach(l){l(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)}map(l){for(var c=this._ifNode(l(this.fn,"fn",this)),f=[],p=0;p<this.args.length;p++)f[p]=this._ifNode(l(this.args[p],"args["+p+"]",this));return new s(c,f)}clone(){return new s(this.fn,this.args.slice(0))}toString(l){var c,f=this.fn.toString(l);return l&&typeof l.handler=="object"&&Re(l.handler,f)&&(c=l.handler[f](this,l)),typeof c<"u"?c:super.toString(l)}_toString(l){var c=this.args.map(function(p){return p.toString(l)}),f=Ao(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:cs,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+zt(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(l){var c;return l&&typeof l.handler=="object"&&Re(l.handler,this.name)&&(c=l.handler[this.name](this,l)),typeof c<"u"?c:super.toTex(l)}_toTex(l){var c=this.args.map(function(d){return d.toTex(l)}),f;V0[this.name]&&(f=V0[this.name]),t[this.name]&&(typeof t[this.name].toTex=="function"||typeof t[this.name].toTex=="object"||typeof t[this.name].toTex=="string")&&(f=t[this.name].toTex);var p;switch(typeof f){case"function":p=f(this,l);break;case"string":p=o(f,this,l);break;case"object":switch(typeof f[c.length]){case"function":p=f[c.length](this,l);break;case"string":p=o(f[c.length],this,l);break}}return typeof p<"u"?p:o($Z,this,l)}getIdentifier(){return this.type+":"+this.name}}return r=s,jr(s,"name",cs),jr(s,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),jr(s,"fromJSON",function(u){return new r(u.fn,u.args)}),s},{isClass:!0,isNode:!0}),W0="parse",eY=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],rY=L(W0,eY,e=>{var{typed:r,numeric:t,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:s,ConditionalNode:u,ConstantNode:l,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:p,ObjectNode:d,OperatorNode:v,ParenthesisNode:m,RangeNode:y,RelationalNode:g,SymbolNode:E}=e,h=r(W0,{string:function(X){return Y(X,{})},"Array | Matrix":function(X){return w(X,{})},"string, Object":function(X,pe){var Ae=pe.nodes!==void 0?pe.nodes:{};return Y(X,Ae)},"Array | Matrix, Object":w});function w(T){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=X.nodes!==void 0?X.nodes:{};return rr(T,function(Ae){if(typeof Ae!="string")throw new TypeError("String expected");return Y(Ae,pe)})}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},D={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},A={true:!0,false:!1,null:null,undefined:void 0},S=["NaN","Infinity"],C={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
103
|
+
`,r:"\r",t:" "};function M(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function $(T,X){return T.expression.substr(T.index,X)}function B(T){return $(T,1)}function P(T){T.index++}function R(T){return T.expression.charAt(T.index-1)}function N(T){return T.expression.charAt(T.index+1)}function O(T){for(T.tokenType=x.NULL,T.token="",T.comment="";;){if(B(T)==="#")for(;B(T)!==`
|
|
104
|
+
`&&B(T)!=="";)T.comment+=B(T),P(T);if(h.isWhitespace(B(T),T.nestingLevel))P(T);else break}if(B(T)===""){T.tokenType=x.DELIMITER;return}if(B(T)===`
|
|
105
|
+
`&&!T.nestingLevel){T.tokenType=x.DELIMITER,T.token=B(T),P(T);return}var X=B(T),pe=$(T,2),Ae=$(T,3);if(Ae.length===3&&b[Ae]){T.tokenType=x.DELIMITER,T.token=Ae,P(T),P(T),P(T);return}if(pe.length===2&&b[pe]){T.tokenType=x.DELIMITER,T.token=pe,P(T),P(T);return}if(b[X]){T.tokenType=x.DELIMITER,T.token=X,P(T);return}if(h.isDigitDot(X)){T.tokenType=x.NUMBER;var qe=$(T,2);if(qe==="0b"||qe==="0o"||qe==="0x"){for(T.token+=B(T),P(T),T.token+=B(T),P(T);h.isHexDigit(B(T));)T.token+=B(T),P(T);if(B(T)===".")for(T.token+=".",P(T);h.isHexDigit(B(T));)T.token+=B(T),P(T);else if(B(T)==="i")for(T.token+="i",P(T);h.isDigit(B(T));)T.token+=B(T),P(T);return}if(B(T)==="."){if(T.token+=B(T),P(T),!h.isDigit(B(T))){T.tokenType=x.DELIMITER;return}}else{for(;h.isDigit(B(T));)T.token+=B(T),P(T);h.isDecimalMark(B(T),N(T))&&(T.token+=B(T),P(T))}for(;h.isDigit(B(T));)T.token+=B(T),P(T);if(B(T)==="E"||B(T)==="e"){if(h.isDigit(N(T))||N(T)==="-"||N(T)==="+"){if(T.token+=B(T),P(T),(B(T)==="+"||B(T)==="-")&&(T.token+=B(T),P(T)),!h.isDigit(B(T)))throw Le(T,'Digit expected, got "'+B(T)+'"');for(;h.isDigit(B(T));)T.token+=B(T),P(T);if(h.isDecimalMark(B(T),N(T)))throw Le(T,'Digit expected, got "'+B(T)+'"')}else if(N(T)===".")throw P(T),Le(T,'Digit expected, got "'+B(T)+'"')}return}if(h.isAlpha(B(T),R(T),N(T))){for(;h.isAlpha(B(T),R(T),N(T))||h.isDigit(B(T));)T.token+=B(T),P(T);Re(D,T.token)?T.tokenType=x.DELIMITER:T.tokenType=x.SYMBOL;return}for(T.tokenType=x.UNKNOWN;B(T)!=="";)T.token+=B(T),P(T);throw Le(T,'Syntax error in part "'+T.token+'"')}function U(T){do O(T);while(T.token===`
|
|
106
|
+
`)}function F(T){T.nestingLevel++}function q(T){T.nestingLevel--}h.isAlpha=function(X,pe,Ae){return h.isValidLatinOrGreek(X)||h.isValidMathSymbol(X,Ae)||h.isValidMathSymbol(pe,X)},h.isValidLatinOrGreek=function(X){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(X)},h.isValidMathSymbol=function(X,pe){return/^[\uD835]$/.test(X)&&/^[\uDC00-\uDFFF]$/.test(pe)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(pe)},h.isWhitespace=function(X,pe){return X===" "||X===" "||X===`
|
|
107
|
+
`&&pe>0},h.isDecimalMark=function(X,pe){return X==="."&&pe!=="/"&&pe!=="*"&&pe!=="^"},h.isDigitDot=function(X){return X>="0"&&X<="9"||X==="."},h.isDigit=function(X){return X>="0"&&X<="9"},h.isHexDigit=function(X){return X>="0"&&X<="9"||X>="a"&&X<="f"||X>="A"&&X<="F"};function Y(T,X){var pe=M();Hr(pe,{expression:T,extraNodes:X}),O(pe);var Ae=G(pe);if(pe.token!=="")throw pe.tokenType===x.DELIMITER?_r(pe,"Unexpected operator "+pe.token):Le(pe,'Unexpected part "'+pe.token+'"');return Ae}function G(T){var X,pe=[],Ae;for(T.token!==""&&T.token!==`
|
|
108
|
+
`&&T.token!==";"&&(X=z(T),T.comment&&(X.comment=T.comment));T.token===`
|
|
109
|
+
`||T.token===";";)pe.length===0&&X&&(Ae=T.token!==";",pe.push({node:X,visible:Ae})),O(T),T.token!==`
|
|
110
|
+
`&&T.token!==";"&&T.token!==""&&(X=z(T),T.comment&&(X.comment=T.comment),Ae=T.token!==";",pe.push({node:X,visible:Ae}));return pe.length>0?new s(pe):(X||(X=new l(void 0),T.comment&&(X.comment=T.comment)),X)}function z(T){var X,pe,Ae,qe,Ge=J(T);if(T.token==="="){if(Zr(Ge))return X=Ge.name,U(T),Ae=z(T),new o(new E(X),Ae);if(oa(Ge))return U(T),Ae=z(T),new o(Ge.object,Ge.index,Ae);if(qn(Ge)&&Zr(Ge.fn)&&(qe=!0,pe=[],X=Ge.name,Ge.args.forEach(function(Xr,Na){Zr(Xr)?pe[Na]=Xr.name:qe=!1}),qe))return U(T),Ae=z(T),new c(X,pe,Ae);throw Le(T,"Invalid left hand side of assignment operator =")}return Ge}function J(T){for(var X=le(T);T.token==="?";){var pe=T.conditionalLevel;T.conditionalLevel=T.nestingLevel,U(T);var Ae=X,qe=z(T);if(T.token!==":")throw Le(T,"False part of conditional expression expected");T.conditionalLevel=null,U(T);var Ge=z(T);X=new u(Ae,qe,Ge),T.conditionalLevel=pe}return X}function le(T){for(var X=Q(T);T.token==="or";)U(T),X=new v("or","or",[X,Q(T)]);return X}function Q(T){for(var X=re(T);T.token==="xor";)U(T),X=new v("xor","xor",[X,re(T)]);return X}function re(T){for(var X=se(T);T.token==="and";)U(T),X=new v("and","and",[X,se(T)]);return X}function se(T){for(var X=te(T);T.token==="|";)U(T),X=new v("|","bitOr",[X,te(T)]);return X}function te(T){for(var X=ae(T);T.token==="^|";)U(T),X=new v("^|","bitXor",[X,ae(T)]);return X}function ae(T){for(var X=fe(T);T.token==="&";)U(T),X=new v("&","bitAnd",[X,fe(T)]);return X}function fe(T){for(var X=[ne(T)],pe=[],Ae={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Re(Ae,T.token);){var qe={name:T.token,fn:Ae[T.token]};pe.push(qe),U(T),X.push(ne(T))}return X.length===1?X[0]:X.length===2?new v(pe[0].name,pe[0].fn,X):new g(pe.map(Ge=>Ge.fn),X)}function ne(T){var X,pe,Ae,qe;X=xe(T);for(var Ge={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Re(Ge,T.token);)pe=T.token,Ae=Ge[pe],U(T),qe=[X,xe(T)],X=new v(pe,Ae,qe);return X}function xe(T){var X,pe,Ae,qe;X=$e(T);for(var Ge={to:"to",in:"to"};Re(Ge,T.token);)pe=T.token,Ae=Ge[pe],U(T),pe==="in"&&T.token===""?X=new v("*","multiply",[X,new E("in")],!0):(qe=[X,$e(T)],X=new v(pe,Ae,qe));return X}function $e(T){var X,pe=[];if(T.token===":"?X=new l(1):X=k(T),T.token===":"&&T.conditionalLevel!==T.nestingLevel){for(pe.push(X);T.token===":"&&pe.length<3;)U(T),T.token===")"||T.token==="]"||T.token===","||T.token===""?pe.push(new E("end")):pe.push(k(T));pe.length===3?X=new y(pe[0],pe[2],pe[1]):X=new y(pe[0],pe[1])}return X}function k(T){var X,pe,Ae,qe;X=W(T);for(var Ge={"+":"add","-":"subtract"};Re(Ge,T.token);){pe=T.token,Ae=Ge[pe],U(T);var Xr=W(T);Xr.isPercentage?qe=[X,new v("*","multiply",[X,Xr])]:qe=[X,Xr],X=new v(pe,Ae,qe)}return X}function W(T){var X,pe,Ae,qe;X=ue(T),pe=X;for(var Ge={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};Re(Ge,T.token);)Ae=T.token,qe=Ge[Ae],U(T),pe=ue(T),X=new v(Ae,qe,[X,pe]);return X}function ue(T){var X,pe;for(X=j(T),pe=X;T.tokenType===x.SYMBOL||T.token==="in"&&cr(X)||T.tokenType===x.NUMBER&&!cr(pe)&&(!kr(pe)||pe.op==="!")||T.token==="(";)pe=j(T),X=new v("*","multiply",[X,pe],!0);return X}function j(T){for(var X=K(T),pe=X,Ae=[];T.token==="/"&&Kl(pe);)if(Ae.push(Hr({},T)),U(T),T.tokenType===x.NUMBER)if(Ae.push(Hr({},T)),U(T),T.tokenType===x.SYMBOL||T.token==="(")Hr(T,Ae.pop()),Ae.pop(),pe=K(T),X=new v("/","divide",[X,pe]);else{Ae.pop(),Hr(T,Ae.pop());break}else{Hr(T,Ae.pop());break}return X}function K(T){var X,pe,Ae,qe;X=oe(T);for(var Ge={"%":"mod",mod:"mod"};Re(Ge,T.token);)pe=T.token,Ae=Ge[pe],U(T),pe==="%"&&T.tokenType===x.DELIMITER&&T.token!=="("?X=new v("/","divide",[X,new l(100)],!1,!0):(qe=[X,oe(T)],X=new v(pe,Ae,qe));return X}function oe(T){var X,pe,Ae,qe={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Re(qe,T.token)?(Ae=qe[T.token],X=T.token,U(T),pe=[oe(T)],new v(X,Ae,pe)):he(T)}function he(T){var X,pe,Ae,qe;return X=me(T),(T.token==="^"||T.token===".^")&&(pe=T.token,Ae=pe==="^"?"pow":"dotPow",U(T),qe=[X,oe(T)],X=new v(pe,Ae,qe)),X}function me(T){var X,pe,Ae,qe;X=I(T);for(var Ge={"!":"factorial","'":"ctranspose"};Re(Ge,T.token);)pe=T.token,Ae=Ge[pe],O(T),qe=[X],X=new v(pe,Ae,qe),X=ie(T,X);return X}function I(T){var X=[];if(T.tokenType===x.SYMBOL&&Re(T.extraNodes,T.token)){var pe=T.extraNodes[T.token];if(O(T),T.token==="("){if(X=[],F(T),O(T),T.token!==")")for(X.push(z(T));T.token===",";)O(T),X.push(z(T));if(T.token!==")")throw Le(T,"Parenthesis ) expected");q(T),O(T)}return new pe(X)}return H(T)}function H(T){var X,pe;return T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in D?(pe=T.token,O(T),Re(A,pe)?X=new l(A[pe]):S.includes(pe)?X=new l(t(pe,"number")):X=new E(pe),X=ie(T,X),X):ce(T)}function ie(T,X,pe){for(var Ae;(T.token==="("||T.token==="["||T.token===".")&&!pe;)if(Ae=[],T.token==="(")if(Zr(X)||oa(X)){if(F(T),O(T),T.token!==")")for(Ae.push(z(T));T.token===",";)O(T),Ae.push(z(T));if(T.token!==")")throw Le(T,"Parenthesis ) expected");q(T),O(T),X=new f(X,Ae)}else return X;else if(T.token==="["){if(F(T),O(T),T.token!=="]")for(Ae.push(z(T));T.token===",";)O(T),Ae.push(z(T));if(T.token!=="]")throw Le(T,"Parenthesis ] expected");q(T),O(T),X=new a(X,new p(Ae))}else{O(T);var qe=T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in D;if(!qe)throw Le(T,"Property name expected after dot");Ae.push(new l(T.token)),O(T);var Ge=!0;X=new a(X,new p(Ae,Ge))}return X}function ce(T){var X,pe;return T.token==='"'||T.token==="'"?(pe=de(T,T.token),X=new l(pe),X=ie(T,X),X):ve(T)}function de(T,X){for(var pe="";B(T)!==""&&B(T)!==X;)if(B(T)==="\\"){P(T);var Ae=B(T),qe=C[Ae];if(qe!==void 0)pe+=qe,T.index+=1;else if(Ae==="u"){var Ge=T.expression.slice(T.index+1,T.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ge))pe+=String.fromCharCode(parseInt(Ge,16)),T.index+=5;else throw Le(T,"Invalid unicode character \\u".concat(Ge))}else throw Le(T,"Bad escape character \\".concat(Ae))}else pe+=B(T),P(T);if(O(T),T.token!==X)throw Le(T,"End of string ".concat(X," expected"));return O(T),pe}function ve(T){var X,pe,Ae,qe;if(T.token==="["){if(F(T),O(T),T.token!=="]"){var Ge=Se(T);if(T.token===";"){for(Ae=1,pe=[Ge];T.token===";";)O(T),T.token!=="]"&&(pe[Ae]=Se(T),Ae++);if(T.token!=="]")throw Le(T,"End of matrix ] expected");q(T),O(T),qe=pe[0].items.length;for(var Xr=1;Xr<Ae;Xr++)if(pe[Xr].items.length!==qe)throw _r(T,"Column dimensions mismatch ("+pe[Xr].items.length+" !== "+qe+")");X=new i(pe)}else{if(T.token!=="]")throw Le(T,"End of matrix ] expected");q(T),O(T),X=Ge}}else q(T),O(T),X=new i([]);return ie(T,X)}return we(T)}function Se(T){for(var X=[z(T)],pe=1;T.token===",";)O(T),T.token!=="]"&&T.token!==";"&&(X[pe]=z(T),pe++);return new i(X)}function we(T){if(T.token==="{"){F(T);var X,pe={};do if(O(T),T.token!=="}"){if(T.token==='"'||T.token==="'")X=de(T,T.token);else if(T.tokenType===x.SYMBOL||T.tokenType===x.DELIMITER&&T.token in D)X=T.token,O(T);else throw Le(T,"Symbol or string expected as object key");if(T.token!==":")throw Le(T,"Colon : expected after object key");O(T),pe[X]=z(T)}while(T.token===",");if(T.token!=="}")throw Le(T,"Comma , or bracket } expected after object value");q(T),O(T);var Ae=new d(pe);return Ae=ie(T,Ae),Ae}return Te(T)}function Te(T){var X;if(T.tokenType===x.NUMBER){X=T.token,O(T);var pe=jn(X,n),Ae=t(X,pe);return new l(Ae)}return De(T)}function De(T){var X;if(T.token==="("){if(F(T),O(T),X=z(T),T.token!==")")throw Le(T,"Parenthesis ) expected");return q(T),O(T),X=new m(X),X=ie(T,X),X}return ir(T)}function ir(T){throw T.token===""?Le(T,"Unexpected end of expression"):Le(T,"Value expected")}function or(T){return T.index-T.token.length+1}function Le(T,X){var pe=or(T),Ae=new SyntaxError(X+" (char "+pe+")");return Ae.char=pe,Ae}function _r(T,X){var pe=or(T),Ae=new SyntaxError(X+" (char "+pe+")");return Ae.char=pe,Ae}return r.addConversion({from:"string",to:"Node",convert:h}),h}),Z0="compile",tY=["typed","parse"],nY=L(Z0,tY,e=>{var{typed:r,parse:t}=e;return r(Z0,{string:function(a){return t(a).compile()},"Array | Matrix":function(a){return rr(a,function(i){return t(i).compile()})}})}),Y0="evaluate",aY=["typed","parse"],iY=L(Y0,aY,e=>{var{typed:r,parse:t}=e;return r(Y0,{string:function(a){var i=io();return t(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return t(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=io();return rr(a,function(o){return t(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return rr(a,function(o){return t(o).compile().evaluate(i)})}})}),oY="Parser",sY=["evaluate"],uY=L(oY,sY,e=>{var{evaluate:r}=e;function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:io(),writable:!1})}return t.prototype.type="Parser",t.prototype.isParser=!0,t.prototype.evaluate=function(n){return r(n,this.scope)},t.prototype.get=function(n){if(this.scope.has(n))return this.scope.get(n)},t.prototype.getAll=function(){return vI(this.scope)},t.prototype.getAllAsMap=function(){return this.scope},t.prototype.set=function(n,a){return this.scope.set(n,a),a},t.prototype.remove=function(n){this.scope.delete(n)},t.prototype.clear=function(){this.scope.clear()},t},{isClass:!0}),X0="parser",lY=["typed","Parser"],cY=L(X0,lY,e=>{var{typed:r,Parser:t}=e;return r(X0,{"":function(){return new t}})}),K0="lup",fY=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],pY=L(K0,fY,e=>{var{typed:r,matrix:t,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:s,larger:u,equalScalar:l,unaryMinus:c,DenseMatrix:f,SparseMatrix:p,Spa:d}=e;return r(K0,{DenseMatrix:function(g){return v(g)},SparseMatrix:function(g){return m(g)},Array:function(g){var E=t(g),h=v(E);return{L:h.L.valueOf(),U:h.U.valueOf(),p:h.p}}});function v(y){var g=y._size[0],E=y._size[1],h=Math.min(g,E),w=We(y._data),x=[],b=[g,h],D=[],A=[h,E],S,C,M,$=[];for(S=0;S<g;S++)$[S]=S;for(C=0;C<E;C++){if(C>0)for(S=0;S<g;S++){var B=Math.min(S,C),P=0;for(M=0;M<B;M++)P=a(P,o(w[S][M],w[M][C]));w[S][C]=s(w[S][C],P)}var R=C,N=0,O=0;for(S=C;S<g;S++){var U=w[S][C],F=n(U);u(F,N)&&(R=S,N=F,O=U)}if(C!==R&&($[C]=[$[R],$[R]=$[C]][0],f._swapRows(C,R,w)),C<g)for(S=C+1;S<g;S++){var q=w[S][C];l(q,0)||(w[S][C]=i(w[S][C],O))}}for(C=0;C<E;C++)for(S=0;S<g;S++){if(C===0&&(S<E&&(D[S]=[]),x[S]=[]),S<C){S<E&&(D[S][C]=w[S][C]),C<g&&(x[S][C]=0);continue}if(S===C){S<E&&(D[S][C]=w[S][C]),C<g&&(x[S][C]=1);continue}S<E&&(D[S][C]=0),C<g&&(x[S][C]=w[S][C])}var Y=new f({data:x,size:b}),G=new f({data:D,size:A}),z=[];for(S=0,h=$.length;S<h;S++)z[$[S]]=S;return{L:Y,U:G,p:z,toString:function(){return"L: "+this.L.toString()+`
|
|
111
|
+
U: `+this.U.toString()+`
|
|
112
|
+
P: `+this.p}}}function m(y){var g=y._size[0],E=y._size[1],h=Math.min(g,E),w=y._values,x=y._index,b=y._ptr,D=[],A=[],S=[],C=[g,h],M=[],$=[],B=[],P=[h,E],R,N,O,U=[],F=[];for(R=0;R<g;R++)U[R]=R,F[R]=R;var q=function(z,J){var le=F[z],Q=F[J];U[le]=J,U[Q]=z,F[z]=Q,F[J]=le},Y=function(){var z=new d;N<g&&(S.push(D.length),D.push(1),A.push(N)),B.push(M.length);var J=b[N],le=b[N+1];for(O=J;O<le;O++)R=x[O],z.set(U[R],w[O]);N>0&&z.forEach(0,N-1,function(te,ae){p._forEachRow(te,D,A,S,function(fe,ne){fe>te&&z.accumulate(fe,c(o(ne,ae)))})});var Q=N,re=z.get(N),se=n(re);z.forEach(N+1,g-1,function(te,ae){var fe=n(ae);u(fe,se)&&(Q=te,se=fe,re=ae)}),N!==Q&&(p._swapRows(N,Q,C[1],D,A,S),p._swapRows(N,Q,P[1],M,$,B),z.swap(N,Q),q(N,Q)),z.forEach(0,g-1,function(te,ae){te<=N?(M.push(ae),$.push(te)):(ae=i(ae,re),l(ae,0)||(D.push(ae),A.push(te)))})};for(N=0;N<E;N++)Y();return B.push(M.length),S.push(D.length),{L:new p({values:D,index:A,ptr:S,size:C}),U:new p({values:M,index:$,ptr:B,size:P}),p:U,toString:function(){return"L: "+this.L.toString()+`
|
|
113
|
+
U: `+this.U.toString()+`
|
|
114
|
+
P: `+this.p}}}}),J0="qr",dY=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],vY=L(J0,dY,e=>{var{typed:r,matrix:t,zeros:n,identity:a,isZero:i,equal:o,sign:s,sqrt:u,conj:l,unaryMinus:c,addScalar:f,divideScalar:p,multiplyScalar:d,subtractScalar:v,complex:m}=e;return Hr(r(J0,{DenseMatrix:function(w){return g(w)},SparseMatrix:function(w){return E()},Array:function(w){var x=t(w),b=g(x);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:y});function y(h){var w=h._size[0],x=h._size[1],b=a([w],"dense"),D=b._data,A=h.clone(),S=A._data,C,M,$,B=n([w],"");for($=0;$<Math.min(x,w);++$){var P=S[$][$],R=c(o(P,0)?1:s(P)),N=l(R),O=0;for(C=$;C<w;C++)O=f(O,d(S[C][$],l(S[C][$])));var U=d(R,u(O));if(!i(U)){var F=v(P,U);for(B[$]=1,C=$+1;C<w;C++)B[C]=p(S[C][$],F);var q=c(l(p(F,U))),Y=void 0;for(M=$;M<x;M++){for(Y=0,C=$;C<w;C++)Y=f(Y,d(l(B[C]),S[C][M]));for(Y=d(Y,q),C=$;C<w;C++)S[C][M]=d(v(S[C][M],d(B[C],Y)),N)}for(C=0;C<w;C++){for(Y=0,M=$;M<w;M++)Y=f(Y,d(D[C][M],B[M]));for(Y=d(Y,q),M=$;M<w;++M)D[C][M]=p(v(D[C][M],d(Y,l(B[M]))),N)}}}return{Q:b,R:A,toString:function(){return"Q: "+this.Q.toString()+`
|
|
115
|
+
R: `+this.R.toString()}}}function g(h){var w=y(h),x=w.R._data;if(h._data.length>0)for(var b=x[0][0].type==="Complex"?m(0):0,D=0;D<x.length;++D)for(var A=0;A<D&&A<(x[0]||[]).length;++A)x[D][A]=b;return w}function E(h){throw new Error("qr not implemented for sparse matrices yet")}});function mY(e,r,t,n){e._values;for(var a=e._index,i=e._ptr,o=e._size,s=e._datatype,u=o[0],l=o[1],c=null,f=[],p=[],d=0,v=0;v<l;v++){p[v]=d;for(var m=t?t[v]:v,y=i[m],g=i[m+1],E=y;E<g;E++){var h=a[E];f[d]=h,d++}}return p[l]=d,e.createSparseMatrix({values:c,index:f,ptr:p,size:[u,l],datatype:s})}function mx(e,r,t,n,a,i,o){var s=0;for(t[o]=e;s>=0;){var u=t[o+s],l=t[n+u];l===-1?(s--,i[r++]=u):(t[n+u]=t[a+l],++s,t[o+s]=l)}return r}function hY(e,r){if(!e)return null;var t=0,n,a=[],i=[],o=0,s=r,u=2*r;for(n=0;n<r;n++)i[o+n]=-1;for(n=r-1;n>=0;n--)e[n]!==-1&&(i[s+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<r;n++)e[n]===-1&&(t=mx(n,t,i,o,s,a,u));return a}function gY(e,r){if(!e)return null;var t=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],s=[],u=[],l=0,c=o,f,p;for(f=0;f<i;f++)u[c+f]=-1;for(var d=0;d<o;d++){s[d]=-1,u[l+d]=-1;for(var v=n[d],m=n[d+1],y=v;y<m;y++){var g=t[y];for(f=u[c+g];f!==-1&&f<d;f=p)p=u[l+f],u[l+f]=d,p===-1&&(s[f]=d);u[c+g]=d}}return s}function yY(e,r,t){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,s=o[1],u=0,l=0;l<s;l++){var c=i[l];for(i[l]=u;c<i[l+1];c++)r(a[c],l,n?n[c]:1,t)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[s]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function Rn(e){return-e-2}var bY="csAmd",xY=["add","multiply","transpose"],wY=L(bY,xY,e=>{var{add:r,multiply:t,transpose:n}=e;return function(c,f){if(!f||c<=0||c>3)return null;var p=f._size,d=p[0],v=p[1],m=0,y=Math.max(16,10*Math.sqrt(v));y=Math.min(v-2,y);var g=a(c,f,d,v,y);yY(g,u,null);for(var E=g._index,h=g._ptr,w=h[v],x=[],b=[],D=0,A=v+1,S=2*(v+1),C=3*(v+1),M=4*(v+1),$=5*(v+1),B=6*(v+1),P=7*(v+1),R=x,N=i(v,h,b,D,C,R,S,P,A,B,M,$),O=o(v,h,b,$,M,B,y,A,C,R,S),U=0,F,q,Y,G,z,J,le,Q,re,se,te,ae,fe,ne,xe,$e;O<v;){for(Y=-1;U<v&&(Y=b[C+U])===-1;U++);b[S+Y]!==-1&&(R[b[S+Y]]=-1),b[C+U]=b[S+Y];var k=b[M+Y],W=b[A+Y];O+=W;var ue=0;b[A+Y]=-W;var j=h[Y],K=k===0?j:w,oe=K;for(G=1;G<=k+1;G++){for(G>k?(J=Y,le=j,Q=b[D+Y]-k):(J=E[j++],le=h[J],Q=b[D+J]),z=1;z<=Q;z++)F=E[le++],!((re=b[A+F])<=0)&&(ue+=re,b[A+F]=-re,E[oe++]=F,b[S+F]!==-1&&(R[b[S+F]]=R[F]),R[F]!==-1?b[S+R[F]]=b[S+F]:b[C+b[$+F]]=b[S+F]);J!==Y&&(h[J]=Rn(Y),b[B+J]=0)}for(k!==0&&(w=oe),b[$+Y]=ue,h[Y]=K,b[D+Y]=oe-K,b[M+Y]=-2,N=s(N,m,b,B,v),se=K;se<oe;se++)if(F=E[se],!((te=b[M+F])<=0)){re=-b[A+F];var he=N-re;for(j=h[F],ae=h[F]+te-1;j<=ae;j++)J=E[j],b[B+J]>=N?b[B+J]-=re:b[B+J]!==0&&(b[B+J]=b[$+J]+he)}for(se=K;se<oe;se++){for(F=E[se],ae=h[F],fe=ae+b[M+F]-1,ne=ae,xe=0,$e=0,j=ae;j<=fe;j++)if(J=E[j],b[B+J]!==0){var me=b[B+J]-N;me>0?($e+=me,E[ne++]=J,xe+=J):(h[J]=Rn(Y),b[B+J]=0)}b[M+F]=ne-ae+1;var I=ne,H=ae+b[D+F];for(j=fe+1;j<H;j++){q=E[j];var ie=b[A+q];ie<=0||($e+=ie,E[ne++]=q,xe+=q)}$e===0?(h[F]=Rn(Y),re=-b[A+F],ue-=re,W+=re,O+=re,b[A+F]=0,b[M+F]=-1):(b[$+F]=Math.min(b[$+F],$e),E[ne]=E[I],E[I]=E[ae],E[ae]=Y,b[D+F]=ne-ae+1,xe=(xe<0?-xe:xe)%v,b[S+F]=b[P+xe],b[P+xe]=F,R[F]=xe)}for(b[$+Y]=ue,m=Math.max(m,ue),N=s(N+m,m,b,B,v),se=K;se<oe;se++)if(F=E[se],!(b[A+F]>=0))for(xe=R[F],F=b[P+xe],b[P+xe]=-1;F!==-1&&b[S+F]!==-1;F=b[S+F],N++){for(Q=b[D+F],te=b[M+F],j=h[F]+1;j<=h[F]+Q-1;j++)b[B+E[j]]=N;var ce=F;for(q=b[S+F];q!==-1;){var de=b[D+q]===Q&&b[M+q]===te;for(j=h[q]+1;de&&j<=h[q]+Q-1;j++)b[B+E[j]]!==N&&(de=0);de?(h[q]=Rn(F),b[A+F]+=b[A+q],b[A+q]=0,b[M+q]=-1,q=b[S+q],b[S+ce]=q):(ce=q,q=b[S+q])}}for(j=K,se=K;se<oe;se++)F=E[se],!((re=-b[A+F])<=0)&&(b[A+F]=re,$e=b[$+F]+ue-re,$e=Math.min($e,v-O-re),b[C+$e]!==-1&&(R[b[C+$e]]=F),b[S+F]=b[C+$e],R[F]=-1,b[C+$e]=F,U=Math.min(U,$e),b[$+F]=$e,E[j++]=F);b[A+Y]=W,(b[D+Y]=j-K)===0&&(h[Y]=-1,b[B+Y]=0),k!==0&&(w=j)}for(F=0;F<v;F++)h[F]=Rn(h[F]);for(q=0;q<=v;q++)b[C+q]=-1;for(q=v;q>=0;q--)b[A+q]>0||(b[S+q]=b[C+h[q]],b[C+h[q]]=q);for(J=v;J>=0;J--)b[A+J]<=0||h[J]!==-1&&(b[S+J]=b[C+h[J]],b[C+h[J]]=J);for(Y=0,F=0;F<=v;F++)h[F]===-1&&(Y=mx(F,Y,b,C,S,x,B));return x.splice(x.length-1,1),x};function a(l,c,f,p,d){var v=n(c);if(l===1&&p===f)return r(c,v);if(l===2){for(var m=v._index,y=v._ptr,g=0,E=0;E<f;E++){var h=y[E];if(y[E]=g,!(y[E+1]-h>d))for(var w=y[E+1];h<w;h++)m[g++]=m[h]}return y[f]=g,c=n(v),t(v,c)}return t(v,c)}function i(l,c,f,p,d,v,m,y,g,E,h,w){for(var x=0;x<l;x++)f[p+x]=c[x+1]-c[x];f[p+l]=0;for(var b=0;b<=l;b++)f[d+b]=-1,v[b]=-1,f[m+b]=-1,f[y+b]=-1,f[g+b]=1,f[E+b]=1,f[h+b]=0,f[w+b]=f[p+b];var D=s(0,0,f,E,l);return f[h+l]=-2,c[l]=-1,f[E+l]=0,D}function o(l,c,f,p,d,v,m,y,g,E,h){for(var w=0,x=0;x<l;x++){var b=f[p+x];if(b===0)f[d+x]=-2,w++,c[x]=-1,f[v+x]=0;else if(b>m)f[y+x]=0,f[d+x]=-1,w++,c[x]=Rn(l),f[y+l]++;else{var D=f[g+b];D!==-1&&(E[D]=x),f[h+x]=f[g+b],f[g+b]=x}}return w}function s(l,c,f,p,d){if(l<2||l+c<0){for(var v=0;v<d;v++)f[p+v]!==0&&(f[p+v]=1);l=2}return l}function u(l,c){return l!==c}});function EY(e,r,t,n,a,i,o){var s,u,l=0,c;if(e<=r||t[n+r]<=t[a+e])return-1;t[a+e]=t[n+r];var f=t[i+e];if(t[i+e]=r,f===-1)l=1,c=e;else{for(l=2,c=f;c!==t[o+c];c=t[o+c]);for(s=f;s!==c;s=u)u=t[o+s],t[o+s]=c}return{jleaf:l,q:c}}var SY="csCounts",AY=["transpose"],DY=L(SY,AY,e=>{var{transpose:r}=e;return function(t,n,a,i){if(!t||!n||!a)return null;var o=t._size,s=o[0],u=o[1],l,c,f,p,d,v,m,y=4*u+(i?u+s+1:0),g=[],E=0,h=u,w=2*u,x=3*u,b=4*u,D=5*u+1;for(f=0;f<y;f++)g[f]=-1;var A=[],S=r(t),C=S._index,M=S._ptr;for(f=0;f<u;f++)for(c=a[f],A[c]=g[x+c]===-1?1:0;c!==-1&&g[x+c]===-1;c=n[c])g[x+c]=f;if(i){for(f=0;f<u;f++)g[a[f]]=f;for(l=0;l<s;l++){for(f=u,v=M[l],m=M[l+1],d=v;d<m;d++)f=Math.min(f,g[C[d]]);g[D+l]=g[b+f],g[b+f]=l}}for(l=0;l<u;l++)g[E+l]=l;for(f=0;f<u;f++){for(c=a[f],n[c]!==-1&&A[n[c]]--,p=i?g[b+f]:c;p!==-1;p=i?g[D+p]:-1)for(d=M[p];d<M[p+1];d++){l=C[d];var $=EY(l,c,g,x,h,w,E);$.jleaf>=1&&A[c]++,$.jleaf===2&&A[$.q]--}n[c]!==-1&&(g[E+c]=n[c])}for(c=0;c<u;c++)n[c]!==-1&&(A[n[c]]+=A[c]);return A}}),CY="csSqr",NY=["add","multiply","transpose"],MY=L(CY,NY,e=>{var{add:r,multiply:t,transpose:n}=e,a=wY({add:r,multiply:t,transpose:n}),i=DY({transpose:n});return function(u,l,c){var f=l._ptr,p=l._size,d=p[1],v,m={};if(m.q=a(u,l),u&&!m.q)return null;if(c){var y=u?mY(l,null,m.q):l;m.parent=gY(y);var g=hY(m.parent,d);if(m.cp=i(y,m.parent,g,1),y&&m.parent&&m.cp&&o(y,m))for(m.unz=0,v=0;v<d;v++)m.unz+=m.cp[v]}else m.unz=4*f[d]+d,m.lnz=m.unz;return m};function o(s,u){var l=s._ptr,c=s._index,f=s._size,p=f[0],d=f[1];u.pinv=[],u.leftmost=[];var v=u.parent,m=u.pinv,y=u.leftmost,g=[],E=0,h=p,w=p+d,x=p+2*d,b,D,A,S,C;for(D=0;D<d;D++)g[h+D]=-1,g[w+D]=-1,g[x+D]=0;for(b=0;b<p;b++)y[b]=-1;for(D=d-1;D>=0;D--)for(S=l[D],C=l[D+1],A=S;A<C;A++)y[c[A]]=D;for(b=p-1;b>=0;b--)m[b]=-1,D=y[b],D!==-1&&(g[x+D]++===0&&(g[w+D]=b),g[E+b]=g[h+D],g[h+D]=b);for(u.lnz=0,u.m2=p,D=0;D<d;D++)if(b=g[h+D],u.lnz++,b<0&&(b=u.m2++),m[b]=D,!(--x[D]<=0)){u.lnz+=g[x+D];var M=v[D];M!==-1&&(g[x+M]===0&&(g[w+M]=g[w+D]),g[E+g[w+D]]=g[h+M],g[h+M]=g[E+b],g[x+M]+=g[x+D])}for(b=0;b<p;b++)m[b]<0&&(m[b]=D++);return!0}});function hc(e,r){return e[r]<0}function hx(e,r){e[r]=Rn(e[r])}function Q0(e){return e<0?Rn(e):e}function TY(e,r,t,n,a){var i=r._index,o=r._ptr,s=r._size,u=s[1],l,c,f,p=0;for(n[0]=e;p>=0;){e=n[p];var d=a?a[e]:e;hc(o,e)||(hx(o,e),n[u+p]=d<0?0:Q0(o[d]));var v=1;for(c=n[u+p],f=d<0?0:Q0(o[d+1]);c<f;c++)if(l=i[c],!hc(o,l)){n[u+p]=c,n[++p]=l,v=0;break}v&&(p--,n[--t]=e)}return t}function OY(e,r,t,n,a){var i=e._ptr,o=e._size,s=r._index,u=r._ptr,l=o[1],c,f,p,d=l;for(f=u[t],p=u[t+1],c=f;c<p;c++){var v=s[c];hc(i,v)||(d=TY(v,e,d,n,a))}for(c=d;c<l;c++)hx(i,n[c]);return d}var _Y="csSpsolve",$Y=["divideScalar","multiply","subtract"],FY=L(_Y,$Y,e=>{var{divideScalar:r,multiply:t,subtract:n}=e;return function(i,o,s,u,l,c,f){var p=i._values,d=i._index,v=i._ptr,m=i._size,y=m[1],g=o._values,E=o._index,h=o._ptr,w,x,b,D,A=OY(i,o,s,u,c);for(w=A;w<y;w++)l[u[w]]=0;for(x=h[s],b=h[s+1],w=x;w<b;w++)l[E[w]]=g[w];for(var S=A;S<y;S++){var C=u[S],M=c?c[C]:C;if(!(M<0))for(x=v[M],b=v[M+1],l[C]=r(l[C],p[f?x:b-1]),w=f?x+1:x,D=f?b:b-1;w<D;w++){var $=d[w];l[$]=n(l[$],t(p[w],l[C]))}}return A}}),BY="csLu",RY=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],PY=L(BY,RY,e=>{var{abs:r,divideScalar:t,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:s}=e,u=FY({divideScalar:t,multiply:n,subtract:a});return function(c,f,p){if(!c)return null;var d=c._size,v=d[1],m,y=100,g=100;f&&(m=f.q,y=f.lnz||y,g=f.unz||g);var E=[],h=[],w=[],x=new s({values:E,index:h,ptr:w,size:[v,v]}),b=[],D=[],A=[],S=new s({values:b,index:D,ptr:A,size:[v,v]}),C=[],M,$,B=[],P=[];for(M=0;M<v;M++)B[M]=0,C[M]=-1,w[M+1]=0;y=0,g=0;for(var R=0;R<v;R++){w[R]=y,A[R]=g;var N=m?m[R]:R,O=u(x,c,N,P,B,C,1),U=-1,F=-1;for($=O;$<v;$++)if(M=P[$],C[M]<0){var q=r(B[M]);i(q,F)&&(F=q,U=M)}else D[g]=C[M],b[g++]=B[M];if(U===-1||F<=0)return null;C[N]<0&&o(r(B[N]),n(F,p))&&(U=N);var Y=B[U];for(D[g]=R,b[g++]=Y,C[U]=R,h[y]=U,E[y++]=1,$=O;$<v;$++)M=P[$],C[M]<0&&(h[y]=M,E[y++]=t(B[M],Y)),B[M]=0}for(w[v]=y,A[v]=g,$=0;$<y;$++)h[$]=C[h[$]];return E.splice(y,E.length-y),h.splice(y,h.length-y),b.splice(g,b.length-g),D.splice(g,D.length-g),{L:x,U:S,pinv:C}}}),e1="slu",zY=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],IY=L(e1,zY,e=>{var{typed:r,abs:t,add:n,multiply:a,transpose:i,divideScalar:o,subtract:s,larger:u,largerEq:l,SparseMatrix:c}=e,f=MY({add:n,multiply:a,transpose:i}),p=PY({abs:t,divideScalar:o,multiply:a,subtract:s,larger:u,largerEq:l,SparseMatrix:c});return r(e1,{"SparseMatrix, number, number":function(v,m,y){if(!ze(m)||m<0||m>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var g=f(m,v,!1),E=p(v,g,y);return{L:E.L,U:E.U,p:E.pinv,q:g.q,toString:function(){return"L: "+this.L.toString()+`
|
|
116
|
+
U: `+this.U.toString()+`
|
|
117
|
+
p: `+this.p.toString()+(this.q?`
|
|
118
|
+
q: `+this.q.toString():"")+`
|
|
119
|
+
`}}}})});function r1(e,r){var t,n=r.length,a=[];if(e)for(t=0;t<n;t++)a[e[t]]=r[t];else for(t=0;t<n;t++)a[t]=r[t];return a}var t1="lusolve",LY=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],qY=L(t1,LY,e=>{var{typed:r,matrix:t,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:s}=e,u=No({DenseMatrix:s});return r(t1,{"Array, Array | Matrix":function(p,d){p=t(p);var v=n(p),m=c(v.L,v.U,v.p,null,d);return m.valueOf()},"DenseMatrix, Array | Matrix":function(p,d){var v=n(p);return c(v.L,v.U,v.p,null,d)},"SparseMatrix, Array | Matrix":function(p,d){var v=n(p);return c(v.L,v.U,v.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(p,d,v,m){var y=a(p,v,m);return c(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(p,d){return c(p.L,p.U,p.p,p.q,d)}});function l(f){if(Ue(f))return f;if(hr(f))return t(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,p,d,v,m){f=l(f),p=l(p),d&&(m=u(f,m,!0),m._data=r1(d,m._data));var y=o(f,m),g=i(p,y);return v&&(g._data=r1(v,g._data)),g}}),n1="polynomialRoot",kY=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],UY=L(n1,kY,e=>{var{typed:r,isZero:t,equalScalar:n,add:a,subtract:i,multiply:o,divide:s,sqrt:u,unaryMinus:l,cbrt:c,typeOf:f,im:p,re:d}=e;return r(n1,{"number|Complex, ...number|Complex":(v,m)=>{for(var y=[v,...m];y.length>0&&t(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(v,", ").concat(m,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[l(s(y[0],y[1]))];case 3:{var[g,E,h]=y,w=o(2,h),x=o(E,E),b=o(4,h,g);if(n(x,b))return[s(l(E),w)];var D=u(i(x,b));return[s(i(D,E),w),s(i(l(D),E),w)]}case 4:{var[A,S,C,M]=y,$=l(o(3,M)),B=o(C,C),P=o(3,M,S),R=a(o(2,C,C,C),o(27,M,M,A)),N=o(9,M,C,S);if(n(B,P)&&n(R,N))return[s(C,$)];var O=i(B,P),U=i(R,N),F=a(o(18,M,C,S,A),o(C,C,S,S)),q=a(o(4,C,C,C,A),o(4,M,S,S,S),o(27,M,M,A,A));if(n(F,q))return[s(i(o(4,M,C,S),a(o(9,M,M,A),o(C,C,C))),o(M,O)),s(i(o(9,M,A),o(C,S)),o(2,O))];var Y;n(B,P)?Y=U:Y=s(a(U,u(i(o(U,U),o(4,O,O,O)))),2);var G=!0,z=c(Y,G).toArray().map(J=>s(a(C,J,s(O,J)),$));return z.map(J=>f(J)==="Complex"&&n(d(J),d(J)+p(J))?d(J):J)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),HY="Help",jY=["evaluate"],VY=L(HY,jY,e=>{var{evaluate:r}=e;function t(n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return t.prototype.type="Help",t.prototype.isHelp=!0,t.prototype.toString=function(){var n=this.doc||{},a=`
|
|
120
|
+
`;if(n.name&&(a+="Name: "+n.name+`
|
|
121
|
+
|
|
122
|
+
`),n.category&&(a+="Category: "+n.category+`
|
|
123
|
+
|
|
124
|
+
`),n.description&&(a+=`Description:
|
|
125
|
+
`+n.description+`
|
|
126
|
+
|
|
127
|
+
`),n.syntax&&(a+=`Syntax:
|
|
128
|
+
`+n.syntax.join(`
|
|
129
|
+
`)+`
|
|
130
|
+
|
|
131
|
+
`),n.examples){a+=`Examples:
|
|
132
|
+
`;for(var i=!1,o=r("config()"),s={config:f=>(i=!0,r("config(newConfig)",{newConfig:f}))},u=0;u<n.examples.length;u++){var l=n.examples[u];a+=" "+l+`
|
|
133
|
+
`;var c=void 0;try{c=r(l,s)}catch(f){c=f}c!==void 0&&!y2(c)&&(a+=" "+tr(c,{precision:14})+`
|
|
134
|
+
`)}a+=`
|
|
135
|
+
`,i&&r("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+`
|
|
136
|
+
|
|
137
|
+
`),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+`
|
|
138
|
+
`),a},t.prototype.toJSON=function(){var n=We(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new t(a)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0}),GY="Chain",WY=["?on","math","typed"],ZY=L(GY,WY,e=>{var{on:r,math:t,typed:n}=e;function a(l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");b2(l)?this.value=l.value:this.value=l}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return tr(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(l){return new a(l.value)};function i(l,c){typeof c=="function"&&(a.prototype[l]=s(c))}function o(l,c){kz(a.prototype,l,function(){var p=c();if(typeof p=="function")return s(p)})}function s(l){return function(){if(arguments.length===0)return new a(l(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(l)){var p=n.resolve(l,c);if(p.params.length===1)throw new Error("chain function "+l.name+" cannot match rest parameter between chain value and additional arguments.");return new a(p.implementation.apply(l,c))}return new a(l.apply(l,c))}}a.createProxy=function(l,c){if(typeof l=="string")i(l,c);else{var f=function(v){Re(l,v)&&u[v]===void 0&&o(v,()=>l[v])};for(var p in l)f(p)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(t),r&&r("import",function(l,c,f){f||o(l,c)}),a},{isClass:!0}),a1={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},YY={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},XY={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},KY={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},JY={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},QY={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},eX={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},rX={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},tX={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},nX={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},aX={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},i1={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},iX={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},oX={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},sX={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},uX={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},lX={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},cX={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","bigint","complex","fraction","index","matrix","string","unit"]},fX={name:"bigint",category:"Construction",syntax:["bigint(x)"],description:"Create a bigint, an integer with an arbitrary number of digits, from a number or string.",examples:["123123123123123123 # a large number will lose digits",'bigint("123123123123123123")','bignumber(["1", "3", "5"])'],seealso:["boolean","bignumber","number","complex","fraction","index","matrix","string","unit"]},pX={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},dX={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},vX={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},mX={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},hX={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},gX={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},yX={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","bigint","boolean","complex","fraction","index","matrix","string","unit"]},bX={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},xX={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},wX={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},EX={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},SX={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},AX={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},DX={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},CX={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},NX={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},MX={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},TX={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},OX={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},_X={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},$X={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},FX={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},BX={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},RX={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},PX={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},zX={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},IX={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},LX={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},qX={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},kX={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},UX={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},HX={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},jX={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},VX={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},GX={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},WX={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},ZX={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},YX={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},XX={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},KX={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},JX={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},QX={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},eK={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},rK={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},tK={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},nK={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},aK={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},iK={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},oK={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},sK={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},uK={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},lK={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},cK={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},fK={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},pK={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},dK={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},vK={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},mK={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},hK={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},gK={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},yK={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},bK={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},xK={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},wK={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},EK={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},SK={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},AK={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},DK={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},CK={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},NK={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},MK={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},TK={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},OK={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},_K={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},$K={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},FK={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},BK={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},RK={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},PK={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},zK={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},IK={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},LK={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},qK={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},kK={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},UK={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},HK={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},jK={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]},VK={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},GK={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},WK={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},ZK={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},YK={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},XK={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},KK={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},JK={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},QK={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},eJ={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},rJ={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},tJ={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},nJ={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},aJ={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},iJ={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},oJ={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},sJ={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},uJ={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},lJ={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},cJ={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},fJ={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},pJ={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},dJ={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},vJ={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},mJ={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},hJ={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},gJ={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},yJ={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},bJ={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},xJ={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},wJ={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},EJ={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},SJ={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},AJ={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},DJ={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},CJ={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},NJ={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},MJ={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},TJ={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},OJ={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},_J={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},$J={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},FJ={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},BJ={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},RJ={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},PJ={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},zJ={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},IJ={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},LJ={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},qJ={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},kJ={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},UJ={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},HJ={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},jJ={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},VJ={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},GJ={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},WJ={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},ZJ={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},YJ={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},XJ={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},KJ={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},JJ={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},QJ={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},eQ={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},rQ={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},tQ={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},nQ={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},aQ={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},iQ={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},oQ={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},sQ={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},uQ={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},lQ={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},cQ={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},fQ={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},pQ={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},dQ={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},vQ={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},mQ={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},hQ={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},gQ={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},yQ={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},bQ={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},xQ={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},wQ={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},EQ={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},SQ={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},AQ={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},DQ={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},CQ={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber.
|
|
139
|
+
|
|
140
|
+
In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},NQ={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},MQ={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},TQ={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},OQ={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},_Q={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},$Q={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},FQ={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},BQ={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},RQ={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},PQ={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},zQ={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},IQ={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},LQ={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},qQ={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},kQ={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},UQ={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},HQ={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},jQ={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},VQ={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},GQ={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},WQ={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},ZQ={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},YQ={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},XQ={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},KQ={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},JQ={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},QQ={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},eee={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},ree={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},tee={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},nee={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},aee={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},iee={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},oee={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},see={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},uee={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},lee={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},cee={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},fee={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},pee={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},dee={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},vee={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},mee={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},hee={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, bigint, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "bigint")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","bigint","fraction","bignumber","string","format"]},gee={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},yee={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},bee={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},xee={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},wee={bignumber:cX,bigint:fX,boolean:pX,complex:dX,createUnit:vX,fraction:mX,index:hX,matrix:gX,number:yX,sparse:bX,splitUnit:xX,string:wX,unit:EX,e:a1,E:a1,false:YY,i:XY,Infinity:KY,LN2:QY,LN10:JY,LOG2E:rX,LOG10E:eX,NaN:tX,null:nX,pi:i1,PI:i1,phi:aX,SQRT1_2:iX,SQRT2:oX,tau:sX,true:uX,version:lX,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:CX,lsolve:MX,lsolveAll:TX,lup:OX,lusolve:_X,leafCount:NX,polynomialRoot:$X,resolve:RX,simplify:PX,simplifyConstant:zX,simplifyCore:IX,symbolicEqual:qX,rationalize:BX,slu:LX,usolve:kX,usolveAll:UX,qr:FX,abs:HX,add:jX,cbrt:VX,ceil:GX,cube:WX,divide:ZX,dotDivide:YX,dotMultiply:XX,dotPow:KX,exp:JX,expm:QX,expm1:eK,fix:rK,floor:tK,gcd:nK,hypot:aK,lcm:oK,log:sK,log2:cK,log1p:lK,log10:uK,mod:fK,multiply:pK,norm:dK,nthRoot:vK,nthRoots:mK,pow:hK,round:gK,sign:yK,sqrt:bK,sqrtm:xK,square:AK,subtract:DK,unaryMinus:CK,unaryPlus:NK,xgcd:MK,invmod:iK,bitAnd:TK,bitNot:OK,bitOr:_K,bitXor:$K,leftShift:FK,rightArithShift:BK,rightLogShift:RK,bellNumbers:PK,catalan:zK,composition:IK,stirlingS2:LK,config:SX,import:AX,typed:DX,arg:qK,conj:kK,re:HK,im:UK,evaluate:jK,help:VK,distance:GK,intersect:WK,and:ZK,not:YK,or:XK,xor:KK,concat:QK,count:eJ,cross:rJ,column:JK,ctranspose:tJ,det:nJ,diag:aJ,diff:iJ,dot:oJ,getMatrixDataType:fJ,identity:pJ,filter:uJ,flatten:lJ,forEach:cJ,inv:dJ,pinv:vJ,eigs:sJ,kron:mJ,matrixFromFunction:yJ,matrixFromRows:bJ,matrixFromColumns:gJ,map:hJ,ones:xJ,partitionSelect:wJ,range:EJ,resize:AJ,reshape:SJ,rotate:DJ,rotationMatrix:CJ,row:NJ,size:MJ,sort:TJ,squeeze:OJ,subset:_J,trace:$J,transpose:FJ,zeros:BJ,fft:RJ,ifft:PJ,sylvester:wK,schur:EK,lyap:SK,solveODE:xee,combinations:zJ,combinationsWithRep:IJ,factorial:LJ,gamma:qJ,kldivergence:UJ,lgamma:kJ,multinomial:HJ,permutations:jJ,pickRandom:VJ,random:GJ,randomInt:WJ,compare:ZJ,compareNatural:YJ,compareText:XJ,deepEqual:KJ,equal:JJ,equalText:QJ,larger:eQ,largerEq:rQ,smaller:tQ,smallerEq:nQ,unequal:aQ,setCartesian:iQ,setDifference:oQ,setDistinct:sQ,setIntersect:uQ,setIsSubset:lQ,setMultiplicity:cQ,setPowerset:fQ,setSize:pQ,setSymDifference:dQ,setUnion:vQ,zpk2tf:mQ,freqz:hQ,erf:gQ,zeta:yQ,cumsum:MQ,mad:bQ,max:xQ,mean:wQ,median:EQ,min:SQ,mode:AQ,prod:DQ,quantileSeq:CQ,std:NQ,sum:TQ,variance:OQ,corr:_Q,acos:$Q,acosh:FQ,acot:BQ,acoth:RQ,acsc:PQ,acsch:zQ,asec:IQ,asech:LQ,asin:qQ,asinh:kQ,atan:UQ,atanh:jQ,atan2:HQ,cos:VQ,cosh:GQ,cot:WQ,coth:ZQ,csc:YQ,csch:XQ,sec:KQ,sech:JQ,sin:QQ,sinh:eee,tan:ree,tanh:tee,to:nee,clone:iee,format:oee,bin:aee,oct:gee,hex:uee,isNaN:cee,isInteger:lee,isNegative:fee,isNumeric:pee,hasNumericValue:see,isPositive:dee,isPrime:vee,isZero:mee,print:yee,typeOf:bee,numeric:hee},o1="help",Eee=["typed","mathWithTransform","Help"],See=L(o1,Eee,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(o1,{any:function(i){var o,s=i;if(typeof i!="string"){for(o in t)if(Re(t,o)&&i===t[o]){s=o;break}}var u=ct(wee,s);if(!u){var l=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+l+'"')}return new n(u)}})}),s1="chain",Aee=["typed","Chain"],Dee=L(s1,Aee,e=>{var{typed:r,Chain:t}=e;return r(s1,{"":function(){return new t},any:function(a){return new t(a)}})}),u1="det",Cee=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],Nee=L(u1,Cee,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:s}=e;return r(u1,{any:function(c){return We(c)},"Array | Matrix":function(c){var f;switch(Ue(c)?f=c.size():Array.isArray(c)?(c=t(c),f=c.size()):f=[],f.length){case 0:return We(c);case 1:if(f[0]===1)return We(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+tr(f)+")");case 2:{var p=f[0],d=f[1];if(p===d)return u(c.clone().valueOf(),p);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+tr(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+tr(f)+")")}}});function u(l,c,f){if(c===1)return We(l[0][0]);if(c===2)return n(a(l[0][0],l[1][1]),a(l[1][0],l[0][1]));for(var p=!1,d=new Array(c).fill(0).map((D,A)=>A),v=0;v<c;v++){var m=d[v];if(o(l[m][v])){var y=void 0;for(y=v+1;y<c;y++)if(!o(l[d[y]][v])){m=d[y],d[y]=d[v],d[v]=m,p=!p;break}if(y===c)return l[m][v]}for(var g=l[m][v],E=v===0?1:l[d[v-1]][v-1],h=v+1;h<c;h++)for(var w=d[h],x=v+1;x<c;x++)l[w][x]=i(n(a(l[w][x],g),a(l[w][v],l[m][x])),E)}var b=l[d[c-1]][c-1];return p?s(b):b}}),l1="inv",Mee=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],Tee=L(l1,Mee,e=>{var{typed:r,matrix:t,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:s,identity:u,abs:l}=e;return r(l1,{"Array | Matrix":function(p){var d=Ue(p)?p.size():Ke(p);switch(d.length){case 1:if(d[0]===1)return Ue(p)?t([n(1,p.valueOf()[0])]):[n(1,p[0])];throw new RangeError("Matrix must be square (size: "+tr(d)+")");case 2:{var v=d[0],m=d[1];if(v===m)return Ue(p)?t(c(p.valueOf(),v,m),p.storage()):c(p,v,m);throw new RangeError("Matrix must be square (size: "+tr(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+tr(d)+")")}},any:function(p){return n(1,p)}});function c(f,p,d){var v,m,y,g,E;if(p===1){if(g=f[0][0],g===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,g)]]}else if(p===2){var h=s(f);if(h===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],h),n(o(f[0][1]),h)],[n(o(f[1][0]),h),n(f[0][0],h)]]}else{var w=f.concat();for(v=0;v<p;v++)w[v]=w[v].concat();for(var x=u(p).valueOf(),b=0;b<d;b++){var D=l(w[b][b]),A=b;for(v=b+1;v<p;)l(w[v][b])>D&&(D=l(w[v][b]),A=v),v++;if(D===0)throw Error("Cannot calculate inverse, determinant is zero");v=A,v!==b&&(E=w[b],w[b]=w[v],w[v]=E,E=x[b],x[b]=x[v],x[v]=E);var S=w[b],C=x[b];for(v=0;v<p;v++){var M=w[v],$=x[v];if(v!==b){if(M[b]!==0){for(y=n(o(M[b]),S[b]),m=b;m<d;m++)M[m]=a(M[m],i(y,S[m]));for(m=0;m<d;m++)$[m]=a($[m],i(y,C[m]))}}else{for(y=S[b],m=b;m<d;m++)M[m]=n(M[m],y);for(m=0;m<d;m++)$[m]=n($[m],y)}}}return x}}}),c1="pinv",Oee=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],_ee=L(c1,Oee,e=>{var{typed:r,matrix:t,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:s,ctranspose:u,divideScalar:l,multiply:c,add:f,Complex:p}=e;return r(c1,{"Array | Matrix":function(h){var w=Ue(h)?h.size():Ke(h);switch(w.length){case 1:return g(h)?u(h):w[0]===1?n(h):o(u(h),s(h,h));case 2:{if(g(h))return u(h);var x=w[0],b=w[1];if(x===b)try{return n(h)}catch(D){if(!(D instanceof Error&&D.message.match(/Cannot calculate inverse, determinant is zero/)))throw D}return Ue(h)?t(d(h.valueOf(),x,b),h.storage()):d(h,x,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+tr(w)+")")}},any:function(h){return i(h,0)?We(h):l(1,h)}});function d(E,h,w){var{C:x,F:b}=m(E,h,w),D=c(n(c(u(x),x)),u(x)),A=c(u(b),n(c(b,u(b))));return c(A,D)}function v(E,h,w){for(var x=We(E),b=0,D=0;D<h;D++){if(w<=b)return x;for(var A=D;y(x[A][b]);)if(A++,h===A&&(A=D,b++,w===b))return x;[x[A],x[D]]=[x[D],x[A]];for(var S=x[D][b],C=0;C<w;C++)x[D][C]=o(x[D][C],S);for(var M=0;M<h;M++)if(M!==D){S=x[M][b];for(var $=0;$<w;$++)x[M][$]=f(x[M][$],c(-1,c(S,x[D][$])))}b++}return x}function m(E,h,w){var x=v(E,h,w),b=E.map((A,S)=>A.filter((C,M)=>M<h&&!y(s(x[M],x[M])))),D=x.filter((A,S)=>!y(s(x[S],x[S])));return{C:b,F:D}}function y(E){return i(f(E,p(1,1)),f(0,p(1,1)))}function g(E){return a(f(E,p(1,1)),f(c(E,0),p(1,1)))}});function $ee(e){var{addScalar:r,subtract:t,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:s,abs:u,bignumber:l,diag:c,size:f,reshape:p,inv:d,qr:v,usolve:m,usolveAll:y,equal:g,complex:E,larger:h,smaller:w,matrixFromColumns:x,dot:b}=e;function D(G,z,J,le){var Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,re=A(G,z,J,le,Q);S(G,z,J,le,Q,re);var{values:se,C:te}=C(G,z,J,le,Q);if(Q){var ae=M(G,z,te,re,se,J,le);return{values:se,eigenvectors:ae}}return{values:se}}function A(G,z,J,le,Q){var re=le==="BigNumber",se=le==="Complex",te=re?l(0):0,ae=re?l(1):se?E(1):1,fe=re?l(1):1,ne=re?l(10):2,xe=i(ne,ne),$e;Q&&($e=Array(z).fill(ae));for(var k=!1;!k;){k=!0;for(var W=0;W<z;W++){for(var ue=te,j=te,K=0;K<z;K++)W!==K&&(ue=r(ue,u(G[K][W])),j=r(j,u(G[W][K])));if(!g(ue,0)&&!g(j,0)){for(var oe=fe,he=ue,me=o(j,ne),I=i(j,ne);w(he,me);)he=i(he,xe),oe=i(oe,ne);for(;h(he,I);)he=o(he,xe),oe=o(oe,ne);var H=w(o(r(he,j),oe),i(r(ue,j),.95));if(H){k=!1;for(var ie=o(1,oe),ce=0;ce<z;ce++)W!==ce&&(G[W][ce]=i(G[W][ce],ie),G[ce][W]=i(G[ce][W],oe));Q&&($e[W]=i($e[W],ie))}}}}return Q?c($e):null}function S(G,z,J,le,Q,re){var se=le==="BigNumber",te=le==="Complex",ae=se?l(0):te?E(0):0;se&&(J=l(J));for(var fe=0;fe<z-2;fe++){for(var ne=0,xe=ae,$e=fe+1;$e<z;$e++){var k=G[$e][fe];w(u(xe),u(k))&&(xe=k,ne=$e)}if(!w(u(xe),J)){if(ne!==fe+1){var W=G[ne];G[ne]=G[fe+1],G[fe+1]=W;for(var ue=0;ue<z;ue++){var j=G[ue][ne];G[ue][ne]=G[ue][fe+1],G[ue][fe+1]=j}if(Q){var K=re[ne];re[ne]=re[fe+1],re[fe+1]=K}}for(var oe=fe+2;oe<z;oe++){var he=o(G[oe][fe],xe);if(he!==0){for(var me=0;me<z;me++)G[oe][me]=t(G[oe][me],i(he,G[fe+1][me]));for(var I=0;I<z;I++)G[I][fe+1]=r(G[I][fe+1],i(he,G[I][oe]));if(Q)for(var H=0;H<z;H++)re[oe][H]=t(re[oe][H],i(he,re[fe+1][H]))}}}}return re}function C(G,z,J,le,Q){var re=le==="BigNumber",se=le==="Complex",te=re?l(1):se?E(1):1;re&&(J=l(J));for(var ae=We(G),fe=[],ne=z,xe=[],$e=Q?c(Array(z).fill(te)):void 0,k=Q?c(Array(ne).fill(te)):void 0,W=0;W<=100;){W+=1;for(var ue=ae[ne-1][ne-1],j=0;j<ne;j++)ae[j][j]=t(ae[j][j],ue);var{Q:K,R:oe}=v(ae);ae=a(oe,K);for(var he=0;he<ne;he++)ae[he][he]=r(ae[he][he],ue);if(Q&&(k=a(k,K)),ne===1||w(u(ae[ne-1][ne-2]),J)){W=0,fe.push(ae[ne-1][ne-1]),Q&&(xe.unshift([[1]]),P(k,z),$e=a($e,k),ne>1&&(k=c(Array(ne-1).fill(te)))),ne-=1,ae.pop();for(var me=0;me<ne;me++)ae[me].pop()}else if(ne===2||w(u(ae[ne-2][ne-3]),J)){W=0;var I=$(ae[ne-2][ne-2],ae[ne-2][ne-1],ae[ne-1][ne-2],ae[ne-1][ne-1]);fe.push(...I),Q&&(xe.unshift(B(ae[ne-2][ne-2],ae[ne-2][ne-1],ae[ne-1][ne-2],ae[ne-1][ne-1],I[0],I[1],J,le)),P(k,z),$e=a($e,k),ne>2&&(k=c(Array(ne-2).fill(te)))),ne-=2,ae.pop(),ae.pop();for(var H=0;H<ne;H++)ae[H].pop(),ae[H].pop()}if(ne===0)break}if(fe.sort((de,ve)=>+t(u(de),u(ve))),W>100){var ie=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+fe.join(", "));throw ie.values=fe,ie.vectors=[],ie}var ce=Q?a($e,R(xe,z)):void 0;return{values:fe,C:ce}}function M(G,z,J,le,Q,re,se){var te=d(J),ae=a(te,G,J),fe=se==="BigNumber",ne=se==="Complex",xe=fe?l(0):ne?E(0):0,$e=fe?l(1):ne?E(1):1,k=[],W=[];for(var ue of Q){var j=N(k,ue,g);j===-1?(k.push(ue),W.push(1)):W[j]+=1}for(var K=[],oe=k.length,he=Array(z).fill(xe),me=c(Array(z).fill($e)),I=function(){var ce=k[H],de=t(ae,a(ce,me)),ve=y(de,he);for(ve.shift();ve.length<W[H];){var Se=O(de,z,ve,re,se);if(Se===null)break;ve.push(Se)}var we=a(d(le),J);ve=ve.map(Te=>a(we,Te)),K.push(...ve.map(Te=>({value:ce,vector:n(Te)})))},H=0;H<oe;H++)I();return K}function $(G,z,J,le){var Q=r(G,le),re=t(i(G,le),i(z,J)),se=i(Q,.5),te=i(s(t(i(Q,Q),i(4,re))),.5);return[r(se,te),t(se,te)]}function B(G,z,J,le,Q,re,se,te){var ae=te==="BigNumber",fe=te==="Complex",ne=ae?l(0):fe?E(0):0,xe=ae?l(1):fe?E(1):1;if(w(u(J),se))return[[xe,ne],[ne,xe]];if(h(u(t(Q,re)),se))return[[t(Q,le),t(re,le)],[J,J]];var $e=t(G,Q),k=t(le,Q);return w(u(z),se)&&w(u(k),se)?[[$e,xe],[J,ne]]:[[z,ne],[k,xe]]}function P(G,z){for(var J=0;J<G.length;J++)G[J].push(...Array(z-G[J].length).fill(0));for(var le=G.length;le<z;le++)G.push(Array(z).fill(0)),G[le][le]=1;return G}function R(G,z){for(var J=[],le=0;le<z;le++)J[le]=Array(z).fill(0);var Q=0;for(var re of G){for(var se=re.length,te=0;te<se;te++)for(var ae=0;ae<se;ae++)J[Q+te][Q+ae]=re[te][ae];Q+=se}return J}function N(G,z,J){for(var le=0;le<G.length;le++)if(J(G[le],z))return le;return-1}function O(G,z,J,le,Q){for(var re=Q==="BigNumber"?l(1e3):1e3,se,te=0;te<5;++te){se=U(z,J,Q);try{se=m(G,se)}catch{continue}if(h(q(se),re))break}if(te>=5)return null;for(te=0;;){var ae=m(G,se);if(w(q(F(se,[ae])),le))break;if(++te>=10)return null;se=Y(ae)}return se}function U(G,z,J){var le=J==="BigNumber",Q=J==="Complex",re=Array(G).fill(0).map(se=>2*Math.random()-1);return le&&(re=re.map(se=>l(se))),Q&&(re=re.map(se=>E(se))),re=F(re,z),Y(re,J)}function F(G,z){var J=f(G);for(var le of z)le=p(le,J),G=t(G,a(o(b(le,G),b(le,le)),le));return G}function q(G){return u(s(b(G,G)))}function Y(G,z){var J=z==="BigNumber",le=z==="Complex",Q=J?l(1):le?E(1):1;return a(o(Q,q(G)),G)}return D}function Fee(e){var{config:r,addScalar:t,subtract:n,abs:a,atan:i,cos:o,sin:s,multiplyScalar:u,inv:l,bignumber:c,multiply:f,add:p}=e;function d(S,C){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.relTol,$=arguments.length>3?arguments[3]:void 0,B=arguments.length>4?arguments[4]:void 0;if($==="number")return v(S,M,B);if($==="BigNumber")return m(S,M,B);throw TypeError("Unsupported data type: "+$)}function v(S,C,M){var $=S.length,B=Math.abs(C/$),P,R;if(M){R=new Array($);for(var N=0;N<$;N++)R[N]=Array($).fill(0),R[N][N]=1}for(var O=b(S);Math.abs(O[1])>=Math.abs(B);){var U=O[0][0],F=O[0][1];P=y(S[U][U],S[F][F],S[U][F]),S=x(S,P,U,F),M&&(R=E(R,P,U,F)),O=b(S)}for(var q=Array($).fill(0),Y=0;Y<$;Y++)q[Y]=S[Y][Y];return A(We(q),R,M)}function m(S,C,M){var $=S.length,B=a(C/$),P,R;if(M){R=new Array($);for(var N=0;N<$;N++)R[N]=Array($).fill(0),R[N][N]=1}for(var O=D(S);a(O[1])>=a(B);){var U=O[0][0],F=O[0][1];P=g(S[U][U],S[F][F],S[U][F]),S=w(S,P,U,F),M&&(R=h(R,P,U,F)),O=D(S)}for(var q=Array($).fill(0),Y=0;Y<$;Y++)q[Y]=S[Y][Y];return A(We(q),R,M)}function y(S,C,M){var $=C-S;return Math.abs($)<=r.relTol?Math.PI/4:.5*Math.atan(2*M/(C-S))}function g(S,C,M){var $=n(C,S);return a($)<=r.relTol?c(-1).acos().div(4):u(.5,i(f(2,M,l($))))}function E(S,C,M,$){for(var B=S.length,P=Math.cos(C),R=Math.sin(C),N=Array(B).fill(0),O=Array(B).fill(0),U=0;U<B;U++)N[U]=P*S[U][M]-R*S[U][$],O[U]=R*S[U][M]+P*S[U][$];for(var F=0;F<B;F++)S[F][M]=N[F],S[F][$]=O[F];return S}function h(S,C,M,$){for(var B=S.length,P=o(C),R=s(C),N=Array(B).fill(c(0)),O=Array(B).fill(c(0)),U=0;U<B;U++)N[U]=n(u(P,S[U][M]),u(R,S[U][$])),O[U]=t(u(R,S[U][M]),u(P,S[U][$]));for(var F=0;F<B;F++)S[F][M]=N[F],S[F][$]=O[F];return S}function w(S,C,M,$){for(var B=S.length,P=c(o(C)),R=c(s(C)),N=u(P,P),O=u(R,R),U=Array(B).fill(c(0)),F=Array(B).fill(c(0)),q=f(c(2),P,R,S[M][$]),Y=t(n(u(N,S[M][M]),q),u(O,S[$][$])),G=p(u(O,S[M][M]),q,u(N,S[$][$])),z=0;z<B;z++)U[z]=n(u(P,S[M][z]),u(R,S[$][z])),F[z]=t(u(R,S[M][z]),u(P,S[$][z]));S[M][M]=Y,S[$][$]=G,S[M][$]=c(0),S[$][M]=c(0);for(var J=0;J<B;J++)J!==M&&J!==$&&(S[M][J]=U[J],S[J][M]=U[J],S[$][J]=F[J],S[J][$]=F[J]);return S}function x(S,C,M,$){for(var B=S.length,P=Math.cos(C),R=Math.sin(C),N=P*P,O=R*R,U=Array(B).fill(0),F=Array(B).fill(0),q=N*S[M][M]-2*P*R*S[M][$]+O*S[$][$],Y=O*S[M][M]+2*P*R*S[M][$]+N*S[$][$],G=0;G<B;G++)U[G]=P*S[M][G]-R*S[$][G],F[G]=R*S[M][G]+P*S[$][G];S[M][M]=q,S[$][$]=Y,S[M][$]=0,S[$][M]=0;for(var z=0;z<B;z++)z!==M&&z!==$&&(S[M][z]=U[z],S[z][M]=U[z],S[$][z]=F[z],S[z][$]=F[z]);return S}function b(S){for(var C=S.length,M=0,$=[0,1],B=0;B<C;B++)for(var P=B+1;P<C;P++)Math.abs(M)<Math.abs(S[B][P])&&(M=Math.abs(S[B][P]),$=[B,P]);return[$,M]}function D(S){for(var C=S.length,M=0,$=[0,1],B=0;B<C;B++)for(var P=B+1;P<C;P++)a(M)<a(S[B][P])&&(M=a(S[B][P]),$=[B,P]);return[$,M]}function A(S,C,M){var $=S.length,B=Array($),P;if(M){P=Array($);for(var R=0;R<$;R++)P[R]=Array($)}for(var N=0;N<$;N++){for(var O=0,U=S[0],F=0;F<S.length;F++)a(S[F])<a(U)&&(O=F,U=S[O]);if(B[N]=S.splice(O,1)[0],M)for(var q=0;q<$;q++)P[N][q]=C[q][O],C[q].splice(O,1)}if(!M)return{values:B};var Y=P.map((G,z)=>({value:B[z],vector:G}));return{values:B,eigenvectors:Y}}return d}var Bee="eigs",Ree=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],Pee=L(Bee,Ree,e=>{var{config:r,typed:t,matrix:n,addScalar:a,subtract:i,equal:o,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,divideScalar:p,inv:d,bignumber:v,multiply:m,add:y,larger:g,column:E,flatten:h,number:w,complex:x,sqrt:b,diag:D,size:A,reshape:S,qr:C,usolve:M,usolveAll:$,im:B,re:P,smaller:R,matrixFromColumns:N,dot:O}=e,U=Fee({config:r,addScalar:a,subtract:i,column:E,flatten:h,equal:o,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,inv:d,bignumber:v,complex:x,multiply:m,add:y}),F=$ee({config:r,addScalar:a,subtract:i,multiply:m,multiplyScalar:f,flatten:h,divideScalar:p,sqrt:b,abs:s,bignumber:v,diag:D,size:A,reshape:S,qr:C,inv:d,usolve:M,usolveAll:$,equal:o,complex:x,larger:g,smaller:R,matrixFromColumns:N,dot:O});return t("eigs",{Array:function(re){return q(n(re))},"Array, number|BigNumber":function(re,se){return q(n(re),{precision:se})},"Array, Object"(Q,re){return q(n(Q),re)},Matrix:function(re){return q(re,{matricize:!0})},"Matrix, number|BigNumber":function(re,se){return q(re,{precision:se,matricize:!0})},"Matrix, Object":function(re,se){var te={matricize:!0};return Hr(te,se),q(re,te)}});function q(Q){var re,se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te="eigenvectors"in se?se.eigenvectors:!0,ae=(re=se.precision)!==null&&re!==void 0?re:r.relTol,fe=Y(Q,ae,te);return se.matricize&&(fe.values=n(fe.values),te&&(fe.eigenvectors=fe.eigenvectors.map(ne=>{var{value:xe,vector:$e}=ne;return{value:xe,vector:n($e)}}))),te&&Object.defineProperty(fe,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),fe}function Y(Q,re,se){var te=Q.toArray(),ae=Q.size();if(ae.length!==2||ae[0]!==ae[1])throw new RangeError("Matrix must be square (size: ".concat(tr(ae),")"));var fe=ae[0];if(z(te,fe,re)&&(J(te,fe),G(te,fe,re))){var ne=le(Q,te,fe);return U(te,fe,re,ne,se)}var xe=le(Q,te,fe);return F(te,fe,re,xe,se)}function G(Q,re,se){for(var te=0;te<re;te++)for(var ae=te;ae<re;ae++)if(g(v(s(i(Q[te][ae],Q[ae][te]))),se))return!1;return!0}function z(Q,re,se){for(var te=0;te<re;te++)for(var ae=0;ae<re;ae++)if(g(v(s(B(Q[te][ae]))),se))return!1;return!0}function J(Q,re){for(var se=0;se<re;se++)for(var te=0;te<re;te++)Q[se][te]=P(Q[se][te])}function le(Q,re,se){var te=Q.datatype();if(te==="number"||te==="BigNumber"||te==="Complex")return te;for(var ae=!1,fe=!1,ne=!1,xe=0;xe<se;xe++)for(var $e=0;$e<se;$e++){var k=re[xe][$e];if(Je(k)||So(k))ae=!0;else if(Qe(k))fe=!0;else if(bn(k))ne=!0;else throw TypeError("Unsupported type in Matrix: "+Cr(k))}if(fe&&ne&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),ne){for(var W=0;W<se;W++)for(var ue=0;ue<se;ue++)re[W][ue]=x(re[W][ue]);return"Complex"}if(fe){for(var j=0;j<se;j++)for(var K=0;K<se;K++)re[j][K]=v(re[j][K]);return"BigNumber"}if(ae){for(var oe=0;oe<se;oe++)for(var he=0;he<se;he++)re[oe][he]=w(re[oe][he]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),f1="expm",zee=["typed","abs","add","identity","inv","multiply"],Iee=L(f1,zee,e=>{var{typed:r,abs:t,add:n,identity:a,inv:i,multiply:o}=e;return r(f1,{Matrix:function(f){var p=f.size();if(p.length!==2||p[0]!==p[1])throw new RangeError("Matrix must be square (size: "+tr(p)+")");for(var d=p[0],v=1e-15,m=s(f),y=u(m,v),g=y.q,E=y.j,h=o(f,Math.pow(2,-E)),w=a(d),x=a(d),b=1,D=h,A=-1,S=1;S<=g;S++)S>1&&(D=o(D,h),A=-A),b=b*(g-S+1)/((2*g-S+1)*S),w=n(w,o(b,D)),x=n(x,o(b*A,D));for(var C=o(i(x),w),M=0;M<E;M++)C=o(C,C);return ea(f)?f.createSparseMatrix(C):C}});function s(c){for(var f=c.size()[0],p=0,d=0;d<f;d++){for(var v=0,m=0;m<f;m++)v+=t(c.get([d,m]));p=Math.max(v,p)}return p}function u(c,f){for(var p=30,d=0;d<p;d++)for(var v=0;v<=d;v++){var m=d-v;if(l(c,v,m)<f)return{q:v,j:m}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function l(c,f,p){for(var d=1,v=2;v<=f;v++)d*=v;for(var m=d,y=f+1;y<=2*f;y++)m*=y;var g=m*(2*f+1);return 8*Math.pow(c/Math.pow(2,p),2*f)*d*d/(m*g)}}),p1="sqrtm",Lee=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],qee=L(p1,Lee,e=>{var{typed:r,abs:t,add:n,multiply:a,map:i,sqrt:o,subtract:s,inv:u,size:l,max:c,identity:f}=e,p=1e3,d=1e-6;function v(m){var y,g=0,E=m,h=f(l(m));do{var w=E;if(E=a(.5,n(w,u(h))),h=a(.5,n(h,u(w))),y=c(t(s(E,w))),y>d&&++g>p)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return E}return r(p1,{"Array | Matrix":function(y){var g=Ue(y)?y.size():Ke(y);switch(g.length){case 1:if(g[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+tr(g)+")");case 2:{var E=g[0],h=g[1];if(E===h)return v(y);throw new RangeError("Matrix must be square (size: "+tr(g)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+tr(g)+")")}}})}),d1="sylvester",kee=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],Uee=L(d1,kee,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:s,transpose:u,index:l,subset:c,add:f,subtract:p,identity:d,lusolve:v,abs:m}=e;return r(d1,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(E,h,w){return y(a(E),h,w)},"Array, Array, Matrix":function(E,h,w){return y(a(E),a(h),w)},"Array, Matrix, Array":function(E,h,w){return y(a(E),h,a(w))},"Matrix, Array, Matrix":function(E,h,w){return y(E,a(h),w)},"Matrix, Array, Array":function(E,h,w){return y(E,a(h),a(w))},"Matrix, Matrix, Array":function(E,h,w){return y(E,h,a(w))},"Array, Array, Array":function(E,h,w){return y(a(E),a(h),a(w)).toArray()}});function y(g,E,h){for(var w=E.size()[0],x=g.size()[0],b=t(g),D=b.T,A=b.U,S=t(i(-1,E)),C=S.T,M=S.U,$=i(i(u(A),h),M),B=o(0,x),P=[],R=(ne,xe)=>s(ne,xe,1),N=(ne,xe)=>s(ne,xe,0),O=0;O<w;O++)if(O<w-1&&m(c(C,l(O+1,O)))>1e-5){for(var U=N(c($,l(B,O)),c($,l(B,O+1))),F=0;F<O;F++)U=f(U,N(i(P[F],c(C,l(F,O))),i(P[F],c(C,l(F,O+1)))));var q=i(d(x),i(-1,c(C,l(O,O)))),Y=i(d(x),i(-1,c(C,l(O+1,O)))),G=i(d(x),i(-1,c(C,l(O,O+1)))),z=i(d(x),i(-1,c(C,l(O+1,O+1)))),J=N(R(f(D,q),Y),R(G,f(D,z))),le=v(J,U);P[O]=le.subset(l(o(0,x),0)),P[O+1]=le.subset(l(o(x,2*x),0)),O++}else{for(var Q=c($,l(B,O)),re=0;re<O;re++)Q=f(Q,i(P[re],c(C,l(re,O))));var se=c(C,l(O,O)),te=p(D,i(se,d(x)));P[O]=v(te,Q)}var ae=a(n(...P)),fe=i(A,i(ae,u(M)));return fe}}),v1="schur",Hee=["typed","matrix","identity","multiply","qr","norm","subtract"],jee=L(v1,Hee,e=>{var{typed:r,matrix:t,identity:n,multiply:a,qr:i,norm:o,subtract:s}=e;return r(v1,{Array:function(c){var f=u(t(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return u(c)}});function u(l){var c=l.size()[0],f=l,p=n(c),d=0,v;do{v=f;var m=i(f),y=m.Q,g=m.R;if(f=a(g,y),p=a(p,y),d++>100)break}while(o(s(f,v))>1e-4);return{U:p,T:f}}}),m1="lyap",Vee=["typed","matrix","sylvester","multiply","transpose"],Gee=L(m1,Vee,e=>{var{typed:r,matrix:t,sylvester:n,multiply:a,transpose:i}=e;return r(m1,{"Matrix, Matrix":function(s,u){return n(s,i(s),a(-1,u))},"Array, Matrix":function(s,u){return n(t(s),i(t(s)),a(-1,u))},"Matrix, Array":function(s,u){return n(s,i(t(s)),t(a(-1,u)))},"Array, Array":function(s,u){return n(t(s),i(t(s)),t(a(-1,u))).toArray()}})}),Wee="divide",Zee=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Yee=L(Wee,Zee,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,s=tt({typed:r,equalScalar:a}),u=tn({typed:r});return r("divide",x2({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return u(c,f,i,!1)},"SparseMatrix, any":function(c,f){return s(c,f,i,!1)},"Array, any":function(c,f){return u(t(c),f,i,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},i.signatures))}),h1="distance",Xee=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Kee=L(h1,Xee,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:s,abs:u}=e;return r(h1,{"Array, Array, Array":function(x,b,D){if(x.length===2&&b.length===2&&D.length===2){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(D))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,D))throw new TypeError("LinePoint1 should not be same with LinePoint2");var A=n(D[1],b[1]),S=n(b[0],D[0]),C=n(a(D[0],b[1]),a(b[0],D[1]));return y(x[0],x[1],A,S,C)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(x,b,D){if(Object.keys(x).length===2&&Object.keys(b).length===2&&Object.keys(D).length===2){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(D))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(v(b),v(D)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in x&&"pointY"in x&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in D&&"lineTwoPtY"in D){var A=n(D.lineTwoPtY,b.lineOnePtY),S=n(b.lineOnePtX,D.lineTwoPtX),C=n(a(D.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,D.lineTwoPtY));return y(x.pointX,x.pointY,A,S,C)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(x,b){if(x.length===2&&b.length===3){if(!c(x))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(x[0],x[1],b[0],b[1],b[2])}else if(x.length===3&&b.length===6){if(!f(x))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return g(x[0],x[1],x[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(x.length===b.length&&x.length>0){if(!p(x))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!p(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return E(x,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(x,b){if(Object.keys(x).length===2&&Object.keys(b).length===3){if(!c(x))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return y(x.pointX,x.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(b).length===6){if(!f(x))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in x&&"pointY"in x&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return g(x.pointX,x.pointY,x.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===2&&Object.keys(b).length===2){if(!c(x))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointTwoX"in b&&"pointTwoY"in b)return E([x.pointOneX,x.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(x).length===3&&Object.keys(b).length===3){if(!f(x))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in x&&"pointOneY"in x&&"pointOneZ"in x&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return E([x.pointOneX,x.pointOneY,x.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(x){if(!m(x))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return h(x)}});function l(w){return typeof w=="number"||Qe(w)}function c(w){return w.constructor!==Array&&(w=v(w)),l(w[0])&&l(w[1])}function f(w){return w.constructor!==Array&&(w=v(w)),l(w[0])&&l(w[1])&&l(w[2])}function p(w){return Array.isArray(w)||(w=v(w)),w.every(l)}function d(w){return w.constructor!==Array&&(w=v(w)),l(w[0])&&l(w[1])&&l(w[2])&&l(w[3])&&l(w[4])&&l(w[5])}function v(w){for(var x=Object.keys(w),b=[],D=0;D<x.length;D++)b.push(w[x[D]]);return b}function m(w){if(w[0].length===2&&l(w[0][0])&&l(w[0][1])){if(w.some(x=>x.length!==2||!l(x[0])||!l(x[1])))return!1}else if(w[0].length===3&&l(w[0][0])&&l(w[0][1])&&l(w[0][2])){if(w.some(x=>x.length!==3||!l(x[0])||!l(x[1])||!l(x[2])))return!1}else return!1;return!0}function y(w,x,b,D,A){var S=u(t(t(a(b,w),a(D,x)),A)),C=s(t(a(b,b),a(D,D)));return i(S,C)}function g(w,x,b,D,A,S,C,M,$){var B=[n(a(n(A,x),$),a(n(S,b),M)),n(a(n(S,b),C),a(n(D,w),$)),n(a(n(D,w),M),a(n(A,x),C))];B=s(t(t(a(B[0],B[0]),a(B[1],B[1])),a(B[2],B[2])));var P=s(t(t(a(C,C),a(M,M)),a($,$)));return i(B,P)}function E(w,x){for(var b=w.length,D=0,A=0,S=0;S<b;S++)A=n(w[S],x[S]),D=t(a(A,A),D);return s(D)}function h(w){for(var x=[],b=[],D=[],A=0;A<w.length-1;A++)for(var S=A+1;S<w.length;S++)w[0].length===2?(b=[w[A][0],w[A][1]],D=[w[S][0],w[S][1]]):w[0].length===3&&(b=[w[A][0],w[A][1],w[A][2]],D=[w[S][0],w[S][1],w[S][2]]),x.push(E(b,D));return x}}),Jee="intersect",Qee=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],ere=L(Jee,Qee,e=>{var{typed:r,config:t,abs:n,add:a,addScalar:i,matrix:o,multiply:s,multiplyScalar:u,divideScalar:l,subtract:c,smaller:f,equalScalar:p,flatten:d,isZero:v,isNumeric:m}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":g,"Matrix, Matrix, Matrix":function(M,$,B){var P=y(M.valueOf(),$.valueOf(),B.valueOf());return P===null?null:o(P)},"Matrix, Matrix, Matrix, Matrix":function(M,$,B,P){var R=g(M.valueOf(),$.valueOf(),B.valueOf(),P.valueOf());return R===null?null:o(R)}});function y(C,M,$){if(C=E(C),M=E(M),$=E($),!w(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(M))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x($))throw new TypeError("Array with 4 numbers expected as third argument");return S(C[0],C[1],C[2],M[0],M[1],M[2],$[0],$[1],$[2],$[3])}function g(C,M,$,B){if(C=E(C),M=E(M),$=E($),B=E(B),C.length===2){if(!h(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!h(M))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!h($))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!h(B))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(C,M,$,B)}else if(C.length===3){if(!w(C))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(M))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w($))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!w(B))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return A(C[0],C[1],C[2],M[0],M[1],M[2],$[0],$[1],$[2],B[0],B[1],B[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function E(C){return C.length===1?C[0]:C.length>1&&Array.isArray(C[0])&&C.every(M=>Array.isArray(M)&&M.length===1)?d(C):C}function h(C){return C.length===2&&m(C[0])&&m(C[1])}function w(C){return C.length===3&&m(C[0])&&m(C[1])&&m(C[2])}function x(C){return C.length===4&&m(C[0])&&m(C[1])&&m(C[2])&&m(C[3])}function b(C,M,$,B){var P=C,R=$,N=c(P,M),O=c(R,B),U=c(u(N[0],O[1]),u(O[0],N[1]));if(v(U)||f(n(U),t.relTol))return null;var F=u(O[0],P[1]),q=u(O[1],P[0]),Y=u(O[0],R[1]),G=u(O[1],R[0]),z=l(i(c(c(F,q),Y),G),U);return a(s(N,z),P)}function D(C,M,$,B,P,R,N,O,U,F,q,Y){var G=u(c(C,M),c($,B)),z=u(c(P,R),c(N,O)),J=u(c(U,F),c(q,Y));return i(i(G,z),J)}function A(C,M,$,B,P,R,N,O,U,F,q,Y){var G=D(C,N,F,N,M,O,q,O,$,U,Y,U),z=D(F,N,B,C,q,O,P,M,Y,U,R,$),J=D(C,N,B,C,M,O,P,M,$,U,R,$),le=D(F,N,F,N,q,O,q,O,Y,U,Y,U),Q=D(B,C,B,C,P,M,P,M,R,$,R,$),re=c(u(G,z),u(J,le)),se=c(u(Q,le),u(z,z));if(v(se))return null;var te=l(re,se),ae=l(i(G,u(te,z)),le),fe=i(C,u(te,c(B,C))),ne=i(M,u(te,c(P,M))),xe=i($,u(te,c(R,$))),$e=i(N,u(ae,c(F,N))),k=i(O,u(ae,c(q,O))),W=i(U,u(ae,c(Y,U)));return p(fe,$e)&&p(ne,k)&&p(xe,W)?[fe,ne,xe]:null}function S(C,M,$,B,P,R,N,O,U,F){var q=u(C,N),Y=u(B,N),G=u(M,O),z=u(P,O),J=u($,U),le=u(R,U),Q=c(c(c(F,q),G),J),re=c(c(c(i(i(Y,z),le),q),G),J),se=l(Q,re),te=i(C,u(se,c(B,C))),ae=i(M,u(se,c(P,M))),fe=i($,u(se,c(R,$)));return[te,ae,fe]}}),g1="sum",rre=["typed","config","add","numeric"],gx=L(g1,rre,e=>{var{typed:r,config:t,add:n,numeric:a}=e;return r(g1,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(Di(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(s){var u;return An(s,function(l){try{u=u===void 0?l:n(u,l)}catch(c){throw dt(c,"sum",l)}}),u===void 0&&(u=a(0,t.number)),typeof u=="string"&&(u=a(u,jn(u,t))),u}function o(s,u){try{var l=Tu(s,u,n);return l}catch(c){throw dt(c,"sum")}}}),fs="cumsum",tre=["typed","add","unaryPlus"],yx=L(fs,tre,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(fs,{Array:a,Matrix:function(l){return l.create(a(l.valueOf()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(l,c){return l.create(o(l.valueOf(),c))},"...":function(l){if(Di(l))throw new TypeError("All values expected to be scalar in function cumsum");return a(l)}});function a(u){try{return i(u)}catch(l){throw dt(l,fs)}}function i(u){if(u.length===0)return[];for(var l=[n(u[0])],c=1;c<u.length;++c)l.push(t(l[c-1],u[c]));return l}function o(u,l){var c=Ke(u);if(l<0||l>=c.length)throw new en(l,c.length);try{return s(u,l)}catch(f){throw dt(f,fs)}}function s(u,l){var c,f,p;if(l<=0){var d=u[0][0];if(Array.isArray(d)){for(p=rb(u),f=[],c=0;c<p.length;c++)f[c]=s(p[c],l-1);return f}else return i(u)}else{for(f=[],c=0;c<u.length;c++)f[c]=s(u[c],l-1);return f}}}),y1="mean",nre=["typed","add","divide"],bx=L(y1,nre,e=>{var{typed:r,add:t,divide:n}=e;return r(y1,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(s){if(Di(s))throw new TypeError("Scalar values expected in function mean");return i(s)}});function a(o,s){try{var u=Tu(o,s,t),l=Array.isArray(o)?Ke(o):o.size();return n(u,l[s])}catch(c){throw dt(c,"mean")}}function i(o){var s,u=0;if(An(o,function(l){try{s=s===void 0?l:t(s,l),u++}catch(c){throw dt(c,"mean",l)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,u)}}),b1="median",are=["typed","add","divide","compare","partitionSelect"],ire=L(b1,are,e=>{var{typed:r,add:t,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=mr(l.valueOf());var c=l.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,p=i(l,f+1),d=l[f],v=0;v<f;++v)a(l[v],d)>0&&(d=l[v]);return u(d,p)}else{var m=i(l,(c-1)/2);return s(m)}}catch(y){throw dt(y,"median")}}var s=r({"number | BigNumber | Complex | Unit":function(c){return c}}),u=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(t(c,f),2)}});return r(b1,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(Di(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),x1="mad",ore=["typed","abs","map","median","subtract"],sre=L(x1,ore,e=>{var{typed:r,abs:t,map:n,median:a,subtract:i}=e;return r(x1,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(s){if(s=mr(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(s);return a(n(s,function(l){return t(i(l,u))}))}catch(l){throw l instanceof TypeError&&l.message.includes("median")?new TypeError(l.message.replace("median","mad")):dt(l,"mad")}}}),Sl="unbiased",w1="variance",ure=["typed","add","subtract","multiply","divide","apply","isNaN"],xx=L(w1,ure,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:s}=e;return r(w1,{"Array | Matrix":function(f){return u(f,Sl)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,p){return l(f,p,Sl)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return u(f,Sl)}});function u(c,f){var p,d=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(An(c,function(y){try{p=p===void 0?y:t(p,y),d++}catch(g){throw dt(g,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var v=i(p,d);if(p=void 0,An(c,function(y){var g=n(y,v);p=p===void 0?a(g,g):t(p,a(g,g))}),s(p))return p;switch(f){case"uncorrected":return i(p,d);case"biased":return i(p,d+1);case"unbiased":{var m=Qe(p)?p.mul(0):0;return d===1?m:i(p,d-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function l(c,f,p){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,d=>u(d,p))}catch(d){throw dt(d,"variance")}}}),E1="quantileSeq",lre=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],wx=L(E1,lre,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:p}=e,d=Pf({typed:r,isInteger:l});return r(E1,{"Array | Matrix, number | BigNumber":(E,h)=>m(E,h,!1),"Array | Matrix, number | BigNumber, number":(E,h,w)=>v(E,h,!1,w,m),"Array | Matrix, number | BigNumber, boolean":m,"Array | Matrix, number | BigNumber, boolean, number":(E,h,w,x)=>v(E,h,w,x,m),"Array | Matrix, Array | Matrix":(E,h)=>y(E,h,!1),"Array | Matrix, Array | Matrix, number":(E,h,w)=>v(E,h,!1,w,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(E,h,w,x)=>v(E,h,w,x,y)});function v(E,h,w,x,b){return d(E,x,D=>b(D,h,w))}function m(E,h,w){var x,b=E.valueOf();if(c(h,0))throw new Error("N/prob must be non-negative");if(f(h,1))return Je(h)?g(b,h,w):t(g(b,h,w));if(p(h,1)){if(!l(h))throw new Error("N must be a positive integer");if(p(h,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var D=n(h,1);x=[];for(var A=0;c(A,h);A++){var S=i(A+1,D);x.push(g(b,S,w))}return Je(h)?x:t(x)}}function y(E,h,w){for(var x=E.valueOf(),b=h.valueOf(),D=[],A=0;A<b.length;++A)D.push(g(x,b[A],w));return D}function g(E,h,w){var x=mr(E),b=x.length;if(b===0)throw new Error("Cannot calculate quantile of an empty sequence");var D=Je(h)?h*(b-1):h.times(b-1),A=Je(h)?Math.floor(D):D.floor().toNumber(),S=Je(h)?D%1:D.minus(A);if(l(D))return w?x[D]:s(x,Je(h)?D:D.valueOf());var C,M;if(w)C=x[A],M=x[A+1];else{M=s(x,A+1),C=x[A];for(var $=0;$<A;++$)u(x[$],C)>0&&(C=x[$])}return n(o(C,a(1,S)),o(M,S))}}),S1="std",cre=["typed","map","sqrt","variance"],Ex=L(S1,cre,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e;return r(S1,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(s){return i(s)}});function i(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return Ht(u)?t(u,n):n(u)}catch(l){throw l instanceof TypeError&&l.message.includes(" variance")?new TypeError(l.message.replace(" variance"," std")):l}}}),A1="corr",fre=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],pre=L(A1,fre,e=>{var{typed:r,matrix:t,sqrt:n,sum:a,add:i,subtract:o,multiply:s,pow:u,divide:l}=e;return r(A1,{"Array, Array":function(d,v){return c(d,v)},"Matrix, Matrix":function(d,v){var m=c(d.toArray(),v.toArray());return Array.isArray(m)?t(m):m}});function c(p,d){var v=[];if(Array.isArray(p[0])&&Array.isArray(d[0])){if(p.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var m=0;m<p.length;m++){if(p[m].length!==d[m].length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");v.push(f(p[m],d[m]))}return v}else{if(p.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(p,d)}}function f(p,d){var v=p.length,m=a(p),y=a(d),g=p.reduce((b,D,A)=>i(b,s(D,d[A])),0),E=a(p.map(b=>u(b,2))),h=a(d.map(b=>u(b,2))),w=o(s(v,g),s(m,y)),x=n(s(o(s(v,E),u(m,2)),o(s(v,h),u(y,2))));return l(w,x)}}),D1="combinations",dre=["typed"],vre=L(D1,dre,e=>{var{typed:r}=e;return r(D1,{"number, number":Ab,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=n.minus(a),l=new i(1);if(!C1(n)||!C1(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=l,a.lt(u))for(s=l;s.lte(u);s=s.plus(l))o=o.times(a.plus(s)).dividedBy(s);else for(s=l;s.lte(a);s=s.plus(l))o=o.times(u.plus(s)).dividedBy(s);return o}})});function C1(e){return e.isInteger()&&e.gte(0)}var N1="combinationsWithRep",mre=["typed"],hre=L(N1,mre,e=>{var{typed:r}=e;return r(N1,{"number, number":function(n,a){if(!ze(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!ze(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a<n-1){var i=yn(n,n+a-1);return i/yn(1,a)}var o=yn(a+1,n+a-1);return o/yn(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=new i(1),l=n.minus(u);if(!M1(n)||!M1(a))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n.lt(u))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(o=u,a.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(a.plus(s)).dividedBy(s);else for(s=u;s.lte(a);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function M1(e){return e.isInteger()&&e.gte(0)}var T1="gamma",gre=["typed","config","multiplyScalar","pow","BigNumber","Complex"],yre=L(T1,gre,e=>{var{typed:r,config:t,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function s(l){if(l.im===0)return Ls(l.re);if(l.re<.5){var c=new o(1-l.re,-l.im),f=new o(Math.PI*l.re,Math.PI*l.im);return new o(Math.PI).div(f.sin()).div(s(c))}l=new o(l.re-1,l.im);for(var p=new o(ri[0],0),d=1;d<ri.length;++d){var v=new o(ri[d],0);p=p.add(v.div(l.add(d)))}var m=new o(l.re+Cb+.5,l.im),y=Math.sqrt(2*Math.PI),g=m.pow(l.add(.5)),E=m.neg().exp();return p.mul(y).mul(g).mul(E)}return r(T1,{number:Ls,Complex:s,BigNumber:function(c){if(c.isInteger())return c.isNegative()||c.isZero()?new i(1/0):u(c.minus(1));if(!c.isFinite())return new i(c.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")}});function u(l){if(l<8)return new i([1,1,2,6,24,120,720,5040][l]);var c=t.precision+(Math.log(l.toNumber())|0),f=i.clone({precision:c});if(l%2===1)return l.times(u(new i(l-1)));for(var p=l,d=new f(l),v=l.toNumber();p>2;)p-=2,v+=p,d=d.times(v);return new i(d.toPrecision(i.precision))}}),O1="lgamma",bre=["Complex","typed"],xre=L(O1,bre,e=>{var{Complex:r,typed:t}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(O1,{number:qs,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(l){var c=6.283185307179586,f=1.1447298858494002,p=.1;if(l.isNaN())return new r(NaN,NaN);if(l.im===0)return new r(qs(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return s(l);if(l.re<=p){var d=oI(c,l.im)*Math.floor(.5*l.re+.25),v=l.mul(Math.PI).sin().log(),m=o(new r(1-l.re,-l.im));return new r(f,d).sub(v).sub(m)}else return l.im>=0?u(l):u(l.conjugate()).conjugate()}function s(l){for(var c=l.sub(.5).mul(l.log()).sub(l).add(Nb),f=new r(1,0).div(l),p=f.div(l),d=i[0],v=i[1],m=2*p.re,y=p.re*p.re+p.im*p.im,g=2;g<8;g++){var E=v;v=-y*d+i[g],d=m*d+E}var h=f.mul(p.mul(d).add(v));return c.add(h)}function u(l){var c=0,f=0,p=l;for(l=l.add(1);l.re<=n;){p=p.mul(l);var d=p.im<0?1:0;d!==0&&f===0&&c++,f=d,l=l.add(1)}return s(l).sub(p.log()).sub(new r(0,c*2*Math.PI*1))}}),_1="factorial",wre=["typed","gamma"],Ere=L(_1,wre,e=>{var{typed:r,gamma:t}=e;return r(_1,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return t(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return t(a.plus(1))},"Array | Matrix":r.referToSelf(n=>a=>rr(a,n))})}),$1="kldivergence",Sre=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],Are=L($1,Sre,e=>{var{typed:r,matrix:t,divide:n,sum:a,multiply:i,map:o,dotDivide:s,log:u,isNumeric:l}=e;return r($1,{"Array, Array":function(p,d){return c(t(p),t(d))},"Matrix, Array":function(p,d){return c(p,t(d))},"Array, Matrix":function(p,d){return c(t(p),d)},"Matrix, Matrix":function(p,d){return c(p,d)}});function c(f,p){var d=p.size().length,v=f.size().length;if(d>1)throw new Error("first object must be one dimensional");if(v>1)throw new Error("second object must be one dimensional");if(d!==v)throw new Error("Length of two vectors must be equal");var m=a(f);if(m===0)throw new Error("Sum of elements in first object must be non zero");var y=a(p);if(y===0)throw new Error("Sum of elements in second object must be non zero");var g=n(f,a(f)),E=n(p,a(p)),h=a(i(g,o(s(g,E),w=>u(w))));return l(h)?h:Number.NaN}}),F1="multinomial",Dre=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Cre=L(F1,Dre,e=>{var{typed:r,add:t,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:s}=e;return r(F1,{"Array | Matrix":function(l){var c=0,f=1;return An(l,function(p){if(!o(p)||!s(p))throw new TypeError("Positive integer value expected in function multinomial");c=t(c,p),f=a(f,i(p))}),n(i(c),f)}})}),B1="permutations",Nre=["typed","factorial"],Mre=L(B1,Nre,e=>{var{typed:r,factorial:t}=e;return r(B1,{"number | BigNumber":t,"number, number":function(a,i){if(!ze(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!ze(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return yn(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,s;if(!R1(a)||!R1(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,s=a.minus(i).plus(1);s.lte(a);s=s.plus(1))o=o.times(s);return o}})});function R1(e){return e.isInteger()&&e.gte(0)}var Hf={exports:{}};Hf.exports;(function(e){(function(r,t,n){function a(u){var l=this,c=s();l.next=function(){var f=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=f-(l.c=f|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(u),l.s0<0&&(l.s0+=1),l.s1-=c(u),l.s1<0&&(l.s1+=1),l.s2-=c(u),l.s2<0&&(l.s2+=1),c=null}function i(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function o(u,l){var c=new a(u),f=l&&l.state,p=c.next;return p.int32=function(){return c.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,f&&(typeof f=="object"&&i(f,c),p.state=function(){return i(c,{})}),p}function s(){var u=4022871197,l=function(c){c=String(c);for(var f=0;f<c.length;f++){u+=c.charCodeAt(f);var p=.02519603282416938*u;u=p>>>0,p-=u,p*=u,u=p>>>0,p-=u,u+=p*4294967296}return(u>>>0)*23283064365386963e-26};return l}t&&t.exports?t.exports=o:this.alea=o})(ye.commonjsGlobal,e)})(Hf);var Tre=Hf.exports,jf={exports:{}};jf.exports;(function(e){(function(r,t,n){function a(s){var u=this,l="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var f=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^f^f>>>8},s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,d=(l.next()>>>0)/4294967296,v=(p+d)/(1<<21);while(v===0);return v},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xor128=o})(ye.commonjsGlobal,e)})(jf);var Ore=jf.exports,Vf={exports:{}};Vf.exports;(function(e){(function(r,t,n){function a(s){var u=this,l="";u.next=function(){var f=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(f^f<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,c==l.length&&(u.d=u.x<<10^u.x>>>4),u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u.v=s.v,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,d=(l.next()>>>0)/4294967296,v=(p+d)/(1<<21);while(v===0);return v},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xorwow=o})(ye.commonjsGlobal,e)})(Vf);var _re=Vf.exports,Gf={exports:{}};Gf.exports;(function(e){(function(r,t,n){function a(s){var u=this;u.next=function(){var c=u.x,f=u.i,p,d;return p=c[f],p^=p>>>7,d=p^p<<24,p=c[f+1&7],d^=p^p>>>10,p=c[f+3&7],d^=p^p>>>3,p=c[f+4&7],d^=p^p<<7,p=c[f+7&7],p=p^p<<13,d^=p^p<<9,c[f]=d,u.i=f+1&7,d};function l(c,f){var p,d=[];if(f===(f|0))d[0]=f;else for(f=""+f,p=0;p<f.length;++p)d[p&7]=d[p&7]<<15^f.charCodeAt(p)+d[p+1&7]<<13;for(;d.length<8;)d.push(0);for(p=0;p<8&&d[p]===0;++p);for(p==8?d[7]=-1:d[p],c.x=d,c.i=0,p=256;p>0;--p)c.next()}l(u,s)}function i(s,u){return u.x=s.x.slice(),u.i=s.i,u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,d=(l.next()>>>0)/4294967296,v=(p+d)/(1<<21);while(v===0);return v},f.int32=l.next,f.quick=f,c&&(c.x&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xorshift7=o})(ye.commonjsGlobal,e)})(Gf);var $re=Gf.exports,Wf={exports:{}};Wf.exports;(function(e){(function(r,t,n){function a(s){var u=this;u.next=function(){var c=u.w,f=u.X,p=u.i,d,v;return u.w=c=c+1640531527|0,v=f[p+34&127],d=f[p=p+1&127],v^=v<<13,d^=d<<17,v^=v>>>15,d^=d>>>12,v=f[p]=v^d,u.i=p,v+(c^c>>>16)|0};function l(c,f){var p,d,v,m,y,g=[],E=128;for(f===(f|0)?(d=f,f=null):(f=f+"\0",d=0,E=Math.max(E,f.length)),v=0,m=-32;m<E;++m)f&&(d^=f.charCodeAt((m+32)%f.length)),m===0&&(y=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,m>=0&&(y=y+1640531527|0,p=g[m&127]^=d+y,v=p==0?v+1:0);for(v>=128&&(g[(f&&f.length||0)&127]=-1),v=127,m=4*128;m>0;--m)d=g[v+34&127],p=g[v=v+1&127],d^=d<<13,p^=p<<17,d^=d>>>15,p^=p>>>12,g[v]=d^p;c.w=y,c.X=g,c.i=v}l(u,s)}function i(s,u){return u.i=s.i,u.w=s.w,u.X=s.X.slice(),u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,d=(l.next()>>>0)/4294967296,v=(p+d)/(1<<21);while(v===0);return v},f.int32=l.next,f.quick=f,c&&(c.X&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.xor4096=o})(ye.commonjsGlobal,e)})(Wf);var Fre=Wf.exports,Zf={exports:{}};Zf.exports;(function(e){(function(r,t,n){function a(s){var u=this,l="";u.next=function(){var f=u.b,p=u.c,d=u.d,v=u.a;return f=f<<25^f>>>7^p,p=p-d|0,d=d<<24^d>>>8^v,v=v-f|0,u.b=f=f<<20^f>>>12^p,u.c=p=p-d|0,u.d=d<<16^p>>>16^v,u.a=v-f|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,s===Math.floor(s)?(u.a=s/4294967296|0,u.b=s|0):l+=s;for(var c=0;c<l.length+20;c++)u.b^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.a=s.a,u.b=s.b,u.c=s.c,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var p=l.next()>>>11,d=(l.next()>>>0)/4294967296,v=(p+d)/(1<<21);while(v===0);return v},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}t&&t.exports?t.exports=o:this.tychei=o})(ye.commonjsGlobal,e)})(Zf);var Bre=Zf.exports,Sx={exports:{}};const Rre={},Pre=Object.freeze(Object.defineProperty({__proto__:null,default:Rre},Symbol.toStringTag,{value:"Module"})),zre=ye.getAugmentedNamespace(Pre);(function(e){(function(r,t,n){var a=256,i=6,o=52,s="random",u=n.pow(a,i),l=n.pow(2,o),c=l*2,f=a-1,p;function d(w,x,b){var D=[];x=x==!0?{entropy:!0}:x||{};var A=g(y(x.entropy?[w,h(t)]:w??E(),3),D),S=new v(D),C=function(){for(var M=S.g(i),$=u,B=0;M<l;)M=(M+B)*a,$*=a,B=S.g(1);for(;M>=c;)M/=2,$/=2,B>>>=1;return(M+B)/$};return C.int32=function(){return S.g(4)|0},C.quick=function(){return S.g(4)/4294967296},C.double=C,g(h(S.S),t),(x.pass||b||function(M,$,B,P){return P&&(P.S&&m(P,S),M.state=function(){return m(S,{})}),B?(n[s]=M,$):M})(C,A,"global"in x?x.global:this==n,x.state)}function v(w){var x,b=w.length,D=this,A=0,S=D.i=D.j=0,C=D.S=[];for(b||(w=[b++]);A<a;)C[A]=A++;for(A=0;A<a;A++)C[A]=C[S=f&S+w[A%b]+(x=C[A])],C[S]=x;(D.g=function(M){for(var $,B=0,P=D.i,R=D.j,N=D.S;M--;)$=N[P=f&P+1],B=B*a+N[f&(N[P]=N[R=f&R+$])+(N[R]=$)];return D.i=P,D.j=R,B})(a)}function m(w,x){return x.i=w.i,x.j=w.j,x.S=w.S.slice(),x}function y(w,x){var b=[],D=typeof w,A;if(x&&D=="object")for(A in w)try{b.push(y(w[A],x-1))}catch{}return b.length?b:D=="string"?w:w+"\0"}function g(w,x){for(var b=w+"",D,A=0;A<b.length;)x[f&A]=f&(D^=x[f&A]*19)+b.charCodeAt(A++);return h(x)}function E(){try{var w;return p&&(w=p.randomBytes)?w=w(a):(w=new Uint8Array(a),(r.crypto||r.msCrypto).getRandomValues(w)),h(w)}catch{var x=r.navigator,b=x&&x.plugins;return[+new Date,r,b,r.screen,h(t)]}}function h(w){return String.fromCharCode.apply(0,w)}if(g(n.random(),t),e.exports){e.exports=d;try{p=zre}catch{}}else n["seed"+s]=d})(typeof self<"u"?self:ye.commonjsGlobal,[],Math)})(Sx);var Ire=Sx.exports,Lre=Tre,qre=Ore,kre=_re,Ure=$re,Hre=Fre,jre=Bre,ga=Ire;ga.alea=Lre;ga.xor128=qre;ga.xorwow=kre;ga.xorshift7=Ure;ga.xor4096=Hre;ga.tychei=jre;var Vre=ga;const Ax=ye.getDefaultExportFromCjs(Vre);var Gre=Ax(Date.now());function ui(e){var r;function t(a){r=a===null?Gre:Ax(String(a))}t(e);function n(){return r()}return n}var P1="pickRandom",Wre=["typed","config","?on"],Zre=L(P1,Wre,e=>{var{typed:r,config:t,on:n}=e,a=ui(t.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(a=ui(o.randomSeed))}),r(P1,{"Array | Matrix":function(s){return i(s,{})},"Array | Matrix, Object":function(s,u){return i(s,u)},"Array | Matrix, number":function(s,u){return i(s,{number:u})},"Array | Matrix, Array | Matrix":function(s,u){return i(s,{weights:u})},"Array | Matrix, Array | Matrix, number":function(s,u,l){return i(s,{number:l,weights:u})},"Array | Matrix, number, Array | Matrix":function(s,u,l){return i(s,{number:u,weights:l})}});function i(o,s){var{number:u,weights:l,elementWise:c=!0}=s,f=typeof u>"u";f&&(u=1);var p=Ue(o)?o.create:Ue(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=mr(o),l=mr(l));var d=0;if(typeof l<"u"){if(l.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var v=0,m=l.length;v<m;v++){if(!Je(l[v])||l[v]<0)throw new Error("Weights must be an array of positive numbers");d+=l[v]}}for(var y=o.length,g=[],E;g.length<u;){if(typeof l>"u")E=o[Math.floor(a()*y)];else for(var h=a()*d,w=0,x=o.length;w<x;w++)if(h-=l[w],h<0){E=o[w];break}g.push(E)}return f?g[0]:p?p(g):g}});function Yf(e,r){var t=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)t.push(Yf(e,r));else for(var i=0,o=e.shift();i<o;i++)t.push(r());return t}var z1="random",Yre=["typed","config","?on"],Xre=L(z1,Yre,e=>{var{typed:r,config:t,on:n}=e,a=ui(t.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=ui(s.randomSeed))}),r(z1,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,u)=>o(s,u),"Array | Matrix":s=>i(s,0,1),"Array | Matrix, number":(s,u)=>i(s,0,u),"Array | Matrix, number, number":(s,u,l)=>i(s,u,l)});function i(s,u,l){var c=Yf(s.valueOf(),()=>o(u,l));return Ue(s)?s.create(c):c}function o(s,u){return s+a()*(u-s)}}),I1="randomInt",Kre=["typed","config","?on"],Jre=L(I1,Kre,e=>{var{typed:r,config:t,on:n}=e,a=ui(t.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=ui(s.randomSeed))}),r(I1,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,u)=>o(s,u),"Array | Matrix":s=>i(s,0,1),"Array | Matrix, number":(s,u)=>i(s,0,u),"Array | Matrix, number, number":(s,u,l)=>i(s,u,l)});function i(s,u,l){var c=Yf(s.valueOf(),()=>o(u,l));return Ue(s)?s.create(c):c}function o(s,u){return Math.floor(s+a()*(u-s))}}),L1="stirlingS2",Qre=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],ete=L(L1,Qre,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:s,combinations:u,isNegative:l,isInteger:c,number:f,bignumber:p,larger:d}=e,v=[],m=[];return r(L1,{"number | BigNumber, number | BigNumber":function(g,E){if(!c(g)||l(g)||!c(E)||l(E))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(E,g))throw new TypeError("k must be less than or equal to n in function stirlingS2");var h=!(Je(g)&&Je(E)),w=h?m:v,x=h?p:f,b=f(g),D=f(E);if(w[b]&&w[b].length>D)return w[b][D];for(var A=0;A<=b;++A)if(w[A]||(w[A]=[x(A===0?1:0)]),A!==0)for(var S=w[A],C=w[A-1],M=S.length;M<=A&&M<=D;++M)M===A?S[M]=1:S[M]=t(a(x(M),C[M]),C[M-1]);return w[b][D]}})}),q1="bellNumbers",rte=["typed","addScalar","isNegative","isInteger","stirlingS2"],tte=L(q1,rte,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:a,stirlingS2:i}=e;return r(q1,{"number | BigNumber":function(s){if(!a(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,l=0;l<=s;l++)u=t(u,i(s,l));return u}})}),k1="catalan",nte=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],ate=L(k1,nte,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:s}=e;return r(k1,{"number | BigNumber":function(l){if(!s(l)||o(l))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(l,2),l),t(l,1))}})}),U1="composition",ite=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],ote=L(U1,ite,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:s}=e;return r(U1,{"number | BigNumber, number | BigNumber":function(l,c){if(!o(l)||!a(l)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,l))throw new TypeError("k must be less than or equal to n in function composition");return n(t(l,-1),t(c,-1))}})}),H1="leafCount",ste=["parse","typed"],ute=L(H1,ste,e=>{var{parse:r,typed:t}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return t(H1,{Node:function(i){return n(i)}})});function j1(e){return cr(e)||kr(e)&&e.isUnary()&&cr(e.args[0])}function Xs(e){return!!(cr(e)||(qn(e)||kr(e))&&e.args.every(Xs)||En(e)&&Xs(e.content))}function V1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function Al(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?V1(Object(t),!0).forEach(function(n){jr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V1(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var lte="simplifyUtil",cte=["FunctionNode","OperatorNode","SymbolNode"],Xf=L(lte,cte,e=>{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",s={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},l={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(h,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,b=o;if(typeof h=="string"?b=h:kr(h)?b=h.fn.toString():qn(h)?b=h.name:En(h)&&(b="paren"),Re(x,b)){var D=x[b];if(Re(D,w))return D[w];if(Re(s,b))return s[b][w]}if(Re(x,o)){var A=x[o];return Re(A,w)?A[w]:s[o][w]}if(Re(s,b)){var S=s[b];if(Re(S,w))return S[w]}return s[o][w]}function f(h){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(h,"commutative",w)}function p(h){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(h,"associative",w)}function d(h,w){var x=Al({},h);for(var b in w)Re(h,b)?x[b]=Al(Al({},w[b]),h[b]):x[b]=w[b];return x}function v(h,w){if(!h.args||h.args.length===0)return h;h.args=m(h,w);for(var x=0;x<h.args.length;x++)v(h.args[x],w)}function m(h,w){var x,b=[],D=function A(S){for(var C=0;C<S.args.length;C++){var M=S.args[C];kr(M)&&x===M.op?A(M):b.push(M)}};return p(h,w)?(x=h.op,D(h),b):h.args}function y(h,w){if(!(!h.args||h.args.length===0)){for(var x=E(h),b=h.args.length,D=0;D<b;D++)y(h.args[D],w);if(b>2&&p(h,w)){for(var A=h.args.pop();h.args.length>0;)A=x([h.args.pop(),A]);h.args=A.args}}}function g(h,w){if(!(!h.args||h.args.length===0)){for(var x=E(h),b=h.args.length,D=0;D<b;D++)g(h.args[D],w);if(b>2&&p(h,w)){for(var A=h.args.shift();h.args.length>0;)A=x([A,h.args.shift()]);h.args=A.args}}}function E(h){return kr(h)?function(w){try{return new t(h.op,h.fn,w,h.implicit)}catch(x){return console.error(x),[]}}:function(w){return new r(new n(h.name),w)}}return{createMakeNodeFunction:E,hasProperty:c,isCommutative:f,isAssociative:p,mergeContext:d,flatten:v,allChildren:m,unflattenr:y,unflattenl:g,defaultContext:s,realContext:u,positiveContext:l}}),fte="simplify",pte=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],dte=L(fte,pte,e=>{var{config:r,typed:t,parse:n,add:a,subtract:i,multiply:o,divide:s,pow:u,isZero:l,equal:c,resolve:f,simplifyConstant:p,simplifyCore:d,fraction:v,bignumber:m,mathWithTransform:y,matrix:g,AccessorNode:E,ArrayNode:h,ConstantNode:w,FunctionNode:x,IndexNode:b,ObjectNode:D,OperatorNode:A,ParenthesisNode:S,SymbolNode:C}=e,{hasProperty:M,isCommutative:$,isAssociative:B,mergeContext:P,flatten:R,unflattenr:N,unflattenl:O,createMakeNodeFunction:U,defaultContext:F,realContext:q,positiveContext:Y}=Xf({FunctionNode:x,OperatorNode:A,SymbolNode:C});t.addConversion({from:"Object",to:"Map",convert:ei});var G=t("simplify",{Node:te,"Node, Map":(j,K)=>te(j,!1,K),"Node, Map, Object":(j,K,oe)=>te(j,!1,K,oe),"Node, Array":te,"Node, Array, Map":te,"Node, Array, Map, Object":te});t.removeConversion({from:"Object",to:"Map",convert:ei}),G.defaultContext=F,G.realContext=q,G.positiveContext=Y;function z(j){return j.transform(function(K,oe,he){return En(K)?z(K.content):K})}var J={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};G.rules=[d,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},p,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},p,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function le(j,K){var oe={};if(j.s){var he=j.s.split("->");if(he.length===2)oe.l=he[0],oe.r=he[1];else throw SyntaxError("Could not parse rule: "+j.s)}else oe.l=j.l,oe.r=j.r;oe.l=z(n(oe.l)),oe.r=z(n(oe.r));for(var me of["imposeContext","repeat","assuming"])me in j&&(oe[me]=j[me]);if(j.evaluate&&(oe.evaluate=n(j.evaluate)),B(oe.l,K)){var I=!$(oe.l,K),H;I&&(H=se());var ie=U(oe.l),ce=se();oe.expanded={},oe.expanded.l=ie([oe.l,ce]),R(oe.expanded.l,K),N(oe.expanded.l,K),oe.expanded.r=ie([oe.r,ce]),I&&(oe.expandedNC1={},oe.expandedNC1.l=ie([H,oe.l]),oe.expandedNC1.r=ie([H,oe.r]),oe.expandedNC2={},oe.expandedNC2.l=ie([H,oe.expanded.l]),oe.expandedNC2.r=ie([H,oe.expanded.r]))}return oe}function Q(j,K){for(var oe=[],he=0;he<j.length;he++){var me=j[he],I=void 0,H=typeof me;switch(H){case"string":me={s:me};case"object":I=le(me,K);break;case"function":I=me;break;default:throw TypeError("Unsupported type of rule: "+H)}oe.push(I)}return oe}var re=0;function se(){return new C("_p"+re++)}function te(j,K){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:io(),he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},me=he.consoleDebug;K=Q(K||G.rules,he.context);var I=f(j,oe);I=z(I);for(var H={},ie=I.toString({parenthesis:"all"});!H[ie];){H[ie]=!0,re=0;var ce=ie;me&&console.log("Working on: ",ie);for(var de=0;de<K.length;de++){var ve="";if(typeof K[de]=="function"?(I=K[de](I,he),me&&(ve=K[de].name)):(R(I,he.context),I=fe(I,K[de],he.context),me&&(ve="".concat(K[de].l.toString()," -> ").concat(K[de].r.toString()))),me){var Se=I.toString({parenthesis:"all"});Se!==ce&&(console.log("Applying",ve,"produced",Se),ce=Se)}O(I,he.context)}ie=I.toString({parenthesis:"all"})}return I}function ae(j,K,oe){var he=j;if(j)for(var me=0;me<j.length;++me){var I=fe(j[me],K,oe);I!==j[me]&&(he===j&&(he=j.slice()),he[me]=I)}return he}function fe(j,K,oe){if(K.assuming){for(var he in K.assuming)for(var me in K.assuming[he])if(M(he,me,oe)!==K.assuming[he][me])return j}var I=P(K.imposeContext,oe),H=j;if(H instanceof A||H instanceof x){var ie=ae(H.args,K,oe);ie!==H.args&&(H=H.clone(),H.args=ie)}else if(H instanceof S){if(H.content){var ce=fe(H.content,K,oe);ce!==H.content&&(H=new S(ce))}}else if(H instanceof h){var de=ae(H.items,K,oe);de!==H.items&&(H=new h(de))}else if(H instanceof E){var ve=H.object;H.object&&(ve=fe(H.object,K,oe));var Se=H.index;H.index&&(Se=fe(H.index,K,oe)),(ve!==H.object||Se!==H.index)&&(H=new E(ve,Se))}else if(H instanceof b){var we=ae(H.dimensions,K,oe);we!==H.dimensions&&(H=new b(we))}else if(H instanceof D){var Te=!1,De={};for(var ir in H.properties)De[ir]=fe(H.properties[ir],K,oe),De[ir]!==H.properties[ir]&&(Te=!0);Te&&(H=new D(De))}var or=K.r,Le=W(K.l,H,I)[0];if(!Le&&K.expanded&&(or=K.expanded.r,Le=W(K.expanded.l,H,I)[0]),!Le&&K.expandedNC1&&(or=K.expandedNC1.r,Le=W(K.expandedNC1.l,H,I)[0],Le||(or=K.expandedNC2.r,Le=W(K.expandedNC2.l,H,I)[0])),Le){var _r=H.implicit;H=or.clone(),_r&&"implicit"in or&&(H.implicit=!0),H=H.transform(function(T){return T.isSymbolNode&&Re(Le.placeholders,T.name)?Le.placeholders[T.name].clone():T})}return K.repeat&&H!==j&&(H=fe(H,K,oe)),H}function ne(j,K){var oe=[],he,me,I=U(j);if($(j,K))for(var H=0;H<j.args.length;H++)me=j.args.slice(0),me.splice(H,1),he=me.length===1?me[0]:I(me),oe.push(I([j.args[H],he]));else for(var ie=1;ie<j.args.length;ie++){var ce=j.args[0];ie>1&&(ce=I(j.args.slice(0,ie))),me=j.args.slice(ie),he=me.length===1?me[0]:I(me),oe.push(I([ce,he]))}return oe}function xe(j,K){var oe={placeholders:{}};if(!j.placeholders&&!K.placeholders)return oe;if(j.placeholders){if(!K.placeholders)return j}else return K;for(var he in j.placeholders)if(Re(j.placeholders,he)&&(oe.placeholders[he]=j.placeholders[he],Re(K.placeholders,he)&&!ue(j.placeholders[he],K.placeholders[he])))return null;for(var me in K.placeholders)Re(K.placeholders,me)&&(oe.placeholders[me]=K.placeholders[me]);return oe}function $e(j,K){var oe=[];if(j.length===0||K.length===0)return oe;for(var he,me=0;me<j.length;me++)for(var I=0;I<K.length;I++)he=xe(j[me],K[I]),he&&oe.push(he);return oe}function k(j){if(j.length===0)return j;for(var K=j.reduce($e),oe=[],he={},me=0;me<K.length;me++){var I=JSON.stringify(K[me]);he[I]||(he[I]=!0,oe.push(K[me]))}return oe}function W(j,K,oe,he){var me=[{placeholders:{}}];if(j instanceof A&&K instanceof A||j instanceof x&&K instanceof x){if(j instanceof A){if(j.op!==K.op||j.fn!==K.fn)return[]}else if(j instanceof x&&j.name!==K.name)return[];if(K.args.length===1&&j.args.length===1||!B(K,oe)&&K.args.length===j.args.length||he){for(var I=[],H=0;H<j.args.length;H++){var ie=W(j.args[H],K.args[H],oe);if(ie.length===0)break;I.push(ie)}if(I.length!==j.args.length){if(!$(K,oe)||j.args.length===1)return[];if(j.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var ce=W(j.args[0],K.args[1],oe);if(ce.length===0)return[];var de=W(j.args[1],K.args[0],oe);if(de.length===0)return[];I=[ce,de]}me=k(I)}else if(K.args.length>=2&&j.args.length===2){for(var ve=ne(K,oe),Se=[],we=0;we<ve.length;we++){var Te=W(j,ve[we],oe,!0);Se=Se.concat(Te)}return Se}else{if(j.args.length>2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof C){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(J[j.name]){if(j.name!==K.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":me[0].placeholders[j.name]=K;break;case"c":case"cl":if(cr(K))me[0].placeholders[j.name]=K;else return[];break;case"v":if(!cr(K))me[0].placeholders[j.name]=K;else return[];break;case"vl":if(Zr(K))me[0].placeholders[j.name]=K;else return[];break;case"cd":if(j1(K))me[0].placeholders[j.name]=K;else return[];break;case"vd":if(!j1(K))me[0].placeholders[j.name]=K;else return[];break;case"ce":if(Xs(K))me[0].placeholders[j.name]=K;else return[];break;case"ve":if(!Xs(K))me[0].placeholders[j.name]=K;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof w){if(!c(j.value,K.value))return[]}else return[];return me}function ue(j,K){if(j instanceof w&&K instanceof w){if(!c(j.value,K.value))return!1}else if(j instanceof C&&K instanceof C){if(j.name!==K.name)return!1}else if(j instanceof A&&K instanceof A||j instanceof x&&K instanceof x){if(j instanceof A){if(j.op!==K.op||j.fn!==K.fn)return!1}else if(j instanceof x&&j.name!==K.name)return!1;if(j.args.length!==K.args.length)return!1;for(var oe=0;oe<j.args.length;oe++)if(!ue(j.args[oe],K.args[oe]))return!1}else return!1;return!0}return G}),vte="simplifyConstant",mte=["typed","config","mathWithTransform","matrix","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],hte=L(vte,mte,e=>{var{typed:r,config:t,mathWithTransform:n,matrix:a,fraction:i,bignumber:o,AccessorNode:s,ArrayNode:u,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:p,OperatorNode:d,SymbolNode:v}=e,{isCommutative:m,isAssociative:y,allChildren:g,createMakeNodeFunction:E}=Xf({FunctionNode:c,OperatorNode:d,SymbolNode:v}),h=r("simplifyConstant",{Node:R=>D(P(R,{})),"Node, Object":function(N,O){return D(P(N,O))}});function w(R){return So(R)?R.valueOf():R instanceof Array?R.map(w):Ue(R)?a(w(R.valueOf())):R}function x(R,N,O){try{return n[R].apply(null,N)}catch{return N=N.map(w),S(n[R].apply(null,N),O)}}var b=r({Fraction:M,number:function(N){return N<0?C(new l(-N)):new l(N)},BigNumber:function(N){return N<0?C(new l(-N)):new l(N)},bigint:function(N){return N<0n?C(new l(-N)):new l(N)},Complex:function(N){throw new Error("Cannot convert Complex number to Node")},string:function(N){return new l(N)},Matrix:function(N){return new u(N.valueOf().map(O=>b(O)))}});function D(R){return Er(R)?R:b(R)}function A(R,N){var O=N&&N.exactFractions!==!1;if(O&&isFinite(R)&&i){var U=i(R),F=N&&typeof N.fractionsLimit=="number"?N.fractionsLimit:1/0;if(U.valueOf()===R&&U.n<F&&U.d<F)return U}return R}var S=r({"string, Object":function(N,O){var U=jn(N,t);if(U==="BigNumber")return o===void 0&&Lf(),o(N);if(U==="bigint")return BigInt(N);if(U==="Fraction")return i===void 0&&tx(),i(N);var F=parseFloat(N);return A(F,O)},"Fraction, Object":function(N,O){return N},"BigNumber, Object":function(N,O){return N},"number, Object":function(N,O){return A(N,O)},"bigint, Object":function(N,O){return N},"Complex, Object":function(N,O){return N.im!==0?N:A(N.re,O)},"Matrix, Object":function(N,O){return a(A(N.valueOf()))},"Array, Object":function(N,O){return N.map(A)}});function C(R){return new d("-","unaryMinus",[R])}function M(R){var N,O=R.s*R.n;return O<0?N=new d("-","unaryMinus",[new l(-O)]):N=new l(O),R.d===1?N:new d("/","divide",[N,new l(R.d)])}function $(R,N,O){if(!Ai(N))return new s(D(R),D(N));if(Bt(R)||Ue(R)){for(var U=Array.from(N.dimensions);U.length>0;)if(cr(U[0])&&typeof U[0].value!="string"){var F=S(U.shift().value,O);Bt(R)?R=R.items[F-1]:(R=R.valueOf()[F-1],R instanceof Array&&(R=a(R)))}else if(U.length>1&&cr(U[1])&&typeof U[1].value!="string"){var q=S(U[1].value,O),Y=[],G=Bt(R)?R.items:R.valueOf();for(var z of G)if(Bt(z))Y.push(z.items[q-1]);else if(Ue(R))Y.push(z[q-1]);else break;if(Y.length===G.length)Bt(R)?R=new u(Y):R=a(Y),U.splice(1,1);else break}else break;return U.length===N.dimensions.length?new s(D(R),N):U.length>0?(N=new f(U),new s(D(R),N)):R}if(Eu(R)&&N.dimensions.length===1&&cr(N.dimensions[0])){var J=N.dimensions[0].value;return J in R.properties?R.properties[J]:new l}return new s(D(R),N)}function B(R,N,O,U){var F=N.shift(),q=N.reduce((Y,G)=>{if(!Er(G)){var z=Y.pop();if(Er(z))return[z,G];try{return Y.push(x(R,[z,G],U)),Y}catch{Y.push(z)}}Y.push(D(Y.pop()));var J=Y.length===1?Y[0]:O(Y);return[O([J,D(G)])]},[F]);return q.length===1?q[0]:O([q[0],b(q[1])])}function P(R,N){switch(R.type){case"SymbolNode":return R;case"ConstantNode":switch(typeof R.value){case"number":return S(R.value,N);case"bigint":return S(R.value,N);case"string":return R.value;default:if(!isNaN(R.value))return S(R.value,N)}return R;case"FunctionNode":if(n[R.name]&&n[R.name].rawArgs)return R;{var O=["add","multiply"];if(!O.includes(R.name)){var U=R.args.map(fe=>P(fe,N));if(!U.some(Er))try{return x(R.name,U,N)}catch{}if(R.name==="size"&&U.length===1&&Bt(U[0])){for(var F=[],q=U[0];Bt(q);)F.push(q.items.length),q=q.items[0];return a(F)}return new c(R.name,U.map(D))}}case"OperatorNode":{var Y=R.fn.toString(),G,z,J=E(R);if(kr(R)&&R.isUnary())G=[P(R.args[0],N)],Er(G[0])?z=J(G):z=x(Y,G,N);else if(y(R,N.context))if(G=g(R,N.context),G=G.map(fe=>P(fe,N)),m(Y,N.context)){for(var le=[],Q=[],re=0;re<G.length;re++)Er(G[re])?Q.push(G[re]):le.push(G[re]);le.length>1?(z=B(Y,le,J,N),Q.unshift(z),z=B(Y,Q,J,N)):z=B(Y,G,J,N)}else z=B(Y,G,J,N);else G=R.args.map(fe=>P(fe,N)),z=B(Y,G,J,N);return z}case"ParenthesisNode":return P(R.content,N);case"AccessorNode":return $(P(R.object,N),P(R.index,N),N);case"ArrayNode":{var se=R.items.map(fe=>P(fe,N));return se.some(Er)?new u(se.map(D)):a(se)}case"IndexNode":return new f(R.dimensions.map(fe=>h(fe,N)));case"ObjectNode":{var te={};for(var ae in R.properties)te[ae]=h(R.properties[ae],N);return new p(te)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(R.type))}}return h}),G1="simplifyCore",gte=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],yte=L(G1,gte,e=>{var{typed:r,parse:t,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,AccessorNode:c,ArrayNode:f,ConstantNode:p,FunctionNode:d,IndexNode:v,ObjectNode:m,OperatorNode:y,ParenthesisNode:g,SymbolNode:E}=e,h=new p(0),w=new p(1),x=new p(!0),b=new p(!1);function D(M){return kr(M)&&["and","not","or"].includes(M.op)}var{hasProperty:A,isCommutative:S}=Xf({FunctionNode:d,OperatorNode:y,SymbolNode:E});function C(M){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=$?$.context:void 0;if(A(M,"trivial",B)){if(qn(M)&&M.args.length===1)return C(M.args[0],$);var P=!1,R=0;if(M.forEach(Q=>{++R,R===1&&(P=C(Q,$))}),R===1)return P}var N=M;if(qn(N)){var O=xZ(N.name);if(O){if(N.args.length>2&&A(N,"associative",B))for(;N.args.length>2;){var U=N.args.pop(),F=N.args.pop();N.args.push(new y(O,N.name,[U,F]))}N=new y(O,N.name,N.args)}else return new d(C(N.fn),N.args.map(Q=>C(Q,$)))}if(kr(N)&&N.isUnary()){var q=C(N.args[0],$);if(N.op==="~"&&kr(q)&&q.isUnary()&&q.op==="~"||N.op==="not"&&kr(q)&&q.isUnary()&&q.op==="not"&&D(q.args[0]))return q.args[0];var Y=!0;if(N.op==="-"&&kr(q)&&(q.isBinary()&&q.fn==="subtract"&&(N=new y("-","subtract",[q.args[1],q.args[0]]),Y=!1),q.isUnary()&&q.op==="-"))return q.args[0];if(Y)return new y(N.op,N.fn,[q])}if(kr(N)&&N.isBinary()){var G=C(N.args[0],$),z=C(N.args[1],$);if(N.op==="+"){if(cr(G)&&a(G.value))return z;if(cr(z)&&a(z.value))return G;kr(z)&&z.isUnary()&&z.op==="-"&&(z=z.args[0],N=new y("-","subtract",[G,z]))}if(N.op==="-")return kr(z)&&z.isUnary()&&z.op==="-"?C(new y("+","add",[G,z.args[0]]),$):cr(G)&&a(G.value)?C(new y("-","unaryMinus",[z])):cr(z)&&a(z.value)?G:new y(N.op,N.fn,[G,z]);if(N.op==="*"){if(cr(G)){if(a(G.value))return h;if(n(G.value,1))return z}if(cr(z)){if(a(z.value))return h;if(n(z.value,1))return G;if(S(N,B))return new y(N.op,N.fn,[z,G],N.implicit)}return new y(N.op,N.fn,[G,z],N.implicit)}if(N.op==="/")return cr(G)&&a(G.value)?h:cr(z)&&n(z.value,1)?G:new y(N.op,N.fn,[G,z]);if(N.op==="^"&&cr(z)){if(a(z.value))return w;if(n(z.value,1))return G}if(N.op==="and"){if(cr(G))if(G.value){if(D(z))return z;if(cr(z))return z.value?x:b}else return b;if(cr(z))if(z.value){if(D(G))return G}else return b}if(N.op==="or"){if(cr(G)){if(G.value)return x;if(D(z))return z}if(cr(z)){if(z.value)return x;if(D(G))return G}}return new y(N.op,N.fn,[G,z])}if(kr(N))return new y(N.op,N.fn,N.args.map(Q=>C(Q,$)));if(Bt(N))return new f(N.items.map(Q=>C(Q,$)));if(oa(N))return new c(C(N.object,$),C(N.index,$));if(Ai(N))return new v(N.dimensions.map(Q=>C(Q,$)));if(Eu(N)){var J={};for(var le in N.properties)J[le]=C(N.properties[le],$);return new m(J)}return N}return r(G1,{Node:C,"Node,Object":C})}),bte="resolve",xte=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],wte=L(bte,xte,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function s(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!l)return u;if(Zr(u)){if(c.has(u.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var p=l.get(u.name);if(Er(p)){var d=new Set(c);return d.add(u.name),s(p,l,d)}else return typeof p=="number"?t(String(p)):p!==void 0?new n(p):u}else if(kr(u)){var v=u.args.map(function(y){return s(y,l,c)});return new i(u.op,u.fn,v,u.implicit)}else{if(En(u))return new o(s(u.content,l,c));if(qn(u)){var m=u.args.map(function(y){return s(y,l,c)});return new a(u.name,m)}}return u.map(y=>s(y,l,c))}return r("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(u,l)=>s(u,ei(l)),"Array | Matrix":r.referToSelf(u=>l=>l.map(c=>u(c))),"Array | Matrix, null | undefined":r.referToSelf(u=>l=>l.map(c=>u(c))),"Array, Object":r.referTo("Array,Map",u=>(l,c)=>u(l,ei(c))),"Matrix, Object":r.referTo("Matrix,Map",u=>(l,c)=>u(l,ei(c))),"Array | Matrix, Map":r.referToSelf(u=>(l,c)=>l.map(f=>u(f,c)))})}),W1="symbolicEqual",Ete=["parse","simplify","typed","OperatorNode"],Ste=L(W1,Ete,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:a}=e;function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=new a("-","subtract",[o,s]),c=t(l,{},u);return cr(c)&&!c.value}return n(W1,{"Node, Node":i,"Node, Node, Object":i})}),Z1="derivative",Ate=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],Dte=L(Z1,Ate,e=>{var{typed:r,config:t,parse:n,simplify:a,equal:i,isZero:o,numeric:s,ConstantNode:u,FunctionNode:l,OperatorNode:c,ParenthesisNode:f,SymbolNode:p}=e;function d(h,w){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},b={};y(b,h,w.name);var D=g(h,b);return x.simplify?a(D):D}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var v=r(Z1,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d});r.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),v._simplify=!0,v.toTex=function(h){return m.apply(null,h.args)};var m=r("_derivTex",{"Node, SymbolNode":function(w,x){return cr(w)&&Cr(w.value)==="string"?m(n(w.value).toString(),x.toString(),1):m(w.toTex(),x.toString(),1)},"Node, ConstantNode":function(w,x){if(Cr(x.value)==="string")return m(w,n(x.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(w,x,b){return m(w.toString(),x.name,b.value)},"string, string, number":function(w,x,b){var D;return b===1?D="{d\\over d"+x+"}":D="{d^{"+b+"}\\over d"+x+"^{"+b+"}}",D+"\\left[".concat(w,"\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(w,x){return w[x]=!0,!0},"Object, SymbolNode, string":function(w,x,b){return x.name!==b?(w[x]=!0,!0):!1},"Object, ParenthesisNode, string":function(w,x,b){return y(w,x.content,b)},"Object, FunctionAssignmentNode, string":function(w,x,b){return x.params.includes(b)?y(w,x.expr,b):(w[x]=!0,!0)},"Object, FunctionNode | OperatorNode, string":function(w,x,b){if(x.args.length>0){for(var D=y(w,x.args[0],b),A=1;A<x.args.length;++A)D=y(w,x.args[A],b)&&D;if(D)return w[x]=!0,!0}return!1}}),g=r("_derivative",{"ConstantNode, Object":function(w){return E(0)},"SymbolNode, Object":function(w,x){return x[w]!==void 0?E(0):E(1)},"ParenthesisNode, Object":function(w,x){return new f(g(w.content,x))},"FunctionAssignmentNode, Object":function(w,x){return x[w]!==void 0?E(0):g(w.expr,x)},"FunctionNode, Object":function(w,x){if(x[w]!==void 0)return E(0);var b=w.args[0],D,A=!1,S=!1,C;switch(w.name){case"cbrt":A=!0,C=new c("*","multiply",[E(3),new c("^","pow",[b,new c("/","divide",[E(2),E(3)])])]);break;case"sqrt":case"nthRoot":if(w.args.length===1)A=!0,C=new c("*","multiply",[E(2),new l("sqrt",[b])]);else if(w.args.length===2)return D=new c("/","divide",[E(1),w.args[1]]),x[D]=x[w.args[1]],g(new c("^","pow",[b,D]),x);break;case"log10":D=E(10);case"log":if(!D&&w.args.length===1)C=b.clone(),A=!0;else if(w.args.length===1&&D||w.args.length===2&&x[w.args[1]]!==void 0)C=new c("*","multiply",[b.clone(),new l("log",[D||w.args[1]])]),A=!0;else if(w.args.length===2)return g(new c("/","divide",[new l("log",[b]),new l("log",[w.args[1]])]),x);break;case"pow":if(w.args.length===2)return x[D]=x[w.args[1]],g(new c("^","pow",[b,w.args[1]]),x);break;case"exp":C=new l("exp",[b.clone()]);break;case"sin":C=new l("cos",[b.clone()]);break;case"cos":C=new c("-","unaryMinus",[new l("sin",[b.clone()])]);break;case"tan":C=new c("^","pow",[new l("sec",[b.clone()]),E(2)]);break;case"sec":C=new c("*","multiply",[w,new l("tan",[b.clone()])]);break;case"csc":S=!0,C=new c("*","multiply",[w,new l("cot",[b.clone()])]);break;case"cot":S=!0,C=new c("^","pow",[new l("csc",[b.clone()]),E(2)]);break;case"asin":A=!0,C=new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])]);break;case"acos":A=!0,S=!0,C=new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])]);break;case"atan":A=!0,C=new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)]);break;case"asec":A=!0,C=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acsc":A=!0,S=!0,C=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acot":A=!0,S=!0,C=new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)]);break;case"sinh":C=new l("cosh",[b.clone()]);break;case"cosh":C=new l("sinh",[b.clone()]);break;case"tanh":C=new c("^","pow",[new l("sech",[b.clone()]),E(2)]);break;case"sech":S=!0,C=new c("*","multiply",[w,new l("tanh",[b.clone()])]);break;case"csch":S=!0,C=new c("*","multiply",[w,new l("coth",[b.clone()])]);break;case"coth":S=!0,C=new c("^","pow",[new l("csch",[b.clone()]),E(2)]);break;case"asinh":A=!0,C=new l("sqrt",[new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)])]);break;case"acosh":A=!0,C=new l("sqrt",[new c("-","subtract",[new c("^","pow",[b.clone(),E(2)]),E(1)])]);break;case"atanh":A=!0,C=new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])]);break;case"asech":A=!0,S=!0,C=new c("*","multiply",[b.clone(),new l("sqrt",[new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])])])]);break;case"acsch":A=!0,S=!0,C=new c("*","multiply",[new l("abs",[b.clone()]),new l("sqrt",[new c("+","add",[new c("^","pow",[b.clone(),E(2)]),E(1)])])]);break;case"acoth":A=!0,S=!0,C=new c("-","subtract",[E(1),new c("^","pow",[b.clone(),E(2)])]);break;case"abs":C=new c("/","divide",[new l(new p("abs"),[b.clone()]),b.clone()]);break;case"gamma":default:throw new Error('Cannot process function "'+w.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}var M,$;A?(M="/",$="divide"):(M="*",$="multiply");var B=g(b,x);return S&&(B=new c("-","unaryMinus",[B])),new c(M,$,[B,C])},"OperatorNode, Object":function(w,x){if(x[w]!==void 0)return E(0);if(w.op==="+")return new c(w.op,w.fn,w.args.map(function(R){return g(R,x)}));if(w.op==="-"){if(w.isUnary())return new c(w.op,w.fn,[g(w.args[0],x)]);if(w.isBinary())return new c(w.op,w.fn,[g(w.args[0],x),g(w.args[1],x)])}if(w.op==="*"){var b=w.args.filter(function(R){return x[R]!==void 0});if(b.length>0){var D=w.args.filter(function(R){return x[R]===void 0}),A=D.length===1?D[0]:new c("*","multiply",D),S=b.concat(g(A,x));return new c("*","multiply",S)}return new c("+","add",w.args.map(function(R){return new c("*","multiply",w.args.map(function(N){return N===R?g(N,x):N.clone()}))}))}if(w.op==="/"&&w.isBinary()){var C=w.args[0],M=w.args[1];return x[M]!==void 0?new c("/","divide",[g(C,x),M]):x[C]!==void 0?new c("*","multiply",[new c("-","unaryMinus",[C]),new c("/","divide",[g(M,x),new c("^","pow",[M.clone(),E(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[g(C,x),M.clone()]),new c("*","multiply",[C.clone(),g(M,x)])]),new c("^","pow",[M.clone(),E(2)])])}if(w.op==="^"&&w.isBinary()){var $=w.args[0],B=w.args[1];if(x[$]!==void 0)return cr($)&&(o($.value)||i($.value,1))?E(0):new c("*","multiply",[w,new c("*","multiply",[new l("log",[$.clone()]),g(B.clone(),x)])]);if(x[B]!==void 0){if(cr(B)){if(o(B.value))return E(0);if(i(B.value,1))return g($,x)}var P=new c("^","pow",[$.clone(),new c("-","subtract",[B,E(1)])]);return new c("*","multiply",[B.clone(),new c("*","multiply",[g($,x),P])])}return new c("*","multiply",[new c("^","pow",[$.clone(),B.clone()]),new c("+","add",[new c("*","multiply",[g($,x),new c("/","divide",[B.clone(),$.clone()])]),new c("*","multiply",[g(B,x),new l("log",[$.clone()])])])])}throw new Error('Cannot process operator "'+w.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function E(h,w){return new u(s(h,jn(String(h),t)))}return v}),Y1="rationalize",Cte=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],Nte=L(Y1,Cte,e=>{var{config:r,typed:t,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,parse:c,simplifyConstant:f,simplifyCore:p,simplify:d,fraction:v,bignumber:m,mathWithTransform:y,matrix:g,AccessorNode:E,ArrayNode:h,ConstantNode:w,FunctionNode:x,IndexNode:b,ObjectNode:D,OperatorNode:A,SymbolNode:S,ParenthesisNode:C}=e;function M(N){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,F=B(),q=$(N,O,!0,F.firstRules),Y=q.variables.length,G={exactFractions:!1},z={exactFractions:!0};if(N=q.expression,Y>=1){N=P(N);var J,le,Q=!0,re=!1;N=d(N,F.firstRules,{},G);for(var se;le=Q?F.distrDivRules:F.sucDivRules,N=d(N,le,{},z),Q=!Q,se=N.toString(),se!==J;)re=!0,J=se;re&&(N=d(N,F.firstRulesAgain,{},G)),N=d(N,F.finalRules,{},G)}var te=[],ae={};return N.type==="OperatorNode"&&N.isBinary()&&N.op==="/"?(Y===1&&(N.args[0]=R(N.args[0],te),N.args[1]=R(N.args[1])),U&&(ae.numerator=N.args[0],ae.denominator=N.args[1])):(Y===1&&(N=R(N,te)),U&&(ae.numerator=N,ae.denominator=null)),U?(ae.coefficients=te,ae.variables=q.variables,ae.expression=N,ae):N}return t(Y1,{Node:M,"Node, boolean":(N,O)=>M(N,{},O),"Node, Object":M,"Node, Object, boolean":M});function $(N,O,U,F){var q=[],Y=d(N,F,O,{exactFractions:!1});U=!!U;var G="+-*"+(U?"/":"");J(Y);var z={};return z.expression=Y,z.variables=q,z;function J(le){var Q=le.type;if(Q==="FunctionNode")throw new Error("There is an unsolved function call");if(Q==="OperatorNode")if(le.op==="^"){if(le.args[1].type!=="ConstantNode"||!ze(parseFloat(le.args[1].value)))throw new Error("There is a non-integer exponent");J(le.args[0])}else{if(!G.includes(le.op))throw new Error("Operator "+le.op+" invalid in polynomial expression");for(var re=0;re<le.args.length;re++)J(le.args[re])}else if(Q==="SymbolNode"){var se=le.name,te=q.indexOf(se);te===-1&&q.push(se)}else if(Q==="ParenthesisNode")J(le.content);else if(Q!=="ConstantNode")throw new Error("type "+Q+" is not allowed in polynomial expression")}}function B(){var N=[p,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],O=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],U=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],F=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],q={};return q.firstRules=N.concat(O,F),q.distrDivRules=U,q.sucDivRules=F,q.firstRulesAgain=N.concat(O),q.finalRules=[p,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],q}function P(N,O,U){var F=N.type,q=arguments.length>1;if(F==="OperatorNode"&&N.isBinary()){var Y=!1,G;if(N.op==="^"&&(N.args[0].type==="ParenthesisNode"||N.args[0].type==="OperatorNode")&&N.args[1].type==="ConstantNode"&&(G=parseFloat(N.args[1].value),Y=G>=2&&ze(G)),Y){if(G>2){var z=N.args[0],J=new A("^","pow",[N.args[0].cloneDeep(),new w(G-1)]);N=new A("*","multiply",[z,J])}else N=new A("*","multiply",[N.args[0],N.args[0].cloneDeep()]);q&&(U==="content"?O.content=N:O.args[U]=N)}}if(F==="ParenthesisNode")P(N.content,N,"content");else if(F!=="ConstantNode"&&F!=="SymbolNode")for(var le=0;le<N.args.length;le++)P(N.args[le],N,le);if(!q)return N}function R(N,O){O===void 0&&(O=[]),O[0]=0;var U={};U.cte=1,U.oper="+",U.fire="";var F=0,q="";se(N,null,U),F=O.length-1;for(var Y=!0,G,z=F;z>=0;z--)if(O[z]!==0){var J=new w(Y?O[z]:Math.abs(O[z])),le=O[z]<0?"-":"+";if(z>0){var Q=new S(q);if(z>1){var re=new w(z);Q=new A("^","pow",[Q,re])}O[z]===-1&&Y?J=new A("-","unaryMinus",[Q]):Math.abs(O[z])===1?J=Q:J=new A("*","multiply",[J,Q])}Y?G=J:le==="+"?G=new A("+","add",[G,J]):G=new A("-","subtract",[G,J]),Y=!1}if(Y)return new w(0);return G;function se(te,ae,fe){var ne=te.type;if(ne==="FunctionNode")throw new Error("There is an unsolved function call");if(ne==="OperatorNode"){if(!"+-*^".includes(te.op))throw new Error("Operator "+te.op+" invalid");if(ae!==null){if((te.fn==="unaryMinus"||te.fn==="pow")&&ae.fn!=="add"&&ae.fn!=="subtract"&&ae.fn!=="multiply")throw new Error("Invalid "+te.op+" placing");if((te.fn==="subtract"||te.fn==="add"||te.fn==="multiply")&&ae.fn!=="add"&&ae.fn!=="subtract")throw new Error("Invalid "+te.op+" placing");if((te.fn==="subtract"||te.fn==="add"||te.fn==="unaryMinus")&&fe.noFil!==0)throw new Error("Invalid "+te.op+" placing")}(te.op==="^"||te.op==="*")&&(fe.fire=te.op);for(var xe=0;xe<te.args.length;xe++)te.fn==="unaryMinus"&&(fe.oper="-"),(te.op==="+"||te.fn==="subtract")&&(fe.fire="",fe.cte=1,fe.oper=xe===0?"+":te.op),fe.noFil=xe,se(te.args[xe],te,fe)}else if(ne==="SymbolNode"){if(te.name!==q&&q!=="")throw new Error("There is more than one variable");if(q=te.name,ae===null){O[1]=1;return}if(ae.op==="^"&&fe.noFil!==0)throw new Error("In power the variable should be the first parameter");if(ae.op==="*"&&fe.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(fe.fire===""||fe.fire==="*")&&(F<1&&(O[1]=0),O[1]+=fe.cte*(fe.oper==="+"?1:-1),F=Math.max(1,F))}else if(ne==="ConstantNode"){var $e=parseFloat(te.value);if(ae===null){O[0]=$e;return}if(ae.op==="^"){if(fe.noFil!==1)throw new Error("Constant cannot be powered");if(!ze($e)||$e<=0)throw new Error("Non-integer exponent is not allowed");for(var k=F+1;k<$e;k++)O[k]=0;$e>F&&(O[$e]=0),O[$e]+=fe.cte*(fe.oper==="+"?1:-1),F=Math.max($e,F);return}fe.cte=$e,fe.fire===""&&(O[0]+=fe.cte*(fe.oper==="+"?1:-1))}else throw new Error("Type "+ne+" is not allowed")}}}),X1="zpk2tf",Mte=["typed","add","multiply","Complex","number"],Tte=L(X1,Mte,e=>{var{typed:r,add:t,multiply:n,Complex:a,number:i}=e;return r(X1,{"Array,Array,number":function(l,c,f){return o(l,c,f)},"Array,Array":function(l,c){return o(l,c,1)},"Matrix,Matrix,number":function(l,c,f){return o(l.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(l,c){return o(l.valueOf(),c.valueOf(),1)}});function o(u,l,c){u.some(E=>E.type==="BigNumber")&&(u=u.map(E=>i(E))),l.some(E=>E.type==="BigNumber")&&(l=l.map(E=>i(E)));for(var f=[a(1,0)],p=[a(1,0)],d=0;d<u.length;d++){var v=u[d];typeof v=="number"&&(v=a(v,0)),f=s(f,[a(1,0),a(-v.re,-v.im)])}for(var m=0;m<l.length;m++){var y=l[m];typeof y=="number"&&(y=a(y,0)),p=s(p,[a(1,0),a(-y.re,-y.im)])}for(var g=0;g<f.length;g++)f[g]=n(f[g],c);return[f,p]}function s(u,l){for(var c=[],f=0;f<u.length+l.length-1;f++){c[f]=a(0,0);for(var p=0;p<u.length;p++)f-p>=0&&f-p<l.length&&(c[f]=t(c[f],n(u[p],l[f-p])))}return c}}),K1="freqz",Ote=["typed","add","multiply","Complex","divide","matrix"],_te=L(K1,Ote,e=>{var{typed:r,add:t,multiply:n,Complex:a,divide:i,matrix:o}=e;return r(K1,{"Array, Array":function(c,f){var p=u(512);return s(c,f,p)},"Array, Array, Array":function(c,f,p){return s(c,f,p)},"Array, Array, number":function(c,f,p){if(p<0)throw new Error("w must be a positive number");var d=u(p);return s(c,f,d)},"Matrix, Matrix":function(c,f){var p=u(512),{w:d,h:v}=s(c.valueOf(),f.valueOf(),p);return{w:o(d),h:o(v)}},"Matrix, Matrix, Matrix":function(c,f,p){var{h:d}=s(c.valueOf(),f.valueOf(),p.valueOf());return{h:o(d),w:o(p)}},"Matrix, Matrix, number":function(c,f,p){if(p<0)throw new Error("w must be a positive number");var d=u(p),{h:v}=s(c.valueOf(),f.valueOf(),d);return{h:o(v),w:o(d)}}});function s(l,c,f){for(var p=[],d=[],v=0;v<f.length;v++){for(var m=a(0,0),y=a(0,0),g=0;g<l.length;g++)m=t(m,n(l[g],a(Math.cos(-g*f[v]),Math.sin(-g*f[v]))));for(var E=0;E<c.length;E++)y=t(y,n(c[E],a(Math.cos(-E*f[v]),Math.sin(-E*f[v]))));p.push(m),d.push(y)}for(var h=[],w=0;w<p.length;w++)h.push(i(p[w],d[w]));return{h,w:f}}function u(l){for(var c=[],f=0;f<l;f++)c.push(f/l*Math.PI);return c}}),$te="reviver",Fte=["classes"],Bte=L($te,Fte,e=>{var{classes:r}=e;return function(n,a){var i=r[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}}),Rte="replacer",Pte=[],zte=L(Rte,Pte,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:typeof t=="bigint"?{mathjs:"bigint",value:String(t)}:t}),Ite="13.0.3",Lte=L("true",[],()=>!0),qte=L("false",[],()=>!1),kte=L("null",[],()=>null),Ute=Ot("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),Hte=Ot("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),jte=Ot("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Uf(t):eq}),Vte=Ot("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?AG(t):rq}),Gte=Ot("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?EG(t):tq}),Wte=Ot("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?SG(t):nq}),Zte=Ot("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),Yte=Ot("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),Xte=Ot("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),Kte=Ot("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),Jte=Ot("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),Qte=Ot("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),ene=Ot("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),rne=L("version",[],()=>Ite);function Ot(e,r,t){return L(e,r,t,{recreateOnConfigChange:!0})}var tne=Xe("speedOfLight","299792458","m s^-1"),nne=Xe("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),ane=Xe("planckConstant","6.62607015e-34","J s"),ine=Xe("reducedPlanckConstant","1.0545718176461565e-34","J s"),one=Xe("magneticConstant","1.25663706212e-6","N A^-2"),sne=Xe("electricConstant","8.8541878128e-12","F m^-1"),une=Xe("vacuumImpedance","376.730313667","ohm"),lne=Xe("coulomb","8.987551792261171e9","N m^2 C^-2"),cne=Xe("elementaryCharge","1.602176634e-19","C"),fne=Xe("bohrMagneton","9.2740100783e-24","J T^-1"),pne=Xe("conductanceQuantum","7.748091729863649e-5","S"),dne=Xe("inverseConductanceQuantum","12906.403729652257","ohm"),vne=Xe("magneticFluxQuantum","2.0678338484619295e-15","Wb"),mne=Xe("nuclearMagneton","5.0507837461e-27","J T^-1"),hne=Xe("klitzing","25812.807459304513","ohm"),gne=Xe("bohrRadius","5.29177210903e-11","m"),yne=Xe("classicalElectronRadius","2.8179403262e-15","m"),bne=Xe("electronMass","9.1093837015e-31","kg"),xne=Xe("fermiCoupling","1.1663787e-5","GeV^-2"),wne=Fu("fineStructure",.0072973525693),Ene=Xe("hartreeEnergy","4.3597447222071e-18","J"),Sne=Xe("protonMass","1.67262192369e-27","kg"),Ane=Xe("deuteronMass","3.3435830926e-27","kg"),Dne=Xe("neutronMass","1.6749271613e-27","kg"),Cne=Xe("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Nne=Xe("rydberg","10973731.568160","m^-1"),Mne=Xe("thomsonCrossSection","6.6524587321e-29","m^2"),Tne=Fu("weakMixingAngle",.2229),One=Fu("efimovFactor",22.7),_ne=Xe("atomicMass","1.66053906660e-27","kg"),$ne=Xe("avogadro","6.02214076e23","mol^-1"),Fne=Xe("boltzmann","1.380649e-23","J K^-1"),Bne=Xe("faraday","96485.33212331001","C mol^-1"),Rne=Xe("firstRadiation","3.7417718521927573e-16","W m^2"),Pne=Xe("loschmidt","2.686780111798444e25","m^-3"),zne=Xe("gasConstant","8.31446261815324","J K^-1 mol^-1"),Ine=Xe("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),Lne=Xe("molarVolume","0.022413969545014137","m^3 mol^-1"),qne=Fu("sackurTetrode",-1.16487052358),kne=Xe("secondRadiation","0.014387768775039337","m K"),Une=Xe("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),Hne=Xe("wienDisplacement","2.897771955e-3","m K"),jne=Xe("molarMass","0.99999999965e-3","kg mol^-1"),Vne=Xe("molarMassC12","11.9999999958e-3","kg mol^-1"),Gne=Xe("gravity","9.80665","m s^-2"),Wne=Xe("planckLength","1.616255e-35","m"),Zne=Xe("planckMass","2.176435e-8","kg"),Yne=Xe("planckTime","5.391245e-44","s"),Xne=Xe("planckCharge","1.87554603778e-18","C"),Kne=Xe("planckTemperature","1.416785e+32","K");function Xe(e,r,t){var n=["config","Unit","BigNumber"];return L(e,n,a=>{var{config:i,Unit:o,BigNumber:s}=a,u=i.number==="BigNumber"?new s(r):parseFloat(r),l=new o(u,t);return l.fixPrefix=!0,l})}function Fu(e,r){var t=["config","BigNumber"];return L(e,t,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(r):r})}var Jne="apply",Qne=["typed","isInteger"],eae=L(Jne,Qne,e=>{var{typed:r,isInteger:t}=e,n=Pf({typed:r,isInteger:t});return r("apply",{"...any":function(i){var o=i[1];Je(o)?i[1]=o-1:Qe(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(s){throw mt(s)}}})},{isTransformFunction:!0}),rae="column",tae=["typed","Index","matrix","range"],nae=L(rae,tae,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=ex({typed:r,Index:t,matrix:n,range:a});return r("column",{"...any":function(s){var u=s.length-1,l=s[u];Je(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});function Kf(e,r,t){var n=e.filter(function(u){return Zr(u)&&!(u.name in r)&&!t.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new N2(t,i,new Set([a])),s=e.compile();return function(l){return i.set(a,l),s.evaluate(o)}}var aae="filter",iae=["typed"],oae=L(aae,iae,e=>{var{typed:r}=e;function t(a,i,o){var s,u;return a[0]&&(s=a[0].compile().evaluate(o)),a[1]&&(Zr(a[1])||Ao(a[1])?u=a[1].compile().evaluate(o):u=Kf(a[1],i,o)),n(s,u)}t.rawArgs=!0;var n=r("filter",{"Array, function":J1,"Matrix, function":function(i,o){return i.create(J1(i.toArray(),o))},"Array, RegExp":Ps,"Matrix, RegExp":function(i,o){return i.create(Ps(i.toArray(),o))}});return t},{isTransformFunction:!0});function J1(e,r){return Y2(e,function(t,n,a){return Ti(r,t,[n+1],a,"filter")})}var sae="forEach",uae=["typed"],lae=L(sae,uae,e=>{var{typed:r}=e;function t(a,i,o){var s,u;return a[0]&&(s=a[0].compile().evaluate(o)),a[1]&&(Zr(a[1])||Ao(a[1])?u=a[1].compile().evaluate(o):u=Kf(a[1],i,o)),n(s,u)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(i,o){var s=function u(l,c){if(Array.isArray(l))Mu(l,function(f,p){u(f,c.concat(p+1))});else return Ti(o,l,c,i,"forEach")};s(i.valueOf(),[])}});return t},{isTransformFunction:!0}),cae="index",fae=["Index","getMatrixDataType"],pae=L(cae,fae,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var a=[],i=0,o=arguments.length;i<o;i++){var s=arguments[i];if(Mf(s))s.start--,s.end-=s.step>0?0:2;else if(s&&s.isSet===!0)s=s.map(function(l){return l-1});else if(hr(s)||Ue(s))t(s)!=="boolean"&&(s=s.map(function(l){return l-1}));else if(Je(s))s--;else if(Qe(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=s}var u=new r;return r.apply(u,a),u}},{isTransformFunction:!0}),dae="map",vae=["typed"],mae=L(dae,vae,e=>{var{typed:r}=e;function t(a,i,o){var s,u;return a[0]&&(s=a[0].compile().evaluate(o)),a[1]&&(Zr(a[1])||Ao(a[1])?u=a[1].compile().evaluate(o):u=Kf(a[1],i,o)),n(s,u)}t.rawArgs=!0;var n=r("map",{"Array, function":function(i,o){return Q1(i,o,i)},"Matrix, function":function(i,o){return i.create(Q1(i.valueOf(),o,i))}});return t},{isTransformFunction:!0});function Q1(e,r,t){function n(a,i){return Array.isArray(a)?xn(a,function(o,s){return n(o,i.concat(s+1))}):Ti(r,a,i,t,"map")}return n(e,[])}function Wn(e){if(e.length===2&&Ht(e[0])){e=e.slice();var r=e[1];Je(r)?e[1]=r-1:Qe(r)&&(e[1]=r.minus(1))}return e}var hae="max",gae=["typed","config","numeric","larger"],yae=L(hae,gae,e=>{var{typed:r,config:t,numeric:n,larger:a}=e,i=cx({typed:r,config:t,numeric:n,larger:a});return r("max",{"...any":function(s){s=Wn(s);try{return i.apply(null,s)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),bae="mean",xae=["typed","add","divide"],wae=L(bae,xae,e=>{var{typed:r,add:t,divide:n}=e,a=bx({typed:r,add:t,divide:n});return r("mean",{"...any":function(o){o=Wn(o);try{return a.apply(null,o)}catch(s){throw mt(s)}}})},{isTransformFunction:!0}),Eae="min",Sae=["typed","config","numeric","smaller"],Aae=L(Eae,Sae,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e,i=fx({typed:r,config:t,numeric:n,smaller:a});return r("min",{"...any":function(s){s=Wn(s);try{return i.apply(null,s)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),Dae="range",Cae=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],Nae=L(Dae,Cae,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c}=e,f=ax({typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isPositive:c});return r("range",{"...any":function(d){var v=d.length-1,m=d[v];return typeof m!="boolean"&&d.push(!0),f.apply(null,d)}})},{isTransformFunction:!0}),Mae="row",Tae=["typed","Index","matrix","range"],Oae=L(Mae,Tae,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=ix({typed:r,Index:t,matrix:n,range:a});return r("row",{"...any":function(s){var u=s.length-1,l=s[u];Je(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw mt(c)}}})},{isTransformFunction:!0}),_ae="subset",$ae=["typed","matrix","zeros","add"],Fae=L(_ae,$ae,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=ox({typed:r,matrix:t,zeros:n,add:a});return r("subset",{"...any":function(s){try{return i.apply(null,s)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),Bae="concat",Rae=["typed","matrix","isInteger"],Pae=L(Bae,Rae,e=>{var{typed:r,matrix:t,isInteger:n}=e,a=Qb({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(o){var s=o.length-1,u=o[s];Je(u)?o[s]=u-1:Qe(u)&&(o[s]=u.minus(1));try{return a.apply(null,o)}catch(l){throw mt(l)}}})},{isTransformFunction:!0}),eg="diff",zae=["typed","matrix","subtract","number","bignumber"],Iae=L(eg,zae,e=>{var{typed:r,matrix:t,subtract:n,number:a,bignumber:i}=e,o=rx({typed:r,matrix:t,subtract:n,number:a,bignumber:i});return r(eg,{"...any":function(u){u=Wn(u);try{return o.apply(null,u)}catch(l){throw mt(l)}}})},{isTransformFunction:!0}),Lae="std",qae=["typed","map","sqrt","variance"],kae=L(Lae,qae,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e,i=Ex({typed:r,map:t,sqrt:n,variance:a});return r("std",{"...any":function(s){s=Wn(s);try{return i.apply(null,s)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),rg="sum",Uae=["typed","config","add","numeric"],Hae=L(rg,Uae,e=>{var{typed:r,config:t,add:n,numeric:a}=e,i=gx({typed:r,config:t,add:n,numeric:a});return r(rg,{"...any":function(s){s=Wn(s);try{return i.apply(null,s)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),jae="quantileSeq",Vae=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],Gae=L(jae,Vae,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:p}=e,d=wx({typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:p});return r("quantileSeq",{"Array | Matrix, number | BigNumber":d,"Array | Matrix, number | BigNumber, number":(m,y,g)=>d(m,y,v(g)),"Array | Matrix, number | BigNumber, boolean":d,"Array | Matrix, number | BigNumber, boolean, number":(m,y,g,E)=>d(m,y,g,v(E)),"Array | Matrix, Array | Matrix":d,"Array | Matrix, Array | Matrix, number":(m,y,g)=>d(m,y,v(g)),"Array | Matrix, Array | Matrix, boolean":d,"Array | Matrix, Array | Matrix, boolean, number":(m,y,g,E)=>d(m,y,g,v(E))});function v(m){return Wn([[],m])[1]}},{isTransformFunction:!0}),tg="cumsum",Wae=["typed","add","unaryPlus"],Zae=L(tg,Wae,e=>{var{typed:r,add:t,unaryPlus:n}=e,a=yx({typed:r,add:t,unaryPlus:n});return r(tg,{"...any":function(o){if(o.length===2&&Ht(o[0])){var s=o[1];Je(s)?o[1]=s-1:Qe(s)&&(o[1]=s.minus(1))}try{return a.apply(null,o)}catch(u){throw mt(u)}}})},{isTransformFunction:!0}),ng="variance",Yae=["typed","add","subtract","multiply","divide","apply","isNaN"],Xae=L(ng,Yae,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:s}=e,u=xx({typed:r,add:t,subtract:n,multiply:a,divide:i,apply:o,isNaN:s});return r(ng,{"...any":function(c){c=Wn(c);try{return u.apply(null,c)}catch(f){throw mt(f)}}})},{isTransformFunction:!0}),ag="print",Kae=["typed","matrix","zeros","add"],Jae=L(ag,Kae,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=ux({typed:r,matrix:t,zeros:n,add:a});return r(ag,{"string, Object | Array":function(u,l){return i(o(u),l)},"string, Object | Array, number | Object":function(u,l,c){return i(o(u),l,c)}});function o(s){return s.replace(sx,u=>{var l=u.slice(1).split("."),c=l.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),Qae="and",eie=["typed","matrix","zeros","add","equalScalar","not","concat"],rie=L(Qae,eie,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,s=lx({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var p=l[0].compile().evaluate(f);if(!Ht(p)&&!s(p,!0))return!1;var d=l[1].compile().evaluate(f);return s(p,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),tie="or",nie=["typed","matrix","equalScalar","DenseMatrix","concat"],aie=L(tie,nie,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Jb({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!Ht(f)&&o(f,!1))return!0;var p=u[1].compile().evaluate(c);return o(f,p)}return s.rawArgs=!0,s},{isTransformFunction:!0}),iie="bitAnd",oie=["typed","matrix","zeros","add","equalScalar","not","concat"],sie=L(iie,oie,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o}=e,s=Xb({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var p=l[0].compile().evaluate(f);if(!Ht(p)){if(isNaN(p))return NaN;if(p===0||p===!1)return 0}var d=l[1].compile().evaluate(f);return s(p,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),uie="bitOr",lie=["typed","matrix","equalScalar","DenseMatrix","concat"],cie=L(uie,lie,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,o=Kb({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!Ht(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var p=u[1].compile().evaluate(c);return o(f,p)}return s.rawArgs=!0,s},{isTransformFunction:!0}),_e=hL({config:ge}),Nr=xL({}),ig=Gte({BigNumber:_e,config:ge}),fie=qte({}),pie=wne({BigNumber:_e,config:ge}),ya=ML({}),Dx=ene({Complex:Nr}),die=Ute({BigNumber:_e,config:ge}),vie=Yte({BigNumber:_e,config:ge}),mie=Kte({BigNumber:_e,config:ge}),Bu=BL({}),hie=Hte({BigNumber:_e,config:ge}),gie=kte({}),yie=Wte({BigNumber:_e,config:ge}),bie=_L({}),Cx=xI({}),xie=Jte({BigNumber:_e,config:ge}),wie=qne({BigNumber:_e,config:ge}),Nx=Vte({BigNumber:_e,config:ge}),Eie=Lte({}),Sie=rne({}),er=WL({Matrix:Bu}),Aie=One({BigNumber:_e,config:ge}),Die=Zte({BigNumber:_e,config:ge}),gc=jte({BigNumber:_e,config:ge}),Cie=zte({}),Nie=Qte({BigNumber:_e,config:ge}),Z=hI({BigNumber:_e,Complex:Nr,DenseMatrix:er,Fraction:ya}),Mie=Tne({BigNumber:_e,config:ge}),ht=lk({typed:Z}),Tie=RG({Complex:Nr,config:ge,typed:Z}),Oie=LG({BigNumber:_e,typed:Z}),_ie=HG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),Gr=dk({typed:Z}),$ie=JU({typed:Z}),Fie=YG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),Bie=eW({typed:Z}),Mx=nW({typed:Z}),Rie=sW({Complex:Nr,config:ge,typed:Z}),Pie=Bq({typed:Z}),zie=VU({typed:Z}),Iie=Iq({typed:Z}),Lie=YL({typed:Z}),Ru=vre({typed:Z}),Pu=jq({Complex:Nr,typed:Z}),ba=eH({typed:Z}),Jf=lW({typed:Z}),qie=dW({BigNumber:_e,typed:Z}),kie=gW({BigNumber:_e,typed:Z}),Uie=Mk({typed:Z}),ar=Sq({config:ge,typed:Z}),Hie=Ej({typed:Z}),Tx=Ok({typed:Z}),jie=$k({Complex:Nr,typed:Z}),Vie=xH({typed:Z}),Gie=AH({typed:Z}),Mo=Fj({typed:Z}),Qf=NH({typed:Z}),Wie=Lj({format:Mo,typed:Z}),ep=tH({typed:Z}),bt=KL({typed:Z}),Zn=uq({config:ge,typed:Z}),xa=vq({config:ge,typed:Z}),an=hq({equalScalar:ar,typed:Z}),Zie=Xte({BigNumber:_e,config:ge}),Yie=xre({Complex:Nr,typed:Z}),Xie=fU({Complex:Nr,config:ge,typed:Z}),Ox=dU({Complex:Nr,config:ge,typed:Z}),wa=FH({typed:Z}),qr=hU({typed:Z}),Ks=oH({typed:Z}),Mn=_q({typed:Z}),Kie=zj({format:Mo,typed:Z}),Jie=Zre({config:ge,typed:Z}),Qie=ux({typed:Z}),eoe=Xre({config:ge,typed:Z}),rp=aH({typed:Z}),roe=wW({BigNumber:_e,typed:Z}),_x=EU({BigNumber:_e,Fraction:ya,complex:Pu,typed:Z}),zu=DW({typed:Z}),Tn=Cq({Matrix:Bu,equalScalar:ar,typed:Z}),toe=nk({typed:Z}),noe=NU({typed:Z}),aoe=Pq({typed:Z}),jt=mk({typed:Z}),ioe=TW({typed:Z}),$x=xq({typed:Z}),ooe=zG({Complex:Nr,config:ge,typed:Z}),soe=VG({BigNumber:_e,typed:Z}),tp=Pf({isInteger:bt,typed:Z}),uoe=WG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),Mt=kq({BigNumber:_e,typed:Z}),loe=hre({typed:Z}),coe=fW({typed:Z}),foe=bW({BigNumber:_e,typed:Z}),To=yq({typed:Z}),poe=jj({typed:Z}),doe=Jre({config:ge,typed:Z}),voe=SW({BigNumber:_e,typed:Z}),moe=NW({typed:Z}),hoe=_G({SparseMatrix:Tn,typed:Z}),on=DU({Complex:Nr,config:ge,typed:Z}),goe=$W({typed:Z}),fn=ik({typed:Z}),yoe=kG({BigNumber:_e,Complex:Nr,config:ge,typed:Z}),boe=Rj({format:Mo,typed:Z}),xoe=mW({BigNumber:_e,typed:Z}),_i=Wq({Fraction:ya,typed:Z}),Ea=cq({typed:Z}),Ne=Yq({DenseMatrix:er,Matrix:Bu,SparseMatrix:Tn,typed:Z}),woe=Kq({isZero:an,matrix:Ne,typed:Z}),Eoe=Tj({isNaN:To,isNumeric:Ea,typed:Z}),qt=Wj({bignumber:Mt,fraction:_i,number:Mn}),Fx=_j({config:ge,multiplyScalar:qr,numeric:qt,typed:Z}),Bx=kH({isInteger:bt,matrix:Ne,typed:Z}),nt=KH({matrix:Ne,config:ge,typed:Z}),Soe=QH({matrix:Ne,typed:Z}),Oo=ij({matrix:Ne,typed:Z}),Rx=_U({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),et=lj({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),Aoe=KG({Complex:Nr,config:ge,typed:Z}),Px=gk({BigNumber:_e,Complex:Nr,Fraction:ya,config:ge,isNegative:Zn,matrix:Ne,typed:Z,unaryMinus:fn}),fr=Qb({isInteger:bt,matrix:Ne,typed:Z}),Doe=dH({prod:Fx,size:nt,typed:Z}),np=sj({conj:ba,transpose:Oo,typed:Z}),zx=gH({DenseMatrix:er,SparseMatrix:Tn,matrix:Ne,typed:Z}),Rr=Yj({numeric:qt,typed:Z}),_o=lV({DenseMatrix:er,concat:fr,divideScalar:Rr,equalScalar:ar,matrix:Ne,typed:Z}),Vt=zV({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),$o=EH({matrix:Ne,typed:Z}),Coe=pq({isNumeric:Ea,typed:Z}),Yn=TH({BigNumber:_e,DenseMatrix:er,SparseMatrix:Tn,config:ge,matrix:Ne,typed:Z}),Noe=_H({matrix:Ne,multiplyScalar:qr,typed:Z}),Iu=KV({DenseMatrix:er,concat:fr,config:ge,matrix:Ne,typed:Z}),Moe=wV({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z,zeros:et}),Ix=fV({DenseMatrix:er,divideScalar:Rr,equalScalar:ar,matrix:Ne,multiplyScalar:qr,subtractScalar:jt,typed:Z}),ap=rk({flatten:$o,matrix:Ne,size:nt,typed:Z}),Toe=xU({BigNumber:_e,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),Ooe=IH({BigNumber:_e,config:ge,matrix:Ne,typed:Z}),ip=vY({addScalar:Gr,complex:Pu,conj:ba,divideScalar:Rr,equal:Vt,identity:Yn,isZero:an,matrix:Ne,multiplyScalar:qr,sign:_x,sqrt:on,subtractScalar:jt,typed:Z,unaryMinus:fn,zeros:et}),_oe=jH({config:ge,matrix:Ne}),$oe=SV({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z,zeros:et}),$i=Qj({BigNumber:_e,DenseMatrix:er,config:ge,equalScalar:ar,matrix:Ne,typed:Z,zeros:et}),ft=UV({DenseMatrix:er,concat:fr,config:ge,matrix:Ne,typed:Z}),Lr=TU({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,subtractScalar:jt,typed:Z,unaryMinus:fn}),Foe=Uj({concat:fr,matrix:Ne,typed:Z}),op=sk({config:ge,numeric:qt,typed:Z}),sp=dV({DenseMatrix:er,divideScalar:Rr,equalScalar:ar,matrix:Ne,multiplyScalar:qr,subtractScalar:jt,typed:Z}),Boe=lH({DenseMatrix:er,concat:fr,matrix:Ne,typed:Z}),ur=eZ({DenseMatrix:er,SparseMatrix:Tn,addScalar:Gr,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),Roe=iW({BigNumber:_e,DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),Poe=Xb({concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),zoe=Kb({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),Ioe=XU({DenseMatrix:er,concat:fr,matrix:Ne,typed:Z}),Loe=ate({addScalar:Gr,combinations:Ru,divideScalar:Rr,isInteger:bt,isNegative:Zn,multiplyScalar:qr,typed:Z}),Sa=MV({BigNumber:_e,DenseMatrix:er,Fraction:ya,concat:fr,config:ge,equalScalar:ar,matrix:Ne,typed:Z}),Lx=RV({concat:fr,matrix:Ne,typed:Z}),qoe=yx({add:ur,typed:Z,unaryPlus:op}),up=eG({equal:Vt,typed:Z}),koe=rx({matrix:Ne,number:Mn,subtract:Lr,typed:Z}),Uoe=Kee({abs:ht,addScalar:Gr,deepEqual:up,divideScalar:Rr,multiplyScalar:qr,sqrt:on,subtractScalar:jt,typed:Z}),Lu=oZ({addScalar:Gr,conj:ba,multiplyScalar:qr,size:nt,typed:Z}),Hoe=qV({compareText:Lx,isZero:an,typed:Z}),qx=Wb({DenseMatrix:er,config:ge,equalScalar:ar,matrix:Ne,round:$i,typed:Z,zeros:et}),joe=iU({BigNumber:_e,DenseMatrix:er,concat:fr,config:ge,equalScalar:ar,matrix:Ne,round:$i,typed:Z,zeros:et}),Voe=tZ({abs:ht,addScalar:Gr,divideScalar:Rr,isPositive:xa,multiplyScalar:qr,smaller:ft,sqrt:on,typed:Z}),kx=pG({DenseMatrix:er,smaller:ft}),ot=mG({ImmutableDenseMatrix:kx,getMatrixDataType:Qf}),pt=ZV({DenseMatrix:er,concat:fr,config:ge,matrix:Ne,typed:Z}),lp=rV({Complex:Nr,config:ge,divideScalar:Rr,typed:Z}),Goe=mV({DenseMatrix:er,divideScalar:Rr,equalScalar:ar,matrix:Ne,multiplyScalar:qr,subtractScalar:jt,typed:Z}),Woe=Qq({flatten:$o,matrix:Ne,size:nt,typed:Z}),Zoe=fx({config:ge,numeric:qt,smaller:ft,typed:Z}),Ux=Zb({DenseMatrix:er,concat:fr,config:ge,equalScalar:ar,matrix:Ne,round:$i,typed:Z,zeros:et}),yr=yU({addScalar:Gr,dot:Lu,equalScalar:ar,matrix:Ne,multiplyScalar:qr,typed:Z}),Yoe=iV({Complex:Nr,config:ge,divideScalar:Rr,typed:Z}),Xoe=Jb({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),qu=iG({compare:Sa,isNaN:To,isNumeric:Ea,typed:Z}),Koe=DV({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z,zeros:et}),Hx=IY({SparseMatrix:Tn,abs:ht,add:ur,divideScalar:Rr,larger:pt,largerEq:Iu,multiply:yr,subtract:Lr,transpose:Oo,typed:Z}),_t=ox({add:ur,matrix:Ne,typed:Z,zeros:et}),cp=gx({add:ur,config:ge,numeric:qt,typed:Z}),Joe=lZ({add:ur,matrix:Ne,typed:Z}),jx=gV({DenseMatrix:er,divideScalar:Rr,equalScalar:ar,matrix:Ne,multiplyScalar:qr,subtractScalar:jt,typed:Z}),Qoe=Tte({Complex:Nr,add:ur,multiply:yr,number:Mn,typed:Z}),fp=Ck({DenseMatrix:er,config:ge,equalScalar:ar,matrix:Ne,round:$i,typed:Z,zeros:et}),pn=$V({compare:Sa,typed:Z}),ese=ote({addScalar:Gr,combinations:Ru,isInteger:bt,isNegative:Zn,isPositive:xa,larger:pt,typed:Z}),rse=mH({matrix:Ne,multiply:yr,subtract:Lr,typed:Z}),Vx=Nee({divideScalar:Rr,isZero:an,matrix:Ne,multiply:yr,subtractScalar:jt,typed:Z,unaryMinus:fn}),tse=zU({concat:fr,equalScalar:ar,matrix:Ne,multiplyScalar:qr,typed:Z}),Gx=yG({larger:pt,smaller:ft}),Wx=Rk({Complex:Nr,DenseMatrix:er,ceil:fp,equalScalar:ar,floor:qx,matrix:Ne,typed:Z,zeros:et}),Zx=fZ({Index:ot,typed:Z}),nse=ere({abs:ht,add:ur,addScalar:Gr,config:ge,divideScalar:Rr,equalScalar:ar,flatten:$o,isNumeric:Ea,isZero:an,matrix:Ne,multiply:yr,multiplyScalar:qr,smaller:ft,subtract:Lr,typed:Z}),ase=FU({BigNumber:_e,add:ur,config:ge,equal:Vt,isInteger:bt,mod:Ux,smaller:ft,typed:Z,xgcd:Rx}),ise=lU({concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),ose=nV({Complex:Nr,config:ge,divideScalar:Rr,log:lp,typed:Z}),pp=cx({config:ge,larger:pt,numeric:qt,typed:Z}),sse=BW({DenseMatrix:er,Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),use=IW({DenseMatrix:er,Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),lse=UW({Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),cse=GW({Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),li=VV({DenseMatrix:er,concat:fr,config:ge,matrix:Ne,typed:Z}),fse=sG({compare:Sa,compareNatural:pn,matrix:Ne,typed:Z}),pse=tG({DenseMatrix:er,concat:fr,config:ge,equalScalar:ar,matrix:Ne,typed:Z}),dse=lx({concat:fr,equalScalar:ar,matrix:Ne,not:Ks,typed:Z,zeros:et}),ci=ax({bignumber:Mt,matrix:Ne,add:ur,config:ge,isPositive:xa,larger:pt,largerEq:Iu,smaller:ft,smallerEq:li,typed:Z}),vse=ix({Index:ot,matrix:Ne,range:ci,typed:Z}),Yx=PW({DenseMatrix:er,Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),mse=jW({Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),Xx=XW({Index:ot,concat:fr,setDifference:Yx,size:nt,subset:_t,typed:Z}),Kx=wG({FibonacciHeap:Gx,addScalar:Gr,equalScalar:ar}),Jx=ex({Index:ot,matrix:Ne,range:ci,typed:Z}),Aa=Tee({abs:ht,addScalar:Gr,det:Vx,divideScalar:Rr,identity:Yn,matrix:Ne,multiply:yr,typed:Z,unaryMinus:fn}),Qx=pY({DenseMatrix:er,Spa:Kx,SparseMatrix:Tn,abs:ht,addScalar:Gr,divideScalar:Rr,equalScalar:ar,larger:pt,matrix:Ne,multiplyScalar:qr,subtractScalar:jt,typed:Z,unaryMinus:fn}),hse=_ee({Complex:Nr,add:ur,ctranspose:np,deepEqual:up,divideScalar:Rr,dot:Lu,dotDivide:_o,equal:Vt,inv:Aa,matrix:Ne,multiply:yr,typed:Z}),Gt=Kj({Complex:Nr,config:ge,fraction:_i,identity:Yn,inv:Aa,matrix:Ne,multiply:yr,number:Mn,typed:Z}),ew=qW({DenseMatrix:er,Index:ot,compareNatural:pn,size:nt,subset:_t,typed:Z}),gse=JW({Index:ot,concat:fr,setIntersect:ew,setSymDifference:Xx,size:nt,subset:_t,typed:Z}),yse=qee({abs:ht,add:ur,identity:Yn,inv:Aa,map:wa,max:pp,multiply:yr,size:nt,sqrt:on,subtract:Lr,typed:Z}),je=NG({BigNumber:_e,Complex:Nr,Fraction:ya,abs:ht,addScalar:Gr,config:ge,divideScalar:Rr,equal:Vt,fix:Wx,format:Mo,isNumeric:Ea,multiplyScalar:qr,number:Mn,pow:Gt,round:$i,subtractScalar:jt}),bse=une({BigNumber:_e,Unit:je,config:ge}),xse=Hne({BigNumber:_e,Unit:je,config:ge}),wse=_ne({BigNumber:_e,Unit:je,config:ge}),Ese=fne({BigNumber:_e,Unit:je,config:ge}),Sse=Fne({BigNumber:_e,Unit:je,config:ge}),Ase=pne({BigNumber:_e,Unit:je,config:ge}),Dse=lne({BigNumber:_e,Unit:je,config:ge}),Cse=Ane({BigNumber:_e,Unit:je,config:ge}),Nse=sV({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,pow:Gt,typed:Z}),Mse=sne({BigNumber:_e,Unit:je,config:ge}),Tse=cne({BigNumber:_e,Unit:je,config:ge}),Ose=Iee({abs:ht,add:ur,identity:Yn,inv:Aa,multiply:yr,typed:Z}),_se=Bne({BigNumber:_e,Unit:je,config:ge}),rw=fj({addScalar:Gr,ceil:fp,conj:ba,divideScalar:Rr,dotDivide:_o,exp:Tx,i:Dx,log2:Ox,matrix:Ne,multiplyScalar:qr,pow:Gt,tau:Nx,typed:Z}),dp=yre({BigNumber:_e,Complex:Nr,config:ge,multiplyScalar:qr,pow:Gt,typed:Z}),$se=nne({BigNumber:_e,Unit:je,config:ge}),Fse=Ene({BigNumber:_e,Unit:je,config:ge}),Bse=dj({conj:ba,dotDivide:_o,fft:rw,typed:Z}),Rse=hne({BigNumber:_e,Unit:je,config:ge}),Pse=Pne({BigNumber:_e,Unit:je,config:ge}),zse=one({BigNumber:_e,Unit:je,config:ge}),Ise=jne({BigNumber:_e,Unit:je,config:ge}),Lse=Ine({BigNumber:_e,Unit:je,config:ge}),qse=Dne({BigNumber:_e,Unit:je,config:ge}),kse=mne({BigNumber:_e,Unit:je,config:ge}),Use=Xne({BigNumber:_e,Unit:je,config:ge}),Hse=Wne({BigNumber:_e,Unit:je,config:ge}),jse=Kne({BigNumber:_e,Unit:je,config:ge}),Vse=Sne({BigNumber:_e,Unit:je,config:ge}),Gse=Cne({BigNumber:_e,Unit:je,config:ge}),Wse=ine({BigNumber:_e,Unit:je,config:ge}),Zse=Nne({BigNumber:_e,Unit:je,config:ge}),Yse=kne({BigNumber:_e,Unit:je,config:ge}),Xse=tne({BigNumber:_e,Unit:je,config:ge}),Kse=Une({BigNumber:_e,Unit:je,config:ge}),Jse=Mne({BigNumber:_e,Unit:je,config:ge}),Qse=$ne({BigNumber:_e,Unit:je,config:ge}),eue=gne({BigNumber:_e,Unit:je,config:ge}),rue=FG({Unit:je,typed:Z}),Yr=Yee({divideScalar:Rr,equalScalar:ar,inv:Aa,matrix:Ne,multiply:yr,typed:Z}),tue=bne({BigNumber:_e,Unit:je,config:ge}),Fo=Ere({gamma:dp,typed:Z}),nue=Rne({BigNumber:_e,Unit:je,config:ge}),aue=Gne({BigNumber:_e,Unit:je,config:ge}),iue=dne({BigNumber:_e,Unit:je,config:ge}),tw=qY({DenseMatrix:er,lsolve:Ix,lup:Qx,matrix:Ne,slu:Hx,typed:Z,usolve:sp}),oue=vne({BigNumber:_e,Unit:je,config:ge}),sue=Vne({BigNumber:_e,Unit:je,config:ge}),uue=Cre({add:ur,divide:Yr,factorial:Fo,isInteger:bt,isPositive:xa,multiply:yr,typed:Z}),lue=Mre({factorial:Fo,typed:Z}),cue=Zne({BigNumber:_e,Unit:je,config:ge}),fue=UY({add:ur,cbrt:Px,divide:Yr,equalScalar:ar,im:ep,isZero:an,multiply:yr,re:rp,sqrt:on,subtract:Lr,typeOf:$x,typed:Z,unaryMinus:fn}),pue=ZW({compareNatural:pn,typed:Z}),due=bj({abs:ht,add:ur,bignumber:Mt,divide:Yr,isNegative:Zn,isPositive:xa,larger:pt,map:wa,matrix:Ne,max:pp,multiply:yr,smaller:ft,subtract:Lr,typed:Z,unaryMinus:fn}),nw=ete({bignumber:Mt,addScalar:Gr,combinations:Ru,divideScalar:Rr,factorial:Fo,isInteger:bt,isNegative:Zn,larger:pt,multiplyScalar:qr,number:Mn,pow:Gt,subtractScalar:jt,typed:Z}),vue=TG({Unit:je,typed:Z}),mue=tte({addScalar:Gr,isInteger:bt,isNegative:Zn,stirlingS2:nw,typed:Z}),aw=Pee({abs:ht,add:ur,addScalar:Gr,atan:Mx,bignumber:Mt,column:Jx,complex:Pu,config:ge,cos:Jf,diag:zx,divideScalar:Rr,dot:Lu,equal:Vt,flatten:$o,im:ep,inv:Aa,larger:pt,matrix:Ne,matrixFromColumns:ap,multiply:yr,multiplyScalar:qr,number:Mn,qr:ip,re:rp,reshape:Bx,sin:zu,size:nt,smaller:ft,sqrt:on,subtract:Lr,typed:Z,usolve:sp,usolveAll:jx}),hue=xne({BigNumber:_e,Unit:je,config:ge}),gue=zne({BigNumber:_e,Unit:je,config:ge}),yue=Are({divide:Yr,dotDivide:_o,isNumeric:Ea,log:lp,map:wa,matrix:Ne,multiply:yr,sum:cp,typed:Z}),iw=bx({add:ur,divide:Yr,typed:Z}),bue=Lne({BigNumber:_e,Unit:je,config:ge}),xue=ane({BigNumber:_e,Unit:je,config:ge}),wue=wx({bignumber:Mt,add:ur,compare:Sa,divide:Yr,isInteger:bt,larger:pt,multiply:yr,partitionSelect:qu,smaller:ft,smallerEq:li,subtract:Lr,typed:Z}),vp=xx({add:ur,apply:tp,divide:Yr,isNaN:To,multiply:yr,subtract:Lr,typed:Z}),Eue=yne({BigNumber:_e,Unit:je,config:ge}),ow=ire({add:ur,compare:Sa,divide:Yr,partitionSelect:qu,typed:Z}),Sue=pre({add:ur,divide:Yr,matrix:Ne,mean:iw,multiply:yr,pow:Gt,sqrt:on,subtract:Lr,sum:cp,typed:Z}),Aue=_te({Complex:Nr,add:ur,divide:Yr,matrix:Ne,multiply:yr,typed:Z}),Due=sre({abs:ht,map:wa,median:ow,subtract:Lr,typed:Z}),Cue=Ex({map:wa,sqrt:on,typed:Z,variance:vp}),Nue=Nj({BigNumber:_e,Complex:Nr,add:ur,config:ge,divide:Yr,equal:Vt,factorial:Fo,gamma:dp,isNegative:Zn,multiply:yr,pi:gc,pow:Gt,sin:zu,smallerEq:li,subtract:Lr,typed:Z}),mp=aZ({abs:ht,add:ur,conj:ba,ctranspose:np,eigs:aw,equalScalar:ar,larger:pt,matrix:Ne,multiply:yr,pow:Gt,smaller:ft,sqrt:on,typed:Z}),sw=ZH({BigNumber:_e,DenseMatrix:er,SparseMatrix:Tn,addScalar:Gr,config:ge,cos:Jf,matrix:Ne,multiplyScalar:qr,norm:mp,sin:zu,typed:Z,unaryMinus:fn}),Mue=Yne({BigNumber:_e,Unit:je,config:ge}),uw=jee({identity:Yn,matrix:Ne,multiply:yr,norm:mp,qr:ip,subtract:Lr,typed:Z}),Tue=GH({multiply:yr,rotationMatrix:sw,typed:Z}),lw=Uee({abs:ht,add:ur,concat:fr,identity:Yn,index:Zx,lusolve:tw,matrix:Ne,matrixFromColumns:ap,multiply:yr,range:ci,schur:uw,subset:_t,subtract:Lr,transpose:Oo,typed:Z}),Oue=Gee({matrix:Ne,multiply:yr,sylvester:lw,transpose:Oo,typed:Z}),Fi={},Bi={},cw={},lt=vZ({mathWithTransform:Bi}),Ri=qZ({Node:lt}),On=UZ({Node:lt}),Da=jZ({Node:lt}),fw=ZZ({Node:lt}),Pi=yZ({Node:lt}),pw=AZ({Node:lt,ResultSet:Cx}),dw=CZ({Node:lt}),Xn=BZ({Node:lt}),vw=GZ({Node:lt}),_ue=Bte({classes:cw}),hp=ZY({math:Fi,typed:Z}),mw=PZ({Node:lt,typed:Z}),$ue=Dee({Chain:hp,typed:Z}),zi=IZ({Node:lt,size:nt}),Ii=hZ({Node:lt,subset:_t}),hw=EZ({matrix:Ne,Node:lt,subset:_t}),Kn=KZ({Unit:je,Node:lt,math:Fi}),Jn=QZ({Node:lt,SymbolNode:Kn,math:Fi}),dn=rY({AccessorNode:Ii,ArrayNode:Pi,AssignmentNode:hw,BlockNode:pw,ConditionalNode:dw,ConstantNode:Xn,FunctionAssignmentNode:mw,FunctionNode:Jn,IndexNode:zi,ObjectNode:Ri,OperatorNode:On,ParenthesisNode:Da,RangeNode:vw,RelationalNode:fw,SymbolNode:Kn,config:ge,numeric:qt,typed:Z}),gw=wte({ConstantNode:Xn,FunctionNode:Jn,OperatorNode:On,ParenthesisNode:Da,parse:dn,typed:Z}),gp=hte({bignumber:Mt,fraction:_i,AccessorNode:Ii,ArrayNode:Pi,ConstantNode:Xn,FunctionNode:Jn,IndexNode:zi,ObjectNode:Ri,OperatorNode:On,SymbolNode:Kn,config:ge,mathWithTransform:Bi,matrix:Ne,typed:Z}),Fue=nY({parse:dn,typed:Z}),yp=yte({AccessorNode:Ii,ArrayNode:Pi,ConstantNode:Xn,FunctionNode:Jn,IndexNode:zi,ObjectNode:Ri,OperatorNode:On,ParenthesisNode:Da,SymbolNode:Kn,add:ur,divide:Yr,equal:Vt,isZero:an,multiply:yr,parse:dn,pow:Gt,subtract:Lr,typed:Z}),ku=iY({parse:dn,typed:Z}),yw=VY({evaluate:ku}),bw=uY({evaluate:ku}),Uu=dte({bignumber:Mt,fraction:_i,AccessorNode:Ii,ArrayNode:Pi,ConstantNode:Xn,FunctionNode:Jn,IndexNode:zi,ObjectNode:Ri,OperatorNode:On,ParenthesisNode:Da,SymbolNode:Kn,add:ur,config:ge,divide:Yr,equal:Vt,isZero:an,mathWithTransform:Bi,matrix:Ne,multiply:yr,parse:dn,pow:Gt,resolve:gw,simplifyConstant:gp,simplifyCore:yp,subtract:Lr,typed:Z}),Bue=Ste({OperatorNode:On,parse:dn,simplify:Uu,typed:Z}),Rue=ute({parse:dn,typed:Z}),Pue=cY({Parser:bw,typed:Z}),zue=Nte({bignumber:Mt,fraction:_i,AccessorNode:Ii,ArrayNode:Pi,ConstantNode:Xn,FunctionNode:Jn,IndexNode:zi,ObjectNode:Ri,OperatorNode:On,ParenthesisNode:Da,SymbolNode:Kn,add:ur,config:ge,divide:Yr,equal:Vt,isZero:an,mathWithTransform:Bi,matrix:Ne,multiply:yr,parse:dn,pow:Gt,simplify:Uu,simplifyConstant:gp,simplifyCore:yp,subtract:Lr,typed:Z}),Iue=Dte({ConstantNode:Xn,FunctionNode:Jn,OperatorNode:On,ParenthesisNode:Da,SymbolNode:Kn,config:ge,equal:Vt,isZero:an,numeric:qt,parse:dn,simplify:Uu,typed:Z}),Lue=See({Help:yw,mathWithTransform:Bi,typed:Z});Hr(Fi,{e:ig,false:fie,fineStructure:pie,i:Dx,Infinity:die,LN10:vie,LOG10E:mie,NaN:hie,null:gie,phi:yie,SQRT1_2:xie,sackurTetrode:wie,tau:Nx,true:Eie,E:ig,version:Sie,efimovFactor:Aie,LN2:Die,pi:gc,replacer:Cie,reviver:_ue,SQRT2:Nie,typed:Z,PI:gc,weakMixingAngle:Mie,abs:ht,acos:Tie,acot:Oie,acsc:_ie,addScalar:Gr,arg:$ie,asech:Fie,asinh:Bie,atan:Mx,atanh:Rie,bigint:Pie,bitNot:zie,boolean:Iie,clone:Lie,combinations:Ru,complex:Pu,conj:ba,cos:Jf,cot:qie,csc:kie,cube:Uie,equalScalar:ar,erf:Hie,exp:Tx,expm1:jie,filter:Vie,forEach:Gie,format:Mo,getMatrixDataType:Qf,hex:Wie,im:ep,isInteger:bt,isNegative:Zn,isPositive:xa,isZero:an,LOG2E:Zie,lgamma:Yie,log10:Xie,log2:Ox,map:wa,multiplyScalar:qr,not:Ks,number:Mn,oct:Kie,pickRandom:Jie,print:Qie,random:eoe,re:rp,sec:roe,sign:_x,sin:zu,splitUnit:toe,square:noe,string:aoe,subtractScalar:jt,tan:ioe,typeOf:$x,acosh:ooe,acsch:soe,apply:tp,asec:uoe,bignumber:Mt,chain:$ue,combinationsWithRep:loe,cosh:coe,csch:foe,isNaN:To,isPrime:poe,randomInt:doe,sech:voe,sinh:moe,sparse:hoe,sqrt:on,tanh:goe,unaryMinus:fn,acoth:yoe,bin:boe,coth:xoe,fraction:_i,isNumeric:Ea,matrix:Ne,matrixFromFunction:woe,mode:Eoe,numeric:qt,prod:Fx,reshape:Bx,size:nt,squeeze:Soe,transpose:Oo,xgcd:Rx,zeros:et,asin:Aoe,cbrt:Px,concat:fr,count:Doe,ctranspose:np,diag:zx,divideScalar:Rr,dotDivide:_o,equal:Vt,flatten:$o,hasNumericValue:Coe,identity:Yn,kron:Noe,largerEq:Iu,leftShift:Moe,lsolve:Ix,matrixFromColumns:ap,nthRoot:Toe,ones:Ooe,qr:ip,resize:_oe,rightArithShift:$oe,round:$i,smaller:ft,subtract:Lr,to:Foe,unaryPlus:op,usolve:sp,xor:Boe,add:ur,atan2:Roe,bitAnd:Poe,bitOr:zoe,bitXor:Ioe,catalan:Loe,compare:Sa,compareText:Lx,cumsum:qoe,deepEqual:up,diff:koe,distance:Uoe,dot:Lu,equalText:Hoe,floor:qx,gcd:joe,hypot:Voe,larger:pt,log:lp,lsolveAll:Goe,matrixFromRows:Woe,min:Zoe,mod:Ux,multiply:yr,nthRoots:Yoe,or:Xoe,partitionSelect:qu,rightLogShift:Koe,slu:Hx,subset:_t,sum:cp,trace:Joe,usolveAll:jx,zpk2tf:Qoe,ceil:fp,compareNatural:pn,composition:ese,cross:rse,det:Vx,dotMultiply:tse,fix:Wx,index:Zx,intersect:nse,invmod:ase,lcm:ise,log1p:ose,max:pp,setCartesian:sse,setDistinct:use,setIsSubset:lse,setPowerset:cse,smallerEq:li,sort:fse,unequal:pse,and:dse,range:ci,row:vse,setDifference:Yx,setMultiplicity:mse,setSymDifference:Xx,column:Jx,inv:Aa,lup:Qx,pinv:hse,pow:Gt,setIntersect:ew,setUnion:gse,sqrtm:yse,vacuumImpedance:bse,wienDisplacement:xse,atomicMass:wse,bohrMagneton:Ese,boltzmann:Sse,conductanceQuantum:Ase,coulomb:Dse,deuteronMass:Cse,dotPow:Nse,electricConstant:Mse,elementaryCharge:Tse,expm:Ose,faraday:_se,fft:rw,gamma:dp,gravitationConstant:$se,hartreeEnergy:Fse,ifft:Bse,klitzing:Rse,loschmidt:Pse,magneticConstant:zse,molarMass:Ise,molarPlanckConstant:Lse,neutronMass:qse,nuclearMagneton:kse,planckCharge:Use,planckLength:Hse,planckTemperature:jse,protonMass:Vse,quantumOfCirculation:Gse,reducedPlanckConstant:Wse,rydberg:Zse,secondRadiation:Yse,speedOfLight:Xse,stefanBoltzmann:Kse,thomsonCrossSection:Jse,avogadro:Qse,bohrRadius:eue,createUnit:rue,divide:Yr,electronMass:tue,factorial:Fo,firstRadiation:nue,gravity:aue,inverseConductanceQuantum:iue,lusolve:tw,magneticFluxQuantum:oue,molarMassC12:sue,multinomial:uue,parse:dn,permutations:lue,planckMass:cue,polynomialRoot:fue,resolve:gw,setSize:pue,simplifyConstant:gp,solveODE:due,stirlingS2:nw,unit:vue,bellNumbers:mue,compile:Fue,eigs:aw,fermiCoupling:hue,gasConstant:gue,kldivergence:yue,mean:iw,molarVolume:bue,planckConstant:xue,quantileSeq:wue,simplifyCore:yp,variance:vp,classicalElectronRadius:Eue,evaluate:ku,median:ow,simplify:Uu,symbolicEqual:Bue,corr:Sue,freqz:Aue,leafCount:Rue,mad:Due,parser:Pue,rationalize:zue,std:Cue,zeta:Nue,derivative:Iue,norm:mp,rotationMatrix:sw,help:Lue,planckTime:Mue,schur:uw,rotate:Tue,sylvester:lw,lyap:Oue,config:ge});Hr(Bi,Fi,{filter:oae({typed:Z}),forEach:lae({typed:Z}),map:mae({typed:Z}),apply:eae({isInteger:bt,typed:Z}),or:aie({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),and:rie({add:ur,concat:fr,equalScalar:ar,matrix:Ne,not:Ks,typed:Z,zeros:et}),concat:Pae({isInteger:bt,matrix:Ne,typed:Z}),max:yae({config:ge,larger:pt,numeric:qt,typed:Z}),print:Jae({add:ur,matrix:Ne,typed:Z,zeros:et}),bitAnd:sie({add:ur,concat:fr,equalScalar:ar,matrix:Ne,not:Ks,typed:Z,zeros:et}),diff:Iae({bignumber:Mt,matrix:Ne,number:Mn,subtract:Lr,typed:Z}),min:Aae({config:ge,numeric:qt,smaller:ft,typed:Z}),subset:Fae({add:ur,matrix:Ne,typed:Z,zeros:et}),bitOr:cie({DenseMatrix:er,concat:fr,equalScalar:ar,matrix:Ne,typed:Z}),cumsum:Zae({add:ur,typed:Z,unaryPlus:op}),index:pae({Index:ot,getMatrixDataType:Qf}),sum:Hae({add:ur,config:ge,numeric:qt,typed:Z}),range:Nae({bignumber:Mt,matrix:Ne,add:ur,config:ge,isPositive:xa,larger:pt,largerEq:Iu,smaller:ft,smallerEq:li,typed:Z}),row:Oae({Index:ot,matrix:Ne,range:ci,typed:Z}),column:nae({Index:ot,matrix:Ne,range:ci,typed:Z}),mean:wae({add:ur,divide:Yr,typed:Z}),quantileSeq:Gae({add:ur,bignumber:Mt,compare:Sa,divide:Yr,isInteger:bt,larger:pt,multiply:yr,partitionSelect:qu,smaller:ft,smallerEq:li,subtract:Lr,typed:Z}),variance:Xae({add:ur,apply:tp,divide:Yr,isNaN:To,multiply:yr,subtract:Lr,typed:Z}),std:kae({map:wa,sqrt:on,typed:Z,variance:vp})});Hr(cw,{BigNumber:_e,Complex:Nr,Fraction:ya,Matrix:Bu,Node:lt,ObjectNode:Ri,OperatorNode:On,ParenthesisNode:Da,Range:bie,RelationalNode:fw,ResultSet:Cx,ArrayNode:Pi,BlockNode:pw,ConditionalNode:dw,ConstantNode:Xn,DenseMatrix:er,RangeNode:vw,Chain:hp,FunctionAssignmentNode:mw,SparseMatrix:Tn,IndexNode:zi,ImmutableDenseMatrix:kx,Index:ot,AccessorNode:Ii,AssignmentNode:hw,FibonacciHeap:Gx,Spa:Kx,Unit:je,SymbolNode:Kn,FunctionNode:Jn,Help:yw,Parser:bw});hp.createProxy(Fi);const xw=_.forwardRef(({onChange:e,value:r,dragDirection:t,showDragHandle:n=!0,dragScale:a,selectOnFocus:i=!0,bounds:o=V.R.INFINITE,resetValue:s,style:u,variant:l="outlined",className:c,children:f,onBlur:p,...d},v)=>{const[m,y,g]=ia(r.toString()),[E,h,w]=ia(!0),x=Ut(r),b=_.useCallback(()=>{if(w.current)return;h(!0);let B=!1,P=0;try{P=ku(g.current),B=P!=null}catch{B=!1}B?e==null||e(V.R.clamp(o,P)):y(x.current.toString())},[e,y]),D=Ut(b),A=_.useCallback(()=>{p==null||p(),b()},[p,b]);_.useEffect(()=>()=>{var B;return(B=D.current)==null?void 0:B.call(D)},[]);const S=_.useCallback(B=>{h(!1),y(B)},[y,h]),C=E?r:m,M=_.useCallback(B=>{h(!1),y(Math.round(V.R.clamp(o,B)).toString())},[y,h]),$=_.useCallback(B=>{h(!0),e==null||e(V.R.clamp(o,Math.round(B)))},[e,h]);return a==null&&V.R.isFinite(o)&&(a={x:V.R.span(o)*.01,y:V.R.span(o)*.02}),Me.jsxRuntimeExports.jsxs(Si,{ref:v,type:"text",variant:l,value:C.toString(),onChange:S,style:u,selectOnFocus:i,onKeyDown:B=>{ti(B)==="Enter"&&(b(),p==null||p())},onBlur:A,...d,children:[n&&Me.jsxRuntimeExports.jsx(bu,{direction:t,value:r,onChange:M,dragScale:a,resetValue:s,onDragEnd:$,onBlur:A}),f]})});xw.displayName="InputNumber";const Dl="input-switch",bp=_.forwardRef(({className:e,value:r,disabled:t,onChange:n,size:a="medium",...i},o)=>Me.jsxRuntimeExports.jsx("div",{className:V.CSS(V.CSS.BE(Dl,"container"),V.CSS.disabled(t),V.CSS.size(a)),children:Me.jsxRuntimeExports.jsxs("label",{className:V.CSS(V.CSS.BE(Dl,"track"),e),children:[Me.jsxRuntimeExports.jsx("input",{className:V.CSS.BE(Dl,"input"),type:"checkbox",ref:o,checked:r,onChange:s=>n(s.target.checked),value:"",disabled:t,...i}),Me.jsxRuntimeExports.jsx("span",{className:"pluto-input-switch__slider"})]})}));bp.displayName="InputSwitch";const ww=_.forwardRef(({value:e,style:r,onChange:t,className:n,onFocus:a,selectOnFocus:i=!1,placeholder:o,variant:s="outlined",sharp:u=!1,children:l,...c},f)=>Me.jsxRuntimeExports.jsx("textarea",{style:r,className:V.CSS(V.CSS.B("textarea"),V.CSS.BM("textarea",s),V.CSS.sharp(u),n),ref:f,value:e,onChange:p=>t(p.target.value.replace(/\n/g,"")),onFocus:p=>{i&&p.target.select(),a==null||a(p)},placeholder:o,...c}));ww.displayName="InputTextArea";const que=(e,r)=>new ye.m(e).add(r).sub(ye.m.utcOffset),kue={x:Number(ye.w.SECOND.valueOf())*.5,y:Number(ye.w.MINUTE.valueOf())},Ew=({value:e,onChange:r,tzInfo:t})=>{const n=new ye.m(e,"UTC"),a=n.sub(ye.m.utcOffset);if(a.after(ye.m.DAY)){const s=a.remainder(ye.m.DAY);r(Number(new ye.m(s,"local").valueOf()))}const i=_.useCallback(s=>{let u;if(typeof s=="number")u=new ye.m(s,"UTC");else{if(s.length===0)return;u=new ye.m(s,"local")}r(Number(u.valueOf()))},[r,t]);return{inputValue:n.fString("time",t),ts:n,handleChange:i}},Sw=_.forwardRef(({size:e,value:r,tzInfo:t="local",onChange:n,dragDirection:a,showDragHandle:i=!0,className:o,children:s,...u},l)=>{const{inputValue:c,ts:f,handleChange:p}=Ew({value:r,onChange:n,tzInfo:t});return Me.jsxRuntimeExports.jsxs(Si,{ref:l,value:c,className:V.CSS(V.CSS.B("input-time"),o),type:"time",step:"1",onChange:p,...u,children:[i&&Me.jsxRuntimeExports.jsx(bu,{direction:a,value:Number(f.valueOf()),onChange:p,dragScale:kue}),s]})});Sw.displayName="InputTime";const Aw=_.createContext({theme:ye.themeZ.parse(ye.SYNNAX_THEMES.synnaxLight),toggleTheme:()=>{},setTheme:()=>{}}),yc=()=>typeof(window==null?void 0:window.matchMedia)>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),og=()=>{var e;return((e=yc())==null?void 0:e.matches)??!0},Dw=({theme:e,themes:r=ye.SYNNAX_THEMES,setTheme:t,toggleTheme:n,lightTheme:a="synnaxLight",darkTheme:i="synnaxDark"})=>{const[o,s]=_.useState(og()?i:a),u=_.useMemo(()=>{if(e!=null){const f=ye.themeZ.parse(ye._.override(ye._.copy(ye.SYNNAX_LIGHT),e)),p=ye.themeZ.parse(ye._.override(ye._.copy(ye.SYNNAX_DARK),e));return e.key!=null&&e.key.length>0&&s(e.key),{synnaxLight:f,synnaxDark:p}}return Object.entries(r).reduce((f,[p,d])=>({...f,[p]:ye.themeZ.parse(d)}),{})},[e,r]),l=_.useCallback(()=>{const f=Object.keys(r),d=(f.indexOf(o)+1)%f.length;s(f[d])},[n,o,r]),c=_.useMemo(()=>u[o],[u,o]);return _.useEffect(()=>{var p;const f=()=>s(og()?i:a);return(p=yc())==null||p.addEventListener("change",f),()=>{var d;return(d=yc())==null?void 0:d.removeEventListener("change",f)}},[]),{theme:c,toggleTheme:n??l,setTheme:t??s}},Hu=()=>_.useContext(Aw),Uue=()=>Hu().theme,Hue=yu(ye.Provider.TYPE,({children:e,aetherKey:r,applyCSSVars:t=!0,...n})=>{const a=Dw(n),[{path:i},,o]=gu({aetherKey:r,type:ye.Provider.TYPE,schema:ye.Provider.z,initialState:{theme:a.theme}});return _.useEffect(()=>o({theme:a.theme}),[a.theme]),_.useLayoutEffect(()=>{t?V.CSS.applyVars(document.documentElement,u2(a.theme)):V.CSS.removeVars(document.documentElement,"--pluto")},[a.theme]),Me.jsxRuntimeExports.jsx(Aw.Provider,{value:a,children:Me.jsxRuntimeExports.jsx(Eo,{path:i,children:e})})}),jue=({...e})=>{const{toggleTheme:r}=Hu(),[t,n]=_.useState(!1);return Me.jsxRuntimeExports.jsx(bp,{value:t,onChange:a=>{r(),n(a)},...e})},Cw=e=>{const{theme:r}=Hu(),t=r.typography[e];return{...t,toString:()=>ye.fontString(r,e),baseSize:r.sizes.base,lineHeightPx:t.lineHeight*r.sizes.base,sizePx:t.size*r.sizes.base}},xp=_.createContext(null),Vue=()=>Sf(xp),Cl="sort",Gue=({hide:e=!1,columns:r,children:t})=>{const n=a2(),{setTransform:a,deleteTransform:i}=wo(),o=Cw("p").toString(),[s,u]=_.useState([null,!1]),[l,c]=_.useState({columns:r}),f=p=>{const[d,v]=s;d===p?v?(u([p,!v]),a(Cl,sg(p,!v))):(u([null,!1]),i(Cl)):(u([p,!0]),a(Cl,sg(p,!0)))};return _.useEffect(()=>{c(p=>({columns:Yue(p.columns.length===0?r:p.columns,n,o)}))},[o,n,r]),Me.jsxRuntimeExports.jsxs(xp.Provider,{value:l,children:[!e&&Me.jsxRuntimeExports.jsx(It.Space,{direction:"x",size:"medium",className:V.CSS(V.CSS.BE("list-col-header","container"),V.CSS.visible(!e)),children:l.columns.filter(({visible:p=!0})=>p).map(({key:p,cWidth:d,name:v})=>{const[m,y]=s;let g;const E=n[0];return p===m&&(g=y?Me.jsxRuntimeExports.jsx(Lt.Caret.Up,{}):Me.jsxRuntimeExports.jsx(Lt.Caret.Down,{})),Me.jsxRuntimeExports.jsx(Gu,{className:V.CSS.BE("list-col-header","item"),justify:"spaceBetween",level:"p",endIcon:g,style:{width:d},shrink:!1,onClick:()=>E!=null&&p in E&&f(p),children:v},p.toString())})}),t]})},Wue=({entry:e,onSelect:r,className:t,...n})=>{const{columns:a}=Vue(),{index:i}=n;return Me.jsxRuntimeExports.jsx(s2,{entry:e,onSelect:r,className:V.CSS(t,V.CSS.BE("list-col-item","container"),r!=null&&V.CSS.BEM("list-col-item","container","selectable")),align:"center",size:"medium",...n,children:a.filter(({visible:o=!0})=>o).map(o=>Me.jsxRuntimeExports.jsx(Zue,{entry:e,col:o,index:i},o.key.toString()))},e.key.toString())},Zue=({entry:e,index:r,col:{width:t,...n}})=>{const a={width:n.cWidth,userSelect:"none",padding:"1rem",flexShrink:0};if(n.render!=null)return n.render({key:n.key,entry:e,style:a,index:r});let i;return n.stringer!=null?i=n.stringer(e):i=e[n.key],Me.jsxRuntimeExports.jsx(wn,{className:V.CSS.BE("list-col-item-value",n.key.toString()),level:"p",style:a,shade:n.shade,weight:n.weight,children:ye.L(i)},n.key.toString())},Yue=(e,r,t,n=30)=>{const a=Xue(r,e);return e.map(i=>{if(i.width!=null)i.cWidth=i.width;else{const{width:o}=ye.dimensions(i.name,t),{width:s}=ye.dimensions(a[i.key],t);i.cWidth=Math.max(o,s)+n}return i})},Xue=(e,r)=>{const t={};return e.forEach(n=>r.forEach(({key:a,stringer:i})=>{const o=n[a];if(o==null)return;const s=i!=null?i(n):o.toString();(!(a in t)||s.length>t[a].length)&&(t[a]=s)})),t},sg=(e,r)=>({data:t})=>t.length===0?{data:t,transformed:!1}:{data:[...t].sort(ye.E.newFieldF(e,t[0],!r)),transformed:!0},Kue={Header:Gue,Item:Wue,itemHeight:5.5*6};function Zi(e,r,t){let n=t.initialDeps??[],a;return()=>{var i,o,s,u;let l;t.key&&((i=t.debug)!=null&&i.call(t))&&(l=Date.now());const c=e();if(!(c.length!==n.length||c.some((d,v)=>n[v]!==d)))return a;n=c;let p;if(t.key&&((o=t.debug)!=null&&o.call(t))&&(p=Date.now()),a=r(...c),t.key&&((s=t.debug)!=null&&s.call(t))){const d=Math.round((Date.now()-l)*100)/100,v=Math.round((Date.now()-p)*100)/100,m=v/16,y=(g,E)=>{for(g=String(g);g.length<E;)g=" "+g;return g};console.info(`%c⏱ ${y(v,5)} /${y(d,5)} ms`,`
|
|
141
|
+
font-size: .6rem;
|
|
142
|
+
font-weight: bold;
|
|
143
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(u=t==null?void 0:t.onChange)==null||u.call(t,a),a}}function Nl(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const Jue=(e,r)=>Math.abs(e-r)<1,Que=(e,r,t)=>{let n;return function(...a){e.clearTimeout(n),n=e.setTimeout(()=>r.apply(this,a),t)}},ele=e=>e,rle=e=>{const r=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let a=r;a<=t;a++)n.push(a);return n},tle=(e,r)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;const a=o=>{const{width:s,height:u}=o;r({width:Math.round(s),height:Math.round(u)})};if(a(t.getBoundingClientRect()),!n.ResizeObserver)return()=>{};const i=new n.ResizeObserver(o=>{const s=o[0];if(s!=null&&s.borderBoxSize){const u=s.borderBoxSize[0];if(u){a({width:u.inlineSize,height:u.blockSize});return}}a(t.getBoundingClientRect())});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},ug={passive:!0},nle=typeof window>"u"?!0:"onscrollend"in window,ale=(e,r)=>{const t=e.scrollElement;if(!t)return;const n=e.targetWindow;if(!n)return;let a=0;const i=nle?()=>{}:Que(n,()=>{r(a,!1)},e.options.isScrollingResetDelay),o=l=>()=>{a=t[e.options.horizontal?"scrollLeft":"scrollTop"],i(),r(a,l)},s=o(!0),u=o(!1);return u(),t.addEventListener("scroll",s,ug),t.addEventListener("scrollend",u,ug),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",u)}},ile=(e,r,t)=>{if(r!=null&&r.borderBoxSize){const n=r.borderBoxSize[0];if(n)return Math.round(n[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},ole=(e,{adjustments:r=0,behavior:t},n)=>{var a,i;const o=e+r;(i=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||i.call(a,{[n.options.horizontal?"left":"top"]:o,behavior:t})};class sle{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const n=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(a=>{a.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var a;return(a=n())==null?void 0:a.disconnect()},observe:a=>{var i;return(i=n())==null?void 0:i.observe(a,{box:"border-box"})},unobserve:a=>{var i;return(i=n())==null?void 0:i.unobserve(a)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([n,a])=>{typeof a>"u"&&delete t[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ele,rangeExtractor:rle,onChange:()=>{},measureElement:ile,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,n)=>{var a,i;const{startIndex:o,endIndex:s}=this.range??{startIndex:void 0,endIndex:void 0},u=this.calculateRange();(t||o!==(u==null?void 0:u.startIndex)||s!==(u==null?void 0:u.endIndex))&&((i=(a=this.options).onChange)==null||i.call(a,this,n))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.notify(!1,!1);return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(a,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a;const o=this.isScrolling;this.isScrolling=i,this.notify(o!==i,i)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,n)=>{const a=new Map,i=new Map;for(let o=n-1;o>=0;o--){const s=t[o];if(a.has(s.lane))continue;const u=i.get(s.lane);if(u==null||s.end>u.end?i.set(s.lane,s):s.end<u.end&&a.set(s.lane,!0),a.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Zi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,n,a,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Zi(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:o},s)=>{var u;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let f=l;f<t;f++){let p=(u=this.measurementsCache[f])==null?void 0:u.measureElement;p||(p=w=>{const x=i(f),b=this.elementsCache.get(x);if(!w){b&&(this.observer.unobserve(b),this.elementsCache.delete(x));return}b!==w&&(b&&this.observer.unobserve(b),this.observer.observe(w),this.elementsCache.set(x,w)),w.isConnected&&this.resizeItem(f,this.options.measureElement(w,void 0,this))});const d=i(f),v=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f),m=v?v.end+this.options.gap:n+a,y=s.get(d),g=typeof y=="number"?y:this.options.estimateSize(f),E=m+g,h=v?v.lane:f%this.options.lanes;c[f]={index:f,start:m,size:g,end:E,key:d,lane:h,measureElement:p}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Zi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,n,a)=>this.range=t.length>0&&n>0?ule({measurements:t,outerSize:n,scrollOffset:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=Zi(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,n,a,i)=>n===null?[]:t({startIndex:n.startIndex,endIndex:n.endIndex,overscan:a,count:i}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const n=this.options.indexAttribute,a=t.getAttribute(n);return a?parseInt(a,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(t,n)=>{const a=this.indexFromElement(t),i=this.getMeasurements()[a];if(!i||!t.isConnected){this.elementsCache.forEach((s,u)=>{s===t&&(this.observer.unobserve(t),this.elementsCache.delete(u))});return}const o=this.elementsCache.get(i.key);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(i.key,t)),this.resizeItem(a,this.options.measureElement(t,n,this))},this.resizeItem=(t,n)=>{const a=this.getMeasurements()[t];if(!a)return;const i=this.itemSizeCache.get(a.key)??a.size,o=n-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=Zi(()=>[this.getIndexes(),this.getMeasurements()],(t,n)=>{const a=[];for(let i=0,o=t.length;i<o;i++){const s=t[i],u=n[s];a.push(u)}return a},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const n=this.getMeasurements();if(n.length!==0)return Nl(n[Nw(0,n.length-1,a=>Nl(n[a]).start,t)])},this.getOffsetForAlignment=(t,n)=>{const a=this.getSize(),i=this.getScrollOffset();n==="auto"&&(t<=i?n="start":t>=i+a?n="end":n="start"),n==="start"?t=t:n==="end"?t=t-a:n==="center"&&(t=t-a/2);const o=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-a;return Math.max(Math.min(u,t),0)},this.getOffsetForIndex=(t,n="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const a=this.getMeasurements()[t];if(!a)return;const i=this.getSize(),o=this.getScrollOffset();if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:n="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,n),{adjustments:void 0,behavior:a})},this.scrollToIndex=(t,{align:n="auto",behavior:a}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(t,n);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[l]=Nl(this.getOffsetForIndex(t,s));Jue(l,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:a})}else this.scrollToIndex(t,{align:s,behavior:a})}))},this.scrollBy=(t,{behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var t;const n=this.getMeasurements();let a;return n.length===0?a=this.options.paddingStart:a=this.options.lanes===1?((t=n[n.length-1])==null?void 0:t.end)??0:Math.max(...n.slice(-this.options.lanes).map(i=>i.end)),a-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:n,behavior:a})=>{this.options.scrollToFn(t,{behavior:a,adjustments:n},this)},this.measure=()=>{var t,n;this.itemSizeCache=new Map,(n=(t=this.options).onChange)==null||n.call(t,this,!1)},this.setOptions(r)}}const Nw=(e,r,t,n)=>{for(;e<=r;){const a=(e+r)/2|0,i=t(a);if(i<n)e=a+1;else if(i>n)r=a-1;else return a}return e>0?e-1:0};function ule({measurements:e,outerSize:r,scrollOffset:t}){const n=e.length-1,i=Nw(0,n,s=>e[s].start,t);let o=i;for(;o<n&&e[o].end<t+r;)o++;return{startIndex:i,endIndex:o}}const lle=typeof document<"u"?eo.useLayoutEffect:eo.useEffect;function cle(e){const r=eo.useReducer(()=>({}),{})[1],t={...e,onChange:(a,i)=>{var o;i?to.flushSync(r):r(),(o=e.onChange)==null||o.call(e,a,i)}},[n]=eo.useState(()=>new sle(t));return n.setOptions(t),eo.useEffect(()=>n._didMount(),[]),lle(()=>n._willUpdate()),n}function fle(e){return cle({observeElementRect:tle,observeElementOffset:ale,scrollToFn:ole,...e})}const Mw=_.createContext({selected:[]}),Tw=_.createContext({onSelect:()=>{},clear:()=>{},getSelected:()=>[]}),wp=()=>_.useContext(Mw),Ow=()=>wp().selected,ju=()=>_.useContext(Tw),_w=_.memo(({value:e,children:r,...t})=>{const n=Af(),{onSelect:a,clear:i}=r2({...t,value:e,data:n}),o=Ut(e),s=_.useMemo(()=>({selected:ye.o(e)}),[e]),u=_.useMemo(()=>({onSelect:a,clear:i,getSelected:()=>ye.o(o.current)}),[a,i]);return Me.jsxRuntimeExports.jsx(Tw.Provider,{value:u,children:Me.jsxRuntimeExports.jsx(Mw.Provider,{value:s,children:r})})});_w.displayName="List.Selector";const ple=_w,$w=["ArrowUp"],Fw=["ArrowDown"],Bw=["Enter"],dle=[$w,Fw,Bw],Rw=_.createContext({hover:-1,setHover:()=>{}}),Ep=()=>_.useContext(Rw),vle=({children:e,initialHover:r=-1,disabled:t=!1})=>{const n=Af(),{transformedData:a}=Ei(),{onSelect:i}=ju(),[o,s,u]=ia(r),l=_.useRef(r);_.useEffect(()=>{t&&(l.current=o),s(t?-1:l.current)},[t]),_.useEffect(()=>{o>=a.length&&s(0)},[a.length]);const c=_.useRef(null),f=_.useCallback(({triggers:d,stage:v})=>{if(c.current!=null&&(clearInterval(c.current),c.current=null),v!=="start"||t)return;const m=n();if(ra(d,[Bw])){if(u.current===-1)return;i==null||i(m[u.current].key);return}const y=()=>{const g=n();ra(d,[$w],!0)?s(E=>E<=0?g.length-1:E-1):ra(d,[Fw],!0)&&s(E=>E>=g.length-1?0:E+1)};y(),c.current=setTimeout(()=>{c.current=setInterval(y,100)},200)},[i,t]);wi({triggers:dle,callback:f,loose:!0});const p=_.useMemo(()=>({hover:o,setHover:s}),[o,s]);return Me.jsxRuntimeExports.jsx(Rw.Provider,{value:p,children:e})},Pw=_.createContext({hasMore:!1,onFetchMore:()=>{}}),zw=_.createContext({setHasMore:()=>{},setOnFetchMore:()=>{}}),mle=()=>_.useContext(Pw),hle=()=>_.useContext(zw),gle=({children:e})=>{const[r,t]=_.useState(!1),[n,a]=xo(()=>{}),i=_.useCallback(()=>{var u;(u=n.current)==null||u.call(n)},[n]),o=_.useMemo(()=>({hasMore:r,onFetchMore:i}),[r,i]),s=_.useMemo(()=>({setHasMore:t,setOnFetchMore:u=>{a(()=>u)}}),[t,a]);return Me.jsxRuntimeExports.jsx(Pw.Provider,{value:o,children:Me.jsxRuntimeExports.jsx(zw.Provider,{value:s,children:e})})},yle=(e,r,t)=>{var o;const n=e>r?1:-1;let a=e;const i=e+n*2;V.R.contains({lower:0,upper:t.children.length},i)?a=e+n*2:a=e,(o=t.children[a])==null||o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},ble=({itemHeight:e,children:r,overscan:t=5,className:n,...a})=>{var b;const{hasMore:i,onFetchMore:o}=mle(),{hover:s,setHover:u}=Ep(),{transformedData:l,emptyContent:c,transformed:f,sourceData:p}=Ei(),d=Ow(),{onSelect:v}=ju(),m=_.useRef(null),y=fle({count:l.length,getScrollElement:()=>m.current,estimateSize:()=>e,overscan:t}),g=yf(l);_.useLayoutEffect(()=>{g==null||g.length===0||l.length>0&&l[0].key!==g[0].key&&(y==null||y.scrollToIndex(0),u(0))},[l]),_.useEffect(()=>{if(m.current==null)return;const D=y.calculateRange();if(D==null)return;const A=V.R.construct(D.startIndex+2,D.endIndex-2);V.R.contains(A,s)||y.scrollToIndex(s)},[s,e]);const E=y.getVirtualItems(),h=(b=E.at(-1))==null?void 0:b.index,w=l.length;if(_.useEffect(()=>{h===w-1&&i&&(o==null||o())},[h,w,i]),e<=0)throw new Error("itemHeight must be greater than 0");const x=l.length===0;return Me.jsxRuntimeExports.jsx("div",{ref:m,className:V.CSS(n,V.CSS.BE("list","container"),x&&V.CSS.BM("list","empty")),...a,children:x?c:Me.jsxRuntimeExports.jsx("div",{className:V.CSS.BE("list","virtualizer"),style:{height:y.getTotalSize()},children:E.map(({index:D,start:A})=>{const S=l[D];let C=D;return f&&(C=p.findIndex(M=>M.key===S.key)),r({key:S.key,sourceIndex:C,index:D,onSelect:v,entry:S,selected:d.includes(S.key),hovered:D===s,translate:A})})})})},Iw=({itemHeight:e=50,...r})=>{const{transformedData:t,transformed:n,emptyContent:a,sourceData:i}=Ei(),{hover:o}=Ep(),{selected:s}=wp(),{onSelect:u}=ju(),l=_.useRef(null),c=yf(o)??0;return _.useLayoutEffect(()=>{l.current!=null&&yle(o,c,l.current)},[o,e]),Me.jsxRuntimeExports.jsx(It.Space,{className:V.CSS.BE("list","container"),ref:l,size:0,...r,children:t.length===0?a:Me.jsxRuntimeExports.jsx(Me.jsxRuntimeExports.Fragment,{children:t.map((f,p)=>{let d=p;return n&&(d=i.findIndex(v=>v.key===f.key)),r.children({key:f.key,index:p,sourceIndex:d,onSelect:u,entry:f,selected:s.includes(f.key),hovered:p===o})})})})};Iw.Virtual=ble;const xle={statuses:[],add:()=>{}},Sp=_.createContext(xle),Ap=_.useContext,wle=yu(ye.Aggregator.TYPE,({aetherKey:e,children:r,maxHistory:t=500})=>{const[{path:n},{statuses:a},i]=gu({aetherKey:e,type:ye.Aggregator.TYPE,schema:ye.aggregatorStateZ,initialState:{statuses:[]}});if(t!=null&&a.length>t){const u=Math.floor(t*.9);i(l=>({...l,statuses:a.slice(0,u)}))}const o=_.useCallback(u=>{const l={time:ye.m.now(),key:ye.mt.id(),...u};i(c=>({...c,statuses:[l,...c.statuses]}))},[i]),s=_.useMemo(()=>({statuses:a,add:o}),[a,o]);return Me.jsxRuntimeExports.jsx(Sp.Provider,{value:s,children:Me.jsxRuntimeExports.jsx(Eo,{path:n,children:r})})}),Ele=()=>Ap(Sp).add,Sle=ye.w.seconds(5),Ale=(e={})=>{const{statuses:r}=Ap(Sp),{expiration:t=Sle}=e,n=Ut(r),[a,i]=_.useState(()=>ye.m.now()),[o,s]=_.useState([]),u=r.filter(c=>{const f=c.time.after(a);return f&&setTimeout(()=>i(p=>c.time.after(p)?c.time:p),t.milliseconds),f&&!o.includes(c.key)}),l=_.useCallback(c=>{const f=n.current.find(d=>d.key===c);if(f==null)return;const p=Cle(f,n.current);s(d=>[...d,...p.map(v=>v.key)])},[s]);return{statuses:Dle(u),silence:l}},Dle=e=>e.reduce((r,t)=>{const{message:n,variant:a}=t,i=r.find(o=>o.message===n&&o.variant===a);return i!=null?(i.count+=1,i.time.before(t.time)&&(i.time=t.time)):r.push({...t,count:1}),r},[]),Cle=(e,r)=>r.filter(t=>{const{message:n,variant:a}=t;return n===e.message&&a===e.variant}),Lw={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-z)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l6)",secondary:"var(--pluto-secondary-z)"},qw=({variant:e="info",level:r="p",hideIcon:t=!1,className:n,...a})=>{const i=e==="loading"?Me.jsxRuntimeExports.jsx(Lt.Loading,{}):Me.jsxRuntimeExports.jsx(Lt.Circle,{});return Me.jsxRuntimeExports.jsx(Gu,{color:Lw[e],className:V.CSS(n,V.CSS.B("status-text")),level:r,startIcon:!t&&i,...a})},Nle=({style:e,...r})=>Me.jsxRuntimeExports.jsx(It.Center,{style:e,grow:!0,children:Me.jsxRuntimeExports.jsx(qw,{...r})}),Ca=qw;Ca.Centered=Nle;const Vu={height:150},Ml=Me.jsxRuntimeExports.jsx(Ca.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:Vu,children:"No Results"}),Mle=Me.jsxRuntimeExports.jsx(Ca.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:Vu,children:"Type to search"}),Tle=Me.jsxRuntimeExports.jsx(Ca.Centered,{level:"h2",variant:"disabled",hideIcon:!0,style:Vu,children:Me.jsxRuntimeExports.jsx(Lt.Loading,{})}),Ole=({error:e})=>Me.jsxRuntimeExports.jsx(Ca.Centered,{level:"h4",variant:"error",style:Vu,children:e.message}),_le=e=>e,kw=({debounce:e=250,searcher:r,value:t,onChange:n,pageSize:a=10,filter:i=_le})=>{const[o,s]=ye.usePurePassthrough({value:t,onChange:n,initial:""}),u=Ut(o),l=_.useRef(!1),c=_.useRef(!0),f=_.useRef(0),{setSourceData:p,setEmptyContent:d,getDefaultEmptyContent:v}=wo(),{setHasMore:m,setOnFetchMore:y}=hle();_.useEffect(()=>d(Mle),[d]);const g=_.useCallback((w=!1)=>{if(u.current.length>0||l.current||r==null)return;w&&(f.current=0,c.current=!0,m(!0)),l.current=!0,d(Tle),(async()=>{try{let b=await r.page(f.current,a);b=i(b),b.length===0&&d(v()??Ml),b.length<a&&(c.current=!1,m(!1)),f.current+=a,p(w?b:D=>[...D,...b])}catch(b){l.current=!1,d(Me.jsxRuntimeExports.jsx(Ole,{error:b}))}finally{l.current=!1}})()},[r,p,a,i]);_.useEffect(()=>{g(!0),y(g)},[g]);const E=Ry(w=>{if(w.length===0){g(!0);return}if(r==null)return d(Ml);r.search(w).then(x=>{x.length===0&&d(Ml),p(i(x))}).catch(x=>{d(Me.jsxRuntimeExports.jsx(Ca.Centered,{level:"h4",variant:"error",children:x.message}))})},e,[r,p,d,i]),h=_.useCallback(w=>{s(w),E(w)},[s,E]);return{value:o,onChange:h}},$le=e=>Me.jsxRuntimeExports.jsx(Si,{placeholder:"Search",...e}),Fle=({children:e=$le,...r})=>e(kw(r)),Ble=e=>({key:r,...t})=>Me.jsxRuntimeExports.jsx(e,{...t},r),Uw=e=>typeof e=="function",lg=ye.w$1.getOS()==="Windows",Rle={Meta:lg?Lt.Keyboard.Control:Lt.Keyboard.Command,Alt:lg?()=>"Alt":Lt.Keyboard.Option},Js=({direction:e="y",className:r,padded:t=!1,...n})=>(t===!0&&(t="center"),Me.jsxRuntimeExports.jsx("div",{className:V.CSS(V.CSS.B("divider"),V.CSS.dir(e),t!==!1&&V.CSS.BM("divider","padded"),typeof t=="string"&&V.CSS.loc(t),r),...n})),Ple=Object.freeze(Object.defineProperty({__proto__:null,Divider:Js},Symbol.toStringTag,{value:"Module"})),zle=e=>_.isValidElement(e)&&!("hydrate"in e.props),Gu=({level:e="h1",divided:r=!1,startIcon:t,endIcon:n,children:a,color:i,className:o,noWrap:s=!1,shade:u,weight:l,...c})=>{const f=Ef(i,u),p=_.Children.toArray(t),d=_.Children.toArray(n),v=Dp(e,a,f,u,l);return Me.jsxRuntimeExports.jsxs(It.Space,{className:V.CSS(V.CSS.B("text-icon"),V.CSS.BM("text-icon",e),V.CSS.noWrap(s),o),direction:"x",size:"small",align:"center",...c,style:{...c.style,color:f},children:[p,r&&t!=null&&Me.jsxRuntimeExports.jsx(Js,{direction:"y"}),v,r&&n!=null&&Me.jsxRuntimeExports.jsx(Js,{direction:"y"}),d]})},Dp=(e,r=[],t,n,a)=>{const i=ye.A(r),o=[];let s=[];const u={color:t,level:e,shade:n,weight:a};return i.forEach(l=>{l!=null&&(typeof l=="string"||typeof l=="number"||!zle(l)?s.push(l):(s.length>0&&(o.push(Me.jsxRuntimeExports.jsx(wn,{...u,children:s},s[0])),s=[]),o.push(l)))}),s.length>0&&o.push(Me.jsxRuntimeExports.jsx(wn,{...u,children:s},s[0])),o.length===1?o[0]:o},Hw=(e,r)=>{for(;e!=null&&!r(e);)e=e.parentElement;return e},bc=()=>document.getElementById("root")??document.body,jw=$y,Ile={width:0,left:0,dialogLoc:V.J.BOTTOM_LEFT},Tl="--pluto-dropdown-z-index",Cp=({visible:e,children:r,location:t,keepMounted:n=!0,className:a,variant:i="connected",close:o,maxHeight:s,open:u,toggle:l,zIndex:c=5,...f})=>{const p=_.useRef(null),d=Ut(e),v=_.useRef(null),m=_.useRef(void 0),[{dialogLoc:y,width:g,...E},h]=_.useState({...Ile}),w=_.useCallback(()=>{if(p.current==null||v.current==null||!d.current)return;const B=i==="floating"?kle:Hle,{adjustedDialog:P,location:R}=B({target:p.current,dialog:v.current,initial:t,prefer:m.current!=null?[m.current]:void 0});m.current=R;const N={dialogLoc:R,width:V.To.width(P),left:V.To.left(P)};if(R.y==="bottom")N.top=V.To.top(P);else{const O=V.To.construct(window.document.documentElement);N.bottom=V.To.height(O)-V.To.bottom(P)}h(N)},[t,i]);_.useLayoutEffect(()=>{w()},[e,w]),wi({triggers:[["Escape"]],callback:o,loose:!0});const x=Zl(w,{enabled:e}),b=Ns(p,x),D=Zl(w,{enabled:e}),A=Ns(v,D);let S={};i!=="modal"&&p.current!=null&&(S={...E},i==="connected"&&(S.width=g)),typeof s=="number"&&(S.maxHeight=s),e&&(S.zIndex=c,S[Tl]=c);const C=i==="connected"?It.Pack:It.Space;bf({ref:v,exclude:B=>{var R;return(R=p.current)!=null&&R.contains(B.target)?!0:Hw(B.target,N=>{if(!((N==null?void 0:N.getAttribute("role"))==="dialog"))return!1;const U=N.style.zIndex;return Number(U)>c})!=null},onClickOutside:o});let M=Me.jsxRuntimeExports.jsx(It.Space,{ref:A,className:V.CSS(V.CSS.BE("dropdown","dialog"),V.CSS.loc(y.x),V.CSS.loc(y.y),V.CSS.visible(e),V.CSS.M(i),typeof s=="string"&&V.CSS.B(`height-${s}`)),role:"dialog",empty:!0,style:S,children:(n||e)&&r[1]});i==="floating"?M=to.createPortal(M,bc()):i==="modal"&&(M=to.createPortal(Me.jsxRuntimeExports.jsx(It.Space,{className:V.CSS(V.CSS.BE("dropdown","bg"),V.CSS.visible(e)),role:"dialog",empty:!0,align:"center",style:{zIndex:c,[Tl]:c},children:M}),bc()));const $=_.useMemo(()=>({close:o}),[o]);return Me.jsxRuntimeExports.jsx(gf.Provider,{value:$,children:Me.jsxRuntimeExports.jsxs(C,{...f,ref:b,className:V.CSS(a,V.CSS.B("dropdown"),V.CSS.visible(e),V.CSS.M(i),V.CSS.loc(y.x),V.CSS.loc(y.y)),direction:"y",reverse:y.y==="top",style:{...f.style,[Tl]:c},children:[r[0],M]})})};Cp.displayName="Dropdown";const Lle={alignments:["end"],disable:["center"],prefer:[{y:"bottom"}]},qle=6,kle=({target:e,dialog:r,initial:t,prefer:n})=>{const a=Sc.dialog({container:V.To.construct(0,0,window.innerWidth,window.innerHeight),target:V.To.construct(e),dialog:V.To.construct(r),...Lle,initial:t,prefer:n}),{location:i}=a;return{adjustedDialog:V.To.translate(a.adjustedDialog,"y",ye.G(i.y==="top")*qle),location:i}},Ol={alignments:["center"],disable:[{y:"center"}],initial:{x:"center"},prefer:[{y:"bottom"}]},Ule=1,Hle=({target:e,dialog:r,initial:t=Ol.initial,prefer:n=Ol.prefer})=>{let a=V.To.construct(e),i=V.To.construct(0,0,window.innerWidth,window.innerHeight),o=e.parentElement;for(;o!=null;){if(window.getComputedStyle(o).getPropertyValue("container-type")!=="normal"){i=V.To.construct(o),a=V.To.translate(a,V.q.scale(V.To.topLeft(i),-1));break}o=o.parentElement}const s={target:a,dialog:V.To.resize(V.To.construct(r),"x",V.To.width(a)),container:i,...Ol,initial:t,prefer:n},u=Sc.dialog(s),{location:l}=u;return{adjustedDialog:V.To.translate(u.adjustedDialog,"y",ye.G(l.y==="bottom")*Ule),location:l}},jle=Object.freeze(Object.defineProperty({__proto__:null,Dialog:Cp,use:jw},Symbol.toStringTag,{value:"Module"})),xc=Ft.z.object({key:Ft.z.string().or(Ft.z.number()),type:Ft.z.string(),elementID:Ft.z.string().optional(),data:Ft.z.record(Ft.z.unknown()).optional()}),Vle=Ft.z.object({source:xc,items:Ft.z.array(xc)}),Vw={key:"",type:""},na={source:Vw,items:[]},Np="file",Gle={key:"file",type:Np},Wle=(e,r)=>e.dataTransfer.effectAllowed==="all"&&r.items.length===0,wc=_.createContext(null),_l={...na,onSuccessfulDrop:()=>{}},Li=()=>_.useContext(wc),Gw=({children:e,useState:r=_.useState,onDropOutside:t})=>{const n=_.useContext(wc),[a,i]=r(na),o=_.useRef(_l),s=_.useRef(new Set),u=_.useCallback((d,v,m)=>{o.current={source:d,items:v,onSuccessfulDrop:m},i({source:d,items:v})},[i,t]),l=_.useCallback(({target:d,dropped:v})=>{var y,g;const m=o.current.items;(g=(y=o.current).onSuccessfulDrop)==null||g.call(y,{target:d,dropped:v,hauled:m}),o.current=_l,i(na)},[i]),c=_.useCallback(d=>{let v=null;s.current.forEach(m=>{v==null&&(v=m(o.current,d))}),v!=null&&l(v),o.current=_l,i(na)},[i]),f=_.useCallback(d=>(s.current.add(d),()=>s.current.delete(d)),[]),p=_.useMemo(()=>n??{state:a,start:u,end:c,drop:l,bind:f},[a,u,c,l,n]);return Me.jsxRuntimeExports.jsx(wc.Provider,{value:p,children:e})},Mp=()=>{const e=_.useRef(na),r=Li();return r==null||(e.current=r.state),e},Ww=()=>{const e=Li();return e==null?na:e.state},Zw=({type:e,key:r})=>{const t=r??_.useId(),n=_.useMemo(()=>({key:t,type:e}),[t,e]),a=Li();if(a==null)return{startDrag:()=>{},onDragEnd:()=>{}};const{start:i,end:o}=a;return{startDrag:_.useCallback((s,u)=>i(n,s,u),[i,n]),onDragEnd:s=>o(V.q.construct({x:s.screenX,y:s.screenY}))}},Tp=({type:e,key:r,canDrop:t,onDrop:n,onDragOver:a})=>{const i=Mp(),o=Li();if(o==null)return{onDragOver:()=>{},onDrop:()=>{}};const{drop:s}=o,u=r??_.useId(),l=_.useMemo(()=>({key:u,type:e}),[u,e]),c=_.useCallback(p=>{t(i.current)&&(p.preventDefault(),a==null||a({event:p,...i.current}))},[i,t]),f=_.useCallback(p=>{t(i.current)&&(p.preventDefault(),s({target:l,dropped:n({...i.current,event:p})}))},[i,n,t,s,l]);return{onDragOver:c,onDrop:f}},Yw=({type:e,key:r,...t})=>{const n=r??_.useId(),a=_.useMemo(()=>({key:n,type:e}),[n,e]),i=Zw(a),o=Tp({...t,...a});return{...i,...o}},Xw=e=>({items:r})=>r.some(t=>t.type===e),Kw=(e,r)=>r.filter(t=>t.type===e),Zle=({type:e,key:r,...t})=>{const n=Li();if(n==null)return;const a=Mp(),{bind:i}=n,o=_.useRef(!1),s=r??_.useId(),u=_.useMemo(()=>({key:s,type:e}),[s,e]),l=_.useRef({...t,type:e,key:s});_.useEffect(()=>{const c=i((d,v)=>{const{canDrop:m,onDrop:y}=l.current;if(!m(d)||!o.current)return null;const g=y({...d},v);return{target:u,dropped:g}}),f=()=>{const{canDrop:d}=l.current;o.current=!1,d(a.current)},p=d=>{const{onDragOver:v,canDrop:m}=l.current,y=V.To.construct(window.document.documentElement);V.To.contains(y,V.q.construct(d.clientX,d.clientY)),o.current=!0,m(a.current)&&(v==null||v(a.current))};return document.body.addEventListener("dragleave",p),document.body.addEventListener("mouseenter",f),()=>{c(),document.body.removeEventListener("dragleave",p),document.body.removeEventListener("mouseenter",f)}},[])},Yle=Object.freeze(Object.defineProperty({__proto__:null,FILE:Gle,FILE_TYPE:Np,Provider:Gw,ZERO_DRAGGING_STATE:na,ZERO_ITEM:Vw,canDropOfType:Xw,draggingStateZ:Vle,filterByType:Kw,isFileDrag:Wle,itemZ:xc,useContext:Li,useDrag:Zw,useDragAndDrop:Yw,useDraggingRef:Mp,useDraggingState:Ww,useDrop:Tp,useDropOutside:Zle},Symbol.toStringTag,{value:"Module"})),Xle={delay:ye.w.milliseconds(750),startAccelerating:()=>{}},Op=_.createContext(Xle),Jw=()=>_.useContext(Op),Kle=({delay:e=ye.w.milliseconds(700),accelerate:r=!0,acceleratedDelay:t=ye.w.minutes(60),accelerationDelay:n=ye.w.seconds(0),children:a})=>{const[i,o]=_.useState(!1),s=_.useRef(null),u=_.useCallback(()=>{i||!r||(o(!0),s.current=setTimeout(()=>{o(!1)},new ye.w(n).milliseconds))},[i,n]);return Me.jsxRuntimeExports.jsx(Op.Provider,{value:{delay:i?t:e,startAccelerating:u},children:a})},Jle=150,Qw=["top","bottom"],e3=["left","right"],r3=[...e3,...Qw],cg=[...r3,"center"],Qle={[V.J.xyToString(V.J.TOP_RIGHT)]:(e,r)=>V.q.translate(e,"x",-V.To.width(r)),[V.J.xyToString(V.J.TOP_LEFT)]:(e,r)=>V.q.translate(e,"x",V.To.width(r)),[V.J.xyToString(V.J.BOTTOM_RIGHT)]:(e,r)=>V.q.translate(e,"x",-V.To.width(r)),[V.J.xyToString(V.J.BOTTOM_LEFT)]:(e,r)=>V.q.translate(e,"x",V.To.width(r))},$l=(e,r,t)=>{for(const n of t)if(Math.abs(V.To.loc(r,n)-V.To.loc(e,n))>Jle)return n;return t[0]},t3=(e,r,t)=>{const n=V.J.location.safeParse(e),a=o=>{let s;return o==="center"?s=r3:V.J.isX(o)?s=["center",...Qw]:s=["center",...e3],V.J.construct($l(r,t,s))};if(n.success)return V.J.constructXY(n.data,a(n.data));if(e!=null){const o={...e};return o.x==null&&o.y!=null?o.x=a(V.J.construct(o.y)):o.y==null&&o.x!=null?o.y=a(V.J.construct(o.x)):o.x==null&&o.y==null&&(o.x=$l(r,t,cg),o.y=a(V.J.construct(o.x))),V.J.constructXY(o)}const i=$l(r,t,cg);return V.J.constructXY(i,a(i))},ece=(e,r)=>{let t=e;for(;t!=null;){if(t.id===r)return t;t=t.parentElement}return e},n3=({delay:e,children:r,location:t,hide:n=!1})=>{const{startAccelerating:a,delay:i}=Jw(),o=new ye.w(e??i),[s,u,l]=ia(null),[c,f]=_.useState(""),p=_.useRef(null),d=_.useId(),v=_.useRef(null),m=_.useRef(null),y=_.useCallback(D=>{D==null&&l.current==null||m.current!=null||(D!=null?(u(D),m.current=setTimeout(()=>{f(V.CSS.M("loaded")),m.current=null},1)):(f(""),m.current=setTimeout(()=>{u(null),m.current=null},500)))},[]),g=_.useCallback((D,A)=>{var N,O,U;if(!A||n)return(N=v.current)==null||N.call(v),y(null);a();const S=V.To.construct(ece(D.target,d));V.To.contains(S,V.q.construct(D))||((O=v.current)==null||O.call(v),y(null));const C=V.To.construct(document.documentElement),M=t3(t,S,C);let $=V.To.xyLoc(S,M);const B=Qle[V.J.xyToString(M)];B!=null&&($=B($,S));const P=V.To.construct(document.body);y({location:M,position:V.q.translate($,V.q.scale(V.To.topLeft(P),-1)),triggerDims:V.To.dims(S)}),(U=v.current)==null||U.call(v);const R=F=>{const q=V.q.construct(F);V.To.contains(S,q)||(y(null),document.removeEventListener("mousemove",R),v.current=null,p.current!=null&&clearTimeout(p.current))};document.addEventListener("mousemove",R),v.current=()=>document.removeEventListener("mousemove",R),document.addEventListener("mousedown",()=>{var F;y(null),(F=v.current)==null||F.call(v)},{once:!0})},[a,t,n,d,o.milliseconds]);n&&s!=null&&y(null);const E=_.useCallback(D=>{p.current=setTimeout(()=>g(D,!0),o.milliseconds)},[g,o.milliseconds]),h=_.useCallback(D=>{p.current!=null&&clearTimeout(p.current),g(D,!1)},[g]),[w,x]=r,b=document.body;return Me.jsxRuntimeExports.jsxs(Me.jsxRuntimeExports.Fragment,{children:[s!=null&&to.createPortal(Me.jsxRuntimeExports.jsx("div",{className:V.CSS(V.CSS.B("tooltip"),V.CSS.loc(s.location.x),V.CSS.loc(s.location.y),c),style:{"--pos-x":V.CSS.px(s.position.x),"--pos-y":V.CSS.px(s.position.y),"--el-width":V.CSS.px(s.triggerDims.width)},children:Uw(w)?w(s):a3(w)},d),b),_.cloneElement(x,{id:d,onMouseEnter:E,onMouseLeave:h,onMouseDown:_.useCallback(D=>{var A,S;h(D),(S=(A=x.props).onMouseDown)==null||S.call(A,D)},[g])})]})},a3=e=>typeof e=="string"||typeof e=="number"||!_.isValidElement(e)?Me.jsxRuntimeExports.jsx(wn,{level:"small",children:e}):e,_p=e=>{const r=_.forwardRef(({tooltipDelay:t,tooltip:n,tooltipLocation:a,...i},o)=>{const s=Me.jsxRuntimeExports.jsx(e,{ref:o,...i});return n==null?s:Me.jsxRuntimeExports.jsxs(n3,{delay:t,location:a,children:[n,s]})});return r.displayName=`Tooltip.Wrap(${e.displayName??e.name})`,r},i3=_p(({size:e="medium",variant:r="filled",type:t="button",className:n,children:a,iconSpacing:i,sharp:o=!1,disabled:s=!1,loading:u=!1,level:l,triggers:c,startIcon:f=[],delay:p=0,onClick:d,color:v,status:m,...y})=>{u&&(f=[...ye.A(f),Me.jsxRuntimeExports.jsx(Lt.Loading,{},"loader")]),i==null&&(i=e==="small"?"small":"medium");const g=E=>{if(s)return;if((p instanceof ye.w?p:ye.w.milliseconds(p)).isZero)return d==null?void 0:d(E)};return wi({triggers:c,callback:_.useCallback(({stage:E})=>{E==="end"&&g(new MouseEvent("click"))},[g])}),Me.jsxRuntimeExports.jsx(Gu,{el:"button",className:V.CSS(V.CSS.B("btn"),V.CSS.size(e),V.CSS.sharp(o),V.CSS.disabled(s),m!=null&&V.CSS.M(m),V.CSS.BM("btn",r),n),type:t,level:l??ye.ComponentSizeLevels[e],size:i,onClick:g,noWrap:!0,color:V.cssString(v),startIcon:f,...y,children:a})}),rce=(e,r,t,n)=>r===!0?"var(--pluto-gray-l5)":t!=null?V.cssString(t):e==="filled"?"var(--pluto-text-on-primary)":"var(--pluto-text-color)",o3=_.forwardRef(({children:e,className:r,variant:t="text",size:n="medium",sharp:a=!1,disabled:i=!1,loading:o=!1,onClick:s,...u},l)=>(o&&(e=Me.jsxRuntimeExports.jsx(Lt.Loading,{})),Me.jsxRuntimeExports.jsx("button",{ref:l,className:V.clsx(r,V.CSS.B("btn"),V.CSS.B("btn-icon"),V.CSS.size(n),V.CSS.sharp(a),V.CSS.BM("btn",t),V.CSS.disabled(i)),onClick:i?void 0:s,...u,children:typeof e=="string"?e:_.cloneElement(e,{color:rce(t,i,u.color),fill:"currentColor",...e.props})})));o3.displayName="ButtonIcon";const $p=_p(o3),s3=e=>({value:r,onClick:t,onChange:n,checkedVariant:a="filled",uncheckedVariant:i="outlined",rightClickToggle:o=!1,...s})=>Me.jsxRuntimeExports.jsx(e,{...s,checked:r,onClick:u=>{t==null||t(u),!o&&n(!r)},onContextMenu:u=>{u.preventDefault(),u.stopPropagation(),o&&n(!r)},className:V.CSS(V.CSS.B("btn-toggle"),s.className),variant:r?a:i}),u3=s3(i3);u3.displayName="ButtonToggle";const l3=s3($p);l3.displayName="ButtonToggleIcon";exports.ALPHANUMERIC_KEYS=xf;exports.ALPHANUMERIC_KEYS_SET=zy;exports.Aggregator=wle;exports.Button=i3;exports.CONTEXT_SELECTED=Df;exports.CONTEXT_TARGET=Ts;exports.Column=Kue;exports.ColumnContext=xp;exports.Composite=Eo;exports.Config=Kle;exports.Context=Op;exports.Context$1=xz;exports.ContextMenu=o2;exports.Core=Iw;exports.CoreDateTime=Yy;exports.DataProvider=mz;exports.Date=h2;exports.DateTime=nz;exports.Dialog=Cp;exports.Dialog$1=n3;exports.Divider=Js;exports.Divider$1=Ple;exports.DragButton=bu;exports.Dropdown=jle;exports.Editable=Qy;exports.FILE_TYPE=Np;exports.Haul=Yle;exports.Hover=vle;exports.Icon=$p;exports.InfiniteProvider=gle;exports.ItemFrame=s2;exports.KEYS=Iy;exports.Link=cz;exports.MOUSE_KEYS=mu;exports.MaybeEditable=uz;exports.Numeric=xw;exports.Provider=Hue;exports.Provider$1=QP;exports.Provider$2=Gw;exports.Provider$3=p2;exports.Provider$4=Cf;exports.Search=Fle;exports.Selector=ple;exports.SketchPicker=DP;exports.Switch=jue;exports.Switch$1=bp;exports.Symbols=Rle;exports.Text=wn;exports.Text$1=Si;exports.Text$2=Ca;exports.TextArea=ww;exports.Time=Sw;exports.Toggle=u3;exports.ToggleIcon=l3;exports.WithIcon=Gu;exports.asyncEdit=sz;exports.canDropOfType=Xw;exports.chooseLocation=t3;exports.combineDateAndTimeValue=que;exports.compareArrayDeps=Fy;exports.compareModeConfigs=jy;exports.componentRenderProp=Ble;exports.determineMode=WP;exports.diff=Uy;exports.edit=Jy;exports.evalColor=Ef;exports.eventKey=ti;exports.filter=Ms;exports.filterByType=Kw;exports.findParent=Hw;exports.flattenConfig=Vy;exports.formatChildren=Dp;exports.formatTip=a3;exports.getRootElement=bc;exports.isRenderProp=Uw;exports.j0=Lt;exports.keyZ=Ly;exports.keyboardKey=qy;exports.main=Sz;exports.match=ra;exports.matchCallback=VP;exports.mouseKey=ky;exports.mouseKeyZ=kP;exports.purge=wf;exports.purgeMouse=YP;exports.selectValueIsZero=e2;exports.toCSSVars=u2;exports.triggerZ=UP;exports.use=Uue;exports.use$1=jw;exports.use$2=wi;exports.use$3=gu;exports.use$4=PP;exports.useAggregator=Ele;exports.useAsyncEffect=LP;exports.useClickOutside=bf;exports.useCombinedRefs=Ns;exports.useCombinedStateAndRef=ia;exports.useConfig=Jw;exports.useContext=Hu;exports.useContext$1=Wy;exports.useContext$2=Ap;exports.useContextMenu=yz;exports.useDataContext=Ei;exports.useDataUtilContext=wo;exports.useDate=m2;exports.useDebouncedCallback=Ry;exports.useDragAndDrop=Yw;exports.useDraggingState=Ww;exports.useDrop=Tp;exports.useEffectCompare=By;exports.useFlattenedMemoConfig=ZP;exports.useGetTransformedData=Af;exports.useHeld=rz;exports.useHeldRef=Yl;exports.useHoverContext=Ep;exports.useMemoCompare=va;exports.useMemoDeepEqualProps=zP;exports.useMemoPrimitiveArray=IP;exports.useNotifications=Ale;exports.usePrevious=yf;exports.useProvider=Dw;exports.useResize=Zl;exports.useSearch=kw;exports.useSelect=r2;exports.useSelection=Ow;exports.useSelectionContext=wp;exports.useSelectionUtils=ju;exports.useSetSourceData=vz;exports.useSourceData=a2;exports.useStateRef=xo;exports.useSyncedRef=Ut;exports.useTime=Ew;exports.useTransformedData=dz;exports.useTransforms=Py;exports.useTypography=Cw;exports.useUniqueKey=l2;exports.variantColors=Lw;exports.wrap=_p;exports.wrap$1=yu;
|