From 3ca7840dcf31a7013f2326a984f10770b75ac29e Mon Sep 17 00:00:00 2001 From: Ezequiel-Vega Date: Fri, 16 Jul 2021 11:41:58 -0300 Subject: [PATCH] Web2d module migration --- package-lock.json | 8390 +++++++++++++++ package.json | 3 +- packages/core-js/README.md | 11 + packages/core-js/__tests__/core.test.js | 7 + packages/core-js/babel.config.json | 11 + packages/core-js/lib/Functions.js | 53 + packages/core-js/lib/Utils.js | 57 + packages/core-js/lib/core.js | 13 + packages/core-js/lib/header.js | 18 + packages/core-js/package.json | 40 + packages/core-js/webpack.common.js | 59 + packages/core-js/webpack.dev.js | 14 + packages/core-js/webpack.prod.js | 16 + packages/mindplot/README.md | 11 + packages/mindplot/__tests__/mindplot.test.js | 7 + packages/mindplot/babel.config.json | 11 + packages/mindplot/lib/components/.gitignore | 1 + .../lib/components/ActionDispatcher.js | 112 + .../mindplot/lib/components/ActionIcon.js | 64 + .../mindplot/lib/components/CentralTopic.js | 83 + packages/mindplot/lib/components/Command.js | 67 + .../mindplot/lib/components/ConnectionLine.js | 211 + .../mindplot/lib/components/ControlPoint.js | 211 + packages/mindplot/lib/components/Designer.js | 1051 ++ .../lib/components/DesignerActionRunner.js | 58 + .../lib/components/DesignerKeyboard.js | 400 + .../mindplot/lib/components/DesignerModel.js | 191 + .../lib/components/DesignerUndoManager.js | 85 + .../mindplot/lib/components/DragConnector.js | 115 + .../mindplot/lib/components/DragManager.js | 151 + packages/mindplot/lib/components/DragPivot.js | 238 + packages/mindplot/lib/components/DragTopic.js | 221 + .../mindplot/lib/components/EditorOptions.js | 27 + .../lib/components/EditorProperties.js | 38 + packages/mindplot/lib/components/Events.js | 43 + packages/mindplot/lib/components/Icon.js | 60 + packages/mindplot/lib/components/IconGroup.js | 345 + packages/mindplot/lib/components/ImageIcon.js | 166 + packages/mindplot/lib/components/Keyboard.js | 35 + packages/mindplot/lib/components/LinkIcon.js | 72 + .../lib/components/LocalStorageManager.js | 64 + packages/mindplot/lib/components/MainTopic.js | 170 + packages/mindplot/lib/components/Messages.js | 45 + .../lib/components/MultilineTextEditor.js | 316 + packages/mindplot/lib/components/NodeGraph.js | 222 + packages/mindplot/lib/components/NoteIcon.js | 84 + packages/mindplot/lib/components/Options.js | 15 + .../lib/components/PersistenceManager.js | 88 + .../mindplot/lib/components/Relationship.js | 345 + .../lib/components/RelationshipPivot.js | 167 + .../lib/components/RestPersistenceManager.js | 166 + .../mindplot/lib/components/ScreenManager.js | 153 + .../lib/components/ShrinkConnector.js | 114 + .../components/StandaloneActionDispatcher.js | 381 + .../mindplot/lib/components/TextEditor.js | 270 + .../lib/components/TextEditorFactory.js | 31 + packages/mindplot/lib/components/Topic.js | 1386 +++ .../lib/components/TopicEventDispatcher.js | 87 + .../mindplot/lib/components/TopicFeature.js | 98 + .../mindplot/lib/components/TopicStyle.js | 132 + packages/mindplot/lib/components/Workspace.js | 229 + .../commands/AddFeatureToTopicCommand.js | 69 + .../commands/AddRelationshipCommand.js | 53 + .../components/commands/AddTopicCommand.js | 97 + .../commands/ChangeFeatureToTopicCommand.js | 64 + .../lib/components/commands/DeleteCommand.js | 186 + .../components/commands/DragTopicCommand.js | 103 + .../commands/GenericFunctionCommand.js | 99 + .../commands/MoveControlPointCommand.js | 119 + .../commands/RemoveFeatureFromTopicCommand.js | 61 + packages/mindplot/lib/components/footer.js | 5 + packages/mindplot/lib/components/header.js | 35 + .../components/layout/AbstractBasicSorter.js | 93 + .../lib/components/layout/BalancedSorter.js | 278 + .../lib/components/layout/ChangeEvent.js | 70 + .../layout/ChildrenSorterStrategy.js | 69 + .../lib/components/layout/EventBus.js | 48 + .../components/layout/EventBusDispatcher.js | 99 + .../lib/components/layout/GridSorter.js | 94 + .../lib/components/layout/LayoutManager.js | 271 + .../mindplot/lib/components/layout/Node.js | 222 + .../lib/components/layout/OriginalLayout.js | 258 + .../lib/components/layout/RootedTreeSet.js | 396 + .../lib/components/layout/SymmetricSorter.js | 283 + .../bootstrap/BootstrapDialog.Request.js | 51 + .../libraries/bootstrap/BootstrapDialog.js | 115 + .../bootstrap/css/bootstrap-colorpicker.css | 214 + .../css/bootstrap-colorpicker.min.css | 9 + .../bootstrap/css/bootstrap-theme.css | 347 + .../bootstrap/css/bootstrap-theme.css.map | 1 + .../bootstrap/css/bootstrap-theme.min.css | 7 + .../libraries/bootstrap/css/bootstrap.css | 5785 ++++++++++ .../libraries/bootstrap/css/bootstrap.css.map | 1 + .../libraries/bootstrap/css/bootstrap.min.css | 7 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes .../fonts/glyphicons-halflings-regular.svg | 229 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes .../alpha-horizontal.png | Bin 0 -> 3635 bytes .../img/bootstrap-colorpicker/alpha.png | Bin 0 -> 3271 bytes .../bootstrap-colorpicker/hue-horizontal.png | Bin 0 -> 2837 bytes .../img/bootstrap-colorpicker/hue.png | Bin 0 -> 2972 bytes .../img/bootstrap-colorpicker/saturation.png | Bin 0 -> 8817 bytes .../img/glyphicons-halflings-blue.png | Bin 0 -> 4207 bytes .../bootstrap/js/bootstrap-colorpicker.js | 951 ++ .../bootstrap/js/bootstrap-colorpicker.min.js | 1 + .../libraries/bootstrap/js/bootstrap.js | 1951 ++++ .../libraries/bootstrap/js/bootstrap.min.js | 6 + .../libraries/hotkeys/jquery.hotkeys.js | 110 + .../libraries/jquery/jquery-2.1.0.js | 9111 ++++++++++++++++ .../libraries/jquery/jquery-2.1.0.min.js | 4 + .../libraries/jquery/jquery.mousewheel.min.js | 8 + .../libraries/less/less-1.4.2.min.js | 11 + .../libraries/less/less-1.6.2.min.js | 16 + .../mootools-core-1.4.5-full-nocompat-yc.js | 574 + .../libraries/underscorejs/underscore-min.js | 5 + .../lib/components/model/FeatureModel.js | 91 + .../mindplot/lib/components/model/IMindmap.js | 181 + .../lib/components/model/INodeModel.js | 425 + .../lib/components/model/IconModel.js | 51 + .../lib/components/model/LinkModel.js | 78 + .../mindplot/lib/components/model/Mindmap.js | 191 + .../lib/components/model/NodeModel.js | 245 + .../lib/components/model/NoteModel.js | 52 + .../lib/components/model/RelationshipModel.js | 148 + .../persistence/Beta2PelaMigrator.js | 59 + .../components/persistence/ModelCodeName.js | 29 + .../persistence/Pela2TangoMigrator.js | 99 + .../persistence/XMLSerializerFactory.js | 95 + .../persistence/XMLSerializer_Beta.js | 304 + .../persistence/XMLSerializer_Pela.js | 530 + .../persistence/XMLSerializer_Tango.js | 30 + .../lib/components/util/FadeEffect.js | 48 + .../mindplot/lib/components/util/Shape.js | 139 + .../components/widget/ColorPalettePanel.js | 104 + .../lib/components/widget/FloatingTip.js | 68 + .../lib/components/widget/FontFamilyPanel.js | 40 + .../lib/components/widget/FontSizePanel.js | 40 + .../mindplot/lib/components/widget/IMenu.js | 114 + .../lib/components/widget/IconPanel.js | 71 + .../widget/KeyboardShortcutTooltip.js | 69 + .../lib/components/widget/LinkEditor.js | 155 + .../lib/components/widget/LinkIconTooltip.js | 79 + .../lib/components/widget/ListToolbarPanel.js | 54 + .../mindplot/lib/components/widget/Menu.js | 506 + .../components/widget/ModalDialogNotifier.js | 54 + .../lib/components/widget/NoteEditor.js | 93 + .../lib/components/widget/ToolbarItem.js | 79 + .../lib/components/widget/ToolbarNotifier.js | 48 + .../lib/components/widget/ToolbarPaneItem.js | 126 + .../lib/components/widget/TopicShapePanel.js | 40 + .../lib/components/widget/colorPalette.css | 75 + .../lib/components/widget/colorPalette.html | 450 + packages/mindplot/lib/mindplot.js | 61 + packages/mindplot/package.json | 42 + .../test/javascript/BalancedTestSuite.js | 284 + .../test/javascript/DesignerTestSuite.js | 68 + .../test/javascript/EventsTestSuite.js | 43 + .../mindplot/test/javascript/FreeTestSuite.js | 254 + .../test/javascript/SymmetricTestSuite.js | 81 + .../mindplot/test/javascript/TestSuite.js | 6 + .../mindplot/test/javascript/lib/bootstrap.js | 1 + packages/mindplot/test/javascript/lib/core.js | 1 + .../test/javascript/lib/jquery-1.8.2.js | 9440 +++++++++++++++++ .../mindplot/test/javascript/lib/jquery.js | 1 + .../test/javascript/lib/web2d.svg-min.js | 1 + .../mindplot/test/javascript/simpleTest.js | 128 + .../test/javascript/static/layout.html | 195 + .../test/javascript/static/palette.html | 41 + .../test/javascript/static/sample.xml | 7 + .../static/test/BalancedTestSuite.js | 388 + .../javascript/static/test/FreeTestSuite.js | 482 + .../static/test/SymmetricTestSuite.js | 266 + .../test/javascript/static/test/TestSuite.js | 486 + .../javascript/static/test/raphael-min.js | 8 + .../javascript/static/test/raphael-plugins.js | 29 + .../mindplot/test/javascript/static/utils.js | 59 + packages/mindplot/test/resources/welcome.xml | 48 + packages/mindplot/webpack.common.js | 29 + packages/mindplot/webpack.dev.js | 14 + packages/mindplot/webpack.prod.js | 15 + packages/web2d/.gitignore | 0 packages/web2d/README.md | 11 + packages/web2d/__tests__/web2d.test.js | 7 + packages/web2d/babel.config.json | 12 + packages/web2d/lib/components/Arrow.js | 63 + packages/web2d/lib/components/CurvedLine.js | 123 + packages/web2d/lib/components/Element.js | 319 + packages/web2d/lib/components/Elipse.js | 41 + packages/web2d/lib/components/Font.js | 84 + packages/web2d/lib/components/Group.js | 136 + packages/web2d/lib/components/Image.js | 45 + packages/web2d/lib/components/Issues.txt | 17 + packages/web2d/lib/components/Line.js | 73 + packages/web2d/lib/components/Point.js | 53 + packages/web2d/lib/components/PolyLine.js | 79 + packages/web2d/lib/components/Rect.js | 55 + packages/web2d/lib/components/Text.js | 99 + packages/web2d/lib/components/Toolkit.js | 97 + packages/web2d/lib/components/Workspace.js | 200 + packages/web2d/lib/components/header.js | 24 + .../lib/components/peer/svg/ArialFont.js | 36 + .../lib/components/peer/svg/ArrowPeer.js | 100 + .../lib/components/peer/svg/CurvedLinePeer.js | 204 + .../lib/components/peer/svg/ElementPeer.js | 248 + .../lib/components/peer/svg/ElipsePeer.js | 61 + .../web2d/lib/components/peer/svg/Font.js | 93 + .../lib/components/peer/svg/GroupPeer.js | 135 + .../lib/components/peer/svg/ImagePeer.js | 50 + .../web2d/lib/components/peer/svg/LinePeer.js | 64 + .../lib/components/peer/svg/PolyLinePeer.js | 107 + .../web2d/lib/components/peer/svg/RectPeer.js | 60 + .../lib/components/peer/svg/TahomaFont.js | 36 + .../web2d/lib/components/peer/svg/TextPeer.js | 197 + .../lib/components/peer/svg/TimesFont.js | 36 + .../lib/components/peer/svg/VerdanaFont.js | 36 + .../lib/components/peer/svg/WorkspacePeer.js | 112 + .../lib/components/peer/utils/EventUtils.js | 37 + .../components/peer/utils/TransformUtils.js | 39 + packages/web2d/lib/web2d.js | 74 + packages/web2d/package.json | 46 + .../web2d/test/javascript/jquery-2.1.0.js | 4 + .../javascript/jsUnit/ElementsTestSuite.html | 286 + .../javascript/jsUnit/WorkspaceTestSuite.html | 135 + .../test/javascript/mootools-core-1.4.5.js | 76 + .../web2d/test/javascript/render/arrow.html | 80 + .../test/javascript/render/curvedLine.html | 85 + .../web2d/test/javascript/render/events.html | 277 + .../web2d/test/javascript/render/font.html | 136 + .../web2d/test/javascript/render/group.html | 502 + .../web2d/test/javascript/render/line.html | 139 + .../test/javascript/render/polyLine.html | 190 + .../test/javascript/render/prototype.html | 174 + .../web2d/test/javascript/render/rect.html | 108 + .../web2d/test/javascript/render/shapes.html | 311 + .../web2d/test/javascript/render/testing.js | 3 + .../web2d/test/javascript/render/text.html | 112 + .../web2d/test/javascript/render/utils.js | 59 + .../test/javascript/render/workspace.html | 323 + packages/web2d/webpack.common.js | 29 + packages/web2d/webpack.dev.js | 14 + packages/web2d/webpack.prod.js | 15 + packages/web2d/webpack.test.js | 31 + yarn.lock | 1471 ++- 244 files changed, 65312 insertions(+), 10 deletions(-) create mode 100644 package-lock.json create mode 100644 packages/core-js/README.md create mode 100644 packages/core-js/__tests__/core.test.js create mode 100644 packages/core-js/babel.config.json create mode 100644 packages/core-js/lib/Functions.js create mode 100644 packages/core-js/lib/Utils.js create mode 100644 packages/core-js/lib/core.js create mode 100644 packages/core-js/lib/header.js create mode 100644 packages/core-js/package.json create mode 100644 packages/core-js/webpack.common.js create mode 100644 packages/core-js/webpack.dev.js create mode 100644 packages/core-js/webpack.prod.js create mode 100644 packages/mindplot/README.md create mode 100644 packages/mindplot/__tests__/mindplot.test.js create mode 100644 packages/mindplot/babel.config.json create mode 100644 packages/mindplot/lib/components/.gitignore create mode 100644 packages/mindplot/lib/components/ActionDispatcher.js create mode 100644 packages/mindplot/lib/components/ActionIcon.js create mode 100644 packages/mindplot/lib/components/CentralTopic.js create mode 100644 packages/mindplot/lib/components/Command.js create mode 100644 packages/mindplot/lib/components/ConnectionLine.js create mode 100644 packages/mindplot/lib/components/ControlPoint.js create mode 100644 packages/mindplot/lib/components/Designer.js create mode 100644 packages/mindplot/lib/components/DesignerActionRunner.js create mode 100644 packages/mindplot/lib/components/DesignerKeyboard.js create mode 100644 packages/mindplot/lib/components/DesignerModel.js create mode 100644 packages/mindplot/lib/components/DesignerUndoManager.js create mode 100644 packages/mindplot/lib/components/DragConnector.js create mode 100644 packages/mindplot/lib/components/DragManager.js create mode 100644 packages/mindplot/lib/components/DragPivot.js create mode 100644 packages/mindplot/lib/components/DragTopic.js create mode 100644 packages/mindplot/lib/components/EditorOptions.js create mode 100644 packages/mindplot/lib/components/EditorProperties.js create mode 100644 packages/mindplot/lib/components/Events.js create mode 100644 packages/mindplot/lib/components/Icon.js create mode 100644 packages/mindplot/lib/components/IconGroup.js create mode 100644 packages/mindplot/lib/components/ImageIcon.js create mode 100644 packages/mindplot/lib/components/Keyboard.js create mode 100644 packages/mindplot/lib/components/LinkIcon.js create mode 100644 packages/mindplot/lib/components/LocalStorageManager.js create mode 100644 packages/mindplot/lib/components/MainTopic.js create mode 100644 packages/mindplot/lib/components/Messages.js create mode 100644 packages/mindplot/lib/components/MultilineTextEditor.js create mode 100644 packages/mindplot/lib/components/NodeGraph.js create mode 100644 packages/mindplot/lib/components/NoteIcon.js create mode 100644 packages/mindplot/lib/components/Options.js create mode 100644 packages/mindplot/lib/components/PersistenceManager.js create mode 100644 packages/mindplot/lib/components/Relationship.js create mode 100644 packages/mindplot/lib/components/RelationshipPivot.js create mode 100644 packages/mindplot/lib/components/RestPersistenceManager.js create mode 100644 packages/mindplot/lib/components/ScreenManager.js create mode 100644 packages/mindplot/lib/components/ShrinkConnector.js create mode 100644 packages/mindplot/lib/components/StandaloneActionDispatcher.js create mode 100644 packages/mindplot/lib/components/TextEditor.js create mode 100644 packages/mindplot/lib/components/TextEditorFactory.js create mode 100644 packages/mindplot/lib/components/Topic.js create mode 100644 packages/mindplot/lib/components/TopicEventDispatcher.js create mode 100644 packages/mindplot/lib/components/TopicFeature.js create mode 100644 packages/mindplot/lib/components/TopicStyle.js create mode 100644 packages/mindplot/lib/components/Workspace.js create mode 100644 packages/mindplot/lib/components/commands/AddFeatureToTopicCommand.js create mode 100644 packages/mindplot/lib/components/commands/AddRelationshipCommand.js create mode 100644 packages/mindplot/lib/components/commands/AddTopicCommand.js create mode 100644 packages/mindplot/lib/components/commands/ChangeFeatureToTopicCommand.js create mode 100644 packages/mindplot/lib/components/commands/DeleteCommand.js create mode 100644 packages/mindplot/lib/components/commands/DragTopicCommand.js create mode 100644 packages/mindplot/lib/components/commands/GenericFunctionCommand.js create mode 100644 packages/mindplot/lib/components/commands/MoveControlPointCommand.js create mode 100644 packages/mindplot/lib/components/commands/RemoveFeatureFromTopicCommand.js create mode 100644 packages/mindplot/lib/components/footer.js create mode 100644 packages/mindplot/lib/components/header.js create mode 100644 packages/mindplot/lib/components/layout/AbstractBasicSorter.js create mode 100644 packages/mindplot/lib/components/layout/BalancedSorter.js create mode 100644 packages/mindplot/lib/components/layout/ChangeEvent.js create mode 100644 packages/mindplot/lib/components/layout/ChildrenSorterStrategy.js create mode 100644 packages/mindplot/lib/components/layout/EventBus.js create mode 100644 packages/mindplot/lib/components/layout/EventBusDispatcher.js create mode 100644 packages/mindplot/lib/components/layout/GridSorter.js create mode 100644 packages/mindplot/lib/components/layout/LayoutManager.js create mode 100644 packages/mindplot/lib/components/layout/Node.js create mode 100644 packages/mindplot/lib/components/layout/OriginalLayout.js create mode 100644 packages/mindplot/lib/components/layout/RootedTreeSet.js create mode 100644 packages/mindplot/lib/components/layout/SymmetricSorter.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.Request.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap-colorpicker.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap-colorpicker.min.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap-theme.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap-theme.css.map create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap-theme.min.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap.css.map create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/css/bootstrap.min.css create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/fonts/glyphicons-halflings-regular.eot create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/fonts/glyphicons-halflings-regular.svg create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/fonts/glyphicons-halflings-regular.ttf create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/fonts/glyphicons-halflings-regular.woff create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/bootstrap-colorpicker/alpha-horizontal.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/bootstrap-colorpicker/alpha.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/bootstrap-colorpicker/hue-horizontal.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/bootstrap-colorpicker/hue.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/bootstrap-colorpicker/saturation.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/img/glyphicons-halflings-blue.png create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/js/bootstrap-colorpicker.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/js/bootstrap-colorpicker.min.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/js/bootstrap.js create mode 100644 packages/mindplot/lib/components/libraries/bootstrap/js/bootstrap.min.js create mode 100644 packages/mindplot/lib/components/libraries/hotkeys/jquery.hotkeys.js create mode 100644 packages/mindplot/lib/components/libraries/jquery/jquery-2.1.0.js create mode 100644 packages/mindplot/lib/components/libraries/jquery/jquery-2.1.0.min.js create mode 100644 packages/mindplot/lib/components/libraries/jquery/jquery.mousewheel.min.js create mode 100755 packages/mindplot/lib/components/libraries/less/less-1.4.2.min.js create mode 100644 packages/mindplot/lib/components/libraries/less/less-1.6.2.min.js create mode 100644 packages/mindplot/lib/components/libraries/mootools/mootools-core-1.4.5-full-nocompat-yc.js create mode 100644 packages/mindplot/lib/components/libraries/underscorejs/underscore-min.js create mode 100644 packages/mindplot/lib/components/model/FeatureModel.js create mode 100644 packages/mindplot/lib/components/model/IMindmap.js create mode 100644 packages/mindplot/lib/components/model/INodeModel.js create mode 100644 packages/mindplot/lib/components/model/IconModel.js create mode 100644 packages/mindplot/lib/components/model/LinkModel.js create mode 100644 packages/mindplot/lib/components/model/Mindmap.js create mode 100644 packages/mindplot/lib/components/model/NodeModel.js create mode 100644 packages/mindplot/lib/components/model/NoteModel.js create mode 100644 packages/mindplot/lib/components/model/RelationshipModel.js create mode 100644 packages/mindplot/lib/components/persistence/Beta2PelaMigrator.js create mode 100644 packages/mindplot/lib/components/persistence/ModelCodeName.js create mode 100644 packages/mindplot/lib/components/persistence/Pela2TangoMigrator.js create mode 100644 packages/mindplot/lib/components/persistence/XMLSerializerFactory.js create mode 100644 packages/mindplot/lib/components/persistence/XMLSerializer_Beta.js create mode 100644 packages/mindplot/lib/components/persistence/XMLSerializer_Pela.js create mode 100644 packages/mindplot/lib/components/persistence/XMLSerializer_Tango.js create mode 100644 packages/mindplot/lib/components/util/FadeEffect.js create mode 100644 packages/mindplot/lib/components/util/Shape.js create mode 100644 packages/mindplot/lib/components/widget/ColorPalettePanel.js create mode 100644 packages/mindplot/lib/components/widget/FloatingTip.js create mode 100644 packages/mindplot/lib/components/widget/FontFamilyPanel.js create mode 100644 packages/mindplot/lib/components/widget/FontSizePanel.js create mode 100644 packages/mindplot/lib/components/widget/IMenu.js create mode 100644 packages/mindplot/lib/components/widget/IconPanel.js create mode 100644 packages/mindplot/lib/components/widget/KeyboardShortcutTooltip.js create mode 100644 packages/mindplot/lib/components/widget/LinkEditor.js create mode 100644 packages/mindplot/lib/components/widget/LinkIconTooltip.js create mode 100644 packages/mindplot/lib/components/widget/ListToolbarPanel.js create mode 100644 packages/mindplot/lib/components/widget/Menu.js create mode 100644 packages/mindplot/lib/components/widget/ModalDialogNotifier.js create mode 100644 packages/mindplot/lib/components/widget/NoteEditor.js create mode 100644 packages/mindplot/lib/components/widget/ToolbarItem.js create mode 100644 packages/mindplot/lib/components/widget/ToolbarNotifier.js create mode 100644 packages/mindplot/lib/components/widget/ToolbarPaneItem.js create mode 100644 packages/mindplot/lib/components/widget/TopicShapePanel.js create mode 100644 packages/mindplot/lib/components/widget/colorPalette.css create mode 100644 packages/mindplot/lib/components/widget/colorPalette.html create mode 100644 packages/mindplot/lib/mindplot.js create mode 100644 packages/mindplot/package.json create mode 100644 packages/mindplot/test/javascript/BalancedTestSuite.js create mode 100644 packages/mindplot/test/javascript/DesignerTestSuite.js create mode 100644 packages/mindplot/test/javascript/EventsTestSuite.js create mode 100644 packages/mindplot/test/javascript/FreeTestSuite.js create mode 100644 packages/mindplot/test/javascript/SymmetricTestSuite.js create mode 100644 packages/mindplot/test/javascript/TestSuite.js create mode 120000 packages/mindplot/test/javascript/lib/bootstrap.js create mode 120000 packages/mindplot/test/javascript/lib/core.js create mode 100644 packages/mindplot/test/javascript/lib/jquery-1.8.2.js create mode 120000 packages/mindplot/test/javascript/lib/jquery.js create mode 120000 packages/mindplot/test/javascript/lib/web2d.svg-min.js create mode 100644 packages/mindplot/test/javascript/simpleTest.js create mode 100644 packages/mindplot/test/javascript/static/layout.html create mode 100644 packages/mindplot/test/javascript/static/palette.html create mode 100644 packages/mindplot/test/javascript/static/sample.xml create mode 100644 packages/mindplot/test/javascript/static/test/BalancedTestSuite.js create mode 100644 packages/mindplot/test/javascript/static/test/FreeTestSuite.js create mode 100644 packages/mindplot/test/javascript/static/test/SymmetricTestSuite.js create mode 100644 packages/mindplot/test/javascript/static/test/TestSuite.js create mode 100644 packages/mindplot/test/javascript/static/test/raphael-min.js create mode 100644 packages/mindplot/test/javascript/static/test/raphael-plugins.js create mode 100755 packages/mindplot/test/javascript/static/utils.js create mode 100644 packages/mindplot/test/resources/welcome.xml create mode 100644 packages/mindplot/webpack.common.js create mode 100644 packages/mindplot/webpack.dev.js create mode 100644 packages/mindplot/webpack.prod.js create mode 100644 packages/web2d/.gitignore create mode 100644 packages/web2d/README.md create mode 100644 packages/web2d/__tests__/web2d.test.js create mode 100644 packages/web2d/babel.config.json create mode 100644 packages/web2d/lib/components/Arrow.js create mode 100644 packages/web2d/lib/components/CurvedLine.js create mode 100644 packages/web2d/lib/components/Element.js create mode 100644 packages/web2d/lib/components/Elipse.js create mode 100644 packages/web2d/lib/components/Font.js create mode 100644 packages/web2d/lib/components/Group.js create mode 100644 packages/web2d/lib/components/Image.js create mode 100644 packages/web2d/lib/components/Issues.txt create mode 100644 packages/web2d/lib/components/Line.js create mode 100644 packages/web2d/lib/components/Point.js create mode 100644 packages/web2d/lib/components/PolyLine.js create mode 100644 packages/web2d/lib/components/Rect.js create mode 100644 packages/web2d/lib/components/Text.js create mode 100644 packages/web2d/lib/components/Toolkit.js create mode 100644 packages/web2d/lib/components/Workspace.js create mode 100644 packages/web2d/lib/components/header.js create mode 100644 packages/web2d/lib/components/peer/svg/ArialFont.js create mode 100644 packages/web2d/lib/components/peer/svg/ArrowPeer.js create mode 100644 packages/web2d/lib/components/peer/svg/CurvedLinePeer.js create mode 100644 packages/web2d/lib/components/peer/svg/ElementPeer.js create mode 100644 packages/web2d/lib/components/peer/svg/ElipsePeer.js create mode 100644 packages/web2d/lib/components/peer/svg/Font.js create mode 100644 packages/web2d/lib/components/peer/svg/GroupPeer.js create mode 100644 packages/web2d/lib/components/peer/svg/ImagePeer.js create mode 100644 packages/web2d/lib/components/peer/svg/LinePeer.js create mode 100644 packages/web2d/lib/components/peer/svg/PolyLinePeer.js create mode 100644 packages/web2d/lib/components/peer/svg/RectPeer.js create mode 100644 packages/web2d/lib/components/peer/svg/TahomaFont.js create mode 100644 packages/web2d/lib/components/peer/svg/TextPeer.js create mode 100644 packages/web2d/lib/components/peer/svg/TimesFont.js create mode 100644 packages/web2d/lib/components/peer/svg/VerdanaFont.js create mode 100644 packages/web2d/lib/components/peer/svg/WorkspacePeer.js create mode 100644 packages/web2d/lib/components/peer/utils/EventUtils.js create mode 100644 packages/web2d/lib/components/peer/utils/TransformUtils.js create mode 100644 packages/web2d/lib/web2d.js create mode 100644 packages/web2d/package.json create mode 100644 packages/web2d/test/javascript/jquery-2.1.0.js create mode 100755 packages/web2d/test/javascript/jsUnit/ElementsTestSuite.html create mode 100755 packages/web2d/test/javascript/jsUnit/WorkspaceTestSuite.html create mode 100644 packages/web2d/test/javascript/mootools-core-1.4.5.js create mode 100644 packages/web2d/test/javascript/render/arrow.html create mode 100644 packages/web2d/test/javascript/render/curvedLine.html create mode 100755 packages/web2d/test/javascript/render/events.html create mode 100644 packages/web2d/test/javascript/render/font.html create mode 100755 packages/web2d/test/javascript/render/group.html create mode 100755 packages/web2d/test/javascript/render/line.html create mode 100755 packages/web2d/test/javascript/render/polyLine.html create mode 100755 packages/web2d/test/javascript/render/prototype.html create mode 100755 packages/web2d/test/javascript/render/rect.html create mode 100755 packages/web2d/test/javascript/render/shapes.html create mode 100644 packages/web2d/test/javascript/render/testing.js create mode 100755 packages/web2d/test/javascript/render/text.html create mode 100755 packages/web2d/test/javascript/render/utils.js create mode 100755 packages/web2d/test/javascript/render/workspace.html create mode 100644 packages/web2d/webpack.common.js create mode 100644 packages/web2d/webpack.dev.js create mode 100644 packages/web2d/webpack.prod.js create mode 100644 packages/web2d/webpack.test.js diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..4e135605 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8390 @@ +{ + "name": "wisemapping-react", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", + "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "dev": true + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@evocateur/libnpmaccess": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz", + "integrity": "sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "aproba": "^2.0.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "npm-package-arg": "^6.1.0" + }, + "dependencies": { + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + } + } + }, + "@evocateur/libnpmpublish": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz", + "integrity": "sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "aproba": "^2.0.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "lodash.clonedeep": "^4.5.0", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^6.1.0", + "semver": "^5.5.1", + "ssri": "^6.0.1" + }, + "dependencies": { + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@evocateur/npm-registry-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz", + "integrity": "sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g==", + "dev": true, + "requires": { + "JSONStream": "^1.3.4", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.4.1", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "npm-package-arg": "^6.1.0", + "safe-buffer": "^5.1.2" + } + }, + "@evocateur/pacote": { + "version": "9.6.5", + "resolved": "https://registry.npmjs.org/@evocateur/pacote/-/pacote-9.6.5.tgz", + "integrity": "sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "bluebird": "^3.5.3", + "cacache": "^12.0.3", + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.1.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "minimatch": "^3.0.4", + "minipass": "^2.3.5", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "normalize-package-data": "^2.5.0", + "npm-package-arg": "^6.1.0", + "npm-packlist": "^1.4.4", + "npm-pick-manifest": "^3.0.0", + "osenv": "^0.1.5", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^5.0.1", + "rimraf": "^2.6.3", + "safe-buffer": "^5.2.0", + "semver": "^5.7.0", + "ssri": "^6.0.1", + "tar": "^4.4.10", + "unique-filename": "^1.1.1", + "which": "^1.3.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@lerna/add": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/add/-/add-3.21.0.tgz", + "integrity": "sha512-vhUXXF6SpufBE1EkNEXwz1VLW03f177G9uMOFMQkp6OJ30/PWg4Ekifuz9/3YfgB2/GH8Tu4Lk3O51P2Hskg/A==", + "dev": true, + "requires": { + "@evocateur/pacote": "^9.6.3", + "@lerna/bootstrap": "3.21.0", + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/npm-conf": "3.16.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "npm-package-arg": "^6.1.0", + "p-map": "^2.1.0", + "semver": "^6.2.0" + } + }, + "@lerna/bootstrap": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.21.0.tgz", + "integrity": "sha512-mtNHlXpmvJn6JTu0KcuTTPl2jLsDNud0QacV/h++qsaKbhAaJr/FElNZ5s7MwZFUM3XaDmvWzHKaszeBMHIbBw==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/has-npm-version": "3.16.5", + "@lerna/npm-install": "3.16.5", + "@lerna/package-graph": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/rimraf-dir": "3.16.5", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/symlink-binary": "3.17.0", + "@lerna/symlink-dependencies": "3.17.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "get-port": "^4.2.0", + "multimatch": "^3.0.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0", + "p-waterfall": "^1.0.0", + "read-package-tree": "^5.1.6", + "semver": "^6.2.0" + } + }, + "@lerna/changed": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/changed/-/changed-3.21.0.tgz", + "integrity": "sha512-hzqoyf8MSHVjZp0gfJ7G8jaz+++mgXYiNs9iViQGA8JlN/dnWLI5sWDptEH3/B30Izo+fdVz0S0s7ydVE3pWIw==", + "dev": true, + "requires": { + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.21.0", + "@lerna/listable": "3.18.5", + "@lerna/output": "3.13.0" + } + }, + "@lerna/check-working-tree": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz", + "integrity": "sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ==", + "dev": true, + "requires": { + "@lerna/collect-uncommitted": "3.16.5", + "@lerna/describe-ref": "3.16.5", + "@lerna/validation-error": "3.13.0" + } + }, + "@lerna/child-process": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.16.5.tgz", + "integrity": "sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg==", + "dev": true, + "requires": { + "chalk": "^2.3.1", + "execa": "^1.0.0", + "strong-log-transformer": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@lerna/clean": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/clean/-/clean-3.21.0.tgz", + "integrity": "sha512-b/L9l+MDgE/7oGbrav6rG8RTQvRiZLO1zTcG17zgJAAuhlsPxJExMlh2DFwJEVi2les70vMhHfST3Ue1IMMjpg==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/rimraf-dir": "3.16.5", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0", + "p-waterfall": "^1.0.0" + } + }, + "@lerna/cli": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/cli/-/cli-3.18.5.tgz", + "integrity": "sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA==", + "dev": true, + "requires": { + "@lerna/global-options": "3.13.0", + "dedent": "^0.7.0", + "npmlog": "^4.1.2", + "yargs": "^14.2.2" + } + }, + "@lerna/collect-uncommitted": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz", + "integrity": "sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "chalk": "^2.3.1", + "figgy-pudding": "^3.5.1", + "npmlog": "^4.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@lerna/collect-updates": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.20.0.tgz", + "integrity": "sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/describe-ref": "3.16.5", + "minimatch": "^3.0.4", + "npmlog": "^4.1.2", + "slash": "^2.0.0" + }, + "dependencies": { + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "@lerna/command": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/command/-/command-3.21.0.tgz", + "integrity": "sha512-T2bu6R8R3KkH5YoCKdutKv123iUgUbW8efVjdGCDnCMthAQzoentOJfDeodBwn0P2OqCl3ohsiNVtSn9h78fyQ==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/package-graph": "3.18.5", + "@lerna/project": "3.21.0", + "@lerna/validation-error": "3.13.0", + "@lerna/write-log-file": "3.13.0", + "clone-deep": "^4.0.1", + "dedent": "^0.7.0", + "execa": "^1.0.0", + "is-ci": "^2.0.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/conventional-commits": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-3.22.0.tgz", + "integrity": "sha512-z4ZZk1e8Mhz7+IS8NxHr64wyklHctCJyWpJKEZZPJiLFJ8yKto/x38O80R10pIzC0rr8Sy/OsjSH4bl0TbbgqA==", + "dev": true, + "requires": { + "@lerna/validation-error": "3.13.0", + "conventional-changelog-angular": "^5.0.3", + "conventional-changelog-core": "^3.1.6", + "conventional-recommended-bump": "^5.0.0", + "fs-extra": "^8.1.0", + "get-stream": "^4.0.0", + "lodash.template": "^4.5.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "pify": "^4.0.1", + "semver": "^6.2.0" + } + }, + "@lerna/create": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-3.22.0.tgz", + "integrity": "sha512-MdiQQzCcB4E9fBF1TyMOaAEz9lUjIHp1Ju9H7f3lXze5JK6Fl5NYkouAvsLgY6YSIhXMY8AHW2zzXeBDY4yWkw==", + "dev": true, + "requires": { + "@evocateur/pacote": "^9.6.3", + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.21.0", + "@lerna/npm-conf": "3.16.0", + "@lerna/validation-error": "3.13.0", + "camelcase": "^5.0.0", + "dedent": "^0.7.0", + "fs-extra": "^8.1.0", + "globby": "^9.2.0", + "init-package-json": "^1.10.3", + "npm-package-arg": "^6.1.0", + "p-reduce": "^1.0.0", + "pify": "^4.0.1", + "semver": "^6.2.0", + "slash": "^2.0.0", + "validate-npm-package-license": "^3.0.3", + "validate-npm-package-name": "^3.0.0", + "whatwg-url": "^7.0.0" + }, + "dependencies": { + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "@lerna/create-symlink": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-3.16.2.tgz", + "integrity": "sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw==", + "dev": true, + "requires": { + "@zkochan/cmd-shim": "^3.1.0", + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/describe-ref": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.16.5.tgz", + "integrity": "sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "npmlog": "^4.1.2" + } + }, + "@lerna/diff": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/diff/-/diff-3.21.0.tgz", + "integrity": "sha512-5viTR33QV3S7O+bjruo1SaR40m7F2aUHJaDAC7fL9Ca6xji+aw1KFkpCtVlISS0G8vikUREGMJh+c/VMSc8Usw==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.21.0", + "@lerna/validation-error": "3.13.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/exec": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/exec/-/exec-3.21.0.tgz", + "integrity": "sha512-iLvDBrIE6rpdd4GIKTY9mkXyhwsJ2RvQdB9ZU+/NhR3okXfqKc6py/24tV111jqpXTtZUW6HNydT4dMao2hi1Q==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/profiler": "3.20.0", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "p-map": "^2.1.0" + } + }, + "@lerna/filter-options": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.20.0.tgz", + "integrity": "sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g==", + "dev": true, + "requires": { + "@lerna/collect-updates": "3.20.0", + "@lerna/filter-packages": "3.18.0", + "dedent": "^0.7.0", + "figgy-pudding": "^3.5.1", + "npmlog": "^4.1.2" + } + }, + "@lerna/filter-packages": { + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-3.18.0.tgz", + "integrity": "sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ==", + "dev": true, + "requires": { + "@lerna/validation-error": "3.13.0", + "multimatch": "^3.0.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/get-npm-exec-opts": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz", + "integrity": "sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/get-packed": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-3.16.0.tgz", + "integrity": "sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw==", + "dev": true, + "requires": { + "fs-extra": "^8.1.0", + "ssri": "^6.0.1", + "tar": "^4.4.8" + } + }, + "@lerna/github-client": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.22.0.tgz", + "integrity": "sha512-O/GwPW+Gzr3Eb5bk+nTzTJ3uv+jh5jGho9BOqKlajXaOkMYGBELEAqV5+uARNGWZFvYAiF4PgqHb6aCUu7XdXg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@octokit/plugin-enterprise-rest": "^6.0.1", + "@octokit/rest": "^16.28.4", + "git-url-parse": "^11.1.2", + "npmlog": "^4.1.2" + } + }, + "@lerna/gitlab-client": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz", + "integrity": "sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q==", + "dev": true, + "requires": { + "node-fetch": "^2.5.0", + "npmlog": "^4.1.2", + "whatwg-url": "^7.0.0" + } + }, + "@lerna/global-options": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/global-options/-/global-options-3.13.0.tgz", + "integrity": "sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ==", + "dev": true + }, + "@lerna/has-npm-version": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz", + "integrity": "sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "semver": "^6.2.0" + } + }, + "@lerna/import": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@lerna/import/-/import-3.22.0.tgz", + "integrity": "sha512-uWOlexasM5XR6tXi4YehODtH9Y3OZrFht3mGUFFT3OIl2s+V85xIGFfqFGMTipMPAGb2oF1UBLL48kR43hRsOg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.21.0", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "fs-extra": "^8.1.0", + "p-map-series": "^1.0.0" + } + }, + "@lerna/info": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/info/-/info-3.21.0.tgz", + "integrity": "sha512-0XDqGYVBgWxUquFaIptW2bYSIu6jOs1BtkvRTWDDhw4zyEdp6q4eaMvqdSap1CG+7wM5jeLCi6z94wS0AuiuwA==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/output": "3.13.0", + "envinfo": "^7.3.1" + } + }, + "@lerna/init": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/init/-/init-3.21.0.tgz", + "integrity": "sha512-6CM0z+EFUkFfurwdJCR+LQQF6MqHbYDCBPyhu/d086LRf58GtYZYj49J8mKG9ktayp/TOIxL/pKKjgLD8QBPOg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.21.0", + "fs-extra": "^8.1.0", + "p-map": "^2.1.0", + "write-json-file": "^3.2.0" + } + }, + "@lerna/link": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/link/-/link-3.21.0.tgz", + "integrity": "sha512-tGu9GxrX7Ivs+Wl3w1+jrLi1nQ36kNI32dcOssij6bg0oZ2M2MDEFI9UF2gmoypTaN9uO5TSsjCFS7aR79HbdQ==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/package-graph": "3.18.5", + "@lerna/symlink-dependencies": "3.17.0", + "p-map": "^2.1.0", + "slash": "^2.0.0" + }, + "dependencies": { + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "@lerna/list": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/list/-/list-3.21.0.tgz", + "integrity": "sha512-KehRjE83B1VaAbRRkRy6jLX1Cin8ltsrQ7FHf2bhwhRHK0S54YuA6LOoBnY/NtA8bHDX/Z+G5sMY78X30NS9tg==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/listable": "3.18.5", + "@lerna/output": "3.13.0" + } + }, + "@lerna/listable": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/listable/-/listable-3.18.5.tgz", + "integrity": "sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg==", + "dev": true, + "requires": { + "@lerna/query-graph": "3.18.5", + "chalk": "^2.3.1", + "columnify": "^1.5.4" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@lerna/log-packed": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-3.16.0.tgz", + "integrity": "sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ==", + "dev": true, + "requires": { + "byte-size": "^5.0.1", + "columnify": "^1.5.4", + "has-unicode": "^2.0.1", + "npmlog": "^4.1.2" + } + }, + "@lerna/npm-conf": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-3.16.0.tgz", + "integrity": "sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA==", + "dev": true, + "requires": { + "config-chain": "^1.1.11", + "pify": "^4.0.1" + } + }, + "@lerna/npm-dist-tag": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz", + "integrity": "sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "@lerna/otplease": "3.18.5", + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/npm-install": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.16.5.tgz", + "integrity": "sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/get-npm-exec-opts": "3.13.0", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "signal-exit": "^3.0.2", + "write-pkg": "^3.1.0" + } + }, + "@lerna/npm-publish": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-3.18.5.tgz", + "integrity": "sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg==", + "dev": true, + "requires": { + "@evocateur/libnpmpublish": "^1.2.2", + "@lerna/otplease": "3.18.5", + "@lerna/run-lifecycle": "3.16.2", + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "pify": "^4.0.1", + "read-package-json": "^2.0.13" + } + }, + "@lerna/npm-run-script": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz", + "integrity": "sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/get-npm-exec-opts": "3.13.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/otplease": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/otplease/-/otplease-3.18.5.tgz", + "integrity": "sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog==", + "dev": true, + "requires": { + "@lerna/prompt": "3.18.5", + "figgy-pudding": "^3.5.1" + } + }, + "@lerna/output": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/output/-/output-3.13.0.tgz", + "integrity": "sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/pack-directory": { + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-3.16.4.tgz", + "integrity": "sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng==", + "dev": true, + "requires": { + "@lerna/get-packed": "3.16.0", + "@lerna/package": "3.16.0", + "@lerna/run-lifecycle": "3.16.2", + "figgy-pudding": "^3.5.1", + "npm-packlist": "^1.4.4", + "npmlog": "^4.1.2", + "tar": "^4.4.10", + "temp-write": "^3.4.0" + } + }, + "@lerna/package": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/package/-/package-3.16.0.tgz", + "integrity": "sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw==", + "dev": true, + "requires": { + "load-json-file": "^5.3.0", + "npm-package-arg": "^6.1.0", + "write-pkg": "^3.1.0" + } + }, + "@lerna/package-graph": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-3.18.5.tgz", + "integrity": "sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA==", + "dev": true, + "requires": { + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/validation-error": "3.13.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "semver": "^6.2.0" + } + }, + "@lerna/prerelease-id-from-version": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz", + "integrity": "sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA==", + "dev": true, + "requires": { + "semver": "^6.2.0" + } + }, + "@lerna/profiler": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/profiler/-/profiler-3.20.0.tgz", + "integrity": "sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2", + "upath": "^1.2.0" + } + }, + "@lerna/project": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/project/-/project-3.21.0.tgz", + "integrity": "sha512-xT1mrpET2BF11CY32uypV2GPtPVm6Hgtha7D81GQP9iAitk9EccrdNjYGt5UBYASl4CIDXBRxwmTTVGfrCx82A==", + "dev": true, + "requires": { + "@lerna/package": "3.16.0", + "@lerna/validation-error": "3.13.0", + "cosmiconfig": "^5.1.0", + "dedent": "^0.7.0", + "dot-prop": "^4.2.0", + "glob-parent": "^5.0.0", + "globby": "^9.2.0", + "load-json-file": "^5.3.0", + "npmlog": "^4.1.2", + "p-map": "^2.1.0", + "resolve-from": "^4.0.0", + "write-json-file": "^3.2.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "@lerna/prompt": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/prompt/-/prompt-3.18.5.tgz", + "integrity": "sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ==", + "dev": true, + "requires": { + "inquirer": "^6.2.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/publish": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/@lerna/publish/-/publish-3.22.1.tgz", + "integrity": "sha512-PG9CM9HUYDreb1FbJwFg90TCBQooGjj+n/pb3gw/eH5mEDq0p8wKdLFe0qkiqUkm/Ub5C8DbVFertIo0Vd0zcw==", + "dev": true, + "requires": { + "@evocateur/libnpmaccess": "^3.1.2", + "@evocateur/npm-registry-fetch": "^4.0.0", + "@evocateur/pacote": "^9.6.3", + "@lerna/check-working-tree": "3.16.5", + "@lerna/child-process": "3.16.5", + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.21.0", + "@lerna/describe-ref": "3.16.5", + "@lerna/log-packed": "3.16.0", + "@lerna/npm-conf": "3.16.0", + "@lerna/npm-dist-tag": "3.18.5", + "@lerna/npm-publish": "3.18.5", + "@lerna/otplease": "3.18.5", + "@lerna/output": "3.13.0", + "@lerna/pack-directory": "3.16.4", + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "@lerna/version": "3.22.1", + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-pipe": "^1.2.0", + "semver": "^6.2.0" + } + }, + "@lerna/pulse-till-done": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz", + "integrity": "sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/query-graph": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-3.18.5.tgz", + "integrity": "sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA==", + "dev": true, + "requires": { + "@lerna/package-graph": "3.18.5", + "figgy-pudding": "^3.5.1" + } + }, + "@lerna/resolve-symlink": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz", + "integrity": "sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ==", + "dev": true, + "requires": { + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2", + "read-cmd-shim": "^1.0.1" + } + }, + "@lerna/rimraf-dir": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz", + "integrity": "sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "npmlog": "^4.1.2", + "path-exists": "^3.0.0", + "rimraf": "^2.6.2" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "@lerna/run": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@lerna/run/-/run-3.21.0.tgz", + "integrity": "sha512-fJF68rT3veh+hkToFsBmUJ9MHc9yGXA7LSDvhziAojzOb0AI/jBDp6cEcDQyJ7dbnplba2Lj02IH61QUf9oW0Q==", + "dev": true, + "requires": { + "@lerna/command": "3.21.0", + "@lerna/filter-options": "3.20.0", + "@lerna/npm-run-script": "3.16.5", + "@lerna/output": "3.13.0", + "@lerna/profiler": "3.20.0", + "@lerna/run-topologically": "3.18.5", + "@lerna/timer": "3.13.0", + "@lerna/validation-error": "3.13.0", + "p-map": "^2.1.0" + } + }, + "@lerna/run-lifecycle": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz", + "integrity": "sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A==", + "dev": true, + "requires": { + "@lerna/npm-conf": "3.16.0", + "figgy-pudding": "^3.5.1", + "npm-lifecycle": "^3.1.2", + "npmlog": "^4.1.2" + } + }, + "@lerna/run-topologically": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-3.18.5.tgz", + "integrity": "sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg==", + "dev": true, + "requires": { + "@lerna/query-graph": "3.18.5", + "figgy-pudding": "^3.5.1", + "p-queue": "^4.0.0" + } + }, + "@lerna/symlink-binary": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz", + "integrity": "sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ==", + "dev": true, + "requires": { + "@lerna/create-symlink": "3.16.2", + "@lerna/package": "3.16.0", + "fs-extra": "^8.1.0", + "p-map": "^2.1.0" + } + }, + "@lerna/symlink-dependencies": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz", + "integrity": "sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q==", + "dev": true, + "requires": { + "@lerna/create-symlink": "3.16.2", + "@lerna/resolve-symlink": "3.16.0", + "@lerna/symlink-binary": "3.17.0", + "fs-extra": "^8.1.0", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0" + } + }, + "@lerna/timer": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/timer/-/timer-3.13.0.tgz", + "integrity": "sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw==", + "dev": true + }, + "@lerna/validation-error": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-3.13.0.tgz", + "integrity": "sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/version": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/@lerna/version/-/version-3.22.1.tgz", + "integrity": "sha512-PSGt/K1hVqreAFoi3zjD0VEDupQ2WZVlVIwesrE5GbrL2BjXowjCsTDPqblahDUPy0hp6h7E2kG855yLTp62+g==", + "dev": true, + "requires": { + "@lerna/check-working-tree": "3.16.5", + "@lerna/child-process": "3.16.5", + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.21.0", + "@lerna/conventional-commits": "3.22.0", + "@lerna/github-client": "3.22.0", + "@lerna/gitlab-client": "3.15.0", + "@lerna/output": "3.13.0", + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/prompt": "3.18.5", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "chalk": "^2.3.1", + "dedent": "^0.7.0", + "load-json-file": "^5.3.0", + "minimatch": "^3.0.4", + "npmlog": "^4.1.2", + "p-map": "^2.1.0", + "p-pipe": "^1.2.0", + "p-reduce": "^1.0.0", + "p-waterfall": "^1.0.0", + "semver": "^6.2.0", + "slash": "^2.0.0", + "temp-write": "^3.4.0", + "write-json-file": "^3.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@lerna/write-log-file": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-3.13.0.tgz", + "integrity": "sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A==", + "dev": true, + "requires": { + "npmlog": "^4.1.2", + "write-file-atomic": "^2.3.0" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "@octokit/auth-token": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3" + } + }, + "@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + } + } + }, + "@octokit/openapi-types": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-8.2.1.tgz", + "integrity": "sha512-BJz6kWuL3n+y+qM8Pv+UGbSxH6wxKf/SBs5yzGufMHwDefsa+Iq7ZGy1BINMD2z9SkXlIzk1qiu988rMuGXEMg==", + "dev": true + }, + "@octokit/plugin-enterprise-rest": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz", + "integrity": "sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==", + "dev": true + }, + "@octokit/plugin-paginate-rest": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", + "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", + "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1", + "deprecation": "^2.3.1" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/request": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.0.tgz", + "integrity": "sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dev": true, + "requires": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + } + } + }, + "@octokit/request-error": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", + "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/rest": { + "version": "16.43.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz", + "integrity": "sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/plugin-paginate-rest": "^1.1.1", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "2.4.0", + "@octokit/request": "^5.2.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + } + }, + "@octokit/types": { + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.18.1.tgz", + "integrity": "sha512-5YsddjO1U+xC8ZYKV8yZYebW55PCc7qiEEeZ+wZRr6qyclynzfyD65KZ5FdtIeP0/cANyFaD7hV69qElf1nMsQ==", + "dev": true, + "requires": { + "@octokit/openapi-types": "^8.2.1" + } + }, + "@types/glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "@types/node": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.1.tgz", + "integrity": "sha512-hBOx4SUlEPKwRi6PrXuTGw1z6lz0fjsibcWCM378YxsSu/6+C30L6CR49zIBKHiwNWCYIcOLjg4OHKZaFeLAug==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@zkochan/cmd-shim": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz", + "integrity": "sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg==", + "dev": true, + "requires": { + "is-windows": "^1.0.0", + "mkdirp-promise": "^5.0.1", + "mz": "^2.5.0" + } + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "agentkeepalive": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "dev": true, + "requires": { + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", + "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "atob-lite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "before-after-hook": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", + "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "btoa-lite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "byte-size": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz", + "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + }, + "dependencies": { + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + } + } + }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "conventional-changelog-angular": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", + "integrity": "sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "q": "^1.5.1" + } + }, + "conventional-changelog-core": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz", + "integrity": "sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ==", + "dev": true, + "requires": { + "conventional-changelog-writer": "^4.0.6", + "conventional-commits-parser": "^3.0.3", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "2.0.0", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^2.0.3", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "through2": "^3.0.0" + }, + "dependencies": { + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-changelog-preset-loader": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", + "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz", + "integrity": "sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw==", + "dev": true, + "requires": { + "compare-func": "^2.0.0", + "conventional-commits-filter": "^2.0.7", + "dateformat": "^3.0.0", + "handlebars": "^4.7.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^4.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + } + } + } + }, + "conventional-commits-filter": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", + "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", + "dev": true, + "requires": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz", + "integrity": "sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^8.0.0", + "split2": "^3.0.0", + "through2": "^4.0.0", + "trim-off-newlines": "^1.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + } + } + } + }, + "conventional-recommended-bump": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz", + "integrity": "sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ==", + "dev": true, + "requires": { + "concat-stream": "^2.0.0", + "conventional-changelog-preset-loader": "^2.1.1", + "conventional-commits-filter": "^2.0.2", + "conventional-commits-parser": "^3.0.3", + "git-raw-commits": "2.0.0", + "git-semver-tags": "^2.0.3", + "meow": "^4.0.0", + "q": "^1.5.1" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + } + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "dot-prop": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", + "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "requires": { + "iconv-lite": "^0.6.2" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", + "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.10.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "find-versions": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", + "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", + "dev": true, + "requires": { + "semver-regex": "^3.1.2" + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "genfun": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", + "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "dev": true + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "git-raw-commits": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", + "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "dev": true, + "requires": { + "through2": "^2.0.2" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + } + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "git-semver-tags": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.3.tgz", + "integrity": "sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA==", + "dev": true, + "requires": { + "meow": "^4.0.0", + "semver": "^6.0.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + } + } + }, + "git-up": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-4.0.5.tgz", + "integrity": "sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "parse-url": "^6.0.0" + } + }, + "git-url-parse": { + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.5.0.tgz", + "integrity": "sha512-TZYSMDeM37r71Lqg1mbnMlOqlHd7BSij9qN7XwTkRqSAYFMihGLGhfHwgqQob3GUhEneKnV4nskN9rbQw2KGxA==", + "dev": true, + "requires": { + "git-up": "^4.0.0" + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "dev": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "husky": { + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz", + "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^7.0.0", + "find-versions": "^4.0.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^5.0.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "ignore-walk": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", + "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "init-package-json": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", + "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "dev": true + }, + "is-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "dev": true + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true + }, + "is-ssh": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.3.tgz", + "integrity": "sha512-NKzJmQzJfEEma3w5cJNcUMxoXfDjz0Zj0eyCalHn2E6VOwlzjZo0yuO2fcBSf8zhFuVCL/82/r5gRcoi6aEPVQ==", + "dev": true, + "requires": { + "protocols": "^1.1.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "dev": true + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "lerna": { + "version": "3.22.1", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.22.1.tgz", + "integrity": "sha512-vk1lfVRFm+UuEFA7wkLKeSF7Iz13W+N/vFd48aW2yuS7Kv0RbNm2/qcDPV863056LMfkRlsEe+QYOw3palj5Lg==", + "dev": true, + "requires": { + "@lerna/add": "3.21.0", + "@lerna/bootstrap": "3.21.0", + "@lerna/changed": "3.21.0", + "@lerna/clean": "3.21.0", + "@lerna/cli": "3.18.5", + "@lerna/create": "3.22.0", + "@lerna/diff": "3.21.0", + "@lerna/exec": "3.21.0", + "@lerna/import": "3.22.0", + "@lerna/info": "3.21.0", + "@lerna/init": "3.21.0", + "@lerna/link": "3.21.0", + "@lerna/list": "3.21.0", + "@lerna/publish": "3.22.1", + "@lerna/run": "3.21.0", + "@lerna/version": "3.22.1", + "import-local": "^2.0.0", + "npmlog": "^4.1.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "lint-staged": { + "version": "10.5.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.4.tgz", + "integrity": "sha512-EechC3DdFic/TdOPgj/RB3FicqE6932LTHCUm0Y2fsD9KGlLB+RwJl2q1IYBIvEsKzDOgn0D4gll+YxG5RsrKg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "cli-truncate": "^2.1.0", + "commander": "^6.2.0", + "cosmiconfig": "^7.0.0", + "debug": "^4.2.0", + "dedent": "^0.7.0", + "enquirer": "^2.3.6", + "execa": "^4.1.0", + "listr2": "^3.2.2", + "log-symbols": "^4.0.0", + "micromatch": "^4.0.2", + "normalize-path": "^3.0.0", + "please-upgrade-node": "^3.2.0", + "string-argv": "0.3.1", + "stringify-object": "^3.3.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "listr2": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.10.0.tgz", + "integrity": "sha512-eP40ZHihu70sSmqFNbNy2NL1YwImmlMmPh9WO5sLmPDleurMHt3n+SwEWNu2kzKScexZnkyFtc1VI0z/TGlmpw==", + "dev": true, + "requires": { + "cli-truncate": "^2.1.0", + "colorette": "^1.2.2", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rxjs": "^6.6.7", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", + "dev": true + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "macos-release": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.5.0.tgz", + "integrity": "sha512-EIgv+QZ9r+814gjJj0Bt5vSLJLzswGmSUbUpbi9AIr/fsN2IWFBl2NucV9PAiek+U1STK468tEkxmVYUtuAN3g==", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-fetch-happen": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", + "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", + "dev": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^12.0.0", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^4.0.0", + "ssri": "^6.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dev": true, + "requires": { + "mime-db": "1.48.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + } + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "dev": true, + "requires": { + "mkdirp": "*" + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "multimatch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz", + "integrity": "sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==", + "dev": true, + "requires": { + "array-differ": "^2.0.3", + "array-union": "^1.0.2", + "arrify": "^1.0.1", + "minimatch": "^3.0.4" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, + "node-fetch-npm": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", + "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node-gyp": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.1.tgz", + "integrity": "sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==", + "dev": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.1.2", + "request": "^2.88.0", + "rimraf": "^2.6.3", + "semver": "^5.7.1", + "tar": "^4.4.12", + "which": "^1.3.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true + }, + "npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-lifecycle": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz", + "integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", + "dev": true, + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.15", + "node-gyp": "^5.0.2", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, + "npm-package-arg": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", + "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "dev": true, + "requires": { + "hosted-git-info": "^2.7.1", + "osenv": "^0.1.5", + "semver": "^5.6.0", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "npm-packlist": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "dev": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", + "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "octokit-pagination-methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-name": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "dev": true, + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, + "p-map-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", + "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-pipe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", + "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", + "dev": true + }, + "p-queue": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-4.0.0.tgz", + "integrity": "sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg==", + "dev": true, + "requires": { + "eventemitter3": "^3.1.0" + } + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "p-waterfall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-waterfall/-/p-waterfall-1.0.0.tgz", + "integrity": "sha1-ftlLPOszMngjU69qrhGqn8I1uwA=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "dev": true + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse-path": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.3.tgz", + "integrity": "sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "protocols": "^1.4.0", + "qs": "^6.9.4", + "query-string": "^6.13.8" + }, + "dependencies": { + "qs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", + "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + } + } + }, + "parse-url": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-6.0.0.tgz", + "integrity": "sha512-cYyojeX7yIIwuJzledIHeLUBVJ6COVLeT4eF+2P6aKVzwvgKQPndCBv3+yQ7pcWjqToYwaligxzSYNNmGoMAvw==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "normalize-url": "^6.1.0", + "parse-path": "^4.0.0", + "protocols": "^1.4.0" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", + "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "dev": true, + "requires": { + "find-up": "^5.0.0" + } + }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "promise-retry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", + "dev": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + } + }, + "promzard": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", + "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", + "dev": true, + "requires": { + "read": "1" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "protocols": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-1.4.8.tgz", + "integrity": "sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg==", + "dev": true + }, + "protoduck": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", + "dev": true, + "requires": { + "genfun": "^5.0.0" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "query-string": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz", + "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-cmd-shim": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", + "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "read-package-tree": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", + "dev": true, + "requires": { + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "dev": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-regex": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.2.tgz", + "integrity": "sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } + } + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "smart-buffer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socks": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", + "dev": true, + "requires": { + "ip": "1.1.5", + "smart-buffer": "^4.1.0" + } + }, + "socks-proxy-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", + "dev": true, + "requires": { + "agent-base": "~4.2.1", + "socks": "~2.3.2" + }, + "dependencies": { + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + } + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "requires": { + "readable-stream": "^3.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "dev": true + }, + "string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, + "strong-log-transformer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", + "integrity": "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "minimist": "^1.2.0", + "through": "^2.3.4" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true + }, + "temp-write": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz", + "integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "is-stream": "^1.1.0", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true + }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.13.10", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz", + "integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==", + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", + "dev": true + }, + "umask": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", + "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universal-user-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", + "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util-promisify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "windows-release": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz", + "integrity": "sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==", + "dev": true, + "requires": { + "execa": "^1.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-json-file": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", + "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.15", + "make-dir": "^2.1.0", + "pify": "^4.0.1", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.4.2" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", + "dev": true, + "requires": { + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" + } + } + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + }, + "yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", + "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 180563c6..11b7c14c 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "devDependencies": { "husky": "4", "lerna": "^3.16.4", - "lint-staged": "^10.5.4", - "prettier": "^2.2.1" + "lint-staged": "^10.5.4" }, "workspaces": [ "packages/*" diff --git a/packages/core-js/README.md b/packages/core-js/README.md new file mode 100644 index 00000000..d0d77e85 --- /dev/null +++ b/packages/core-js/README.md @@ -0,0 +1,11 @@ +# `core-js` + +> TODO: description + +## Usage + +``` +const coreJs = require('core-js'); + +// TODO: DEMONSTRATE API +``` diff --git a/packages/core-js/__tests__/core.test.js b/packages/core-js/__tests__/core.test.js new file mode 100644 index 00000000..9ac914ca --- /dev/null +++ b/packages/core-js/__tests__/core.test.js @@ -0,0 +1,7 @@ +'use strict'; + +const coreJs = require('..'); + +describe('core-js', () => { + it('needs tests'); +}); diff --git a/packages/core-js/babel.config.json b/packages/core-js/babel.config.json new file mode 100644 index 00000000..12fbfa49 --- /dev/null +++ b/packages/core-js/babel.config.json @@ -0,0 +1,11 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "corejs": "3.15", + "useBuiltIns": "usage" + } + ] + ] +} diff --git a/packages/core-js/lib/Functions.js b/packages/core-js/lib/Functions.js new file mode 100644 index 00000000..3252e95e --- /dev/null +++ b/packages/core-js/lib/Functions.js @@ -0,0 +1,53 @@ +/* + Function: $defined + Returns true if the passed in value/object is defined, that means is not null or undefined. + + Arguments: + obj - object to inspect + */ + +global.$defined = function (obj) { + return (obj != undefined); +}; + + +global.$assert = function (assert, message) { + if (!$defined(assert) || !assert) { + logStackTrace(); + console.log(message); + throw new Error(message); + } +}; + +Math.sign = function (value) { + return (value >= 0) ? 1 : -1; +}; + +function logStackTrace(exception) { + + if (!$defined(exception)) { + try { + throw Error("Unexpected Exception"); + } catch (e) { + exception = e; + } + } + var result = ""; + if (exception.stack) { //Firefox and Chrome... + result = exception.stack; + } + else if (window.opera && exception.message) { //Opera + result = exception.message; + } else { //IE and Safari + result = exception.sourceURL + ': ' + exception.line + "\n\n"; + + var currentFunction = arguments.callee.caller; + while (currentFunction) { + var fn = currentFunction.toString(); + result = result + "\n" + fn; + currentFunction = currentFunction.caller; + } + } + window.errorStack = result; + return result; +} diff --git a/packages/core-js/lib/Utils.js b/packages/core-js/lib/Utils.js new file mode 100644 index 00000000..17071d3d --- /dev/null +++ b/packages/core-js/lib/Utils.js @@ -0,0 +1,57 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +core.Utils = {}; + +core.Utils.innerXML = function (node) { + // summary: + // Implementation of MS's innerXML function. + if ($defined(node.innerXML)) { + return node.innerXML; + // string + } else if ($defined(node.xml)) { + return node.xml; + // string + } else if ($defined(XMLSerializer)) { + return new XMLSerializer().serializeToString(node); + // string + } +}; + +/** + * Cross-browser implementation of creating an XML document object. + */ +core.Utils.createDocument = function () { + var doc = null; + if ($defined(window.ActiveXObject)) { + //http://blogs.msdn.com/b/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx + var progIDs = ['Msxml2.DOMDocument.6.0', 'Msxml2.DOMDocument.3.0']; + for (var i = 0; i < progIDs.length; i++) { + try { + doc = new ActiveXObject(progIDs[i]); + break; + } catch (ex) {} + } + } else if (window.document.implementation && window.document.implementation.createDocument) { + doc = window.document.implementation.createDocument('', '', null); + } + $assert(doc, 'Parser could not be instantiated'); + + return doc; +}; + diff --git a/packages/core-js/lib/core.js b/packages/core-js/lib/core.js new file mode 100644 index 00000000..df68461a --- /dev/null +++ b/packages/core-js/lib/core.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = coreJs; // eslint-disable-line + +function coreJs() { + global.core = require('./header'); // eslint-disable-line + require('./Functions'); // eslint-disable-line + require('./Utils'); // eslint-disable-line + global.Options = require('@wisemapping/mindplot/lib/components/Options'); + global.BootstrapDialog = require('@wisemapping/mindplot/lib/components/libraries/bootstrap/BootstrapDialog'); + //require('@wisemapping/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.Request'); + return global.core; // eslint-disable-line no-undef +} diff --git a/packages/core-js/lib/header.js b/packages/core-js/lib/header.js new file mode 100644 index 00000000..77ca4120 --- /dev/null +++ b/packages/core-js/lib/header.js @@ -0,0 +1,18 @@ +/* +* Copyright [2015] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +export default {} diff --git a/packages/core-js/package.json b/packages/core-js/package.json new file mode 100644 index 00000000..9c99795d --- /dev/null +++ b/packages/core-js/package.json @@ -0,0 +1,40 @@ +{ + "name": "@wismapping/core-js", + "version": "0.0.1", + "description": "core-js", + "license": "ISC", + "main": "lib/core.js", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib" + ], + "publishConfig": { + "registry": "https://registry.yarnpkg.com" + }, + "repository": { + "type": "git", + "url": "git+https://ezequielVega@bitbucket.org/lilabyus/wisemapping-frontend.git" + }, + "scripts": { + "build": "webpack --config webpack.prod.js", + "start": "webpack serve --config webpack.dev.js" + }, + "devDependencies": { + "@babel/core": "^7.14.6", + "@babel/preset-env": "^7.14.7", + "babel-loader": "^8.2.2", + "clean-webpack-plugin": "^4.0.0-alpha.0", + "core-js": "^3.15.2", + "html-webpack-plugin": "^5.3.2", + "webpack": "^5.44.0", + "webpack-cli": "^4.7.2", + "webpack-dev-server": "^3.11.2", + "webpack-merge": "^5.8.0" + }, + "dependencies": { + "@wisemapping/mindplot": "^0.0.1" + } +} diff --git a/packages/core-js/webpack.common.js b/packages/core-js/webpack.common.js new file mode 100644 index 00000000..b5cf5653 --- /dev/null +++ b/packages/core-js/webpack.common.js @@ -0,0 +1,59 @@ +const path = require('path'); // eslint-disable-line +//const { ProvidePlugin } = require('webpack'); +const { CleanWebpackPlugin } = require('clean-webpack-plugin'); // eslint-disable-line + +/** @type {import('webpack').Configuration} */ +module.exports = { // eslint-disable-line + entry: './lib/core.js', + output: { + path: path.resolve(__dirname, 'dist'), // eslint-disable-line + filename: 'core.js', + publicPath: '', + }, + module: { + rules: [ + { + use: 'babel-loader', + test: /.(js|jsx)$/, + exclude: /node_modules/, + }, + { + type: 'asset', + test: /\.(png|svg|jpg|jpeg|gif)$/i, + }, + ], + }, + resolve: { + extensions: ['.js', '.jsx', '.json'], + }, + plugins: [new CleanWebpackPlugin()], +}; + +/* + *{ + core: [ + path.resolve(__dirname, '../mindplot/src/main/javascript/Options'), + path.resolve( + __dirname, + '../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog' + ), + path.resolve( + __dirname, + '../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.Request' + ), + ], + }, +Options: path.resolve(path.join(__dirname, '../mindplot/src/main/javascript/Options')), + BootstrapDialog: path.resolve( + path.join( + __dirname, + '../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog' + ) + ), + BootstrapDialogRequest: path.resolve( + path.join( + __dirname, + '../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.Request' + ) + ), + * */ diff --git a/packages/core-js/webpack.dev.js b/packages/core-js/webpack.dev.js new file mode 100644 index 00000000..f63290fe --- /dev/null +++ b/packages/core-js/webpack.dev.js @@ -0,0 +1,14 @@ +const { HotModuleReplacementPlugin } = require("webpack"); +const { merge } = require("webpack-merge"); +const common = require("./webpack.common"); + +/** @type {import('webpack').Configuration} */ +const devConfig = { + mode: "development", + target: "core", + plugins: [new HotModuleReplacementPlugin()], + devtool: "eval-source-map" +}; + +module.exports = merge(common, devConfig) + diff --git a/packages/core-js/webpack.prod.js b/packages/core-js/webpack.prod.js new file mode 100644 index 00000000..d4b51f76 --- /dev/null +++ b/packages/core-js/webpack.prod.js @@ -0,0 +1,16 @@ +const { merge } = require("webpack-merge"); +const common = require("./webpack.common"); + +/** @type {import('webpack').Configuration} */ +const prodConfig = { + mode: "production", + devtool: "source-map", + optimization: { + splitChunks: { + chunks: "all", + }, + } +}; + +module.exports = merge(common, prodConfig); + diff --git a/packages/mindplot/README.md b/packages/mindplot/README.md new file mode 100644 index 00000000..507d5675 --- /dev/null +++ b/packages/mindplot/README.md @@ -0,0 +1,11 @@ +# `mindplot` + +> TODO: description + +## Usage + +``` +const mindplot = require('mindplot'); + +// TODO: DEMONSTRATE API +``` diff --git a/packages/mindplot/__tests__/mindplot.test.js b/packages/mindplot/__tests__/mindplot.test.js new file mode 100644 index 00000000..96c92eb4 --- /dev/null +++ b/packages/mindplot/__tests__/mindplot.test.js @@ -0,0 +1,7 @@ +'use strict'; + +const mindplot = require('..'); + +describe('mindplot', () => { + it('needs tests'); +}); diff --git a/packages/mindplot/babel.config.json b/packages/mindplot/babel.config.json new file mode 100644 index 00000000..0af3c4b9 --- /dev/null +++ b/packages/mindplot/babel.config.json @@ -0,0 +1,11 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "corejs": "3.9", + "useBuiltIns": "usage" + } + ] + ] +} diff --git a/packages/mindplot/lib/components/.gitignore b/packages/mindplot/lib/components/.gitignore new file mode 100644 index 00000000..cc4e9f6e --- /dev/null +++ b/packages/mindplot/lib/components/.gitignore @@ -0,0 +1 @@ +MessageBundle_* \ No newline at end of file diff --git a/packages/mindplot/lib/components/ActionDispatcher.js b/packages/mindplot/lib/components/ActionDispatcher.js new file mode 100644 index 00000000..880f1391 --- /dev/null +++ b/packages/mindplot/lib/components/ActionDispatcher.js @@ -0,0 +1,112 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('./Events').default; + +//noinspection JSUnusedLocalSymbols +const ActionDispatcher = new Class({ + Implements:[Events], + initialize: function(commandContext) { + $assert(commandContext, "commandContext can not be null"); + }, + + addRelationship: function(model, mindmap) { + throw "method must be implemented."; + }, + + addTopics: function(models, parentTopicId) { + throw "method must be implemented."; + }, + + deleteEntities: function(topicsIds, relIds) { + throw "method must be implemented."; + }, + + dragTopic: function(topicId, position, order, parentTopic) { + throw "method must be implemented."; + }, + + moveTopic: function(topicId, position) { + throw "method must be implemented."; + }, + + moveControlPoint: function(ctrlPoint, point) { + throw "method must be implemented."; + }, + + changeFontFamilyToTopic: function(topicIds, fontFamily) { + throw "method must be implemented."; + }, + + changeFontStyleToTopic: function(topicsIds) { + throw "method must be implemented."; + }, + + changeFontColorToTopic: function(topicsIds, color) { + throw "method must be implemented."; + }, + + changeFontSizeToTopic : function(topicsIds, size) { + throw "method must be implemented."; + }, + + changeBackgroundColorToTopic: function(topicsIds, color) { + throw "method must be implemented."; + }, + + changeBorderColorToTopic: function(topicsIds, color) { + throw "method must be implemented."; + }, + + changeShapeTypeToTopic : function(topicsIds, shapeType) { + throw "method must be implemented."; + }, + + changeFontWeightToTopic : function(topicsIds) { + throw "method must be implemented."; + }, + + changeTextToTopic : function(topicsIds, text) { + throw "method must be implemented."; + }, + + shrinkBranch : function(topicsIds, collapse) { + throw "method must be implemented."; + }, + + addFeatureToTopic : function(topicId, type, attributes) { + throw "method must be implemented."; + }, + + changeFeatureToTopic : function(topicId, featureId, attributes) { + throw "method must be implemented."; + }, + + removeFeatureFromTopic : function(topicId, featureId) { + throw "method must be implemented."; + } +}); + +ActionDispatcher.setInstance = function(dispatcher) { + ActionDispatcher._instance = dispatcher; +}; + +ActionDispatcher.getInstance = function() { + return ActionDispatcher._instance; +}; + +export default ActionDispatcher; diff --git a/packages/mindplot/lib/components/ActionIcon.js b/packages/mindplot/lib/components/ActionIcon.js new file mode 100644 index 00000000..094cd328 --- /dev/null +++ b/packages/mindplot/lib/components/ActionIcon.js @@ -0,0 +1,64 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Icon = require('./Icon').default; + +const ActionIcon = new Class({ + Extends:Icon, + initialize: function(topic, url) { + this.parent(url); + this._node = topic; + }, + getNode:function() { + return this._node; + }, + + setPosition:function(x, y) { + var size = this.getSize(); + this.getImage().setPosition(x - size.width / 2, y - size.height / 2); + }, + + addEvent:function(event, fn) { + this.getImage().addEvent(event, fn); + }, + + addToGroup:function(group) { + group.append(this.getImage()); + }, + + setVisibility:function(visible) { + this.getImage().setVisibility(visible); + }, + + isVisible:function() { + return this.getImage().isVisible(); + }, + + setCursor:function(cursor) { + return this.getImage().setCursor(cursor); + }, + + moveToBack:function(cursor) { + return this.getImage().moveToBack(cursor); + }, + + moveToFront:function(cursor) { + return this.getImage().moveToFront(cursor); + } +}); + +export default ActionIcon; diff --git a/packages/mindplot/lib/components/CentralTopic.js b/packages/mindplot/lib/components/CentralTopic.js new file mode 100644 index 00000000..cb530412 --- /dev/null +++ b/packages/mindplot/lib/components/CentralTopic.js @@ -0,0 +1,83 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const Topic = require('./Topic').default; +const Shape = require('./util/Shape').default; + +const CentralTopic = new Class(/** @lends CentralTopic*/{ + + Extends:Topic, + /** + * @extends mindplot.Topic + * @constructs + * @param model + * @param options + */ + initialize:function (model, options) { + this.parent(model, options); + }, + + _registerEvents:function () { + this.parent(); + + // This disable the drag of the central topic. But solves the problem of deselecting the nodes when the screen is clicked. + this.addEvent('mousedown', function (event) { + event.stopPropagation(); + }); + }, + + /** */ + workoutIncomingConnectionPoint:function () { + return this.getPosition(); + }, + + /** */ + setCursor:function (type) { + type = (type == 'move') ? 'default' : type; + this.parent(type); + }, + + /** */ + updateTopicShape:function () { + + }, + + _updatePositionOnChangeSize:function () { + + // Center main topic ... + var zeroPoint = new core.Point(0, 0); + this.setPosition(zeroPoint); + }, + + /** */ + getShrinkConnector:function () { + return null; + }, + + /** */ + workoutOutgoingConnectionPoint:function (targetPosition) { + $assert(targetPosition, 'targetPoint can not be null'); + var pos = this.getPosition(); + var isAtRight = Shape.isAtRight(targetPosition, pos); + var size = this.getSize(); + return Shape.calculateRectConnectionPoint(pos, size, !isAtRight); + } +}); + +export default CentralTopic; diff --git a/packages/mindplot/lib/components/Command.js b/packages/mindplot/lib/components/Command.js new file mode 100644 index 00000000..91ed9ec2 --- /dev/null +++ b/packages/mindplot/lib/components/Command.js @@ -0,0 +1,67 @@ +/* +* Copyright [2015] [wisemapping] +* +* Licensed under WiseMapping Public License, Version 1.0 (the "License"). +* It is basically the Apache License, Version 2.0 (the "License") plus the +* "powered by wisemapping" text requirement on every single page; +* you may not use this file except in compliance with the License. +* You may obtain a copy of the license at +* +* http://www.wisemapping.org/license +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +const Command = new Class(/** @lends mindplot.Command */{ + /** + * @classdesc The command base class for handling do/undo mindmap operations + * @constructs + */ + initialize: function() + { + this._id = Command._nextUUID(); + }, + + /** + * @abstract + */ + execute: function(commandContext) + { + throw "execute must be implemented."; + }, + + /** + * Triggered by the undo button - reverses the executed command + * @abstract + */ + undoExecute: function(commandContext) + { + throw "undo must be implemented."; + }, + + /** + * Returns the unique id of this command + * @returns {Number} command id + */ + getId:function() + { + return this._id; + } +}); + +Command._nextUUID = function() +{ + if (!$defined(Command._uuid)) + { + Command._uuid = 1; + } + + Command._uuid = Command._uuid + 1; + return Command._uuid; +}; + +export default Command; diff --git a/packages/mindplot/lib/components/ConnectionLine.js b/packages/mindplot/lib/components/ConnectionLine.js new file mode 100644 index 00000000..ae3afc4a --- /dev/null +++ b/packages/mindplot/lib/components/ConnectionLine.js @@ -0,0 +1,211 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js'); +const core = Core(); +const web2D = require('@wismapping/web2d'); +const web2d = web2D(); + +const INodeModel, + { TopicShape } = require('./model/INodeModel').default; +const Topic = require('./Topic').default; + +const ConnectionLine = new Class({ + initialize: function (sourceNode, targetNode, lineType) { + $assert(targetNode, 'parentNode node can not be null'); + $assert(sourceNode, 'childNode node can not be null'); + $assert(sourceNode != targetNode, 'Circular connection'); + + this._targetTopic = targetNode; + this._sourceTopic = sourceNode; + + var line; + var ctrlPoints = this._getCtrlPoints(sourceNode, targetNode); + if (targetNode.getType() == INodeModel.CENTRAL_TOPIC_TYPE) { + line = this._createLine(lineType, ConnectionLine.CURVED); + line.setSrcControlPoint(ctrlPoints[0]); + line.setDestControlPoint(ctrlPoints[1]); + } else { + line = this._createLine(lineType, ConnectionLine.SIMPLE_CURVED); + line.setSrcControlPoint(ctrlPoints[0]); + line.setDestControlPoint(ctrlPoints[1]); + } + // Set line styles ... + var strokeColor = ConnectionLine.getStrokeColor(); + line.setStroke(1, 'solid', strokeColor, 1); + line.setFill(strokeColor, 1); + + this._line2d = line; + }, + + _getCtrlPoints: function (sourceNode, targetNode) { + var srcPos = sourceNode.workoutOutgoingConnectionPoint(targetNode.getPosition()); + var destPos = targetNode.workoutIncomingConnectionPoint(sourceNode.getPosition()); + var deltaX = (srcPos.x - destPos.x) / 3; + return [new core.Point(deltaX, 0), new core.Point(-deltaX, 0)]; + }, + + _createLine: function (lineType, defaultStyle) { + if (!$defined(lineType)) { + lineType = defaultStyle; + } + lineType = parseInt(lineType); + this._lineType = lineType; + var line = null; + switch (lineType) { + case ConnectionLine.POLYLINE: + line = new web2d.PolyLine(); + break; + case ConnectionLine.CURVED: + line = new web2d.CurvedLine(); + break; + case ConnectionLine.SIMPLE_CURVED: + line = new web2d.CurvedLine(); + line.setStyle(web2d.CurvedLine.SIMPLE_LINE); + break; + default: + line = new web2d.Line(); + break; + } + return line; + }, + + setVisibility: function (value) { + this._line2d.setVisibility(value); + }, + + isVisible: function () { + return this._line2d.isVisible(); + }, + + setOpacity: function (opacity) { + this._line2d.setOpacity(opacity); + }, + + redraw: function () { + var line2d = this._line2d; + var sourceTopic = this._sourceTopic; + var sourcePosition = sourceTopic.getPosition(); + + var targetTopic = this._targetTopic; + var targetPosition = targetTopic.getPosition(); + + var sPos, tPos; + sPos = sourceTopic.workoutOutgoingConnectionPoint(targetPosition); + tPos = targetTopic.workoutIncomingConnectionPoint(sourcePosition); + + line2d.setFrom(tPos.x, tPos.y); + line2d.setTo(sPos.x, sPos.y); + + if (line2d.getType() == 'CurvedLine') { + var ctrlPoints = this._getCtrlPoints(this._sourceTopic, this._targetTopic); + line2d.setSrcControlPoint(ctrlPoints[0]); + line2d.setDestControlPoint(ctrlPoints[1]); + } + + // Add connector ... + this._positionateConnector(targetTopic); + }, + + _positionateConnector: function (targetTopic) { + var targetPosition = targetTopic.getPosition(); + var offset = Topic.CONNECTOR_WIDTH / 2; + var targetTopicSize = targetTopic.getSize(); + var y, x; + if (targetTopic.getShapeType() == TopicShape.LINE) { + y = targetTopicSize.height; + } else { + y = targetTopicSize.height / 2; + } + y = y - offset; + + var connector = targetTopic.getShrinkConnector(); + if ($defined(connector)) { + if (Math.sign(targetPosition.x) > 0) { + x = targetTopicSize.width; + connector.setPosition(x, y); + } else { + x = -Topic.CONNECTOR_WIDTH; + } + connector.setPosition(x, y); + } + }, + + setStroke: function (color, style, opacity) { + this._line2d.setStroke(null, null, color, opacity); + }, + + addToWorkspace: function (workspace) { + workspace.append(this._line2d); + this._line2d.moveToBack(); + }, + + removeFromWorkspace: function (workspace) { + workspace.removeChild(this._line2d); + }, + + getTargetTopic: function () { + return this._targetTopic; + }, + + getSourceTopic: function () { + return this._sourceTopic; + }, + + getLineType: function () { + return this._lineType; + }, + + getLine: function () { + return this._line2d; + }, + + getModel: function () { + return this._model; + }, + + setModel: function (model) { + this._model = model; + }, + + getType: function () { + return 'ConnectionLine'; + }, + + getId: function () { + return this._model.getId(); + }, + + moveToBack: function () { + this._line2d.moveToBack(); + }, + + moveToFront: function () { + this._line2d.moveToFront(); + }, +}); + +ConnectionLine.getStrokeColor = function () { + return '#495879'; +}; + +ConnectionLine.SIMPLE = 0; +ConnectionLine.POLYLINE = 1; +ConnectionLine.CURVED = 2; +ConnectionLine.SIMPLE_CURVED = 3; + +export default ConnectionLine; diff --git a/packages/mindplot/lib/components/ControlPoint.js b/packages/mindplot/lib/components/ControlPoint.js new file mode 100644 index 00000000..c8d357c4 --- /dev/null +++ b/packages/mindplot/lib/components/ControlPoint.js @@ -0,0 +1,211 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const web2D = require('@wismapping/web2d') +const web2d = web2D(); + +const Shape = require('./util/Shape').default +const ActionDispatcher = require('./ActionDispatcher').default; + +const ControlPoint = new Class({ + initialize: function () { + var control1 = new web2d.Elipse({ + width: 6, + height: 6, + stroke: '1 solid #6589de', + fillColor: 'gray', + visibility: false + }); + control1.setCursor('pointer'); + + var control2 = new web2d.Elipse({ + width: 6, + height: 6, + stroke: '1 solid #6589de', + fillColor: 'gray', + visibility: false + }); + control2.setCursor('pointer'); + + this._controlPointsController = [control1, control2]; + this._controlLines = [new web2d.Line({strokeColor: "#6589de", strokeWidth: 1, opacity: 0.3}), + new web2d.Line({strokeColor: "#6589de", strokeWidth: 1, opacity: 0.3})]; + + this._isBinded = false; + var me = this; + this._controlPointsController[0].addEvent('mousedown', function (event) { + (me._mouseDown)(event, ControlPoint.FROM, me); + }); + this._controlPointsController[0].addEvent('click', function (event) { + (me._mouseClick)(event); + }); + this._controlPointsController[0].addEvent('dblclick', function (event) { + (me._mouseClick)(event); + }); + + this._controlPointsController[1].addEvent('mousedown', function (event) { + (me._mouseDown)(event, ControlPoint.TO, me); + }); + this._controlPointsController[1].addEvent('click', function (event) { + (me._mouseClick)(event); + }); + this._controlPointsController[1].addEvent('dblclick', function (event) { + (me._mouseClick)(event); + }); + }, + + setLine: function (line) { + if ($defined(this._line)) { + this._removeLine(); + } + this._line = line; + this._createControlPoint(); + this._endPoint = []; + this._orignalCtrlPoint = []; + this._orignalCtrlPoint[0] = this._controls[0].clone(); + this._orignalCtrlPoint[1] = this._controls[1].clone(); + this._endPoint[0] = this._line.getLine().getFrom().clone(); + this._endPoint[1] = this._line.getLine().getTo().clone(); + }, + + redraw: function () { + if ($defined(this._line)) + this._createControlPoint(); + }, + + _createControlPoint: function () { + this._controls = this._line.getLine().getControlPoints(); + var pos = this._line.getLine().getFrom(); + this._controlPointsController[0].setPosition(this._controls[ControlPoint.FROM].x + pos.x, this._controls[ControlPoint.FROM].y + pos.y - 3); + this._controlLines[0].setFrom(pos.x, pos.y); + this._controlLines[0].setTo(this._controls[ControlPoint.FROM].x + pos.x + 3, this._controls[ControlPoint.FROM].y + pos.y); + pos = this._line.getLine().getTo(); + this._controlLines[1].setFrom(pos.x, pos.y); + this._controlLines[1].setTo(this._controls[ControlPoint.TO].x + pos.x + 3, this._controls[ControlPoint.TO].y + pos.y); + this._controlPointsController[1].setPosition(this._controls[ControlPoint.TO].x + pos.x, this._controls[ControlPoint.TO].y + pos.y - 3); + + }, + + _removeLine: function () { + + }, + + _mouseDown: function (event, point, me) { + if (!this._isBinded) { + this._isBinded = true; + this._mouseMoveFunction = function (event) { + (me._mouseMoveEvent)(event, point, me); + }; + + this._workspace.getScreenManager().addEvent('mousemove', this._mouseMoveFunction); + this._mouseUpFunction = function (event) { + (me._mouseUp)(event, point, me); + }; + this._workspace.getScreenManager().addEvent('mouseup', this._mouseUpFunction); + } + event.preventDefault(); + event.stopPropagation(); + return false; + }, + + _mouseMoveEvent: function (event, point) { + var screen = this._workspace.getScreenManager(); + var pos = screen.getWorkspaceMousePosition(event); + + var cords; + if (point == 0) { + cords = Shape.calculateRelationShipPointCoordinates(this._line.getSourceTopic(), pos); + this._line.setFrom(cords.x, cords.y); + this._line.setSrcControlPoint(new core.Point(pos.x - cords.x, pos.y - cords.y)); + } else { + cords = Shape.calculateRelationShipPointCoordinates(this._line.getTargetTopic(), pos); + this._line.setTo(cords.x, cords.y); + this._line.setDestControlPoint(new core.Point(pos.x - cords.x, pos.y - cords.y)); + } + + this._controls[point].x = (pos.x - cords.x); + this._controls[point].y = (pos.y - cords.y); + this._controlPointsController[point].setPosition(pos.x - 5, pos.y - 3); + this._controlLines[point].setFrom(cords.x, cords.y); + this._controlLines[point].setTo(pos.x - 2, pos.y); + this._line.getLine().updateLine(point); + + }, + + _mouseUp: function (event, point) { + this._workspace.getScreenManager().removeEvent('mousemove', this._mouseMoveFunction); + this._workspace.getScreenManager().removeEvent('mouseup', this._mouseUpFunction); + + var actionDispatcher = ActionDispatcher.getInstance(); + actionDispatcher.moveControlPoint(this, point); + this._isBinded = false; + }, + + _mouseClick: function (event) { + event.preventDefault(); + event.stopPropagation(); + return false; + }, + + setVisibility: function (visible) { + if (visible) { + this._controlLines[0].moveToFront(); + this._controlLines[1].moveToFront(); + this._controlPointsController[0].moveToFront(); + this._controlPointsController[1].moveToFront(); + } + this._controlPointsController[0].setVisibility(visible); + this._controlPointsController[1].setVisibility(visible); + this._controlLines[0].setVisibility(visible); + this._controlLines[1].setVisibility(visible); + }, + + addToWorkspace: function (workspace) { + this._workspace = workspace; + workspace.append(this._controlPointsController[0]); + workspace.append(this._controlPointsController[1]); + workspace.append(this._controlLines[0]); + workspace.append(this._controlLines[1]); + }, + + removeFromWorkspace: function (workspace) { + this._workspace = null; + workspace.removeChild(this._controlPointsController[0]); + workspace.removeChild(this._controlPointsController[1]); + workspace.removeChild(this._controlLines[0]); + workspace.removeChild(this._controlLines[1]); + }, + + getControlPoint: function (index) { + return this._controls[index]; + }, + + getOriginalEndPoint: function (index) { + return this._endPoint[index]; + }, + + getOriginalCtrlPoint: function (index) { + return this._orignalCtrlPoint[index]; + } +}); + +ControlPoint.FROM = 0; +ControlPoint.TO = 1; + +export default ControlPoint; diff --git a/packages/mindplot/lib/components/Designer.js b/packages/mindplot/lib/components/Designer.js new file mode 100644 index 00000000..7303976e --- /dev/null +++ b/packages/mindplot/lib/components/Designer.js @@ -0,0 +1,1051 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('./Events').default; +const Messages = require('./Messages').default; + +const { StandaloneActionDispatcher, CommandContext } = require('./StandaloneActionDispatcher'); +const ActionDispatcher = require('./ActionDispatcher').default; + +const DesignerModel = require('./DesignerModel').default; +const DesignerKeyboard = require('./DesignerKeyboard').default; + +const ScreenManager = require('./ScreenManager').default; +const Workspace = require('./Workspace').default; + +const DragConnector = require('./DragConnector').default; +const DragManager = require('./DragManager').default; +const RelationshipPivot = require('./RelationshipPivot').default; +const Relationship = require('./Relationship').default; + +const TopicEventDispatcher = require('./TopicEventDispatcher').default; +const TopicFeature = require('./TopicFeature').default; +const { TopicEvent } = require('./TopicEventDispatcher'); + +const NodeGraph = require('./NodeGraph').default; + +const EventBusDispatcher = require('./layout/EventBusDispatcher').default; +const LayoutManager = require('./layout/LayoutManager').default; + +const INodeModel = require('./model/INodeModel').default; +const { TopicShape } = require('./model/INodeModel'); + +const Designer = new Class( + /** @lends Designer */ { + Extends: Events, + /** + * @constructs + * @param {Object} options + * @param {HTMLElement} divElement + * @extends mindplot.Events + */ + initialize: function (options, divElement) { + $assert(options, 'options must be defined'); + $assert(options.zoom, 'zoom must be defined'); + $assert(options.size, 'size must be defined'); + $assert(divElement, 'divElement must be defined'); + + // Set up i18n location ... + Messages.init(options.locale); + + this._options = options; + + // Set full div elem render area ... + divElement.css(options.size); + + // Dispatcher manager ... + var commandContext = new CommandContext(this); + this._actionDispatcher = new StandaloneActionDispatcher(commandContext); + + var me = this; + this._actionDispatcher.addEvent('modelUpdate', function (event) { + me.fireEvent('modelUpdate', event); + }); + + ActionDispatcher.setInstance(this._actionDispatcher); + this._model = new DesignerModel(options); + + // Init Screen manager.. + var screenManager = new ScreenManager(divElement); + this._workspace = new Workspace(screenManager, this._model.getZoom()); + + // Init layout manager ... + this._eventBussDispatcher = new EventBusDispatcher(this.getModel()); + + // Register events + if (!this.isReadOnly()) { + // Register mouse events ... + this._registerMouseEvents(); + + // Register keyboard events ... + DesignerKeyboard.register(this); + + this._dragManager = this._buildDragManager(this._workspace); + } + this._registerWheelEvents(); + + this._relPivot = new RelationshipPivot(this._workspace, this); + + // Set editor working area ... + this.setViewPort(options.viewPort); + + TopicEventDispatcher.configure(this.isReadOnly()); + this._clipboard = []; + }, + + /** + * @private + */ + _registerWheelEvents: function () { + var zoomFactor = 1.006; + var me = this; + // Zoom In and Zoom Out must active event + $(document).on('mousewheel', function (event) { + if (event.deltaY > 0) { + me.zoomIn(zoomFactor); + } else { + me.zoomOut(zoomFactor); + } + event.preventDefault(); + }); + }, + + /** + * @param {String} type the event type + * @param {Function} listener + * forwards to the TopicEventDispatcher or the parent Events class, depending on the type + */ + addEvent: function (type, listener) { + if (type == TopicEvent.EDIT || type == TopicEvent.CLICK) { + var editor = TopicEventDispatcher.getInstance(); + editor.addEvent(type, listener); + } else { + this.parent(type, listener); + } + }, + + /** + * @private + */ + _registerMouseEvents: function () { + var workspace = this._workspace; + var screenManager = workspace.getScreenManager(); + var me = this; + // Initialize workspace event listeners. + screenManager.addEvent('update', function () { + // Topic must be set to his original state. All editors must be closed. + var topics = me.getModel().getTopics(); + _.each(topics, function (object) { + object.closeEditors(); + }); + + // Clean some selected nodes on event .. + if (me._cleanScreen) me._cleanScreen(); + }); + + // Deselect on click ... + screenManager.addEvent('click', function (event) { + me.onObjectFocusEvent(null, event); + }); + + // Create nodes on double click... + screenManager.addEvent( + 'dblclick', + function (event) { + if (workspace.isWorkspaceEventsEnabled()) { + var mousePos = screenManager.getWorkspaceMousePosition(event); + var centralTopic = me.getModel().getCentralTopic(); + var model = me._createChildModel(centralTopic, mousePos); + this._actionDispatcher.addTopics([model], [centralTopic.getId()]); + } + }.bind(this) + ); + + // Register mouse drag and drop event ... + function noopHandler(evt) { + evt.stopPropagation(); + evt.preventDefault(); + } + }, + + /** + * @private + * @param {mindplot.Workspace} workspace + * @return {mindplot.DragManager} the new dragManager for the workspace with events + * registered + */ + _buildDragManager: function (workspace) { + var designerModel = this.getModel(); + var dragConnector = new DragConnector(designerModel, this._workspace); + var dragManager = new DragManager(workspace, this._eventBussDispatcher); + var topics = designerModel.getTopics(); + + dragManager.addEvent('startdragging', function () { + // Enable all mouse events. + for (var i = 0; i < topics.length; i++) { + topics[i].setMouseEventsEnabled(false); + } + }); + + dragManager.addEvent('dragging', function (event, dragTopic) { + dragTopic.updateFreeLayout(event); + if (!dragTopic.isFreeLayoutOn(event)) { + // The node is being drag. Is the connection still valid ? + dragConnector.checkConnection(dragTopic); + + if (!dragTopic.isVisible() && dragTopic.isConnected()) { + dragTopic.setVisibility(true); + } + } + }); + + dragManager.addEvent('enddragging', function (event, dragTopic) { + for (var i = 0; i < topics.length; i++) { + topics[i].setMouseEventsEnabled(true); + } + dragTopic.applyChanges(workspace); + }); + + return dragManager; + }, + + /** + * @param {{width:Number, height:Number}} size + * sets width and height of the workspace + */ + setViewPort: function (size) { + this._workspace.setViewPort(size); + var model = this.getModel(); + this._workspace.setZoom(model.getZoom(), true); + }, + + /** + * @private + * @param {mindplot.model.NodeModel} model + * @param {Boolean} readOnly + * @return {mindplot.CentralTopic|mindplot.MainTopic} the topic to the given model, + * connected, added to the drag manager, with events registered - complying type & read mode + */ + _buildNodeGraph: function (model, readOnly) { + // Create node graph ... + var topic = NodeGraph.create(model, { readOnly: readOnly }); + this.getModel().addTopic(topic); + var me = this; + // Add Topic events ... + if (!readOnly) { + // If a node had gained focus, clean the rest of the nodes ... + topic.addEvent('mousedown', function (event) { + me.onObjectFocusEvent(topic, event); + }); + + // Register node listeners ... + if (topic.getType() != INodeModel.CENTRAL_TOPIC_TYPE) { + // Central Topic doesn't support to be dragged + this._dragManager.add(topic); + } + } + + // Connect Topic ... + var isConnected = model.isConnected(); + if (isConnected) { + // Improve this ... + var targetTopicModel = model.getParent(); + var targetTopic = null; + + var topics = this.getModel().getTopics(); + for (var i = 0; i < topics.length; i++) { + var t = topics[i]; + if (t.getModel() == targetTopicModel) { + targetTopic = t; + // Disconnect the node. It will be connected again later ... + model.disconnect(); + break; + } + } + $assert(targetTopic, 'Could not find a topic to connect'); + topic.connectTo(targetTopic, this._workspace); + } + + topic.addEvent('ontblur', function () { + var topics = me.getModel().filterSelectedTopics(); + var rels = me.getModel().filterSelectedRelationships(); + + if (topics.length == 0 || rels.length == 0) { + me.fireEvent('onblur'); + } + }); + + topic.addEvent('ontfocus', function () { + var topics = me.getModel().filterSelectedTopics(); + var rels = me.getModel().filterSelectedRelationships(); + + if (topics.length == 1 || rels.length == 1) { + me.fireEvent('onfocus'); + } + }); + + return topic; + }, + + /** + * @param {?mindplot.Topic} currentObject + * @param {Event=} event + * sets focus to the given currentObject and removes it from any other objects if not + * triggered with Ctrl pressed + */ + onObjectFocusEvent: function (currentObject, event) { + // Close node editors .. + var topics = this.getModel().getTopics(); + _.each(topics, function (topic) { + topic.closeEditors(); + }); + + var model = this.getModel(); + var objects = model.getEntities(); + _.each(objects, function (object) { + // Disable all nodes on focus but not the current if Ctrl key isn't being pressed + if (!$defined(event) || (!event.ctrlKey && !event.metaKey)) { + if (object.isOnFocus() && object != currentObject) { + object.setOnFocus(false); + } + } + }); + }, + + /** sets focus to all model entities, i.e. relationships and topics */ + selectAll: function () { + var model = this.getModel(); + var objects = model.getEntities(); + _.each(objects, function (object) { + object.setOnFocus(true); + }); + }, + + /** removes focus from all model entities, i.e. relationships and topics */ + deselectAll: function () { + var objects = this.getModel().getEntities(); + _.each(objects, function (object) { + object.setOnFocus(false); + }); + }, + + /** + * Set the zoom of the map + * @param {Number} zoom number between 0.3 and 1.9 + */ + setZoom: function (zoom) { + if (zoom > 1.9 || zoom < 0.3) { + $notify($msg('ZOOM_IN_ERROR')); + return; + } + this.getModel().setZoom(zoom); + this._workspace.setZoom(zoom); + }, + + /** + * @param {Number=} factor + * zoom out by the given factor, or 1.2, if undefined + */ + zoomOut: function (factor) { + if (!factor) factor = 1.2; + + var model = this.getModel(); + var scale = model.getZoom() * factor; + if (scale <= 1.9) { + model.setZoom(scale); + this._workspace.setZoom(scale); + } else { + $notify($msg('ZOOM_ERROR')); + } + }, + + /** + * @param {Number=} factor + * zoom in by the given factor, or 1.2, if undefined + */ + zoomIn: function (factor) { + if (!factor) factor = 1.2; + + var model = this.getModel(); + var scale = model.getZoom() / factor; + + if (scale >= 0.3) { + model.setZoom(scale); + this._workspace.setZoom(scale); + } else { + $notify($msg('ZOOM_ERROR')); + } + }, + + /** copy selected topics to a private clipboard */ + copyToClipboard: function () { + var topics = this.getModel().filterSelectedTopics(); + if (topics.length <= 0) { + // If there are more than one node selected, + $notify($msg('AT_LEAST_ONE_TOPIC_MUST_BE_SELECTED')); + return; + } + + // Exclude central topic .. + topics = topics.filter(function (topic) { + return !topic.isCentralTopic(); + }); + + this._clipboard = topics.map(function (topic) { + var nodeModel = topic.getModel().deepCopy(); + + // Change position to make the new topic evident... + var pos = nodeModel.getPosition(); + nodeModel.setPosition(pos.x + 60 * Math.sign(pos.x), pos.y + 30); + + return nodeModel; + }); + + $notify($msg('SELECTION_COPIED_TO_CLIPBOARD')); + }, + + /** paste clipboard contents to the mindmap */ + pasteClipboard: function () { + if (this._clipboard.length == 0) { + $notify($msg('CLIPBOARD_IS_EMPTY')); + return; + } + this._actionDispatcher.addTopics(this._clipboard); + this._clipboard = []; + }, + + /** @return {mindplot.DesignerModel} model */ + getModel: function () { + return this._model; + }, + + /** collapse the subtree of the selected topic */ + shrinkSelectedBranch: function () { + var nodes = this.getModel().filterSelectedTopics(); + if (nodes.length <= 0 || nodes.length != 1) { + // If there are more than one node selected, + $notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED_COLLAPSE')); + return; + } + // Execute event ... + var topic = nodes[0]; + if (topic.getType() != INodeModel.CENTRAL_TOPIC_TYPE) { + this._actionDispatcher.shrinkBranch([topic.getId()], !topic.areChildrenShrunken()); + } + }, + + /** create a NodeModel for the selected node's child and add it via the ActionDispatcher */ + createChildForSelectedNode: function () { + var nodes = this.getModel().filterSelectedTopics(); + if (nodes.length <= 0) { + // If there are more than one node selected, + $notify($msg('ONE_TOPIC_MUST_BE_SELECTED')); + return; + } + if (nodes.length != 1) { + // If there are more than one node selected, + $notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED')); + return; + } + + // Add new node ... + var parentTopic = nodes[0]; + var parentTopicId = parentTopic.getId(); + var childModel = this._createChildModel(parentTopic); + + // Execute event ... + this._actionDispatcher.addTopics([childModel], [parentTopicId]); + }, + + /** + * @private + */ + _copyNodeProps: function (sourceModel, targetModel) { + // I don't copy the font size if the target is the source is the central topic. + if (sourceModel.getType() != INodeModel.CENTRAL_TOPIC_TYPE) { + var fontSize = sourceModel.getFontSize(); + if (fontSize) { + targetModel.setFontSize(fontSize); + } + } + + var fontFamily = sourceModel.getFontFamily(); + if (fontFamily) { + targetModel.setFontFamily(fontFamily); + } + + var fontColor = sourceModel.getFontColor(); + if (fontColor) { + targetModel.setFontColor(fontColor); + } + + var fontWeight = sourceModel.getFontWeight(); + if (fontWeight) { + targetModel.setFontWeight(fontWeight); + } + + var fontStyle = sourceModel.getFontStyle(); + if (fontStyle) { + targetModel.setFontStyle(fontStyle); + } + + var shape = sourceModel.getShapeType(); + if (shape) { + targetModel.setShapeType(shape); + } + + var borderColor = sourceModel.getBorderColor(); + if (borderColor) { + targetModel.setBorderColor(borderColor); + } + + var backgroundColor = sourceModel.getBackgroundColor(); + if (backgroundColor) { + targetModel.setBackgroundColor(backgroundColor); + } + }, + + /** + * @private + * @param {mindplot.Topic} topic the parent topic of the child to create the NodeModel for + * @param {core.Point} mousePos the mouse position + * @return {mindplot.NodeModel} the node model for the new child + */ + _createChildModel: function (topic, mousePos) { + // Create a new node ... + var parentModel = topic.getModel(); + var mindmap = parentModel.getMindmap(); + var childModel = mindmap.createNode(); + + // Create a new node ... + var layoutManager = this._eventBussDispatcher.getLayoutManager(); + var result = layoutManager.predict(topic.getId(), null, mousePos); + childModel.setOrder(result.order); + + var position = result.position; + childModel.setPosition(position.x, position.y); + + this._copyNodeProps(parentModel, childModel); + + return childModel; + }, + + /** + * @param {Events} event + * @param {mindplot.model.NodeModel} model + * @todo not used + */ + addDraggedNode: function (event, model) { + $assert(event, 'event can not be null'); + $assert(model, 'model can not be null'); + + // Position far from the visual area ... + model.setPosition(1000, 1000); + + this._actionDispatcher.addTopics([model]); + var topic = this.getModel().findTopicById(model.getId()); + + // Simulate a mouse down event to start the dragging ... + topic.fireEvent('mousedown', event); + }, + + /** + * creates a sibling or child node of the selected node, if the selected node is the + * central topic + */ + createSiblingForSelectedNode: function () { + var nodes = this.getModel().filterSelectedTopics(); + if (nodes.length <= 0) { + // If there are no nodes selected, + $notify($msg('ONE_TOPIC_MUST_BE_SELECTED')); + return; + } + if (nodes.length > 1) { + // If there are more than one node selected, + $notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED')); + return; + } + + var topic = nodes[0]; + if (!topic.getOutgoingConnectedTopic()) { + // Central topic and isolated topics .... + // Central topic doesn't have siblings ... + this.createChildForSelectedNode(); + } else { + var parentTopic = topic.getOutgoingConnectedTopic(); + var siblingModel = this._createSiblingModel(topic); + + // Hack: if parent is central topic, add node below not on opposite side. + // This should be done in the layout + if (parentTopic.getType() == INodeModel.CENTRAL_TOPIC_TYPE) { + siblingModel.setOrder(topic.getOrder() + 2); + } + + var parentTopicId = parentTopic.getId(); + this._actionDispatcher.addTopics([siblingModel], [parentTopicId]); + } + }, + + /** + * @private + * @param {mindplot.Topic} topic the topic to create the sibling to + * @return {mindplot.NodeModel} the node model of the sibling + */ + _createSiblingModel: function (topic) { + var result = null; + var parentTopic = topic.getOutgoingConnectedTopic(); + if (parentTopic != null) { + // Create a new node ... + var model = topic.getModel(); + var mindmap = model.getMindmap(); + result = mindmap.createNode(); + + // Create a new node ... + var order = topic.getOrder() + 1; + result.setOrder(order); + result.setPosition(10, 10); // Set a dummy position ... + } + + this._copyNodeProps(model, result); + + return result; + }, + + /** + * @param {Event} event + */ + showRelPivot: function (event) { + var nodes = this.getModel().filterSelectedTopics(); + if (nodes.length <= 0) { + // This could not happen ... + $notify($msg('RELATIONSHIP_COULD_NOT_BE_CREATED')); + return; + } + + // Current mouse position .... + var screen = this._workspace.getScreenManager(); + var pos = screen.getWorkspaceMousePosition(event); + + // create a connection ... + this._relPivot.start(nodes[0], pos); + }, + + /** @return {{zoom:Number}} the zoom */ + getMindmapProperties: function () { + var model = this.getModel(); + return { zoom: model.getZoom() }; + }, + + /** + * @param {mindplot.Mindmap} mindmapModel + * @throws will throw an error if mindmapModel is null or undefined + */ + loadMap: function (mindmapModel) { + $assert(mindmapModel, 'mindmapModel can not be null'); + this._mindmap = mindmapModel; + + // Init layout manager ... + var size = { width: 25, height: 25 }; + var layoutManager = new LayoutManager(mindmapModel.getCentralTopic().getId(), size); + var me = this; + layoutManager.addEvent('change', function (event) { + var id = event.getId(); + var topic = me.getModel().findTopicById(id); + topic.setPosition(event.getPosition()); + topic.setOrder(event.getOrder()); + }); + this._eventBussDispatcher.setLayoutManager(layoutManager); + + // Building node graph ... + var branches = mindmapModel.getBranches(); + for (var i = 0; i < branches.length; i++) { + // NodeModel -> NodeGraph ... + var nodeModel = branches[i]; + var nodeGraph = this.nodeModelToNodeGraph(nodeModel); + + // Update shrink render state... + nodeGraph.setBranchVisibility(true); + } + + var relationships = mindmapModel.getRelationships(); + for (var j = 0; j < relationships.length; j++) { + this._relationshipModelToRelationship(relationships[j]); + } + + // Place the focus on the Central Topic + var centralTopic = this.getModel().getCentralTopic(); + this.goToNode(centralTopic); + + // Finally, sort the map ... + EventBus.instance.fireEvent(EventBus.events.DoLayout); + + this.fireEvent('loadSuccess'); + }, + + /** */ + getMindmap: function () { + return this._mindmap; + }, + + /** */ + undo: function () { + // @Todo: This is a hack... + this._actionDispatcher._actionRunner.undo(); + }, + + /** */ + redo: function () { + this._actionDispatcher._actionRunner.redo(); + }, + + /** */ + isReadOnly: function () { + return this._options.readOnly; + }, + + /** + * @param {mindplot.model.NodeModel} nodeModel + * @return {mindplot.Topic} the topic (extends mindplot.NodeGraph) created to the model + */ + nodeModelToNodeGraph: function (nodeModel) { + $assert(nodeModel, 'Node model can not be null'); + var children = nodeModel.getChildren().slice(); + children = children.sort(function (a, b) { + return a.getOrder() - b.getOrder(); + }); + + var nodeGraph = this._buildNodeGraph(nodeModel, this.isReadOnly()); + nodeGraph.setVisibility(false); + + this._workspace.append(nodeGraph); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if ($defined(child)) this.nodeModelToNodeGraph(child); + } + + return nodeGraph; + }, + + /** + * @private + * @param {mindplot.model.RelationshipModel} model + * @return {mindplot.Relationship} the relationship created to the model + * @throws will throw an error if model is null or undefined + */ + _relationshipModelToRelationship: function (model) { + $assert(model, 'Node model can not be null'); + + var result = this._buildRelationshipShape(model); + + var sourceTopic = result.getSourceTopic(); + sourceTopic.addRelationship(result); + + var targetTopic = result.getTargetTopic(); + targetTopic.addRelationship(result); + + result.setVisibility(sourceTopic.isVisible() && targetTopic.isVisible()); + + this._workspace.append(result); + return result; + }, + + /** + * @param {mindplot.model.RelationshipModel} model + * @return {mindplot.Relationship} the relationship added to the mindmap + */ + addRelationship: function (model) { + var mindmap = this.getMindmap(); + mindmap.addRelationship(model); + return this._relationshipModelToRelationship(model); + }, + + /** + * deletes the relationship from the linked topics, DesignerModel, Workspace and Mindmap + * @param {mindplot.Relationship} rel the relationship to delete + */ + deleteRelationship: function (rel) { + var sourceTopic = rel.getSourceTopic(); + sourceTopic.deleteRelationship(rel); + + var targetTopic = rel.getTargetTopic(); + targetTopic.deleteRelationship(rel); + + this.getModel().removeRelationship(rel); + this._workspace.removeChild(rel); + + var mindmap = this.getMindmap(); + mindmap.deleteRelationship(rel.getModel()); + }, + + /** + * @private + * @param {mindplot.model.RelationshipModel} model + * @return {mindplot.Relationship} the new relationship with events registered + * @throws will throw an error if the target topic cannot be found + */ + _buildRelationshipShape: function (model) { + var dmodel = this.getModel(); + + var sourceTopicId = model.getFromNode(); + var sourceTopic = dmodel.findTopicById(sourceTopicId); + + var targetTopicId = model.getToNode(); + var targetTopic = dmodel.findTopicById(targetTopicId); + $assert( + targetTopic, + 'targetTopic could not be found:' + + targetTopicId + + dmodel.getTopics().map(function (e) { + return e.getId(); + }) + ); + + // Build relationship line .... + var result = new Relationship(sourceTopic, targetTopic, model); + var me = this; + + result.addEvent('ontblur', function () { + var topics = me.getModel().filterSelectedTopics(); + var rels = me.getModel().filterSelectedRelationships(); + + if (topics.length == 0 || rels.length == 0) { + me.fireEvent('onblur'); + } + }); + + result.addEvent('ontfocus', function () { + var topics = me.getModel().filterSelectedTopics(); + var rels = me.getModel().filterSelectedRelationships(); + + if (topics.length == 1 || rels.length == 1) { + me.fireEvent('onfocus'); + } + }); + + // Append it to the workspace ... + dmodel.addRelationship(result); + + return result; + }, + + /** + * @param {mindplot.Topic} node the topic to remove + * removes the given topic and its children from Workspace, DesignerModel and NodeModel + */ + removeTopic: function (node) { + if (!node.isCentralTopic()) { + var parent = node._parent; + node.disconnect(this._workspace); + + //remove children + while (node.getChildren().length > 0) { + this.removeTopic(node.getChildren()[0]); + } + + this._workspace.removeChild(node); + this.getModel().removeTopic(node); + + // Delete this node from the model... + var model = node.getModel(); + model.deleteNode(); + + if ($defined(parent)) { + this.goToNode(parent); + } + } + }, + + /** + * @private + */ + _resetEdition: function () { + var screenManager = this._workspace.getScreenManager(); + screenManager.fireEvent('update'); + screenManager.fireEvent('mouseup'); + this._relPivot.dispose(); + }, + + /** */ + deleteSelectedEntities: function () { + // Is there some action in progress ?. + this._resetEdition(); + + var topics = this.getModel().filterSelectedTopics(); + var relation = this.getModel().filterSelectedRelationships(); + if (topics.length <= 0 && relation.length <= 0) { + // If there are more than one node selected, + $notify($msg('ENTITIES_COULD_NOT_BE_DELETED')); + return; + } else if (topics.length == 1 && topics[0].isCentralTopic()) { + $notify($msg('CENTRAL_TOPIC_CAN_NOT_BE_DELETED')); + return; + } + + // If the central topic has been selected, I must filter ir + var topicIds = topics + .filter(function (topic) { + return !topic.isCentralTopic(); + }) + .map(function (topic) { + return topic.getId(); + }); + + var relIds = relation.map(function (rel) { + return rel.getId(); + }); + + // Finally delete the topics ... + if (topicIds.length > 0 || relIds.length > 0) { + this._actionDispatcher.deleteEntities(topicIds, relIds); + } + }, + + /** */ + changeFontFamily: function (font) { + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.changeFontFamilyToTopic(topicsIds, font); + } + }, + + /** */ + changeFontStyle: function () { + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.changeFontStyleToTopic(topicsIds); + } + }, + + /** */ + changeFontColor: function (color) { + $assert(color, 'color can not be null'); + + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.changeFontColorToTopic(topicsIds, color); + } + }, + + /** */ + changeBackgroundColor: function (color) { + var validateFunc = function (topic) { + return topic.getShapeType() != TopicShape.LINE; + }; + var validateError = 'Color can not be set to line topics.'; + + var topicsIds = this.getModel().filterTopicsIds(validateFunc, validateError); + if (topicsIds.length > 0) { + this._actionDispatcher.changeBackgroundColorToTopic(topicsIds, color); + } + }, + + /** */ + changeBorderColor: function (color) { + var validateFunc = function (topic) { + return topic.getShapeType() != TopicShape.LINE; + }; + var validateError = 'Color can not be set to line topics.'; + var topicsIds = this.getModel().filterTopicsIds(validateFunc, validateError); + if (topicsIds.length > 0) { + this._actionDispatcher.changeBorderColorToTopic(topicsIds, color); + } + }, + + /** */ + changeFontSize: function (size) { + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.changeFontSizeToTopic(topicsIds, size); + } + }, + + /** */ + changeTopicShape: function (shape) { + var validateFunc = function (topic) { + return !( + topic.getType() == INodeModel.CENTRAL_TOPIC_TYPE && + shape == TopicShape.LINE + ); + }; + + var validateError = 'Central Topic shape can not be changed to line figure.'; + var topicsIds = this.getModel().filterTopicsIds(validateFunc, validateError); + if (topicsIds.length > 0) { + this._actionDispatcher.changeShapeTypeToTopic(topicsIds, shape); + } + }, + + /** */ + changeFontWeight: function () { + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.changeFontWeightToTopic(topicsIds); + } + }, + + /** */ + addIconType: function (iconType) { + var topicsIds = this.getModel().filterTopicsIds(); + if (topicsIds.length > 0) { + this._actionDispatcher.addFeatureToTopic( + topicsIds[0], + TopicFeature.Icon.id, + { id: iconType } + ); + } + }, + + /** + * lets the selected topic open the link editor where the user can define or modify an + * existing link + */ + addLink: function () { + var model = this.getModel(); + var topic = model.selectedTopic(); + if (topic) { + topic.showLinkEditor(); + this.onObjectFocusEvent(); + } + }, + + /** */ + addNote: function () { + var model = this.getModel(); + var topic = model.selectedTopic(); + if (topic) { + topic.showNoteEditor(); + this.onObjectFocusEvent(); + } + }, + + /** + * @param {mindplot.Topic} node + * sets the focus to the given node + */ + goToNode: function (node) { + node.setOnFocus(true); + this.onObjectFocusEvent(node); + }, + + /** @return {mindplot.Workspace} */ + getWorkSpace: function () { + return this._workspace; + }, + } +); + +export default Designer; diff --git a/packages/mindplot/lib/components/DesignerActionRunner.js b/packages/mindplot/lib/components/DesignerActionRunner.js new file mode 100644 index 00000000..3b5620a2 --- /dev/null +++ b/packages/mindplot/lib/components/DesignerActionRunner.js @@ -0,0 +1,58 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const DesignerUndoManager = require('./DesignerUndoManager').default; +const EventBus = require('./layout/EventBus').default; + +const DesignerActionRunner = new Class({ + initialize: function (commandContext, notifier) { + $assert(commandContext, "commandContext can not be null"); + + this._undoManager = new DesignerUndoManager(); + this._context = commandContext; + this._notifier = notifier; + }, + + execute: function (command) { + $assert(command, "command can not be null"); + command.execute(this._context); + this._undoManager.enqueue(command); + this.fireChangeEvent(); + EventBus.instance.fireEvent(EventBus.events.DoLayout); + + }, + + undo: function () { + this._undoManager.execUndo(this._context); + this.fireChangeEvent(); + EventBus.instance.fireEvent(EventBus.events.DoLayout); + }, + + redo: function () { + this._undoManager.execRedo(this._context); + this.fireChangeEvent(); + EventBus.instance.fireEvent(EventBus.events.DoLayout); + + }, + + fireChangeEvent: function () { + var event = this._undoManager.buildEvent(); + this._notifier.fireEvent("modelUpdate", event); + } +}); + +export default DesignerActionRunner; diff --git a/packages/mindplot/lib/components/DesignerKeyboard.js b/packages/mindplot/lib/components/DesignerKeyboard.js new file mode 100644 index 00000000..b59ef6d3 --- /dev/null +++ b/packages/mindplot/lib/components/DesignerKeyboard.js @@ -0,0 +1,400 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Keyboard = require('./Keyboard').default; + +const DesignerKeyboard = new Class({ + Extends: Keyboard, + Static:{ + register:function (designer) { + this._instance = new DesignerKeyboard(designer); + }, + + getInstance:function () { + return this._instance; + } + }, + + initialize:function (designer) { + $assert(designer, "designer can not be null"); + this._registerEvents(designer); + }, + + _registerEvents:function (designer) { + + // Try with the keyboard .. + var model = designer.getModel(); + this.addShortcut( + ['backspace'], function (event) { + event.preventDefault(); + event.stopPropagation(); + designer.deleteSelectedEntities(); + } + ); + this.addShortcut( + ['space'], function() { + designer.shrinkSelectedBranch(); + } + ); + this.addShortcut( + ['f2'],function(event) { + event.stopPropagation(); + event.preventDefault(); + var node = model.selectedTopic(); + if (node) { + node.showTextEditor(); + } + } + ); + this.addShortcut( + ['del'], function(event) { + designer.deleteSelectedEntities(); + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + ['enter'], function() { + designer.createSiblingForSelectedNode(); + } + ); + this.addShortcut( + ['insert'], function(event) { + designer.createChildForSelectedNode(); + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + ['tab'], function(event) { + designer.createChildForSelectedNode(); + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + ['meta+enter'], function(event) { + event.preventDefault(); + event.stopPropagation(); + designer.createChildForSelectedNode(); + } + ); + this.addShortcut( + ['ctrl+z', 'meta+z'], function(event) { + event.preventDefault(event); + event.stopPropagation(); + designer.undo(); + } + ); + this.addShortcut( + ['ctrl+c', 'meta+c'], function (event) { + event.preventDefault(event); + event.stopPropagation(); + designer.copyToClipboard(); + } + ); + this.addShortcut( + ['ctrl+v', 'meta+v'], function (event) { + event.preventDefault(event); + event.stopPropagation(); + designer.pasteClipboard(); + } + ); + this.addShortcut( + ['ctrl+shift+z', 'meta+shift+z', 'ctrl+y', 'meta+y'], function (event) { + event.preventDefault(); + event.stopPropagation(); + designer.redo(); + } + ); + this.addShortcut( + ['ctrl+a', 'meta+a'], function (event) { + event.preventDefault(); + event.stopPropagation(); + designer.selectAll(); + } + ); + this.addShortcut( + ['ctrl+b', 'meta+b'], function (event) { + event.preventDefault(); + event.stopPropagation(); + + designer.changeFontWeight(); + } + ); + this.addShortcut( + ['ctrl+s', 'meta+s'], function (event) { + event.preventDefault(); + event.stopPropagation(); + $(document).find('#save').trigger('click'); + } + ); + this.addShortcut( + ['ctrl+i', 'meta+i'], function (event) { + event.preventDefault(); + event.stopPropagation(); + + designer.changeFontStyle(); + } + ); + this.addShortcut( + ['ctrl+shift+a', 'meta+shift+a'], function (event) { + event.preventDefault(); + event.stopPropagation(); + + designer.deselectAll(); + } + ); + this.addShortcut( + ['meta+=', 'ctrl+='], function (event) { + event.preventDefault(); + event.stopPropagation(); + + designer.zoomIn(); + } + ); + this.addShortcut( + ['meta+-', 'ctrl+-'], function (event) { + event.preventDefault(); + event.stopPropagation(); + + designer.zoomOut(); + } + ); + var me = this; + this.addShortcut( + 'right', function (event) { + var node = model.selectedTopic(); + if (node) { + if (node.isCentralTopic()) { + me._goToSideChild(designer, node, 'RIGHT'); + } + else { + if (node.getPosition().x < 0) { + me._goToParent(designer, node); + } + else if (!node.areChildrenShrunken()) { + me._goToChild(designer, node); + } + } + } else { + var centralTopic = model.getCentralTopic(); + me._goToNode(designer, centralTopic); + } + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + 'left', function (event) { + var node = model.selectedTopic(); + if (node) { + if (node.isCentralTopic()) { + me._goToSideChild(designer, node, 'LEFT'); + } + else { + if (node.getPosition().x > 0) { + me._goToParent(designer, node); + } + else if (!node.areChildrenShrunken()) { + me._goToChild(designer, node); + } + } + } else { + var centralTopic = model.getCentralTopic(); + me._goToNode(designer, centralTopic); + } + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + 'up', function (event) { + var node = model.selectedTopic(); + if (node) { + if (!node.isCentralTopic()) { + me._goToBrother(designer, node, 'UP'); + } + } else { + var centralTopic = model.getCentralTopic(); + me._goToNode(designer, centralTopic); + } + event.preventDefault(); + event.stopPropagation(); + } + ); + this.addShortcut( + 'down', function (event) { + var node = model.selectedTopic(); + if (node) { + if (!node.isCentralTopic()) { + me._goToBrother(designer, node, 'DOWN'); + } + } else { + var centralTopic = model.getCentralTopic(); + me._goToNode(designer, centralTopic); + } + event.preventDefault(); + event.stopPropagation(); + } + ); + var excludes = ['esc', 'escape', 'f1', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12']; + + $(document).on('keypress', function (event) { + var keyCode; + // Firefox doesn't skip special keys for keypress event... + if (event.key && excludes.contains(event.key.toLowerCase())) { + return; + } + // Sometimes Firefox doesn't contain keyCode value + if (event.key && event.keyCode == 0) { + keyCode = event.charCode; + } else { + keyCode = event.keyCode; + } + + var specialKey = jQuery.hotkeys.specialKeys[keyCode]; + if (["enter", "capslock"].indexOf(specialKey) == -1 && !jQuery.hotkeys.shiftNums[keyCode]) { + var nodes = designer.getModel().filterSelectedTopics(); + if (nodes.length > 0) { + + // If a modifier is press, the key selected must be ignored. + var pressKey = String.fromCharCode(keyCode); + if (event.ctrlKey || event.altKey || event.metaKey) { + return; + } + nodes[0].showTextEditor(pressKey); + event.stopPropagation(); + } + } + + }); + + }, + + _goToBrother:function (designer, node, direction) { + var parent = node.getParent(); + if (parent) { + var brothers = parent.getChildren(); + + var target = node; + var y = node.getPosition().y; + var x = node.getPosition().x; + var dist = null; + for (var i = 0; i < brothers.length; i++) { + var sameSide = (x * brothers[i].getPosition().x) >= 0; + if (brothers[i] != node && sameSide) { + var brother = brothers[i]; + var brotherY = brother.getPosition().y; + if (direction == "DOWN" && brotherY > y) { + var distancia = y - brotherY; + if (distancia < 0) { + distancia = distancia * (-1); + } + if (dist == null || dist > distancia) { + dist = distancia; + target = brothers[i]; + } + } + else if (direction == "UP" && brotherY < y) { + var distance = y - brotherY; + if (distance < 0) { + distance = distance * (-1); + } + if (dist == null || dist > distance) { + dist = distance; + target = brothers[i]; + } + } + } + } + this._goToNode(designer, target); + } + }, + + + _goToSideChild:function (designer, node, side) { + var children = node.getChildren(); + if (children.length > 0) { + var target = children[0]; + var top = null; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var childY = child.getPosition().y; + if (side == 'LEFT' && child.getPosition().x < 0) { + if (top == null || childY < top) { + target = child; + top = childY; + } + } + if (side == 'RIGHT' && child.getPosition().x > 0) { + if (top == null || childY < top) { + target = child; + top = childY; + } + } + } + + this._goToNode(designer, target); + } + }, + + _goToParent:function (designer, node) { + var parent = node.getParent(); + if (parent) { + this._goToNode(designer, parent); + } + }, + + _goToChild:function (designer, node) { + var children = node.getChildren(); + if (children.length > 0) { + var target = children[0]; + var top = target.getPosition().y; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getPosition().y < top) { + top = child.getPosition().y; + target = child; + } + } + this._goToNode(designer, target); + } + }, + + _goToNode:function (designer, node) { + // First deselect all the nodes ... + designer.deselectAll(); + + // Give focus to the selected node.... + node.setOnFocus(true); + } + +}); + +DesignerKeyboard.specialKeys = { + 8: "backspace", 9: "tab", 10: "return", 13: "enter", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", + 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", + 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", + 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", + 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", + 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", + 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 186: ";", 191: "/", + 220: "\\", 222: "'", 224: "meta" +}; + +export default DesignerKeyboard; diff --git a/packages/mindplot/lib/components/DesignerModel.js b/packages/mindplot/lib/components/DesignerModel.js new file mode 100644 index 00000000..5ce65710 --- /dev/null +++ b/packages/mindplot/lib/components/DesignerModel.js @@ -0,0 +1,191 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('./Events').default; + +const DesignerModel = new Class(/** @lends DesignerModel */{ + Implements:[Events], + /** + * @implements {mindplot.Events} + * @constructs + * @param {{readOnly: Boolean, zoom: Number, saveOnLoad: Boolean, size: {width: Number, + * height: Number}, viewPort: {width: Number, height: Number}, container: String, + * persistenceManager: String, mapId: String, locale: String}} options + * options loaded from json config + * @see {@link ConfigParameters.md} + * @see {@link editor.html} + */ + initialize:function (options) { + this._zoom = options.zoom; + this._topics = []; + this._relationships = []; + }, + + /** @return {Number} zoom between 0.3 (largest text) and 1.9 */ + getZoom:function () { + return this._zoom; + }, + + /** @param {Number} zoom number between 0.3 and 1.9 to set the zoom to */ + setZoom:function (zoom) { + this._zoom = zoom; + }, + + /** @return {@link mindplot.Topic[]} all topics */ + getTopics:function () { + return this._topics; + }, + + /** @return {mindplot.Relationship[]} all relationships */ + getRelationships:function () { + return this._relationships; + }, + + /** @return {mindplot.CentralTopic} the central topic */ + getCentralTopic:function () { + var topics = this.getTopics(); + return topics[0]; + }, + + /** @return {mindplot.Topic[]} selected topics */ + filterSelectedTopics:function () { + var result = []; + for (var i = 0; i < this._topics.length; i++) { + if (this._topics[i].isOnFocus()) { + result.push(this._topics[i]); + } + } + return result; + }, + + /** + * @return {mindplot.Relationship[]} selected relationships + */ + filterSelectedRelationships:function () { + var result = []; + for (var i = 0; i < this._relationships.length; i++) { + if (this._relationships[i].isOnFocus()) { + result.push(this._relationships[i]); + } + } + return result; + }, + + /** + * @return {Array.} all topics and relationships + */ + getEntities:function () { + var result = [].append(this._topics); + result.append(this._relationships); + return result; + }, + + /** + * removes occurrences of the given topic from the topic array + * @param {mindplot.Topic} topic the topic to remove + */ + removeTopic:function (topic) { + $assert(topic, "topic can not be null"); + this._topics.erase(topic); + }, + + /** + * removes occurrences of the given relationship from the relationship array + * @param {mindplot.Relationship} rel the relationship to remove + */ + removeRelationship:function (rel) { + $assert(rel, "rel can not be null"); + this._relationships.erase(rel); + }, + + /** + * adds the given topic to the topic array + * @param {mindplot.Topic} topic the topic to add + * @throws will throw an error if topic is null or undefined + * @throws will throw an error if the topic's id is not a number + */ + addTopic:function (topic) { + $assert(topic, "topic can not be null"); + $assert(typeof topic.getId() == "number", "id is not a number:" + topic.getId()); + this._topics.push(topic); + }, + + /** + * adds the given relationship to the relationship array + * @param {mindplot.Relationship} rel the relationship to add + * @throws will throw an error if rel is null or undefined + */ + addRelationship:function (rel) { + $assert(rel, "rel can not be null"); + this._relationships.push(rel); + }, + + /** + * @param {Function=} validate a function to validate nodes + * @param {String=} errorMsg an error message to display if the validation fails + * @return {String} returns an array of the selected (and, if applicable, valid) topics' ids + */ + filterTopicsIds:function (validate, errorMsg) { + var result = []; + var topics = this.filterSelectedTopics(); + + + var isValid = true; + for (var i = 0; i < topics.length; i++) { + var selectedNode = topics[i]; + if ($defined(validate)) { + isValid = validate(selectedNode); + } + + // Add node only if it's valid. + if (isValid) { + result.push(selectedNode.getId()); + } else { + $notify(errorMsg); + } + } + return result; + }, + + /** + * @return {mindplot.Topic} the first selected topic if one or more are found by the + * filterSelectedTopics function, null otherwise + */ + selectedTopic:function () { + var topics = this.filterSelectedTopics(); + return (topics.length > 0) ? topics[0] : null; + }, + + /** + * @param {String} id the id of the topic to be retrieved + * @return {mindplot.Topic} the topic with the respective id + */ + findTopicById:function (id) { + var result = null; + for (var i = 0; i < this._topics.length; i++) { + var topic = this._topics[i]; + if (topic.getId() == id) { + result = topic; + break; + } + } + return result; + + } +}); + +export default DesignerModel; diff --git a/packages/mindplot/lib/components/DesignerUndoManager.js b/packages/mindplot/lib/components/DesignerUndoManager.js new file mode 100644 index 00000000..63fa4feb --- /dev/null +++ b/packages/mindplot/lib/components/DesignerUndoManager.js @@ -0,0 +1,85 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const DesignerUndoManager = new Class({ + initialize: function(fireChange) { + this._undoQueue = []; + this._redoQueue = []; + this._baseId = 0; + }, + + enqueue:function(command) { + $assert(command, "Command can not be null"); + var length = this._undoQueue.length; + if (command.discardDuplicated && length > 0) { + // Skip duplicated events ... + var lastItem = this._undoQueue[length - 1]; + if (lastItem.discardDuplicated != command.discardDuplicated) { + this._undoQueue.push(command); + } + } else { + this._undoQueue.push(command); + } + this._redoQueue = []; + }, + + execUndo: function(commandContext) { + if (this._undoQueue.length > 0) { + var command = this._undoQueue.pop(); + this._redoQueue.push(command); + + command.undoExecute(commandContext); + } + }, + + execRedo: function(commandContext) { + if (this._redoQueue.length > 0) { + var command = this._redoQueue.pop(); + this._undoQueue.push(command); + command.execute(commandContext); + } + }, + + buildEvent: function() { + return {undoSteps: this._undoQueue.length, redoSteps:this._redoQueue.length}; + }, + + markAsChangeBase: function() { + var undoLength = this._undoQueue.length; + if (undoLength > 0) { + var command = this._undoQueue[undoLength - 1]; + this._baseId = command.getId(); + } else { + this._baseId = 0; + } + }, + + hasBeenChanged: function() { + var result = true; + var undoLength= this._undoQueue.length; + if (undoLength == 0 && this._baseId == 0) { + result = false; + } else if (undoLength > 0) { + var command = this._undoQueue[undoLength - 1]; + result = (this._baseId != command.getId()); + } + return result; + } +}); + +export default DesignerUndoManager; diff --git a/packages/mindplot/lib/components/DragConnector.js b/packages/mindplot/lib/components/DragConnector.js new file mode 100644 index 00000000..4505e052 --- /dev/null +++ b/packages/mindplot/lib/components/DragConnector.js @@ -0,0 +1,115 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const DragConnector = new Class({ + initialize:function (designerModel, workspace) { + $assert(designerModel, 'designerModel can not be null'); + $assert(workspace, 'workspace can not be null'); + + // this._layoutManager = layoutManager; + this._designerModel = designerModel; + this._workspace = workspace; + }, + + checkConnection:function (dragTopic) { + var topics = this._designerModel.getTopics(); + + // Must be disconnected from their current connection ?. + var candidates = this._searchConnectionCandidates(dragTopic); + var currentConnection = dragTopic.getConnectedToTopic(); + + + if (currentConnection && (candidates.length == 0 || candidates[0] != currentConnection)) { + dragTopic.disconnect(this._workspace); + } + + // Finally, connect nodes ... + if (!dragTopic.isConnected() && candidates.length > 0) { + dragTopic.connectTo(candidates[0]); + } + }, + + _searchConnectionCandidates:function (dragTopic) { + var topics = this._designerModel.getTopics(); + var draggedNode = dragTopic.getDraggedTopic(); + + // Drag node connects to the border ... + var dragTopicWidth = dragTopic.getSize ? dragTopic.getSize().width : 0; // Hack... + var xMouseGap = dragTopic.getPosition().x > 0 ? 0 : dragTopicWidth; + var sPos = {x:dragTopic.getPosition().x - xMouseGap, y:dragTopic.getPosition().y}; + + // Perform a initial filter to discard topics: + // - Exclude dragged topic + // - Exclude dragTopic pivot + // - Nodes that are collapsed + // - It's not part of the branch dragged itself + topics = topics.filter(function (topic) { + var result = draggedNode != topic; + result = result && topic != draggedNode; + result = result && !topic.areChildrenShrunken() && !topic.isCollapsed(); + result = result && !draggedNode.isChildTopic(topic); + return result; + }); + + // Filter all the nodes that are outside the vertical boundary: + // * The node is to out of the x scope + // * The x distance greater the vertical tolerated distance + topics = topics.filter(function (topic) { + var tpos = topic.getPosition(); + // Center topic has different alignment than the rest of the nodes. That's why i need to divide it by two... + var txborder = tpos.x + (topic.getSize().width / 2) * Math.sign(sPos.x); + var distance = (sPos.x - txborder) * Math.sign(sPos.x); + return distance > 0 && (distance < DragConnector.MAX_VERTICAL_CONNECTION_TOLERANCE); + + }); + + // Assign a priority based on the distance: + // - Alignment with the targetNode + // - Vertical distance + // - Horizontal proximity + // - It's already connected. + var currentConnection = dragTopic.getConnectedToTopic(); + var me = this; + topics = topics.sort(function (a, b) { + var aPos = a.getPosition(); + var bPos = b.getPosition(); + + var av = me._isVerticallyAligned(a.getSize(), aPos, sPos); + var bv = me._isVerticallyAligned(b.getSize(), bPos, sPos); + return me._proximityWeight(av, a, sPos, currentConnection) - me._proximityWeight(bv, b, sPos, currentConnection); + + }); + return topics; + }, + + _proximityWeight:function (isAligned, target, sPos, currentConnection) { + var tPos = target.getPosition(); + return (isAligned ? 0 : 200 ) + Math.abs(tPos.x - sPos.x) + Math.abs(tPos.y - sPos.y) + (currentConnection == target ? 0 : 100); + }, + + _isVerticallyAligned:function (targetSize, targetPosition, sourcePosition) { + + return Math.abs(sourcePosition.y - targetPosition.y) < targetSize.height / 2; + + } + +}); + +DragConnector.MAX_VERTICAL_CONNECTION_TOLERANCE = 80; + +export default DragConnector diff --git a/packages/mindplot/lib/components/DragManager.js b/packages/mindplot/lib/components/DragManager.js new file mode 100644 index 00000000..91ba6566 --- /dev/null +++ b/packages/mindplot/lib/components/DragManager.js @@ -0,0 +1,151 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const DragTopic = require('./DragTopic').default; + +const DragManager = new Class({ + initialize:function(workspace, eventDispatcher) { + this._workspace = workspace; + this._designerModel = workspace; + this._listeners = {}; + this._isDragInProcess = false; + this._eventDispatcher = eventDispatcher; + DragTopic.init(this._workspace); + }, + + add : function(node) { + // Add behaviour ... + var workspace = this._workspace; + var screen = workspace.getScreenManager(); + var dragManager = this; + var me = this; + var mouseDownListener = function(event) { + if (workspace.isWorkspaceEventsEnabled()) { + // Disable double drag... + workspace.enableWorkspaceEvents(false); + + // Set initial position. + var layoutManager = me._eventDispatcher.getLayoutManager(); + var dragNode = node.createDragNode(layoutManager); + + // Register mouse move listener ... + var mouseMoveListener = dragManager._buildMouseMoveListener(workspace, dragNode, dragManager); + screen.addEvent('mousemove', mouseMoveListener); + + // Register mouse up listeners ... + var mouseUpListener = dragManager._buildMouseUpListener(workspace, node, dragNode, dragManager); + screen.addEvent('mouseup', mouseUpListener); + + // Change cursor. + window.document.body.style.cursor = 'move'; + } + }; + node.addEvent('mousedown', mouseDownListener); + }, + + remove : function(node) { + var nodes = this._topics; + var contained = false; + var index = -1; + for (var i = 0; i < nodes.length; i++) { + if (nodes[i] == node) { + contained = true; + index = i; + } + } + }, + + _buildMouseMoveListener : function(workspace, dragNode, dragManager) { + var screen = workspace.getScreenManager(); + var me = this; + var result = function(event) { + + if (!me._isDragInProcess) { + // Execute Listeners .. + var startDragListener = dragManager._listeners['startdragging']; + startDragListener(event, dragNode); + + // Add shadow node to the workspace. + workspace.append(dragNode); + + me._isDragInProcess = true; + } + + var pos = screen.getWorkspaceMousePosition(event); + dragNode.setPosition(pos.x, pos.y); + + // Call mouse move listeners ... + var dragListener = dragManager._listeners['dragging']; + if ($defined(dragListener)) { + dragListener(event, dragNode); + } + + event.preventDefault(); + + }; + dragManager._mouseMoveListener = result; + return result; + }, + + _buildMouseUpListener : function(workspace, node, dragNode, dragManager) { + var screen = workspace.getScreenManager(); + var me = this; + var result = function(event) { + $assert(dragNode.isDragTopic, 'dragNode must be an DragTopic'); + + // Remove all the events. + screen.removeEvent('mousemove', dragManager._mouseMoveListener); + screen.removeEvent('mouseup', dragManager._mouseUpListener); + + // Help GC + dragManager._mouseMoveListener = null; + dragManager._mouseUpListener = null; + + workspace.enableWorkspaceEvents(true); + // Change the cursor to the default. + window.document.body.style.cursor = 'default'; + + if (me._isDragInProcess) { + + // Execute Listeners only if the node has been moved. + var endDragListener = dragManager._listeners['enddragging']; + endDragListener(event, dragNode); + + // Remove drag node from the workspace. + dragNode.removeFromWorkspace(workspace); + + me._isDragInProcess = false; + } + + + }; + dragManager._mouseUpListener = result; + return result; + }, + + /** + * type: + * - startdragging. + * - dragging + * - enddragging + */ + addEvent : function(type, listener) { + this._listeners[type] = listener; + } +}); + +export default DragManager; diff --git a/packages/mindplot/lib/components/DragPivot.js b/packages/mindplot/lib/components/DragPivot.js new file mode 100644 index 00000000..3234c6b7 --- /dev/null +++ b/packages/mindplot/lib/components/DragPivot.js @@ -0,0 +1,238 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const web2D = require('@wismapping/web2d') +const web2d = web2D(); + +const DragTopic = require('./DragTopic').default; +const Shape = require('./util/Shape').default; +const INodeModel = require('./model/INodeModel').default; + +const DragPivot = new Class({ + initialize:function() { + this._position = new core.Point(); + this._size = DragTopic.PIVOT_SIZE; + + this._straightLine = this._buildStraightLine(); + this._curvedLine = this._buildCurvedLine(); + this._dragPivot = this._buildRect(); + this._connectRect = this._buildRect(); + this._targetTopic = null; + this._isVisible = false; + }, + + isVisible:function() { + return this._isVisible; + }, + + getTargetTopic : function() { + return this._targetTopic; + }, + + _buildStraightLine : function() { + var line = new web2d.CurvedLine(); + line.setStyle(web2d.CurvedLine.SIMPLE_LINE); + line.setStroke(1, 'solid', '#CC0033'); + line.setOpacity(0.4); + line.setVisibility(false); + return line; + }, + + _buildCurvedLine : function() { + var line = new web2d.CurvedLine(); + line.setStyle(web2d.CurvedLine.SIMPLE_LINE); + line.setStroke(1, 'solid', '#CC0033'); + line.setOpacity(0.4); + line.setVisibility(false); + return line; + }, + + + _redrawLine : function() { + // Update line position. + $assert(this.getTargetTopic(), 'Illegal invocation. Target node can not be null'); + + var pivotRect = this._getPivotRect(); + + // Pivot position has not changed. In this case, position change is not required. + var targetTopic = this.getTargetTopic(); + var position = this._position; + + // Calculate pivot connection point ... + var size = this._size; + var targetPosition = targetTopic.getPosition(); + var line = this._getConnectionLine(); + + // Update Line position. + var isAtRight = Shape.isAtRight(targetPosition, position); + var pivotPoint = Shape.calculateRectConnectionPoint(position, size, isAtRight); + line.setFrom(pivotPoint.x, pivotPoint.y); + + // Update rect position + var cx = position.x - (parseInt(size.width) / 2); + var cy = position.y - (parseInt(size.height) / 2); + pivotRect.setPosition(cx, cy); + + // Make line visible only when the position has been already changed. + // This solve several strange effects ;) + var targetPoint = targetTopic.workoutIncomingConnectionPoint(pivotPoint); + line.setTo(targetPoint.x, targetPoint.y); + }, + + setPosition : function(point) { + this._position = point; + this._redrawLine(); + }, + + getPosition : function() { + return this._position; + }, + + _buildRect : function() { + var size = this._size; + var rectAttributes = {fillColor:'#CC0033',opacity:0.4,width:size.width,height:size.height,strokeColor:'#FF9933'}; + var rect = new web2d.Rect(0, rectAttributes); + rect.setVisibility(false); + return rect; + }, + + _getPivotRect : function() { + return this._dragPivot; + }, + + getSize : function() { + var elem2d = this._getPivotRect(); + return elem2d.getSize(); + }, + + setVisibility : function(value) { + if (this.isVisible() != value) { + + var pivotRect = this._getPivotRect(); + pivotRect.setVisibility(value); + + var connectRect = this._connectRect; + connectRect.setVisibility(value); + + var line = this._getConnectionLine(); + if (line) { + line.setVisibility(value); + } + this._isVisible = value; + } + }, + + // If the node is connected, validate that there is a line connecting both... + _getConnectionLine : function() { + var result = null; + var parentTopic = this._targetTopic; + if (parentTopic) { + if (parentTopic.getType() == INodeModel.CENTRAL_TOPIC_TYPE) { + result = this._straightLine; + } else { + result = this._curvedLine; + } + } + return result; + }, + + addToWorkspace : function(workspace) { + var pivotRect = this._getPivotRect(); + workspace.append(pivotRect); + + var connectToRect = this._connectRect; + workspace.append(connectToRect); + + // Add a hidden straight line ... + var straighLine = this._straightLine; + straighLine.setVisibility(false); + workspace.append(straighLine); + straighLine.moveToBack(); + + // Add a hidden curved line ... + var curvedLine = this._curvedLine; + curvedLine.setVisibility(false); + workspace.append(curvedLine); + curvedLine.moveToBack(); + + // Add a connect rect ... + var connectRect = this._connectRect; + connectRect.setVisibility(false); + workspace.append(connectRect); + connectRect.moveToBack(); + }, + + removeFromWorkspace : function(workspace) { + var shape = this._getPivotRect(); + workspace.removeChild(shape); + + var connectToRect = this._connectRect; + workspace.removeChild(connectToRect); + + if ($defined(this._straightLine)) { + workspace.removeChild(this._straightLine); + } + + if ($defined(this._curvedLine)) { + workspace.removeChild(this._curvedLine); + } + }, + + connectTo : function(targetTopic, position) { + $assert(!this._outgoingLine, 'Could not connect an already connected node'); + $assert(targetTopic != this, 'Circular connection are not allowed'); + $assert(position, 'position can not be null'); + $assert(targetTopic, 'parent can not be null'); + + this._position = position; + this._targetTopic = targetTopic; + + // Connected to Rect ... + var connectRect = this._connectRect; + var targetSize = targetTopic.getSize(); + + // Add 4 pixel in order to keep create a rect bigger than the topic. + var width = targetSize.width + 4; + var height = targetSize.height + 4; + + connectRect.setSize(width, height); + + var targetPosition = targetTopic.getPosition(); + var cx = Math.ceil(targetPosition.x - (width / 2)); + var cy = Math.ceil(targetPosition.y - (height / 2)); + connectRect.setPosition(cx, cy); + + // Change elements position ... + var pivotRect = this._getPivotRect(); + pivotRect.moveToFront(); + pivotRect.setPosition(position.x, position.y); + + this._redrawLine(); + }, + + disconnect : function(workspace) { + $assert(workspace, 'workspace can not be null.'); + $assert(this._targetTopic, 'There are not connected topic.'); + + this.setVisibility(false); + this._targetTopic = null; + } +}); + +export default DragPivot; diff --git a/packages/mindplot/lib/components/DragTopic.js b/packages/mindplot/lib/components/DragTopic.js new file mode 100644 index 00000000..f5477229 --- /dev/null +++ b/packages/mindplot/lib/components/DragTopic.js @@ -0,0 +1,221 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); + +const ActionDispatcher = require('./ActionDispatcher').default +const DragPivot = require('./DragPivot').default; + +const DragTopic = new Class({ + initialize:function (dragShape, draggedNode, layoutManger) { + $assert(dragShape, 'Rect can not be null.'); + $assert(draggedNode, 'draggedNode can not be null.'); + $assert(layoutManger, 'layoutManger can not be null.'); + + this._elem2d = dragShape; + this._order = null; + this._draggedNode = draggedNode; + this._layoutManager = layoutManger; + this._position = new core.Point(); + this._isInWorkspace = false; + this._isFreeLayoutEnabled = false; + }, + + setOrder:function (order) { + this._order = order; + }, + + setPosition:function (x, y) { + // Update drag shadow position .... + var position = {x:x, y:y}; + if (this.isFreeLayoutOn() && this.isConnected()) { + var _layoutManager = this._layoutManager; + var par = this.getConnectedToTopic(); + position = _layoutManager.predict(par.getId(), this._draggedNode.getId(), position, true).position; + } + this._position.setValue(position.x, position.y); + + // Elements are positioned in the center. + // All topic element must be positioned based on the innerShape. + var draggedNode = this._draggedNode; + var size = draggedNode.getSize(); + var cx = position.x - (position.x > 0 ? 0 : size.width); + var cy = Math.ceil(position.y - (size.height / 2)); + this._elem2d.setPosition(cx, cy); + + // In case is not free, pivot must be draw ... + if (this.isConnected() && !this.isFreeLayoutOn()) { + var parent = this.getConnectedToTopic(); + var predict = this._layoutManager.predict(parent.getId(), this._draggedNode.getId(), this.getPosition()); + if (this._order != predict.order) { + var dragPivot = this._getDragPivot(); + var pivotPosition = predict.position; + dragPivot.connectTo(parent, pivotPosition); + this.setOrder(predict.order); + } + } + }, + + updateFreeLayout:function (event) { + var isFreeEnabled = (event.metaKey && Browser.Platform.mac) || (event.ctrlKey && !Browser.Platform.mac); + if (this.isFreeLayoutOn() != isFreeEnabled) { + var dragPivot = this._getDragPivot(); + dragPivot.setVisibility(!isFreeEnabled); + this._isFreeLayoutEnabled = isFreeEnabled; + } + }, + + setVisibility:function (value) { + var dragPivot = this._getDragPivot(); + dragPivot.setVisibility(value); + }, + + isVisible:function () { + var dragPivot = this._getDragPivot(); + return dragPivot.isVisible(); + }, + + getInnerShape:function () { + return this._elem2d; + }, + + disconnect:function (workspace) { + // Clear connection line ... + var dragPivot = this._getDragPivot(); + dragPivot.disconnect(workspace); + }, + + connectTo:function (parent) { + $assert(parent, 'Parent connection node can not be null.'); + + // Where it should be connected ? + var predict = designer._eventBussDispatcher._layoutManager.predict(parent.getId(), this._draggedNode.getId(), this.getPosition()); + + // Connect pivot ... + var dragPivot = this._getDragPivot(); + var position = predict.position; + dragPivot.connectTo(parent, position); + dragPivot.setVisibility(true); + + this.setOrder(predict.order); + }, + + getDraggedTopic:function () { + return this._draggedNode; + }, + + removeFromWorkspace:function (workspace) { + if (this._isInWorkspace) { + // Remove drag shadow. + workspace.removeChild(this._elem2d); + + // Remove pivot shape. To improve performance it will not be removed. Only the visibility will be changed. + var dragPivot = this._getDragPivot(); + dragPivot.setVisibility(false); + + this._isInWorkspace = false; + } + }, + + isInWorkspace:function () { + return this._isInWorkspace; + }, + + addToWorkspace:function (workspace) { + if (!this._isInWorkspace) { + workspace.append(this._elem2d); + var dragPivot = this._getDragPivot(); + dragPivot.addToWorkspace(workspace); + this._isInWorkspace = true; + } + }, + + _getDragPivot:function () { + return DragTopic.__getDragPivot(); + }, + + getPosition:function () { + return this._position; + }, + + isDragTopic:function () { + return true; + }, + + applyChanges:function (workspace) { + $assert(workspace, 'workspace can not be null'); + + + var actionDispatcher = ActionDispatcher.getInstance(); + var draggedTopic = this.getDraggedTopic(); + var topicId = draggedTopic.getId(); + var position = this.getPosition(); + + if (!this.isFreeLayoutOn()) { + var order = null; + var parent = null; + var isDragConnected = this.isConnected(); + if (isDragConnected) { + var targetTopic = this.getConnectedToTopic(); + order = this._order; + parent = targetTopic; + } + + // If the node is not connected, position based on the original drag topic position. + actionDispatcher.dragTopic(topicId, position, order, parent); + } else { + actionDispatcher.moveTopic(topicId, position); + } + }, + + getConnectedToTopic:function () { + var dragPivot = this._getDragPivot(); + return dragPivot.getTargetTopic(); + }, + + isConnected:function () { + return this.getConnectedToTopic() != null; + }, + + isFreeLayoutOn:function () { +// return this._isFreeLayoutEnabled; + // Disable free layout ... + return false; + } + +}); + +DragTopic.PIVOT_SIZE = {width:50, height:6}; + +DragTopic.init = function (workspace) { + + $assert(workspace, "workspace can not be null"); + var pivot = DragTopic.__getDragPivot(); + workspace.append(pivot); +}; + +DragTopic.__getDragPivot = function () { + var result = DragTopic._dragPivot; + if (!$defined(result)) { + result = new DragPivot(); + DragTopic._dragPivot = result; + } + return result; +}; + +export default DragTopic; diff --git a/packages/mindplot/lib/components/EditorOptions.js b/packages/mindplot/lib/components/EditorOptions.js new file mode 100644 index 00000000..be8241ae --- /dev/null +++ b/packages/mindplot/lib/components/EditorOptions.js @@ -0,0 +1,27 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const EditorOptions = +{ + LayoutManager:"OriginalLayout", +// LayoutManager:"FreeMindLayout", + textEditor:"TextEditor" +// textEditor:"RichTextEditor" +}; + +export default EditorOptions; diff --git a/packages/mindplot/lib/components/EditorProperties.js b/packages/mindplot/lib/components/EditorProperties.js new file mode 100644 index 00000000..9da213e3 --- /dev/null +++ b/packages/mindplot/lib/components/EditorProperties.js @@ -0,0 +1,38 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const EditorProperties = new Class({ + initialize: function () { + this._zoom = 0; + this._position = 0; + }, + + setZoom: function (zoom) { + this._zoom = zoom; + }, + + getZoom: function () { + return this._zoom; + }, + + asProperties: function () { + return "zoom=" + this._zoom + "\n"; + } +}); + +export default EditorProperties; diff --git a/packages/mindplot/lib/components/Events.js b/packages/mindplot/lib/components/Events.js new file mode 100644 index 00000000..090532ee --- /dev/null +++ b/packages/mindplot/lib/components/Events.js @@ -0,0 +1,43 @@ +const Events = new Class({ + + $events: {}, + + _removeOn: function (string) { + return string.replace(/^on([A-Z])/, function (full, first) { + return first.toLowerCase(); + }); + }, + + addEvent: function (type, fn, internal) { + type = this._removeOn(type); + + this.$events[type] = (this.$events[type] || []).include(fn); + if (internal) fn.internal = true; + return this; + }, + + fireEvent: function (type, args, delay) { + type = this._removeOn(type); + var events = this.$events[type]; + if (!events) return this; + args = Array.from(args); + _.each(events, function (fn) { + if (delay) fn.delay(delay, this, args); + else fn.apply(this, args); + }, this); + return this; + }, + + removeEvent: function (type, fn) { + type = this._removeOn(type); + var events = this.$events[type]; + if (events && !fn.internal) { + var index = events.indexOf(fn); + if (index != -1) events.splice(index, 1); + } + return this; + } + +}); + +export default Events; diff --git a/packages/mindplot/lib/components/Icon.js b/packages/mindplot/lib/components/Icon.js new file mode 100644 index 00000000..4f1c4c93 --- /dev/null +++ b/packages/mindplot/lib/components/Icon.js @@ -0,0 +1,60 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D() + +const Icon = new Class({ + initialize: function (url) { + $assert(url, 'topic can not be null'); + this._image = new web2d.Image(); + this._image.setHref(url); + this._image.setSize(Icon.SIZE, Icon.SIZE); + }, + + getImage: function () { + return this._image; + }, + + setGroup: function (group) { + this._group = group; + }, + + getGroup: function () { + return this._group; + }, + + getSize: function () { + return this._image.getSize(); + }, + + getPosition: function () { + return this._image.getPosition(); + }, + + addEvent: function (type, fnc) { + this._image.addEvent(type, fnc); + }, + + remove: function () { + throw "Unsupported operation"; + } +}); + +Icon.SIZE = 90; + +export default Icon; diff --git a/packages/mindplot/lib/components/IconGroup.js b/packages/mindplot/lib/components/IconGroup.js new file mode 100644 index 00000000..d24d5943 --- /dev/null +++ b/packages/mindplot/lib/components/IconGroup.js @@ -0,0 +1,345 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D(); +const Icon = require('./Icon'); + +const IconGroup = new Class(/**@lends IconGroup */{ + /** + * @constructs + * @param topicId + * @param iconSize + * @throws will throw an error if topicId is null or undefined + * @throws will throw an error if iconSize is null or undefined + */ + initialize: function (topicId, iconSize) { + $assert($defined(topicId), "topicId can not be null"); + $assert($defined(iconSize), "iconSize can not be null"); + + this._icons = []; + this._group = new web2d.Group({ + width: 0, + height: iconSize, + x: 0, + y: 0, + coordSizeWidth: 0, + coordSizeHeight: 100 + }); + this._removeTip = new IconGroup.RemoveTip(this._group, topicId); + this.seIconSize(iconSize, iconSize); + + this._registerListeners(); + + }, + + /** */ + setPosition: function (x, y) { + this._group.setPosition(x, y); + }, + + /** */ + getPosition: function () { + return this._group.getPosition(); + }, + + /** */ + getNativeElement: function () { + return this._group; + }, + + /** */ + getSize: function () { + return this._group.getSize(); + }, + + /** */ + seIconSize: function (width, height) { + this._iconSize = {width: width, height: height}; + this._resize(this._icons.length); + }, + + /** + * @param icon the icon to be added to the icon group + * @param {Boolean} remove + * @throws will throw an error if icon is not defined + */ + addIcon: function (icon, remove) { + $defined(icon, "icon is not defined"); + + icon.setGroup(this); + this._icons.push(icon); + + // Adjust group and position ... + this._resize(this._icons.length); + this._positionIcon(icon, this._icons.length - 1); + + var imageShape = icon.getImage(); + this._group.append(imageShape); + + // Register event for the group .. + if (remove) { + this._removeTip.decorate(this._topicId, icon); + } + }, + + _findIconFromModel: function (iconModel) { + var result = null; + _.each(this._icons, function (icon) { + var elModel = icon.getModel(); + if (elModel.getId() == iconModel.getId()) { + result = icon; + } + }, this); + + if (result == null) { + throw new Error("Icon can no be found:" + iconModel.getId() + ", Icons:" + this._icons); + } + + return result; + }, + + /** */ + removeIconByModel: function (featureModel) { + $assert(featureModel, "featureModel can not be null"); + + var icon = this._findIconFromModel(featureModel); + this._removeIcon(icon); + }, + + _removeIcon: function (icon) { + $assert(icon, "icon can not be null"); + + this._removeTip.close(0); + this._group.removeChild(icon.getImage()); + + this._icons.erase(icon); + this._resize(this._icons.length); + var me = this; + // Add all again ... + _.each(this._icons, function (elem, i) { + me._positionIcon(elem, i); + }); + }, + + /** */ + moveToFront: function () { + this._group.moveToFront(); + }, + + _registerListeners: function () { + this._group.addEvent('click', function (event) { + // Avoid node creation ... + event.stopPropagation(); + + }); + + this._group.addEvent('dblclick', function (event) { + event.stopPropagation(); + + }); + }, + + _resize: function (iconsLength) { + this._group.setSize(iconsLength * this._iconSize.width, this._iconSize.height); + + var iconSize = Icon.SIZE + (IconGroup.ICON_PADDING * 2); + this._group.setCoordSize(iconsLength * iconSize, iconSize); + }, + + _positionIcon: function (icon, order) { + + var iconSize = Icon.SIZE + (IconGroup.ICON_PADDING * 2); + icon.getImage().setPosition(iconSize * order + IconGroup.ICON_PADDING, IconGroup.ICON_PADDING); + } +}); + +/** + * @constant + * @type {Number} + * @default + */ +IconGroup.ICON_PADDING = 5; + +IconGroup.RemoveTip = new Class(/** @lends IconGroup.RemoveTip */{ + /** + * @classdesc inner class of IconGroup + * @constructs + * @param container + */ + initialize: function (container) { + $assert(container, "group can not be null"); + this._fadeElem = container; + }, + + + /** + * @param topicId + * @param icon + * @throws will throw an error if icon is null or undefined + */ + show: function (topicId, icon) { + $assert(icon, 'icon can not be null'); + + // Nothing to do ... + if (this._activeIcon != icon) { + // If there is an active icon, close it first ... + if (this._activeIcon) { + this.close(0); + } + + // Now, let move the position the icon... + var pos = icon.getPosition(); + + // Register events ... + var widget = this._buildWeb2d(); + widget.addEvent('click', function () { + icon.remove(); + }); + + var me = this; + + widget.addEvent('mouseover', function () { + me.show(topicId, icon); + }); + + widget.addEvent('mouseout', function () { + me.hide(); + }); + + widget.setPosition(pos.x + 80, pos.y - 50); + this._fadeElem.append(widget); + + // Setup current element ... + this._activeIcon = icon; + this._widget = widget; + + } else { + clearTimeout(this._closeTimeoutId); + } + }, + + /** */ + hide: function () { + this.close(200); + }, + + /** + * @param delay + */ + close: function (delay) { + + // This is not ok, trying to close the same dialog twice ? + if (this._closeTimeoutId) { + clearTimeout(this._closeTimeoutId) + } + + var me = this; + if (this._activeIcon) { + var widget = this._widget; + var close = function () { + me._activeIcon = null; + me._fadeElem.removeChild(widget); + me._widget = null; + me._closeTimeoutId = null; + }; + + if (!$defined(delay) || delay == 0) { + close(); + } + else { + this._closeTimeoutId = close.delay(delay); + } + } + }, + + _buildWeb2d: function () { + var result = new web2d.Group({ + width: 10, + height: 10, + x: 0, + y: 0, + coordSizeWidth: 10, + coordSizeHeight: 10 + }); + + var outerRect = new web2d.Rect(0, { + x: 0, + y: 0, + width: 10, + height: 10, + stroke: '0', + fillColor: 'black' + }); + result.append(outerRect); + outerRect.setCursor('pointer'); + + var innerRect = new web2d.Rect(0, { + x: 1, + y: 1, + width: 8, + height: 8, + stroke: '1 solid white', + fillColor: 'gray' + }); + result.append(innerRect); + + var line = new web2d.Line({stroke: '1 solid white'}); + line.setFrom(1, 1); + line.setTo(9, 9); + result.append(line); + + var line2 = new web2d.Line({stroke: '1 solid white'}); + line2.setFrom(1, 9); + line2.setTo(9, 1); + result.append(line2); + + // Some events ... + result.addEvent('mouseover', function () { + innerRect.setFill('#CC0033'); + }); + result.addEvent('mouseout', function () { + innerRect.setFill('gray'); + }); + + result.setSize(50, 50); + return result; + }, + + /** + * @param topicId + * @param icon + */ + decorate: function (topicId, icon) { + + var me = this; + + if (!icon.__remove) { + icon.addEvent('mouseover', function () { + me.show(topicId, icon); + }); + + icon.addEvent('mouseout', function () { + me.hide(); + }); + icon.__remove = true; + } + } + +}); + +export default IconGroup; diff --git a/packages/mindplot/lib/components/ImageIcon.js b/packages/mindplot/lib/components/ImageIcon.js new file mode 100644 index 00000000..c7357848 --- /dev/null +++ b/packages/mindplot/lib/components/ImageIcon.js @@ -0,0 +1,166 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Icon = require('./Icon').default; +const ActionDispatcher = require('./ActionDispatcher').default; + +const ImageIcon = new Class({ + Extends: Icon, + initialize: function (topic, iconModel, readOnly) { + $assert(iconModel, 'iconModel can not be null'); + $assert(topic, 'topic can not be null'); + + this._topicId = topic.getId(); + this._featureModel = iconModel; + + // Build graph image representation ... + var iconType = iconModel.getIconType(); + var imgUrl = this._getImageUrl(iconType); + this.parent(imgUrl); + + if (!readOnly) { + + //Icon + var image = this.getImage(); + var me = this; + image.addEvent('click', function () { + + var iconType = iconModel.getIconType(); + var newIconType = me._getNextFamilyIconId(iconType); + iconModel.setIconType(newIconType); + + var imgUrl = me._getImageUrl(newIconType); + me._image.setHref(imgUrl); + + }); + this._image.setCursor('pointer'); + } + }, + + _getImageUrl: function (iconId) { + return "icons/" + iconId + ".png"; + }, + + getModel: function () { + return this._featureModel; + }, + + _getNextFamilyIconId: function (iconId) { + + var familyIcons = this._getFamilyIcons(iconId); + $assert(familyIcons != null, "Family Icon not found!"); + + var result = null; + for (var i = 0; i < familyIcons.length && result == null; i++) { + if (familyIcons[i] == iconId) { + //Is last one? + if (i == (familyIcons.length - 1)) { + result = familyIcons[0]; + } else { + result = familyIcons[i + 1]; + } + break; + } + } + + return result; + }, + + _getFamilyIcons: function (iconId) { + $assert(iconId != null, "id must not be null"); + $assert(iconId.indexOf("_") != -1, "Invalid icon id (it must contain '_')"); + + var result = null; + for (var i = 0; i < ImageIcon.prototype.ICON_FAMILIES.length; i++) { + var family = ImageIcon.prototype.ICON_FAMILIES[i]; + var iconFamilyId = iconId.substr(0, iconId.indexOf("_")); + + if (family.id == iconFamilyId) { + result = family.icons; + break; + } + } + return result; + }, + + remove: function () { + var actionDispatcher = ActionDispatcher.getInstance(); + var featureId = this._featureModel.getId(); + var topicId = this._topicId; + actionDispatcher.removeFeatureFromTopic(topicId, featureId); + } +}); + +ImageIcon.prototype.ICON_FAMILIES = [ + {"id": "face", "icons": ["face_plain", "face_sad", "face_crying", "face_smile", "face_surprise", "face_wink"]}, + {"id": "funy", "icons": ["funy_angel", "funy_devilish", "funy_glasses", "funy_grin", "funy_kiss", "funy_monkey"]}, + {"id": "conn", "icons": ["conn_connect", "conn_disconnect"]}, + { + "id": "sport", + "icons": ["sport_basketball", "sport_football", "sport_golf", "sport_raquet", "sport_shuttlecock", "sport_soccer", "sport_tennis"] + }, + {"id": "bulb", "icons": ["bulb_light_on", "bulb_light_off"]}, + {"id": "thumb", "icons": ["thumb_thumb_up", "thumb_thumb_down"]}, + {"id": "tick", "icons": ["tick_tick", "tick_cross"]}, + { + "id": "onoff", + "icons": ["onoff_clock", "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", "onoff_status_online"] + }, + { + "id": "money", + "icons": ["money_money", "money_dollar", "money_euro", "money_pound", "money_yen", "money_coins", "money_ruby"] + }, + {"id": "time", "icons": ["time_calendar", "time_clock", "time_hourglass"]}, + { + "id": "number", + "icons": ["number_1", "number_2", "number_3", "number_4", "number_5", "number_6", "number_7", "number_8", "number_9"] + }, + {"id": "chart", "icons": ["chart_bar", "chart_line", "chart_curve", "chart_pie", "chart_organisation"]}, + {"id": "sign", "icons": ["sign_warning", "sign_info", "sign_stop", "sign_help", "sign_cancel"]}, + { + "id": "hard", + "icons": ["hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", "hard_keyboard", "hard_mouse", "hard_printer"] + }, + { + "id": "soft", + "icons": ["soft_bug", "soft_cursor", "soft_database_table", "soft_database", "soft_feed", "soft_folder_explore", "soft_rss", "soft_penguin"] + }, + {"id": "arrow", "icons": ["arrow_up", "arrow_down", "arrow_left", "arrow_right"]}, + { + "id": "arrowc", + "icons": ["arrowc_rotate_anticlockwise", "arrowc_rotate_clockwise", "arrowc_turn_left", "arrowc_turn_right"] + }, + {"id": "people", "icons": ["people_group", "people_male1", "people_male2", "people_female1", "people_female2"]}, + {"id": "mail", "icons": ["mail_envelop", "mail_mailbox", "mail_edit", "mail_list"]}, + {"id": "flag", "icons": ["flag_blue", "flag_green", "flag_orange", "flag_pink", "flag_purple", "flag_yellow"]}, + { + "id": "bullet", + "icons": ["bullet_black", "bullet_blue", "bullet_green", "bullet_orange", "bullet_red", "bullet_pink", "bullet_purple"] + }, + {"id": "tag", "icons": ["tag_blue", "tag_green", "tag_orange", "tag_red", "tag_pink", "tag_yellow"]}, + { + "id": "object", + "icons": ["object_bell", "object_clanbomber", "object_key", "object_pencil", "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", "object_wizard", "object_house", "object_cake", "object_camera", "object_palette", "object_rainbow"] + }, + { + "id": "weather", + "icons": ["weather_clear-night", "weather_clear", "weather_few-clouds-night", "weather_few-clouds", "weather_overcast", "weather_severe-alert", "weather_showers-scattered", "weather_showers", "weather_snow", "weather_storm"] + }, + {"id": "task", "icons": ["task_0", "task_25", "task_50", "task_75", "task_100"]} +]; + +export default ImageIcon; diff --git a/packages/mindplot/lib/components/Keyboard.js b/packages/mindplot/lib/components/Keyboard.js new file mode 100644 index 00000000..eb029b88 --- /dev/null +++ b/packages/mindplot/lib/components/Keyboard.js @@ -0,0 +1,35 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const Keyboard = new Class({ + + initialize: function () { + }, + + addShortcut: function (shortcuts, callback) { + if (!$.isArray(shortcuts)) { + shortcuts = [shortcuts]; + } + _.each(shortcuts, function (shortcut) { + $(document).bind('keydown', shortcut, callback); + }); + } + +}); + +export default Keyboard; diff --git a/packages/mindplot/lib/components/LinkIcon.js b/packages/mindplot/lib/components/LinkIcon.js new file mode 100644 index 00000000..abd70335 --- /dev/null +++ b/packages/mindplot/lib/components/LinkIcon.js @@ -0,0 +1,72 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Icon = require('./Icon').default; +const LinkIconTooltip = require('./widget/LinkIconTooltip').default; + +const LinkIcon = new Class({ + + Extends: Icon, + initialize: function (topic, linkModel, readOnly) { + $assert(topic, 'topic can not be null'); + $assert(linkModel, 'linkModel can not be null'); + + this.parent(LinkIcon.IMAGE_URL); + this._linksModel = linkModel; + this._topic = topic; + this._readOnly = readOnly; + + this._registerEvents(); + }, + + _registerEvents: function () { + this._image.setCursor('pointer'); + this._tip = new LinkIconTooltip(this); + + var me = this; + if (!this._readOnly) { + // Add on click event to open the editor ... + this.addEvent('click', function (event) { + me._tip.hide(); + me._topic.showLinkEditor(); + event.stopPropagation(); + }); + //FIXME: we shouldn't have timeout of that.. + this.addEvent("mouseleave", function (event) { + window.setTimeout(function () { + if (!$("#linkPopover:hover").length) { + me._tip.hide(); + } + event.stopPropagation(); + }, 100) + }); + } + + $(this.getImage()._peer._native).mouseenter(function () { + me._tip.show(); + }) + }, + + getModel: function () { + return this._linksModel; + } +}); +LinkIcon.IMAGE_URL = "images/links.png"; + +export default LinkIcon; + + diff --git a/packages/mindplot/lib/components/LocalStorageManager.js b/packages/mindplot/lib/components/LocalStorageManager.js new file mode 100644 index 00000000..8e6bd77b --- /dev/null +++ b/packages/mindplot/lib/components/LocalStorageManager.js @@ -0,0 +1,64 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const PersistenceManager = require('./PersistenceManager').default; + +const LocalStorageManager = new Class({ + Extends: PersistenceManager, + initialize: function (documentUrl, forceLoad) { + this.parent(); + this.documentUrl = documentUrl; + this.forceLoad = forceLoad; + }, + + saveMapXml: function (mapId, mapXml, pref, saveHistory, events) { + localStorage.setItem(mapId + "-xml", mapXml); + }, + + discardChanges: function (mapId) { + localStorage.removeItem(mapId + "-xml"); + }, + + loadMapDom: function (mapId) { + var xml = localStorage.getItem(mapId + "-xml"); + if (xml == null || this.forceLoad) { + $.ajax({ + url: this.documentUrl.replace("{id}", mapId), + headers: {"Content-Type": "text/plain", "Accept": "application/xml"}, + type: 'get', + dataType: "text", + async: false, + success: function (response) { + xml = response; + } + }); + // If I could not load it from a file, hard code one. + if (xml == null) { + throw new Error("Map could not be loaded"); + } + } + + return jQuery.parseXML(xml); + }, + + unlockMap: function (mindmap) { + // Ignore, no implementation required ... + } + } +); + +export default LocalStorageManager; diff --git a/packages/mindplot/lib/components/MainTopic.js b/packages/mindplot/lib/components/MainTopic.js new file mode 100644 index 00000000..e068a42c --- /dev/null +++ b/packages/mindplot/lib/components/MainTopic.js @@ -0,0 +1,170 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const web2D = require('@wismapping/web2d'); +const web2d = web2D(); + +const Topic = require('./Topic').default; +const { TopicShape } = require('./model/INodeModel'); +const Shape = require('./util/Shape').default; + +const MainTopic = new Class( + /** @lends MainTopic */ { + Extends: Topic, + /** + * @extends mindplot.Topic + * @constructs + * @param model + * @param options + */ + initialize: function (model, options) { + this.parent(model, options); + }, + + INNER_RECT_ATTRIBUTES: { stroke: '0.5 solid #009900' }, + + _buildDragShape: function () { + var innerShape = this._buildShape(this.INNER_RECT_ATTRIBUTES, this.getShapeType()); + var size = this.getSize(); + innerShape.setSize(size.width, size.height); + innerShape.setPosition(0, 0); + innerShape.setOpacity(0.5); + innerShape.setCursor('default'); + innerShape.setVisibility(true); + + var brColor = this.getBorderColor(); + innerShape.setAttribute('strokeColor', brColor); + + var bgColor = this.getBackgroundColor(); + innerShape.setAttribute('fillColor', bgColor); + + // Create group ... + var groupAttributes = { + width: 100, + height: 100, + coordSizeWidth: 100, + coordSizeHeight: 100, + }; + var group = new web2d.Group(groupAttributes); + group.append(innerShape); + + // Add Text ... + if (this.getShapeType() != TopicShape.IMAGE) { + var textShape = this._buildTextShape(true); + var text = this.getText(); + textShape.setText(text); + textShape.setOpacity(0.5); + group.append(textShape); + } + return group; + }, + + /** */ + updateTopicShape: function (targetTopic, workspace) { + // Change figure based on the connected topic ... + var model = this.getModel(); + var shapeType = model.getShapeType(); + if (!targetTopic.isCentralTopic()) { + if (!$defined(shapeType)) { + // Get the real shape type ... + shapeType = this.getShapeType(); + this._setShapeType(shapeType, false); + } + } + }, + + /** */ + disconnect: function (workspace) { + this.parent(workspace); + var size = this.getSize(); + + var model = this.getModel(); + var shapeType = model.getShapeType(); + if (!$defined(shapeType)) { + // Change figure ... + shapeType = this.getShapeType(); + this._setShapeType(TopicShape.ROUNDED_RECT, false); + } + var innerShape = this.getInnerShape(); + innerShape.setVisibility(true); + }, + + _updatePositionOnChangeSize: function (oldSize, newSize) { + var xOffset = Math.round((newSize.width - oldSize.width) / 2); + var pos = this.getPosition(); + if ($defined(pos)) { + if (pos.x > 0) { + pos.x = pos.x + xOffset; + } else { + pos.x = pos.x - xOffset; + } + this.setPosition(pos); + } + }, + + /** */ + workoutIncomingConnectionPoint: function (sourcePosition) { + return Shape.workoutIncomingConnectionPoint(this, sourcePosition); + }, + + /** */ + workoutOutgoingConnectionPoint: function (targetPosition) { + $assert(targetPosition, 'targetPoint can not be null'); + var pos = this.getPosition(); + var isAtRight = Shape.isAtRight(targetPosition, pos); + var size = this.getSize(); + + var result; + if (this.getShapeType() == TopicShape.LINE) { + result = new core.Point(); + var groupPosition = this._elem2d.getPosition(); + var innerShareSize = this.getInnerShape().getSize(); + + if (innerShareSize) { + var magicCorrectionNumber = 0.3; + if (!isAtRight) { + result.x = groupPosition.x + innerShareSize.width - magicCorrectionNumber; + } else { + result.x = groupPosition.x + magicCorrectionNumber; + } + result.y = groupPosition.y + innerShareSize.height; + } else { + // Hack: When the size has not being defined. This is because the node has not being added. + // Try to do our best ... + if (!isAtRight) { + result.x = pos.x + size.width / 2; + } else { + result.x = pos.x - size.width / 2; + } + result.y = pos.y + size.height / 2; + } + } else { + result = Shape.calculateRectConnectionPoint( + pos, + size, + isAtRight, + true + ); + } + return result; + }, + } +); + +export default MainTopic; diff --git a/packages/mindplot/lib/components/Messages.js b/packages/mindplot/lib/components/Messages.js new file mode 100644 index 00000000..415473ea --- /dev/null +++ b/packages/mindplot/lib/components/Messages.js @@ -0,0 +1,45 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const Messages = new Class({ + Static: { + init: function (locale) { + locale = $defined(locale) ? locale : 'en'; + var bundle = Messages.BUNDLES[locale]; + if (bundle == null && locale.indexOf("_") != -1) { + // Try to locate without the specialization ... + locale = locale.substring(0, locale.indexOf("_")); + bundle = Messages.BUNDLES[locale]; + } + Messages.__bundle = bundle; + } + } +}); + +$msg = function (key) { + if (!Messages.__bundle) { + Messages.init('en'); + } + + var msg = Messages.__bundle[key]; + return msg ? msg : key; +}; + +Messages.BUNDLES = {}; + +export default Messages; diff --git a/packages/mindplot/lib/components/MultilineTextEditor.js b/packages/mindplot/lib/components/MultilineTextEditor.js new file mode 100644 index 00000000..8627bbc0 --- /dev/null +++ b/packages/mindplot/lib/components/MultilineTextEditor.js @@ -0,0 +1,316 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('./Events').default; +const ActionDispatcher = require('./ActionDispatcher').default; + +const MultilineTextEditor = new Class({ + Extends: Events, + initialize: function () { + this._topic = null; + this._timeoutId = -1; + }, + + _buildEditor: function () { + + var result = $('
') + .attr('id', 'textContainer') + .css({ + display: "none", + zIndex: "8", + overflow: "hidden", + border: "0 none" + }); + + + var textareaElem = $('') + .css({ + border: "1px gray dashed", + background: "rgba(98, 135, 167, .3)", + outline: '0 none', + resize: 'none', + overflow: "hidden" + }); + + result.append(textareaElem); + return result; + }, + + _registerEvents: function (containerElem) { + var textareaElem = this._getTextareaElem(); + var me = this; + textareaElem.on('keydown', function (event) { + switch (jQuery.hotkeys.specialKeys[event.keyCode]) { + case 'esc': + me.close(false); + break; + case 'enter': + if (event.metaKey || event.ctrlKey) { + + // Add return ... + var text = textareaElem.val(); + var cursorPosition = text.length; + if (textareaElem.selectionStart) { + cursorPosition = textareaElem.selectionStart; + } + + var head = text.substring(0, cursorPosition); + var tail = ""; + if (cursorPosition < text.length) { + tail = text.substring(cursorPosition, text.length); + } + textareaElem.val(head + "\n" + tail); + + // Position cursor ... + if (textareaElem[0].setSelectionRange) { + textareaElem.focus(); + textareaElem[0].setSelectionRange(cursorPosition + 1, cursorPosition + 1); + } else if (textareaElem.createTextRange) { + var range = textareaElem.createTextRange(); + range.moveStart('character', cursorPosition + 1); + range.select(); + } + + } + else { + me.close(true); + } + break; + case 'tab': + event.preventDefault(); + var start = $(this).get(0).selectionStart; + var end = $(this).get(0).selectionEnd; + + // set textarea value to: text before caret + tab + text after caret + $(this).val($(this).val().substring(0, start) + "\t" + $(this).val().substring(end)); + + // put caret at right position again + $(this).get(0).selectionStart = $(this).get(0).selectionEnd = start + 1; + break; + } + event.stopPropagation(); + }); + + textareaElem.on('keypress', function (event) { + event.stopPropagation(); + }); + + textareaElem.on('keyup', function (event) { + var text = me._getTextareaElem().val(); + me.fireEvent('input', [event, text]); + me._adjustEditorSize(); + }); + + // If the user clicks on the input, all event must be ignored ... + containerElem.on('click', function (event) { + event.stopPropagation(); + }); + containerElem.on('dblclick', function (event) { + event.stopPropagation(); + }); + containerElem.on('mousedown', function (event) { + event.stopPropagation(); + }); + }, + + _adjustEditorSize: function () { + + if (this.isVisible()) { + var textElem = this._getTextareaElem(); + + var lines = textElem.val().split('\n'); + var maxLineLength = 1; + _.each(lines, function (line) { + if (maxLineLength < line.length) + maxLineLength = line.length; + }); + + textElem.attr('cols', maxLineLength); + textElem.attr('rows', lines.length); + + this._containerElem.css({ + width: (maxLineLength + 3) + 'em', + height: textElem.height() + }); + } + }, + + isVisible: function () { + return $defined(this._containerElem) && this._containerElem.css('display') == 'block'; + }, + + _updateModel: function () { + + if (this._topic.getText() != this._getText()) { + var text = this._getText(); + var topicId = this._topic.getId(); + + var actionDispatcher = ActionDispatcher.getInstance(); + actionDispatcher.changeTextToTopic([topicId], text); + } + }, + + show: function (topic, text) { + // Close a previous node editor if it's opened ... + if (this._topic) { + this.close(false); + } + + this._topic = topic; + if (!this.isVisible()) { + //Create editor ui + var containerElem = this._buildEditor(); + $('body').append(containerElem); + + this._containerElem = containerElem; + this._registerEvents(containerElem); + this._showEditor(text); + } + }, + + _showEditor: function (defaultText) { + + var topic = this._topic; + + // Hide topic text ... + topic.getTextShape().setVisibility(false); + + // Set Editor Style + var nodeText = topic.getTextShape(); + var font = nodeText.getFont(); + font.size = nodeText.getHtmlFontSize(); + font.color = nodeText.getColor(); + this._setStyle(font); + var me = this; + // Set editor's initial size + var displayFunc = function () { + // Position the editor and set the size... + var textShape = topic.getTextShape(); + + me._containerElem.css('display', 'block'); + + //FIXME: Im not sure if this is best way... + var shapePosition = textShape.getNativePosition(); + me._containerElem.offset(shapePosition); + + // Set editor's initial text ... + var text = $defined(defaultText) ? defaultText : topic.getText(); + me._setText(text); + + // Set the element focus and select the current text ... + var inputElem = me._getTextareaElem(); + me._positionCursor(inputElem, !$defined(defaultText)); + + }; + + this._timeoutId = displayFunc.delay(10); + }, + + _setStyle: function (fontStyle) { + var inputField = this._getTextareaElem(); + if (!$defined(fontStyle.font)) { + fontStyle.font = "Arial"; + } + if (!$defined(fontStyle.style)) { + fontStyle.style = "normal"; + } + if (!$defined(fontStyle.weight)) { + fontStyle.weight = "normal"; + } + if (!$defined(fontStyle.size)) { + fontStyle.size = 12; + } + var style = { + fontSize: fontStyle.size + "px", + fontFamily: fontStyle.font, + fontStyle: fontStyle.style, + fontWeight: fontStyle.weight, + color: fontStyle.color + }; + inputField.css(style); + this._containerElem.css(style); + }, + + _setText: function (text) { + var textareaElem = this._getTextareaElem(); + textareaElem.val(text); + this._adjustEditorSize(); + }, + + _getText: function () { + return this._getTextareaElem().val(); + }, + + _getTextareaElem: function () { + return this._containerElem.find('textarea'); + }, + + _positionCursor: function (textareaElem, selectText) { + textareaElem.focus(); + var lengh = textareaElem.val().length; + if (selectText) { + // Mark text as selected ... + if (textareaElem.createTextRange) { + var rang = textareaElem.createTextRange(); + rang.select(); + rang.move("character", lengh); + } + else { + textareaElem[0].setSelectionRange(0, lengh); + } + + } else { + // Move the cursor to the last character .. + if (textareaElem.createTextRange) { + var range = textareaElem.createTextRange(); + range.move("character", lengh); + } else { + if (Browser.ie11) { + textareaElem[0].selectionStart = lengh; + textareaElem[0].selectionEnd = lengh; + } else { + textareaElem.selectionStart = lengh; + textareaElem.selectionEnd = lengh; + } + textareaElem.focus(); + } + } + + }, + + close: function (update) { + if (this.isVisible() && this._topic) { + // Update changes ... + clearTimeout(this._timeoutId); + + if (!$defined(update) || update) { + this._updateModel(); + } + + // Let make the visible text in the node visible again ... + this._topic.getTextShape().setVisibility(true); + + // Remove it form the screen ... + this._containerElem.remove(); + this._containerElem = null; + this._timeoutId = -1; + } + this._topic = null; + } +}); + +export default MultilineTextEditor; diff --git a/packages/mindplot/lib/components/NodeGraph.js b/packages/mindplot/lib/components/NodeGraph.js new file mode 100644 index 00000000..81339a1e --- /dev/null +++ b/packages/mindplot/lib/components/NodeGraph.js @@ -0,0 +1,222 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Topic = require('./Topic').default +const DragTopic = require('./DragTopic').default; +const INodeModel = require('./model/INodeModel').default; +const CentralTopic = require('./CentralTopic').default; +const MainTopic = require('./MainTopic').default; + +const NodeGraph = new Class(/** @lends NodeGraph */{ + /** + * @constructs + * @param {mindplot.model.NodeModel} nodeModel + * @param {Object} options + * @throws will throw an error if nodeModel is null or undefined + */ + initialize: function (nodeModel, options) { + $assert(nodeModel, "model can not be null"); + + this._options = options; + this._mouseEvents = true; + this.setModel(nodeModel); + this._onFocus = false; + this._size = {width: 50, height: 20}; + }, + + /** @return true if option is set to read-only */ + isReadOnly: function () { + return this._options.readOnly; + }, + + /** @return model type */ + getType: function () { + var model = this.getModel(); + return model.getType(); + }, + + /** + * @param {String} id + * @throws will throw an error if the topic id is not a number + */ + setId: function (id) { + $assert(typeof topic.getId() == "number", "id is not a number:" + id); + this.getModel().setId(id); + }, + + _set2DElement: function (elem2d) { + this._elem2d = elem2d; + }, + + /** + * @return 2D element + * @throws will throw an error if the element is null or undefined within node graph + */ + get2DElement: function () { + $assert(this._elem2d, 'NodeGraph has not been initialized properly'); + return this._elem2d; + }, + + /** @abstract */ + setPosition: function (point, fireEvent) { + throw "Unsupported operation"; + }, + + /** */ + addEvent: function (type, listener) { + var elem = this.get2DElement(); + elem.addEvent(type, listener); + }, + + /** */ + removeEvent: function (type, listener) { + var elem = this.get2DElement(); + elem.removeEvent(type, listener); + }, + + /** */ + fireEvent: function (type, event) { + var elem = this.get2DElement(); + elem.trigger(type, event); + }, + + /** */ + setMouseEventsEnabled: function (isEnabled) { + this._mouseEvents = isEnabled; + }, + + /** */ + isMouseEventsEnabled: function () { + return this._mouseEvents; + }, + + /** @return {Object} size*/ + getSize: function () { + return this._size; + }, + + /** @param {Object} size*/ + setSize: function (size) { + this._size.width = parseInt(size.width); + this._size.height = parseInt(size.height); + }, + + /** + * @return {mindplot.model.NodeModel} the node model + */ + getModel: function () { + $assert(this._model, 'Model has not been initialized yet'); + return this._model; + }, + + /** + * @param {mindplot.NodeModel} model the node model + * @throws will throw an error if model is null or undefined + */ + setModel: function (model) { + $assert(model, 'Model can not be null'); + this._model = model; + }, + + /** */ + getId: function () { + return this._model.getId(); + }, + + /** */ + setOnFocus: function (focus) { + if (this._onFocus != focus) { + + this._onFocus = focus; + var outerShape = this.getOuterShape(); + if (focus) { + outerShape.setFill(Topic.OUTER_SHAPE_ATTRIBUTES_FOCUS.fillColor); + outerShape.setOpacity(1); + + } else { + outerShape.setFill(Topic.OUTER_SHAPE_ATTRIBUTES.fillColor); + outerShape.setOpacity(0); + } + this.setCursor('move'); + + // In any case, always try to hide the editor ... + this.closeEditors(); + + // Fire event ... + this.fireEvent(focus ? 'ontfocus' : 'ontblur', this); + + } + }, + + /** @return {Boolean} true if the node graph is on focus */ + isOnFocus: function () { + return this._onFocus; + }, + + /** */ + dispose: function (workspace) { + this.setOnFocus(false); + workspace.removeChild(this); + }, + + /** */ + createDragNode: function (layoutManager) { + var dragShape = this._buildDragShape(); + return new DragTopic(dragShape, this, layoutManager); + }, + + _buildDragShape: function () { + $assert(false, '_buildDragShape must be implemented by all nodes.'); + }, + + /** */ + getPosition: function () { + var model = this.getModel(); + return model.getPosition(); + } +}); + +/** + * creates a new topic from the given node model + * @memberof mindplot.Nodegraph + * @param {mindplot.model.NodeModel} nodeModel + * @param {Object} options + * @throws will throw an error if nodeModel is null or undefined + * @throws will throw an error if the nodeModel's type is null or undefined + * @throws will throw an error if the node type cannot be recognized as either central or main + * topic type + * @return {mindplot.CentralTopic|mindplot.MainTopic} the new topic + */ +NodeGraph.create = function (nodeModel, options) { + $assert(nodeModel, 'Model can not be null'); + + var type = nodeModel.getType(); + $assert(type, 'Node model type can not be null'); + + var result; + if (type == INodeModel.CENTRAL_TOPIC_TYPE) { + result = new CentralTopic(nodeModel, options); + } else if (type == INodeModel.MAIN_TOPIC_TYPE) { + result = new MainTopic(nodeModel, options); + } else { + $assert(false, "unsupported node type:" + type); + } + + return result; +}; + +export default NodeGraph; diff --git a/packages/mindplot/lib/components/NoteIcon.js b/packages/mindplot/lib/components/NoteIcon.js new file mode 100644 index 00000000..da192f1e --- /dev/null +++ b/packages/mindplot/lib/components/NoteIcon.js @@ -0,0 +1,84 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Icon = require('./Icon').default; +const FloatingTip = require('./widget/FloatingTip').default; + +const NoteIcon = new Class({ + Extends: Icon, + initialize: function (topic, noteModel, readOnly) { + $assert(topic, 'topic can not be null'); + + this.parent(NoteIcon.IMAGE_URL); + this._linksModel = noteModel; + this._topic = topic; + this._readOnly = readOnly; + + this._registerEvents(); + }, + + _registerEvents: function () { + this._image.setCursor('pointer'); + var me = this; + + if (!this._readOnly) { + // Add on click event to open the editor ... + this.addEvent('click', function (event) { + me._topic.showNoteEditor(); + event.stopPropagation(); + }); + } + this._tip = new FloatingTip($(me.getImage()._peer._native), { + title: $msg('NOTE'), + container: 'body', + // Content can also be a function of the target element! + content: function () { + return me._buildTooltipContent(); + }, + html: true, + placement: 'bottom', + destroyOnExit: true + }); + + }, + + _buildTooltipContent: function () { + if ($("body").find("#textPopoverNote").length == 1) { + var text = $("body").find("#textPopoverNote"); + text.text(this._linksModel.getText()); + } else { + var result = $('
').css({padding: '5px'}); + + var text = $('
').text(this._linksModel.getText()) + .css({ + 'white-space': 'pre-wrap', + 'word-wrap': 'break-word' + } + ); + result.append(text); + return result; + } + }, + + getModel: function () { + return this._linksModel; + } +}); + +NoteIcon.IMAGE_URL = "images/notes.png"; + +export default NoteIcon diff --git a/packages/mindplot/lib/components/Options.js b/packages/mindplot/lib/components/Options.js new file mode 100644 index 00000000..9312acff --- /dev/null +++ b/packages/mindplot/lib/components/Options.js @@ -0,0 +1,15 @@ +const Options = new Class({ + + setOptions: function () { + var options = this.options = Object.merge.apply(null, [{}, this.options].append(arguments)); + if (this.addEvent) for (var option in options) { + if (typeOf(options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue; + this.addEvent(option, options[option]); + delete options[option]; + } + return this; + } + +}); + +export default Options; diff --git a/packages/mindplot/lib/components/PersistenceManager.js b/packages/mindplot/lib/components/PersistenceManager.js new file mode 100644 index 00000000..49236d76 --- /dev/null +++ b/packages/mindplot/lib/components/PersistenceManager.js @@ -0,0 +1,88 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const XMLSerializerFactory = require('./persistence/XMLSerializerFactory'); + +const PersistenceManager = new Class({ + Static: { + loadFromDom: function (mapId, mapDom) { + $assert(mapId, "mapId can not be null"); + $assert(mapDom, "mapDom can not be null"); + + var serializer = XMLSerializerFactory.getSerializerFromDocument(mapDom); + return serializer.loadFromDom(mapDom, mapId); + } + }, + + initialize: function () { + + }, + + save: function (mindmap, editorProperties, saveHistory, events, sync) { + $assert(mindmap, "mindmap can not be null"); + $assert(editorProperties, "editorProperties can not be null"); + + var mapId = mindmap.getId(); + $assert(mapId, "mapId can not be null"); + + var serializer = XMLSerializerFactory.getSerializerFromMindmap(mindmap); + var domMap = serializer.toXML(mindmap); + var mapXml = core.Utils.innerXML(domMap); + + var pref = JSON.stringify(editorProperties); + try { + this.saveMapXml(mapId, mapXml, pref, saveHistory, events, sync); + } catch (e) { + console.log(e); + events.onError(this._buildError()); + } + }, + + load: function (mapId) { + $assert(mapId, "mapId can not be null"); + var domDocument = this.loadMapDom(mapId); + return PersistenceManager.loadFromDom(mapId, domDocument); + }, + + discardChanges: function (mapId) { + throw new Error("Method must be implemented"); + }, + + loadMapDom: function (mapId) { + throw new Error("Method must be implemented"); + }, + + saveMapXml: function (mapId, mapXml, pref, saveHistory, events, sync) { + throw new Error("Method must be implemented"); + }, + + unlockMap: function (mindmap) { + throw new Error("Method must be implemented"); + } +}); + +PersistenceManager.init = function (instance) { + PersistenceManager._instance = instance; +}; + +PersistenceManager.getInstance = function () { + return PersistenceManager._instance; +}; + +export default PersistenceManager; diff --git a/packages/mindplot/lib/components/Relationship.js b/packages/mindplot/lib/components/Relationship.js new file mode 100644 index 00000000..95cef0c8 --- /dev/null +++ b/packages/mindplot/lib/components/Relationship.js @@ -0,0 +1,345 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); + +const web2D = require('@wismapping/web2d') +const web2d = web2D(); + +const ConnectionLine = require('./ConnectionLine').default; +const ControlPoint = require('./ControlPoint').default; + +const INodeModel = require('./model/INodeModel').default; + +const Shape = require('./util/Shape').default + +const Relationship = new Class({ + Extends: ConnectionLine, + Static: { + getStrokeColor: function () { + return '#9b74e6'; + }, + type: "Relationship" + }, + initialize: function (sourceNode, targetNode, model) { + $assert(sourceNode, "sourceNode can not be null"); + $assert(targetNode, "targetNode can not be null"); + + this.parent(sourceNode, targetNode, model.getLineType()); + this.setModel(model); + + var strokeColor = Relationship.getStrokeColor(); + + this._line2d.setIsSrcControlPointCustom(false); + this._line2d.setIsDestControlPointCustom(false); + this._line2d.setCursor('pointer'); + this._line2d.setStroke(1, 'solid', strokeColor); + this._line2d.setDashed(4, 2); + this._focusShape = this._createLine(this.getLineType(), ConnectionLine.SIMPLE_CURVED); + this._focusShape.setStroke(2, "solid", "#3f96ff"); + + var ctrlPoints = this._line2d.getControlPoints(); + this._focusShape.setSrcControlPoint(ctrlPoints[0]); + this._focusShape.setDestControlPoint(ctrlPoints[1]); + this._focusShape.setVisibility(false); + this._onFocus = false; + this._isInWorkspace = false; + this._controlPointsController = new ControlPoint(); + + this._startArrow = new web2d.Arrow(); + this._startArrow.setStrokeColor(strokeColor); + this._startArrow.setStrokeWidth(2); + this.setShowStartArrow(true); + + // Share style is disable ... + if (this._showEndArrow) { + this._endArrow = new web2d.Arrow(); + this._endArrow.setStrokeColor(strokeColor); + this._endArrow.setStrokeWidth(2); + } + + // Position the line ... + if ($defined(model.getSrcCtrlPoint())) { + var srcPoint = model.getSrcCtrlPoint().clone(); + this.setSrcControlPoint(srcPoint); + } + if ($defined(model.getDestCtrlPoint())) { + var destPoint = model.getDestCtrlPoint().clone(); + this.setDestControlPoint(destPoint); + } + }, + + setStroke: function (color, style, opacity) { + this.parent(color, style, opacity); + this._startArrow.setStrokeColor(color); + }, + + redraw: function () { + var line2d = this._line2d; + var sourceTopic = this._sourceTopic; + var sourcePosition = sourceTopic.getPosition(); + + var targetTopic = this._targetTopic; + var targetPosition = targetTopic.getPosition(); + if (targetTopic.getType() == INodeModel.CENTRAL_TOPIC_TYPE) { + targetPosition = Shape.workoutIncomingConnectionPoint(targetTopic, sourcePosition); + } + + var sPos, tPos; + this._line2d.setStroke(2); + var ctrlPoints = this._line2d.getControlPoints(); + if (!this._line2d.isDestControlPointCustom() && !this._line2d.isSrcControlPointCustom()) { + + var defaultPoints = Shape.calculateDefaultControlPoints(sourcePosition, targetPosition); + ctrlPoints[0].x = defaultPoints[0].x; + ctrlPoints[0].y = defaultPoints[0].y; + + ctrlPoints[1].x = defaultPoints[1].x; + ctrlPoints[1].y = defaultPoints[1].y; + } + var spoint = new core.Point(); + spoint.x = parseInt(ctrlPoints[0].x) + parseInt(sourcePosition.x); + spoint.y = parseInt(ctrlPoints[0].y) + parseInt(sourcePosition.y); + + var tpoint = new core.Point(); + tpoint.x = parseInt(ctrlPoints[1].x) + parseInt(targetPosition.x); + tpoint.y = parseInt(ctrlPoints[1].y) + parseInt(targetPosition.y); + + sPos = Shape.calculateRelationShipPointCoordinates(sourceTopic, spoint); + tPos = Shape.calculateRelationShipPointCoordinates(targetTopic, tpoint); + + line2d.setFrom(sPos.x, sPos.y); + line2d.setTo(tPos.x, tPos.y); + + line2d.moveToFront(); + + //Positionate Arrows + this._positionArrows(); + + // Add connector ... + this._positionateConnector(targetTopic); + + if (this.isOnFocus()) { + this._refreshShape(); + } + this._focusShape.moveToBack(); + this._controlPointsController.redraw(); + }, + + _positionArrows: function () { + var tpos = this._line2d.getTo(); + var spos = this._line2d.getFrom(); + + this._startArrow.setFrom(spos.x, spos.y); + this._startArrow.moveToBack(); + + if (this._endArrow) { + this._endArrow.setFrom(tpos.x, tpos.y); + this._endArrow.moveToBack(); + } + + if (this._line2d.getType() == "CurvedLine") { + var controlPoints = this._line2d.getControlPoints(); + this._startArrow.setControlPoint(controlPoints[0]); + if (this._endArrow) { + this._endArrow.setControlPoint(controlPoints[1]); + } + } else { + this._startArrow.setControlPoint(this._line2d.getTo()); + if (this._endArrow) { + this._endArrow.setControlPoint(this._line2d.getFrom()); + } + } + + if (this._showEndArrow) { + this._endArrow.setVisibility(this.isVisible()); + } + this._startArrow.setVisibility(this.isVisible() && this._showStartArrow); + }, + + addToWorkspace: function (workspace) { + workspace.append(this._focusShape); + workspace.append(this._controlPointsController); + + this._controlPointControllerListener = this._initializeControlPointController.bind(this); + this._line2d.addEvent('click', this._controlPointControllerListener); + this._isInWorkspace = true; + + workspace.append(this._startArrow); + if (this._endArrow) + workspace.append(this._endArrow); + + this.parent(workspace); + this._positionArrows(); + this.redraw(); + + }, + + _initializeControlPointController: function () { + this.setOnFocus(true); + }, + + removeFromWorkspace: function (workspace) { + workspace.removeChild(this._focusShape); + workspace.removeChild(this._controlPointsController); + this._line2d.removeEvent('click', this._controlPointControllerListener); + this._isInWorkspace = false; + workspace.removeChild(this._startArrow); + if (this._endArrow) + workspace.removeChild(this._endArrow); + + this.parent(workspace); + }, + + getType: function () { + return Relationship.type; + }, + + setOnFocus: function (focus) { + // Change focus shape + if (this.isOnFocus() != focus) { + if (focus) { + this._refreshShape(); + this._controlPointsController.setLine(this); + } + this._focusShape.setVisibility(focus); + + this._controlPointsController.setVisibility(focus); + this._onFocus = focus; + this.fireEvent(focus ? 'ontfocus' : 'ontblur', this); + } + }, + + _refreshShape: function () { + var sPos = this._line2d.getFrom(); + var tPos = this._line2d.getTo(); + var ctrlPoints = this._line2d.getControlPoints(); + this._focusShape.setFrom(sPos.x, sPos.y); + this._focusShape.setTo(tPos.x, tPos.y); + var shapeCtrlPoints = this._focusShape.getControlPoints(); + shapeCtrlPoints[0].x = ctrlPoints[0].x; + shapeCtrlPoints[0].y = ctrlPoints[0].y; + shapeCtrlPoints[1].x = ctrlPoints[1].x; + shapeCtrlPoints[1].y = ctrlPoints[1].y; + this._focusShape.updateLine(); + }, + + addEvent: function (type, listener) { + // Translate to web 2d events ... + if (type == 'onfocus') { + type = 'mousedown'; + } + + var line = this._line2d; + line.addEvent(type, listener); + }, + + isOnFocus: function () { + return this._onFocus; + }, + + isInWorkspace: function () { + return this._isInWorkspace; + }, + + setVisibility: function (value) { + this.parent(value); + if (this._showEndArrow) + this._endArrow.setVisibility(this._showEndArrow); + this._startArrow.setVisibility(this._showStartArrow && value); + }, + + setOpacity: function (opacity) { + this.parent(opacity); + if (this._showEndArrow) + this._endArrow.setOpacity(opacity); + if (this._showStartArrow) + this._startArrow.setOpacity(opacity); + }, + + setShowEndArrow: function (visible) { + this._showEndArrow = visible; + if (this._isInWorkspace) + this.redraw(); + }, + + setShowStartArrow: function (visible) { + this._showStartArrow = visible; + if (this._isInWorkspace) + this.redraw(); + }, + + setFrom: function (x, y) { + $assert($defined(x), "x must be defined"); + $assert($defined(y), "y must be defined"); + + this._line2d.setFrom(x, y); + this._startArrow.setFrom(x, y); + }, + + setTo: function (x, y) { + $assert($defined(x), "x must be defined"); + $assert($defined(y), "y must be defined"); + + this._line2d.setTo(x, y); + if (this._endArrow) + this._endArrow.setFrom(x, y); + }, + + setSrcControlPoint: function (control) { + this._line2d.setSrcControlPoint(control); + this._startArrow.setControlPoint(control); + }, + + setDestControlPoint: function (control) { + this._line2d.setDestControlPoint(control); + if (this._showEndArrow) + this._endArrow.setControlPoint(control); + }, + + getControlPoints: function () { + return this._line2d.getControlPoints(); + }, + + isSrcControlPointCustom: function () { + return this._line2d.isSrcControlPointCustom(); + }, + + isDestControlPointCustom: function () { + return this._line2d.isDestControlPointCustom(); + }, + + setIsSrcControlPointCustom: function (isCustom) { + this._line2d.setIsSrcControlPointCustom(isCustom); + }, + + setIsDestControlPointCustom: function (isCustom) { + this._line2d.setIsDestControlPointCustom(isCustom); + }, + + getId: function () { + return this._model.getId(); + }, + + fireEvent: function (type, event) { + var elem = this._line2d; + elem.trigger(type, event); + } +}); + +export default Relationship; diff --git a/packages/mindplot/lib/components/RelationshipPivot.js b/packages/mindplot/lib/components/RelationshipPivot.js new file mode 100644 index 00000000..429493b5 --- /dev/null +++ b/packages/mindplot/lib/components/RelationshipPivot.js @@ -0,0 +1,167 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js') +const core = Core(); +const web2D = require('@wismapping/web2d') +const web2d = web2D(); +const INodeModel = require('./model/INodeModel').default +const Shape = require('./util/Shape').default; + +const RelationshipPivot = new Class({ + initialize: function (workspace, designer) { + $assert(workspace, "workspace can not be null"); + $assert(designer, "designer can not be null"); + this._workspace = workspace; + this._designer = designer; + + //FIXME: the aim of the migration is remove .bind mootools method, please remove these! + this._mouseMoveEvent = this._mouseMove.bind(this); + this._onClickEvent = this._cleanOnMouseClick.bind(this); + this._onTopicClick = this._connectOnFocus.bind(this); + + }, + + start: function (sourceTopic, targetPos) { + $assert(sourceTopic, "sourceTopic can not be null"); + $assert(targetPos, "targetPos can not be null"); + + this.dispose(); + this._sourceTopic = sourceTopic; + if (sourceTopic != null) { + this._workspace.enableWorkspaceEvents(false); + + var sourcePos = sourceTopic.getPosition(); + var strokeColor = Relationship.getStrokeColor(); + + this._pivot = new web2d.CurvedLine(); + this._pivot.setStyle(web2d.CurvedLine.SIMPLE_LINE); + + var fromPos = this._calculateFromPosition(sourcePos); + this._pivot.setFrom(fromPos.x, fromPos.y); + + this._pivot.setTo(targetPos.x, targetPos.y); + this._pivot.setStroke(2, 'solid', strokeColor); + this._pivot.setDashed(4, 2); + + this._startArrow = new web2d.Arrow(); + this._startArrow.setStrokeColor(strokeColor); + this._startArrow.setStrokeWidth(2); + this._startArrow.setFrom(sourcePos.x, sourcePos.y); + + this._workspace.append(this._pivot); + this._workspace.append(this._startArrow); + + this._workspace.addEvent('mousemove', this._mouseMoveEvent); + this._workspace.addEvent('click', this._onClickEvent); + + // Register focus events on all topics ... + var model = this._designer.getModel(); + var topics = model.getTopics(); + _.each(topics, function (topic) { + topic.addEvent('ontfocus', this._onTopicClick); + }.bind(this)); + } + + }, + + dispose: function () { + var workspace = this._workspace; + + if (this._isActive()) { + workspace.removeEvent('mousemove', this._mouseMoveEvent); + workspace.removeEvent('click', this._onClickEvent); + + var model = this._designer.getModel(); + var topics = model.getTopics(); + var me = this; + _.each(topics, function (topic) { + topic.removeEvent('ontfocus', me._onTopicClick); + }); + + workspace.removeChild(this._pivot); + workspace.removeChild(this._startArrow); + workspace.enableWorkspaceEvents(true); + + this._sourceTopic = null; + this._pivot = null; + this._startArrow = null; + } + }, + + _mouseMove: function (event) { + var screen = this._workspace.getScreenManager(); + var pos = screen.getWorkspaceMousePosition(event); + + // Leave the arrow a couple of pixels away from the cursor. + var sourcePosition = this._sourceTopic.getPosition(); + var gapDistance = Math.sign(pos.x - sourcePosition.x) * 5; + + var sPos = this._calculateFromPosition(pos); + this._pivot.setFrom(sPos.x, sPos.y); + + // Update target position ... + this._pivot.setTo(pos.x - gapDistance, pos.y); + + var controlPoints = this._pivot.getControlPoints(); + this._startArrow.setFrom(pos.x - gapDistance, pos.y); + this._startArrow.setControlPoint(controlPoints[1]); + + event.stopPropagation(); + return false; + }, + + _cleanOnMouseClick: function (event) { + + // The user clicks on a desktop on in other element that is not a node. + this.dispose(); + event.stopPropagation(); + }, + + _calculateFromPosition: function (toPosition) { + + // Calculate origin position ... + var sourcePosition = this._sourceTopic.getPosition(); + if (this._sourceTopic.getType() == INodeModel.CENTRAL_TOPIC_TYPE) { + sourcePosition = Shape.workoutIncomingConnectionPoint(this._sourceTopic, toPosition); + } + var controlPoint = Shape.calculateDefaultControlPoints(sourcePosition, toPosition); + + var spoint = new core.Point(); + spoint.x = parseInt(controlPoint[0].x) + parseInt(sourcePosition.x); + spoint.y = parseInt(controlPoint[0].y) + parseInt(sourcePosition.y); + return Shape.calculateRelationShipPointCoordinates(this._sourceTopic, spoint); + }, + + _connectOnFocus: function (event, targetTopic) { + var sourceTopic = this._sourceTopic; + var mindmap = this._designer.getMindmap(); + + // Avoid circular connections ... + if (targetTopic.getId() != sourceTopic.getId()) { + var relModel = mindmap.createRelationship(targetTopic.getId(), sourceTopic.getId()); + this._designer._actionDispatcher.addRelationship(relModel); + } + this.dispose(); + }, + + _isActive: function () { + return this._pivot != null; + } +}); + +export default RelationshipPivot; diff --git a/packages/mindplot/lib/components/RestPersistenceManager.js b/packages/mindplot/lib/components/RestPersistenceManager.js new file mode 100644 index 00000000..7ff23522 --- /dev/null +++ b/packages/mindplot/lib/components/RestPersistenceManager.js @@ -0,0 +1,166 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const PersistenceManager = require('./PersistenceManager').default; + +const RESTPersistenceManager = new Class({ + Extends: PersistenceManager, + initialize: function (options) { + this.parent(); + $assert(options.documentUrl, "documentUrl can not be null"); + $assert(options.revertUrl, "revertUrl can not be null"); + $assert(options.lockUrl, "lockUrl can not be null"); + $assert(options.session, "session can not be null"); + $assert(options.timestamp, "timestamp can not be null"); + + this.documentUrl = options.documentUrl; + this.revertUrl = options.revertUrl; + this.lockUrl = options.lockUrl; + this.timestamp = options.timestamp; + this.session = options.session; + }, + + saveMapXml: function (mapId, mapXml, pref, saveHistory, events, sync) { + + var data = { + id: mapId, + xml: mapXml, + properties: pref + }; + + var persistence = this; + var query = "minor=" + !saveHistory; + query = query + "×tamp=" + this.timestamp; + query = query + "&session=" + this.session; + + if (!persistence.onSave) { + + // Mark save in process and fire a event unlocking the save ... + persistence.onSave = true; + persistence.clearTimeout = setTimeout(function () { + persistence.clearTimeout = null; + persistence.onSave = false; + }, 10000); + + $.ajax({ + url: this.documentUrl.replace("{id}", mapId) + "?" + query, + type: 'put', + dataType: "json", + data: JSON.stringify(data), + contentType: "application/json; charset=utf-8", + async: !sync, + + success: function (data, textStatus, jqXHRresponseText) { + persistence.timestamp = data; + events.onSuccess(); + }, + error: function (jqXHR, textStatus, errorThrown) { + events.onError(persistence._buildError()); + }, + complete: function () { + // Clear event timeout ... + if (persistence.clearTimeout) { + clearTimeout(persistence.clearTimeout); + } + persistence.onSave = false; + }, + fail: function (xhr, textStatus) { + + var responseText = xhr.responseText; + var userMsg = {severity: "SEVERE", message: $msg('SAVE_COULD_NOT_BE_COMPLETED')}; + + var contentType = xhr.getResponseHeader("Content-Type"); + if (contentType != null && contentType.indexOf("application/json") != -1) { + var serverMsg = null; + try { + serverMsg = $.parseJSON(responseText); + serverMsg = serverMsg.globalSeverity ? serverMsg : null; + } catch (e) { + // Message could not be decoded ... + } + userMsg = persistence._buildError(serverMsg); + + } else { + if (this.status == 405) { + userMsg = {severity: "SEVERE", message: $msg('SESSION_EXPIRED')}; + } + } + events.onError(userMsg); + persistence.onSave = false; + } + }); + } + }, + + discardChanges: function (mapId) { + $.ajax({ + url: this.revertUrl.replace("{id}", mapId), + async: false, + method: 'post', + headers: {"Content-Type": "application/json; charset=utf-8", "Accept": "application/json"} + }); + }, + + unlockMap: function (mindmap) { + var mapId = mindmap.getId(); + $.ajax({ + url: this.lockUrl.replace("{id}", mapId), + async: false, + method: 'put', + headers: {"Content-Type": "text/plain"}, + data: "false" + }); + }, + + _buildError: function (jsonSeverResponse) { + var message = jsonSeverResponse ? jsonSeverResponse.globalErrors[0] : null; + var severity = jsonSeverResponse ? jsonSeverResponse.globalSeverity : null; + + if (!message) { + message = $msg('SAVE_COULD_NOT_BE_COMPLETED'); + } + + if (!severity) { + severity = "INFO"; + } + return {severity: severity, message: message}; + }, + + loadMapDom: function (mapId) { + // Let's try to open one from the local directory ... + var xml; + $.ajax({ + url: this.documentUrl.replace("{id}", mapId) + "/xml", + method: 'get', + async: false, + headers: {"Content-Type": "text/plain", "Accept": "application/xml"}, + success: function (responseText) { + xml = responseText; + } + }); + + // If I could not load it from a file, hard code one. + if (xml == null) { + throw new Error("Map could not be loaded"); + } + + return xml; + } + } +); + +export default RESTPersistenceManager; diff --git a/packages/mindplot/lib/components/ScreenManager.js b/packages/mindplot/lib/components/ScreenManager.js new file mode 100644 index 00000000..84b3ad91 --- /dev/null +++ b/packages/mindplot/lib/components/ScreenManager.js @@ -0,0 +1,153 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Core = require('@wismapping/core-js'); +const core = Core(); + +const ScreenManager = new Class({ + initialize: function (divElement) { + $assert(divElement, "can not be null"); + this._divContainer = divElement; + this._padding = {x: 0, y: 0}; + + // Ignore default click event propagation. Prevent 'click' event on drag. + this._clickEvents = []; + this._divContainer.bind('click', function (event) { + event.stopPropagation() + }); + + this._divContainer.bind('dblclick', function (event) { + event.stopPropagation(); + event.preventDefault(); + }); + }, + + setScale: function (scale) { + $assert(scale, 'Screen scale can not be null'); + this._scale = scale; + }, + + addEvent: function (event, listener) { + if (event == 'click') + this._clickEvents.push(listener); + else + this._divContainer.bind(event, listener); + }, + + removeEvent: function (event, listener) { + if (event == 'click') { + this._clickEvents.remove(listener); + } + else { + this._divContainer.unbind(event, listener); + } + }, + + fireEvent: function (type, event) { + if (type == 'click') { + _.each(this._clickEvents, function (listener) { + listener(type, event); + }); + } + else { + this._divContainer.trigger(type, event); + } + }, + + _getElementPosition: function (elem) { + // Retrieve current element position. + var elementPosition = elem.getPosition(); + var x = elementPosition.x; + var y = elementPosition.y; + + // Add workspace offset. + x = x - this._padding.x; + y = y - this._padding.y; + + // Scale coordinate in order to be relative to the workspace. That's coord/size; + x = x / this._scale; + y = y / this._scale; + + // Remove decimal part.. + return {x: x, y: y}; + }, + + getWorkspaceIconPosition: function (e) { + // Retrieve current icon position. + var image = e.getImage(); + var elementPosition = image.getPosition(); + var imageSize = e.getSize(); + + //Add group offset + var iconGroup = e.getGroup(); + var group = iconGroup.getNativeElement(); + var coordOrigin = group.getCoordOrigin(); + var groupSize = group.getSize(); + var coordSize = group.getCoordSize(); + + var scale = {x: coordSize.width / parseInt(groupSize.width), y: coordSize.height / parseInt(groupSize.height)}; + + var x = (elementPosition.x - coordOrigin.x - (parseInt(imageSize.width) / 2)) / scale.x; + var y = (elementPosition.y - coordOrigin.y - (parseInt(imageSize.height) / 2)) / scale.y; + + //Retrieve iconGroup Position + var groupPosition = iconGroup.getPosition(); + x = x + groupPosition.x; + y = y + groupPosition.y; + + //Retrieve topic Position + var topic = iconGroup.getTopic(); + var topicPosition = this._getElementPosition(topic); + topicPosition.x = topicPosition.x - (parseInt(topic.getSize().width) / 2); + + // Remove decimal part.. + return {x: x + topicPosition.x, y: y + topicPosition.y}; + }, + + getWorkspaceMousePosition: function (event) { + // Retrieve current mouse position. + var x = event.clientX; + var y = event.clientY; + + //FIXME: paulo: why? Subtract div position. + /*var containerPosition = this.getContainer().position(); + x = x - containerPosition.x; + y = y - containerPosition.y;*/ + + // Scale coordinate in order to be relative to the workspace. That's coordSize/size; + x = x * this._scale; + y = y * this._scale; + + // Add workspace offset. + x = x + this._padding.x; + y = y + this._padding.y; + + // Remove decimal part.. + return new core.Point(x, y); + }, + + getContainer: function () { + return this._divContainer; + }, + + setOffset: function (x, y) { + this._padding.x = x; + this._padding.y = y; + } +}); + +export default ScreenManager; diff --git a/packages/mindplot/lib/components/ShrinkConnector.js b/packages/mindplot/lib/components/ShrinkConnector.js new file mode 100644 index 00000000..431027c3 --- /dev/null +++ b/packages/mindplot/lib/components/ShrinkConnector.js @@ -0,0 +1,114 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D(); + +const Topic = require('./Topic').default +const ActionDispatcher = require('./ActionDispatcher').default; + +const ShirinkConnector = new Class({ + initialize: function (topic) { + + var ellipse = new web2D.Elipse(Topic.prototype.INNER_RECT_ATTRIBUTES); + this._ellipse = ellipse; + ellipse.setFill('rgb(62,118,179)'); + + ellipse.setSize(Topic.CONNECTOR_WIDTH, Topic.CONNECTOR_WIDTH); + ellipse.addEvent('click', function (event) { + var model = topic.getModel(); + var collapse = !model.areChildrenShrunken(); + + var topicId = topic.getId(); + var actionDispatcher = ActionDispatcher.getInstance(); + actionDispatcher.shrinkBranch([topicId], collapse); + + event.stopPropagation(); + + }); + + ellipse.addEvent('mousedown', function (event) { + // Avoid node creation ... + event.stopPropagation(); + }); + + ellipse.addEvent('dblclick', function (event) { + // Avoid node creation ... + event.stopPropagation(); + }); + + ellipse.addEvent('mouseover', function (event) { + + ellipse.setFill('rgb(153, 0, 255)'); + }); + var me = this; + ellipse.addEvent('mouseout', function (event) { + var color = topic.getBackgroundColor(); + me.setFill(color); + }); + + ellipse.setCursor('default'); + this._fillColor = '#f7f7f7'; + var model = topic.getModel(); + this.changeRender(model.areChildrenShrunken()); + + }, + + changeRender: function (isShrink) { + var elipse = this._ellipse; + if (isShrink) { + elipse.setStroke('2', 'solid'); + } else { + elipse.setStroke('1', 'solid'); + } + }, + + setVisibility: function (value) { + this._ellipse.setVisibility(value); + }, + + setOpacity: function (opacity) { + this._ellipse.setOpacity(opacity); + }, + + setFill: function (color) { + this._fillColor = color; + this._ellipse.setFill(color); + }, + + setAttribute: function (name, value) { + this._ellipse.setAttribute(name, value); + }, + + addToWorkspace: function (group) { + group.append(this._ellipse); + }, + + setPosition: function (x, y) { + this._ellipse.setPosition(x, y); + }, + + moveToBack: function () { + this._ellipse.moveToBack(); + }, + + moveToFront: function () { + this._ellipse.moveToFront(); + } +}); + +export default ShirinkConnector; diff --git a/packages/mindplot/lib/components/StandaloneActionDispatcher.js b/packages/mindplot/lib/components/StandaloneActionDispatcher.js new file mode 100644 index 00000000..92e8aab6 --- /dev/null +++ b/packages/mindplot/lib/components/StandaloneActionDispatcher.js @@ -0,0 +1,381 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ActionDispatcher = require('./ActionDispatcher').default; +const DesignerActionRunner = require('./DesignerActionRunner').default; +const AddTopicCommand = require('./commands/AddTopicCommand').default; +const AddRelationshipCommand = require('./commands/AddRelationshipCommand').default; +const AddFeatureToTopicCommand = require('./commands/AddFeatureToTopicCommand').default; +const DeleteCommand = require('./commands/DeleteCommand').default; +const RemoveFeatureFromTopicCommand = require('./commands/RemoveFeatureFromTopicCommand').default; +const DragTopicCommand = require('./commands/DragTopicCommand').default; +const GenericFunctionCommand = require('./commands/GenericFunctionCommand').default; +const MoveControlPointCommand = require('./commands/MoveControlPointCommand').default; +const ChangeFeatureToTopicCommand = require('./commands/ChangeFeatureToTopicCommand').default; +const NodeModel = require('./model/NodeModel').default; + +const StandaloneActionDispatcher = new Class( + /** @lends StandaloneActionDispatcher */ { + Extends: ActionDispatcher, + /** + * @extends mindplot.ActionDispatcher + * @constructs + * @param {mindplot.CommandContext} commandContext + */ + initialize: function (commandContext) { + this.parent(commandContext); + this._actionRunner = new DesignerActionRunner(commandContext, this); + }, + + /** */ + addTopics: function (models, parentTopicsId) { + var command = new AddTopicCommand(models, parentTopicsId); + this.execute(command); + }, + + /** */ + addRelationship: function (model) { + var command = new AddRelationshipCommand(model); + this.execute(command); + }, + + /** */ + deleteEntities: function (topicsIds, relIds) { + var command = new DeleteCommand(topicsIds, relIds); + this.execute(command); + }, + + /** */ + dragTopic: function (topicId, position, order, parentTopic) { + var command = new DragTopicCommand(topicId, position, order, parentTopic); + this.execute(command); + }, + + /** */ + moveTopic: function (topicId, position) { + $assert($defined(topicId), 'topicsId can not be null'); + $assert($defined(position), 'position can not be null'); + + var commandFunc = function (topic, value) { + var result = topic.getPosition(); + EventBus.instance.fireEvent(EventBus.events.NodeMoveEvent, { + node: topic.getModel(), + position: value, + }); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicId, position); + this.execute(command); + }, + + /** */ + moveControlPoint: function (ctrlPoint, point) { + var command = new MoveControlPointCommand(ctrlPoint, point); + this.execute(command); + }, + + /** */ + changeFontStyleToTopic: function (topicsIds) { + var commandFunc = function (topic) { + var result = topic.getFontStyle(); + var style = result == 'italic' ? 'normal' : 'italic'; + topic.setFontStyle(style, true); + return result; + }; + var command = new GenericFunctionCommand(commandFunc, topicsIds); + this.execute(command); + }, + + /** */ + changeTextToTopic: function (topicsIds, text) { + $assert($defined(topicsIds), 'topicsIds can not be null'); + + var commandFunc = function (topic, value) { + var result = topic.getText(); + topic.setText(value); + return result; + }; + commandFunc.commandType = 'changeTextToTopic'; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, text); + this.execute(command); + }, + + /** */ + changeFontFamilyToTopic: function (topicIds, fontFamily) { + $assert(topicIds, 'topicIds can not be null'); + $assert(fontFamily, 'fontFamily can not be null'); + + var commandFunc = function (topic, fontFamily) { + var result = topic.getFontFamily(); + topic.setFontFamily(fontFamily, true); + + topic._adjustShapes(); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicIds, fontFamily); + this.execute(command); + }, + + /** */ + changeFontColorToTopic: function (topicsIds, color) { + $assert(topicsIds, 'topicIds can not be null'); + $assert(color, 'color can not be null'); + + var commandFunc = function (topic, color) { + var result = topic.getFontColor(); + topic.setFontColor(color, true); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, color); + command.discardDuplicated = 'fontColorCommandId'; + this.execute(command); + }, + + /** */ + changeBackgroundColorToTopic: function (topicsIds, color) { + $assert(topicsIds, 'topicIds can not be null'); + $assert(color, 'color can not be null'); + + var commandFunc = function (topic, color) { + var result = topic.getBackgroundColor(); + topic.setBackgroundColor(color); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, color); + command.discardDuplicated = 'backColor'; + this.execute(command); + }, + + /** */ + changeBorderColorToTopic: function (topicsIds, color) { + $assert(topicsIds, 'topicIds can not be null'); + $assert(color, 'topicIds can not be null'); + + var commandFunc = function (topic, color) { + var result = topic.getBorderColor(); + topic.setBorderColor(color); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, color); + command.discardDuplicated = 'borderColorCommandId'; + this.execute(command); + }, + + /** */ + changeFontSizeToTopic: function (topicsIds, size) { + $assert(topicsIds, 'topicIds can not be null'); + $assert(size, 'size can not be null'); + + var commandFunc = function (topic, size) { + var result = topic.getFontSize(); + topic.setFontSize(size, true); + + topic._adjustShapes(); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, size); + this.execute(command); + }, + + /** */ + changeShapeTypeToTopic: function (topicsIds, shapeType) { + $assert(topicsIds, 'topicsIds can not be null'); + $assert(shapeType, 'shapeType can not be null'); + + var commandFunc = function (topic, shapeType) { + var result = topic.getShapeType(); + topic.setShapeType(shapeType, true); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, shapeType); + this.execute(command); + }, + + /** */ + changeFontWeightToTopic: function (topicsIds) { + $assert(topicsIds, 'topicsIds can not be null'); + + var commandFunc = function (topic) { + var result = topic.getFontWeight(); + var weight = result == 'bold' ? 'normal' : 'bold'; + topic.setFontWeight(weight, true); + + topic._adjustShapes(); + return result; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds); + this.execute(command); + }, + + /** */ + shrinkBranch: function (topicsIds, collapse) { + $assert(topicsIds, 'topicsIds can not be null'); + + var commandFunc = function (topic, isShrink) { + topic.setChildrenShrunken(isShrink); + return !isShrink; + }; + + var command = new GenericFunctionCommand(commandFunc, topicsIds, collapse); + this.execute(command, false); + }, + + /** */ + addFeatureToTopic: function (topicId, featureType, attributes) { + var command = new AddFeatureToTopicCommand(topicId, featureType, attributes); + this.execute(command); + }, + + /** */ + changeFeatureToTopic: function (topicId, featureId, attributes) { + var command = new ChangeFeatureToTopicCommand(topicId, featureId, attributes); + this.execute(command); + }, + + /** */ + removeFeatureFromTopic: function (topicId, featureId) { + var command = new RemoveFeatureFromTopicCommand(topicId, featureId); + this.execute(command); + }, + + /** */ + execute: function (command) { + this._actionRunner.execute(command); + }, + } +); + +const CommandContext = new Class( + /** @lends CommandContext */ { + /** + * @constructs + * @param {mindplot.Designer} designer + */ + initialize: function (designer) { + $assert(designer, 'designer can not be null'); + this._designer = designer; + }, + + /** */ + findTopics: function (topicsIds) { + $assert($defined(topicsIds), 'topicsIds can not be null'); + if (!(topicsIds instanceof Array)) { + topicsIds = [topicsIds]; + } + + var designerTopics = this._designer.getModel().getTopics(); + var result = designerTopics.filter(function (topic) { + return topicsIds.contains(topic.getId()); + }); + + if (result.length != topicsIds.length) { + var ids = designerTopics.map(function (topic) { + return topic.getId(); + }); + $assert( + result.length == topicsIds.length, + 'Could not find topic. Result:' + + result + + ', Filter Criteria:' + + topicsIds + + ', Current Topics: [' + + ids + + ']' + ); + } + return result; + }, + + /** */ + deleteTopic: function (topic) { + this._designer.removeTopic(topic); + }, + + /** */ + createTopic: function (model) { + $assert(model, 'model can not be null'); + return this._designer.nodeModelToNodeGraph(model); + }, + + /** */ + createModel: function () { + var mindmap = this._designer.getMindmap(); + return mindmap.createNode(NodeModel.MAIN_TOPIC_TYPE); + }, + + /** */ + addTopic: function (topic) { + var mindmap = this._designer.getMindmap(); + return mindmap.addBranch(topic.getModel()); + }, + + /** */ + connect: function (childTopic, parentTopic) { + childTopic.connectTo(parentTopic, this._designer._workspace); + }, + + /** */ + disconnect: function (topic) { + topic.disconnect(this._designer._workspace); + }, + + /** */ + addRelationship: function (model) { + $assert(model, 'model cannot be null'); + return this._designer.addRelationship(model); + }, + + /** */ + deleteRelationship: function (relationship) { + this._designer.deleteRelationship(relationship); + }, + + /** */ + findRelationships: function (relIds) { + $assert($defined(relIds), 'relId can not be null'); + if (!(relIds instanceof Array)) { + relIds = [relIds]; + } + + var designerRel = this._designer.getModel().getRelationships(); + return designerRel.filter(function (rel) { + return relIds.contains(rel.getId()); + }); + }, + + /** */ + moveTopic: function (topic, position) { + $assert(topic, 'topic cannot be null'); + $assert(position, 'position cannot be null'); + EventBus.instance.fireEvent(EventBus.events.NodeMoveEvent, { + node: topic.getModel(), + position: position, + }); + }, + } +); + +export {StandaloneActionDispatcher, CommandContext} diff --git a/packages/mindplot/lib/components/TextEditor.js b/packages/mindplot/lib/components/TextEditor.js new file mode 100644 index 00000000..4e22825b --- /dev/null +++ b/packages/mindplot/lib/components/TextEditor.js @@ -0,0 +1,270 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D() + +const ActionDispatcher = require('./ActionDispatcher').default + +//FIXME: Not used! +const TextEditor = new Class({ + initialize: function (topic) { + this._topic = topic; + }, + + _buildEditor: function () { + + this._size = {width: 500, height: 100}; + var result = new Element('div'); + result.setStyles({ + position: "absolute", + display: "none", + zIndex: "8", + width: "500px", + height: "100px" + } + ); + + + var inputContainer = new Element('div'); + inputContainer.setStyles({ + border: "none", + overflow: "auto" + }); + inputContainer.inject(result); + + var inputText = new Element('input', + { + type: "text", + tabindex: '-1', + value: "" + } + ); + inputText.setStyles({ + border: "none", + background: "transparent" + }); + inputText.inject(inputContainer); + + var spanContainer = new Element('div'); + spanContainer.setStyle('visibility', "hidden"); + spanContainer.inject(result); + + var spanElem = new Element('span', {tabindex: "-1"}); + spanElem.setStyle('white-space', "nowrap"); + spanElem.setStyle('nowrap', 'nowrap'); + spanElem.inject(spanContainer); + + + return result; + }, + + _registerEvents: function (divElem) { + var inputElem = this._getTextareaElem(); + var spanElem = this._getSpanElem(); + var me = this; + + divElem.addEvent('keydown', function (event) { + switch (event.key) { + case 'esc': + me.close(false); + break; + case 'enter': + me.close(true); + break; + default: + spanElem.innerHTML = inputElem.value; + var size = inputElem.value.length + 1; + inputElem.size = size; + if (spanElem.offsetWidth > (parseInt(divElem.style.width) - 100)) { + divElem.style.width = (spanElem.offsetWidth + 100) + "px"; + } + break; + } + event.stopPropagation(); + }); + + // If the user clicks on the input, all event must be ignored ... + divElem.addEvent('click', function (event) { + event.stopPropagation(); + }); + divElem.addEvent('dblclick', function (event) { + event.stopPropagation(); + }); + divElem.addEvent('mousedown', function (event) { + event.stopPropagation(); + }); + }, + + isVisible: function () { + return $defined(this._containerElem) && this._containerElem.getStyle('display') == 'block'; + }, + + _updateModel: function () { + + if (this._topic.getText() != this._getText()) { + var text = this._getText(); + var topicId = this._topic.getId(); + + var actionDispatcher = ActionDispatcher.getInstance(); + actionDispatcher.changeTextToTopic([topicId], text); + } + }, + + show: function (text) { + + if (!this.isVisible()) { + //Create editor ui + var editorElem = this._buildEditor(); + editorElem.inject($(document.body)[0]); + + this._containerElem = editorElem; + this._registerEvents(editorElem); + this._showEditor(text); + } + }, + + _showEditor: function (defaultText) { + + var topic = this._topic; + + // Hide topic text ... + topic.getTextShape().setVisibility(false); + + // Set Editor Style + var nodeText = topic.getTextShape(); + var font = nodeText.getFont(); + font.size = nodeText.getHtmlFontSize(); + font.color = nodeText.getColor(); + this._setStyle(font); + + // Set editor's initial text + var text = $defined(defaultText) ? defaultText : topic.getText(); + this._setText(text); + + var me = this; + // Set editor's initial size + var displayFunc = function () { + // Position the editor and set the size... + var textShape = me._topic.getTextShape(); + + me._containerElem.css('display', 'block'); + + me._containerElem.offset(textShape.getNativePosition()); + // Set size ... + var elemSize = topic.getSize(); + me._setEditorSize(elemSize.width, elemSize.height); + + var textareaElem = me._getTextareaElem(); + textareaElem.focus(); + me._positionCursor(textareaElem, !$defined(defaultText)); + + }; + + displayFunc.delay(10); + }, + + _setStyle: function (fontStyle) { + var inputField = this._getTextareaElem(); + var spanField = this._getSpanElem(); + if (!$defined(fontStyle.font)) { + fontStyle.font = "Arial"; + } + if (!$defined(fontStyle.style)) { + fontStyle.style = "normal"; + } + if (!$defined(fontStyle.weight)) { + fontStyle.weight = "normal"; + } + if (!$defined(fontStyle.size)) { + fontStyle.size = 12; + } + inputField.style.fontSize = fontStyle.size + "px"; + inputField.style.fontFamily = fontStyle.font; + inputField.style.fontStyle = fontStyle.style; + inputField.style.fontWeight = fontStyle.weight; + inputField.style.color = fontStyle.color; + spanField.style.fontFamily = fontStyle.font; + spanField.style.fontStyle = fontStyle.style; + spanField.style.fontWeight = fontStyle.weight; + spanField.style.fontSize = fontStyle.size + "px"; + }, + + _setText: function (text) { + var inputField = this._getTextareaElem(); + inputField.size = text.length + 1; + this._containerElem.style.width = (inputField.size * parseInt(inputField.style.fontSize) + 100) + "px"; + var spanField = this._getSpanElem(); + spanField.innerHTML = text; + inputField.value = text; + }, + + _getText: function () { + return this._getTextareaElem().value; + }, + + _getTextareaElem: function () { + return this._containerElem.getElement('input'); + }, + + _getSpanElem: function () { + return this._containerElem.getElement('span'); + }, + + _setEditorSize: function (width, height) { + var textShape = this._topic.getTextShape(); + var scale = web2d.utils.TransformUtil.workoutScale(textShape._peer); + this._size = {width: width * scale.width, height: height * scale.height}; + this._containerElem.style.width = this._size.width * 2 + "px"; + this._containerElem.style.height = this._size.height + "px"; + }, + + _positionCursor: function (inputElem, selectText) { + // Select text if it's required ... + if (inputElem.createTextRange) //ie + { + var range = inputElem.createTextRange(); + var pos = inputElem.value.length; + if (!selectText) { + range.select(); + range.move("character", pos); + } + else { + range.move("character", pos); + range.select(); + } + } + else if (!selectText) { + inputElem.setSelectionRange(0, inputElem.value.length); + } + }, + + close: function (update) { + if (this.isVisible()) { + // Update changes ... + if (!$defined(update) || update) { + this._updateModel(); + } + + // Let make the visible text in the node visible again ... + this._topic.getTextShape().setVisibility(true); + + // Remove it form the screen ... + this._containerElem.dispose(); + this._containerElem = null; + } + } +}); + +export default TextEditor; diff --git a/packages/mindplot/lib/components/TextEditorFactory.js b/packages/mindplot/lib/components/TextEditorFactory.js new file mode 100644 index 00000000..82e432b5 --- /dev/null +++ b/packages/mindplot/lib/components/TextEditorFactory.js @@ -0,0 +1,31 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const RichTextEditor = require('./Ri') +const TextEditor = require('./TextEditor').default; + +const TextEditorFactory = {}; + +TextEditorFactory.getTextEditorFromName = function (name) { + var editorClass = null; + if (name == "RichTextEditor") { + editorClass = RichTextEditor; + } else { + editorClass = TextEditor; + } + return editorClass; +}; diff --git a/packages/mindplot/lib/components/Topic.js b/packages/mindplot/lib/components/Topic.js new file mode 100644 index 00000000..50e710e6 --- /dev/null +++ b/packages/mindplot/lib/components/Topic.js @@ -0,0 +1,1386 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D() +const NodeGraph = require('./NodeGraph').default; +const { TopicShape } = require('./model/INodeModel'); +const TopicStyle = require('./TopicStyle').default; +const TopicFeature = require('./TopicFeature').default; +const ConnectionLine = require('./ConnectionLine').default; +const IconGroup = require('./IconGroup').default; +const FadeEffect = require('./util/FadeEffect').default; +const EventBus = require('./layout/EventBus').default; +const ShirinkConnector = require('./ShrinkConnector').default; +const NoteEditor = require('./widget/NoteEditor').default; +const ActionDispatcher = require('./ActionDispatcher').default; +const LinkEditor = require('./widget/LinkEditor').default; +const TopicEventDispatcher = require('./TopicEventDispatcher').default; +const INodeModel = require('./model/INodeModel').default; + +const Topic = new Class( + /** @lends Topic */ { + Extends: NodeGraph, + /** + * @extends mindplot.NodeGraph + * @constructs + * @param model + * @param options + */ + initialize: function (model, options) { + this.parent(model, options); + this._children = []; + this._parent = null; + this._relationships = []; + this._isInWorkspace = false; + this._buildTopicShape(); + + // Position a topic .... + var pos = model.getPosition(); + if (pos != null && this.isCentralTopic()) { + this.setPosition(pos); + } + + // Register events for the topic ... + if (!this.isReadOnly()) { + this._registerEvents(); + } + }, + + _registerEvents: function () { + this.setMouseEventsEnabled(true); + + // Prevent click on the topics being propagated ... + this.addEvent('click', function (event) { + event.stopPropagation(); + }); + var me = this; + this.addEvent('dblclick', function (event) { + me._getTopicEventDispatcher().show(me); + event.stopPropagation(); + }); + }, + + /** + * @param {String} type the topic shape type + * @see {@link mindplot.model.INodeModel} + */ + setShapeType: function (type) { + this._setShapeType(type, true); + }, + + /** @return {mindplot.Topic} parent topic */ + getParent: function () { + return this._parent; + }, + + _setShapeType: function (type, updateModel) { + // Remove inner shape figure ... + var model = this.getModel(); + if ($defined(updateModel) && updateModel) { + model.setShapeType(type); + } + + var oldInnerShape = this.getInnerShape(); + if (oldInnerShape != null) { + this._removeInnerShape(); + + // Create a new one ... + var innerShape = this.getInnerShape(); + + // Update figure size ... + var size = this.getSize(); + this.setSize(size, true); + + var group = this.get2DElement(); + group.append(innerShape); + + // Move text to the front ... + var text = this.getTextShape(); + text.moveToFront(); + + //Move iconGroup to front ... + var iconGroup = this.getIconGroup(); + if ($defined(iconGroup)) { + iconGroup.moveToFront(); + } + + //Move connector to front + var connector = this.getShrinkConnector(); + if ($defined(connector)) { + connector.moveToFront(); + } + } + }, + + /** @return {String} topic shape type */ + getShapeType: function () { + var model = this.getModel(); + var result = model.getShapeType(); + if (!$defined(result)) { + result = TopicStyle.defaultShapeType(this); + } + return result; + }, + + _removeInnerShape: function () { + var group = this.get2DElement(); + var innerShape = this.getInnerShape(); + group.removeChild(innerShape); + this._innerShape = null; + return innerShape; + }, + + /** @return {web2d.Line|web2d.Rect|web2d.Image} inner shape of the topic */ + getInnerShape: function () { + if (!$defined(this._innerShape)) { + // Create inner box. + this._innerShape = this._buildShape( + Topic.INNER_RECT_ATTRIBUTES, + this.getShapeType() + ); + + // Update bgcolor ... + var bgColor = this.getBackgroundColor(); + this._setBackgroundColor(bgColor, false); + + // Update border color ... + var brColor = this.getBorderColor(); + this._setBorderColor(brColor, false); + + // Define the pointer ... + if (!this.isCentralTopic() && !this.isReadOnly()) { + this._innerShape.setCursor('move'); + } else { + this._innerShape.setCursor('default'); + } + } + return this._innerShape; + }, + + _buildShape: function (attributes, shapeType) { + $assert(attributes, 'attributes can not be null'); + $assert(shapeType, 'shapeType can not be null'); + + var result; + if (shapeType == TopicShape.RECTANGLE) { + result = new web2d.Rect(0, attributes); + } else if (shapeType == TopicShape.IMAGE) { + var model = this.getModel(); + var url = model.getImageUrl(); + var size = model.getImageSize(); + + result = new web2d.Image(); + result.setHref(url); + result.setSize(size.width, size.height); + + result.getSize = function () { + return model.getImageSize(); + }; + + result.setPosition = function () {}; + } else if (shapeType == TopicShape.ELLIPSE) { + result = new web2d.Rect(0.9, attributes); + } else if (shapeType == TopicShape.ROUNDED_RECT) { + result = new web2d.Rect(0.3, attributes); + } else if (shapeType == TopicShape.LINE) { + result = new web2d.Line({ strokeColor: '#495879', strokeWidth: 1 }); + result.setSize = function (width, height) { + this.size = { width: width, height: height }; + result.setFrom(0, height); + result.setTo(width, height); + + // Lines will have the same color of the default connection lines... + var stokeColor = ConnectionLine.getStrokeColor(); + result.setStroke(1, 'solid', stokeColor); + }; + + result.getSize = function () { + return this.size; + }; + + result.setPosition = function () {}; + + result.setFill = function () {}; + + result.setStroke = function () {}; + } else { + $assert(false, 'Unsupported figure shapeType:' + shapeType); + } + result.setPosition(0, 0); + return result; + }, + + /** @param {String} type the cursor type, either 'pointer', 'default' or 'move' */ + setCursor: function (type) { + var innerShape = this.getInnerShape(); + innerShape.setCursor(type); + + var outerShape = this.getOuterShape(); + outerShape.setCursor(type); + + var textShape = this.getTextShape(); + textShape.setCursor(type); + }, + + /** @return outer shape */ + getOuterShape: function () { + if (!$defined(this._outerShape)) { + var rect = this._buildShape( + Topic.OUTER_SHAPE_ATTRIBUTES, + TopicShape.ROUNDED_RECT + ); + rect.setPosition(-2, -3); + rect.setOpacity(0); + this._outerShape = rect; + } + + return this._outerShape; + }, + + /** @return text shape */ + getTextShape: function () { + if (!$defined(this._text)) { + this._text = this._buildTextShape(false); + + // Set Text ... + var text = this.getText(); + this._setText(text, false); + } + + return this._text; + }, + + /** @return icon group */ + getOrBuildIconGroup: function () { + if (!$defined(this._iconsGroup)) { + this._iconsGroup = this._buildIconGroup(); + var group = this.get2DElement(); + group.append(this._iconsGroup.getNativeElement()); + this._iconsGroup.moveToFront(); + } + return this._iconsGroup; + }, + + /** */ + getIconGroup: function () { + return this._iconsGroup; + }, + + _buildIconGroup: function () { + var textHeight = this.getTextShape().getFontHeight(); + var result = new IconGroup(this.getId(), textHeight); + var padding = TopicStyle.getInnerPadding(this); + result.setPosition(padding, padding); + + // Load topic features ... + var model = this.getModel(); + var featuresModel = model.getFeatures(); + for (var i = 0; i < featuresModel.length; i++) { + var featureModel = featuresModel[i]; + var icon = TopicFeature.createIcon(this, featureModel, this.isReadOnly()); + result.addIcon( + icon, + featureModel.getType() == TopicFeature.Icon.id && !this.isReadOnly() + ); + } + + return result; + }, + + /** + * assigns the new feature model to the topic's node model and adds the respective icon + * @param {mindplot.model.FeatureModel} featureModel + * @return {mindplot.Icon} the icon corresponding to the feature model + */ + addFeature: function (featureModel) { + var iconGroup = this.getOrBuildIconGroup(); + this.closeEditors(); + + // Update model ... + var model = this.getModel(); + model.addFeature(featureModel); + + var result = TopicFeature.createIcon(this, featureModel, this.isReadOnly()); + iconGroup.addIcon( + result, + featureModel.getType() == TopicFeature.Icon.id && !this.isReadOnly() + ); + + this._adjustShapes(); + return result; + }, + + /** */ + findFeatureById: function (id) { + var model = this.getModel(); + return model.findFeatureById(id); + }, + + /** */ + removeFeature: function (featureModel) { + $assert(featureModel, 'featureModel could not be null'); + + //Removing the icon from MODEL + var model = this.getModel(); + model.removeFeature(featureModel); + + //Removing the icon from UI + var iconGroup = this.getIconGroup(); + if ($defined(iconGroup)) { + iconGroup.removeIconByModel(featureModel); + } + this._adjustShapes(); + }, + + /** */ + addRelationship: function (relationship) { + this._relationships.push(relationship); + }, + + /** */ + deleteRelationship: function (relationship) { + this._relationships.erase(relationship); + }, + + /** */ + getRelationships: function () { + return this._relationships; + }, + + _buildTextShape: function (readOnly) { + var result = new web2d.Text(); + var family = this.getFontFamily(); + var size = this.getFontSize(); + var weight = this.getFontWeight(); + var style = this.getFontStyle(); + result.setFont(family, size, style, weight); + + var color = this.getFontColor(); + result.setColor(color); + + if (!readOnly) { + // Propagate mouse events ... + if (!this.isCentralTopic()) { + result.setCursor('move'); + } else { + result.setCursor('default'); + } + } + + return result; + }, + + /** */ + setFontFamily: function (value, updateModel) { + var textShape = this.getTextShape(); + textShape.setFontFamily(value); + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setFontFamily(value); + } + this._adjustShapes(updateModel); + }, + + /** */ + setFontSize: function (value, updateModel) { + var textShape = this.getTextShape(); + textShape.setSize(value); + + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setFontSize(value); + } + this._adjustShapes(updateModel); + }, + + /** */ + setFontStyle: function (value, updateModel) { + var textShape = this.getTextShape(); + textShape.setStyle(value); + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setFontStyle(value); + } + this._adjustShapes(updateModel); + }, + + /** */ + setFontWeight: function (value, updateModel) { + var textShape = this.getTextShape(); + textShape.setWeight(value); + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setFontWeight(value); + } + this._adjustShapes(); + }, + + /** */ + getFontWeight: function () { + var model = this.getModel(); + var result = model.getFontWeight(); + if (!$defined(result)) { + var font = TopicStyle.defaultFontStyle(this); + result = font.weight; + } + return result; + }, + + /** */ + getFontFamily: function () { + var model = this.getModel(); + var result = model.getFontFamily(); + if (!$defined(result)) { + var font = TopicStyle.defaultFontStyle(this); + result = font.font; + } + return result; + }, + + /** */ + getFontColor: function () { + var model = this.getModel(); + var result = model.getFontColor(); + if (!$defined(result)) { + var font = TopicStyle.defaultFontStyle(this); + result = font.color; + } + return result; + }, + + /** */ + getFontStyle: function () { + var model = this.getModel(); + var result = model.getFontStyle(); + if (!$defined(result)) { + var font = TopicStyle.defaultFontStyle(this); + result = font.style; + } + return result; + }, + + /** */ + getFontSize: function () { + var model = this.getModel(); + var result = model.getFontSize(); + if (!$defined(result)) { + var font = TopicStyle.defaultFontStyle(this); + result = font.size; + } + return result; + }, + + /** */ + setFontColor: function (value, updateModel) { + var textShape = this.getTextShape(); + textShape.setColor(value); + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setFontColor(value); + } + }, + + _setText: function (text, updateModel) { + var textShape = this.getTextShape(); + textShape.setText(text == null ? TopicStyle.defaultText(this) : text); + + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setText(text); + } + }, + + /** */ + setText: function (text) { + // Avoid empty nodes ... + if (!text || $.trim(text).length == 0) { + text = null; + } + + this._setText(text, true); + this._adjustShapes(); + }, + + /** */ + getText: function () { + var model = this.getModel(); + var result = model.getText(); + if (!$defined(result)) { + result = TopicStyle.defaultText(this); + } + return result; + }, + + /** */ + setBackgroundColor: function (color) { + this._setBackgroundColor(color, true); + }, + + _setBackgroundColor: function (color, updateModel) { + var innerShape = this.getInnerShape(); + innerShape.setFill(color); + + var connector = this.getShrinkConnector(); + if (connector) { + connector.setFill(color); + } + + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setBackgroundColor(color); + } + }, + + /** */ + getBackgroundColor: function () { + var model = this.getModel(); + var result = model.getBackgroundColor(); + if (!$defined(result)) { + result = TopicStyle.defaultBackgroundColor(this); + } + return result; + }, + + /** */ + setBorderColor: function (color) { + this._setBorderColor(color, true); + }, + + _setBorderColor: function (color, updateModel) { + var innerShape = this.getInnerShape(); + innerShape.setAttribute('strokeColor', color); + + var connector = this.getShrinkConnector(); + if (connector) { + connector.setAttribute('strokeColor', color); + } + + if ($defined(updateModel) && updateModel) { + var model = this.getModel(); + model.setBorderColor(color); + } + }, + + /** */ + getBorderColor: function () { + var model = this.getModel(); + var result = model.getBorderColor(); + if (!$defined(result)) { + result = TopicStyle.defaultBorderColor(this); + } + return result; + }, + + _buildTopicShape: function () { + var groupAttributes = { + width: 100, + height: 100, + coordSizeWidth: 100, + coordSizeHeight: 100, + }; + var group = new web2d.Group(groupAttributes); + this._set2DElement(group); + + // Shape must be build based on the model width ... + var outerShape = this.getOuterShape(); + var innerShape = this.getInnerShape(); + var textShape = this.getTextShape(); + + // Add to the group ... + group.append(outerShape); + group.append(innerShape); + group.append(textShape); + + // Update figure size ... + var model = this.getModel(); + if (model.getFeatures().length != 0) { + this.getOrBuildIconGroup(); + } + + var shrinkConnector = this.getShrinkConnector(); + if ($defined(shrinkConnector)) { + shrinkConnector.addToWorkspace(group); + } + + // Register listeners ... + this._registerDefaultListenersToElement(group, this); + }, + + _registerDefaultListenersToElement: function (elem, topic) { + var mouseOver = function (event) { + if (topic.isMouseEventsEnabled()) { + topic.handleMouseOver(event); + } + }; + elem.addEvent('mouseover', mouseOver); + + var outout = function (event) { + if (topic.isMouseEventsEnabled()) { + topic.handleMouseOut(event); + } + }; + elem.addEvent('mouseout', outout); + + var me = this; + // Focus events ... + elem.addEvent('mousedown', function (event) { + if (!me.isReadOnly()) { + // Disable topic selection of readOnly mode ... + var value = true; + if ( + (event.metaKey && Browser.Platform.mac) || + (event.ctrlKey && !Browser.Platform.mac) + ) { + value = !me.isOnFocus(); + event.stopPropagation(); + event.preventDefault(); + } + topic.setOnFocus(value); + } + + var eventDispatcher = me._getTopicEventDispatcher(); + eventDispatcher.process(TopicEvent.CLICK, me); + event.stopPropagation(); + }); + }, + + /** */ + areChildrenShrunken: function () { + var model = this.getModel(); + return model.areChildrenShrunken() && !this.isCentralTopic(); + }, + + /** */ + isCollapsed: function () { + var result = false; + + var current = this.getParent(); + while (current && !result) { + result = current.areChildrenShrunken(); + current = current.getParent(); + } + return result; + }, + + /** */ + setChildrenShrunken: function (value) { + // Update Model ... + var model = this.getModel(); + model.setChildrenShrunken(value); + + // Change render base on the state. + var shrinkConnector = this.getShrinkConnector(); + if ($defined(shrinkConnector)) { + shrinkConnector.changeRender(value); + } + + // Do some fancy animation .... + var elements = this._flatten2DElements(this); + var fade = new FadeEffect(elements, !value); + var me = this; + fade.addEvent('complete', function () { + // Set focus on the parent node ... + if (value) { + me.setOnFocus(true); + } + + // Set focus in false for all the children ... + elements.forEach(function (elem) { + if (elem.setOnFocus) { + elem.setOnFocus(false); + } + }); + }); + fade.start(); + + EventBus.instance.fireEvent(EventBus.events.NodeShrinkEvent, model); + }, + + /** */ + getShrinkConnector: function () { + var result = this._connector; + if (this._connector == null) { + this._connector = new ShirinkConnector(this); + this._connector.setVisibility(false); + result = this._connector; + } + return result; + }, + + /** */ + handleMouseOver: function () { + var outerShape = this.getOuterShape(); + outerShape.setOpacity(1); + }, + + /** */ + handleMouseOut: function () { + var outerShape = this.getOuterShape(); + if (!this.isOnFocus()) { + outerShape.setOpacity(0); + } + }, + + /** */ + showTextEditor: function (text) { + this._getTopicEventDispatcher().show(this, { text: text }); + }, + + /** */ + showNoteEditor: function () { + var topicId = this.getId(); + var model = this.getModel(); + var editorModel = { + getValue: function () { + var notes = model.findFeatureByType(TopicFeature.Note.id); + var result; + if (notes.length > 0) result = notes[0].getText(); + + return result; + }, + + setValue: function (value) { + var dispatcher = ActionDispatcher.getInstance(); + var notes = model.findFeatureByType(TopicFeature.Note.id); + if (!$defined(value)) { + var featureId = notes[0].getId(); + dispatcher.removeFeatureFromTopic(topicId, featureId); + } else { + if (notes.length > 0) { + dispatcher.changeFeatureToTopic(topicId, notes[0].getId(), { + text: value, + }); + } else { + dispatcher.addFeatureToTopic(topicId, TopicFeature.Note.id, { + text: value, + }); + } + } + }, + }; + var editor = new NoteEditor(editorModel); + this.closeEditors(); + editor.show(); + }, + + /** opens a dialog where the user can enter or edit an existing link associated with this topic */ + showLinkEditor: function () { + var topicId = this.getId(); + var model = this.getModel(); + var editorModel = { + getValue: function () { + //@param {mindplot.model.LinkModel[]} links + var links = model.findFeatureByType(TopicFeature.Link.id); + var result; + if (links.length > 0) result = links[0].getUrl(); + + return result; + }, + + setValue: function (value) { + var dispatcher = ActionDispatcher.getInstance(); + var links = model.findFeatureByType(TopicFeature.Link.id); + if (!$defined(value)) { + var featureId = links[0].getId(); + dispatcher.removeFeatureFromTopic(topicId, featureId); + } else { + if (links.length > 0) { + dispatcher.changeFeatureToTopic(topicId, links[0].getId(), { + url: value, + }); + } else { + dispatcher.addFeatureToTopic(topicId, TopicFeature.Link.id, { + url: value, + }); + } + } + }, + }; + + this.closeEditors(); + var editor = new LinkEditor(editorModel); + editor.show(); + }, + + /** */ + closeEditors: function () { + this._getTopicEventDispatcher().close(true); + }, + + _getTopicEventDispatcher: function () { + return TopicEventDispatcher.getInstance(); + }, + + /** + * Point: references the center of the rect shape.!!! + */ + setPosition: function (point) { + $assert(point, 'position can not be null'); + point.x = Math.ceil(point.x); + point.y = Math.ceil(point.y); + + // Update model's position ... + var model = this.getModel(); + model.setPosition(point.x, point.y); + + // Elements are positioned in the center. + // All topic element must be positioned based on the innerShape. + var size = this.getSize(); + + var cx = point.x - size.width / 2; + var cy = point.y - size.height / 2; + + // Update visual position. + this._elem2d.setPosition(cx, cy); + + // Update connection lines ... + this._updateConnectionLines(); + + // Check object state. + this.invariant(); + }, + + /** */ + getOutgoingLine: function () { + return this._outgoingLine; + }, + + /** */ + getIncomingLines: function () { + var result = []; + var children = this.getChildren(); + for (var i = 0; i < children.length; i++) { + var node = children[i]; + var line = node.getOutgoingLine(); + if ($defined(line)) { + result.push(line); + } + } + return result; + }, + + /** */ + getOutgoingConnectedTopic: function () { + var result = null; + var line = this.getOutgoingLine(); + if ($defined(line)) { + result = line.getTargetTopic(); + } + return result; + }, + + _updateConnectionLines: function () { + // Update this to parent line ... + var outgoingLine = this.getOutgoingLine(); + if ($defined(outgoingLine)) { + outgoingLine.redraw(); + } + + // Update all the incoming lines ... + var incomingLines = this.getIncomingLines(); + for (var i = 0; i < incomingLines.length; i++) { + incomingLines[i].redraw(); + } + + // Update relationship lines + for (var j = 0; j < this._relationships.length; j++) { + this._relationships[j].redraw(); + } + }, + + /** */ + setBranchVisibility: function (value) { + var current = this; + var parent = this; + while (parent != null && !parent.isCentralTopic()) { + current = parent; + parent = current.getParent(); + } + current.setVisibility(value); + }, + + /** */ + setVisibility: function (value) { + this._setTopicVisibility(value); + + // Hide all children... + this._setChildrenVisibility(value); + + // If there there are connection to the node, topic must be hidden. + this._setRelationshipLinesVisibility(value); + + // If it's connected, the connection must be rendered. + var outgoingLine = this.getOutgoingLine(); + if (outgoingLine) { + outgoingLine.setVisibility(value); + } + }, + + /** */ + moveToBack: function () { + // Update relationship lines + for (var j = 0; j < this._relationships.length; j++) { + this._relationships[j].moveToBack(); + } + var connector = this.getShrinkConnector(); + if ($defined(connector)) { + connector.moveToBack(); + } + + this.get2DElement().moveToBack(); + }, + + /** */ + moveToFront: function () { + this.get2DElement().moveToFront(); + var connector = this.getShrinkConnector(); + if ($defined(connector)) { + connector.moveToFront(); + } + // Update relationship lines + for (var j = 0; j < this._relationships.length; j++) { + this._relationships[j].moveToFront(); + } + }, + + /** */ + isVisible: function () { + var elem = this.get2DElement(); + return elem.isVisible(); + }, + + _setRelationshipLinesVisibility: function (value) { + _.each(this._relationships, function (relationship) { + var sourceTopic = relationship.getSourceTopic(); + var targetTopic = relationship.getTargetTopic(); + + var targetParent = targetTopic.getModel().getParent(); + var sourceParent = sourceTopic.getModel().getParent(); + relationship.setVisibility( + value && + (targetParent == null || !targetParent.areChildrenShrunken()) && + (sourceParent == null || !sourceParent.areChildrenShrunken()) + ); + }); + }, + + _setTopicVisibility: function (value) { + var elem = this.get2DElement(); + elem.setVisibility(value); + + if (this.getIncomingLines().length > 0) { + var connector = this.getShrinkConnector(); + if ($defined(connector)) { + connector.setVisibility(value); + } + } + + var textShape = this.getTextShape(); + textShape.setVisibility( + this.getShapeType() != TopicShape.IMAGE ? value : false + ); + }, + + /** */ + setOpacity: function (opacity) { + var elem = this.get2DElement(); + elem.setOpacity(opacity); + + var connector = this.getShrinkConnector(); + if ($defined(connector)) { + connector.setOpacity(opacity); + } + var textShape = this.getTextShape(); + textShape.setOpacity(opacity); + }, + + _setChildrenVisibility: function (isVisible) { + // Hide all children. + var children = this.getChildren(); + var model = this.getModel(); + + isVisible = isVisible ? !model.areChildrenShrunken() : isVisible; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + child.setVisibility(isVisible); + + var outgoingLine = child.getOutgoingLine(); + outgoingLine.setVisibility(isVisible); + } + }, + + /** */ + invariant: function () { + var line = this._outgoingLine; + var model = this.getModel(); + var isConnected = model.isConnected(); + + // Check consistency... + if ((isConnected && !line) || (!isConnected && line)) { + // $assert(false,'Illegal state exception.'); + } + }, + + /** */ + setSize: function (size, force) { + $assert(size, 'size can not be null'); + $assert($defined(size.width), 'size seem not to be a valid element'); + size = { width: Math.ceil(size.width), height: Math.ceil(size.height) }; + + var oldSize = this.getSize(); + var hasSizeChanged = oldSize.width != size.width || oldSize.height != size.height; + if (hasSizeChanged || force) { + NodeGraph.prototype.setSize.call(this, size); + + var outerShape = this.getOuterShape(); + var innerShape = this.getInnerShape(); + + outerShape.setSize(size.width + 4, size.height + 6); + innerShape.setSize(size.width, size.height); + + // Update the figure position(ej: central topic must be centered) and children position. + this._updatePositionOnChangeSize(oldSize, size); + + if (hasSizeChanged) { + EventBus.instance.fireEvent(EventBus.events.NodeResizeEvent, { + node: this.getModel(), + size: size, + }); + } + } + }, + + _updatePositionOnChangeSize: function () { + $assert(false, 'this method must be overwrited.'); + }, + + /** */ + disconnect: function (workspace) { + var outgoingLine = this.getOutgoingLine(); + if ($defined(outgoingLine)) { + $assert(workspace, 'workspace can not be null'); + + this._outgoingLine = null; + + // Disconnect nodes ... + var targetTopic = outgoingLine.getTargetTopic(); + targetTopic.removeChild(this); + + // Update model ... + var childModel = this.getModel(); + childModel.disconnect(); + + this._parent = null; + + // Remove graphical element from the workspace... + outgoingLine.removeFromWorkspace(workspace); + + // Remove from workspace. + EventBus.instance.fireEvent( + EventBus.events.NodeDisconnectEvent, + this.getModel() + ); + + // Change text based on the current connection ... + var model = this.getModel(); + if (!model.getText()) { + var text = this.getText(); + this._setText(text, false); + } + if (!model.getFontSize()) { + var size = this.getFontSize(); + this.setFontSize(size, false); + } + + // Hide connection line?. + if (targetTopic.getChildren().length == 0) { + var connector = targetTopic.getShrinkConnector(); + if ($defined(connector)) { + connector.setVisibility(false); + } + } + } + }, + + /** */ + getOrder: function () { + var model = this.getModel(); + return model.getOrder(); + }, + + /** */ + setOrder: function (value) { + var model = this.getModel(); + model.setOrder(value); + }, + + /** */ + connectTo: function (targetTopic, workspace) { + $assert(!this._outgoingLine, 'Could not connect an already connected node'); + $assert(targetTopic != this, 'Circular connection are not allowed'); + $assert(targetTopic, 'Parent Graph can not be null'); + $assert(workspace, 'Workspace can not be null'); + + // Connect Graphical Nodes ... + targetTopic.append(this); + this._parent = targetTopic; + + // Update model ... + var targetModel = targetTopic.getModel(); + var childModel = this.getModel(); + childModel.connectTo(targetModel); + + // Create a connection line ... + var outgoingLine = new ConnectionLine(this, targetTopic); + outgoingLine.setVisibility(false); + + this._outgoingLine = outgoingLine; + workspace.append(outgoingLine); + + // Update figure is necessary. + this.updateTopicShape(targetTopic); + + // Change text based on the current connection ... + var model = this.getModel(); + if (!model.getText()) { + var text = this.getText(); + this._setText(text, false); + } + if (!model.getFontSize()) { + var size = this.getFontSize(); + this.setFontSize(size, false); + } + this.getTextShape(); + + // Display connection node... + var connector = targetTopic.getShrinkConnector(); + if ($defined(connector)) { + connector.setVisibility(true); + } + + // Redraw line ... + outgoingLine.redraw(); + + // Fire connection event ... + if (this.isInWorkspace()) { + EventBus.instance.fireEvent(EventBus.events.NodeConnectEvent, { + parentNode: targetTopic.getModel(), + childNode: this.getModel(), + }); + } + }, + + /** */ + append: function (child) { + var children = this.getChildren(); + children.push(child); + }, + + /** */ + removeChild: function (child) { + var children = this.getChildren(); + children.erase(child); + }, + + /** */ + getChildren: function () { + var result = this._children; + if (!$defined(result)) { + this._children = []; + result = this._children; + } + return result; + }, + + /** */ + removeFromWorkspace: function (workspace) { + var elem2d = this.get2DElement(); + workspace.removeChild(elem2d); + var line = this.getOutgoingLine(); + if ($defined(line)) { + workspace.removeChild(line); + } + this._isInWorkspace = false; + EventBus.instance.fireEvent( + EventBus.events.NodeRemoved, + this.getModel() + ); + }, + + /** */ + addToWorkspace: function (workspace) { + var elem = this.get2DElement(); + workspace.append(elem); + if (!this.isInWorkspace()) { + if (!this.isCentralTopic()) { + EventBus.instance.fireEvent( + EventBus.events.NodeAdded, + this.getModel() + ); + } + + if (this.getModel().isConnected()) + EventBus.instance.fireEvent( + EventBus.events.NodeConnectEvent, + { + parentNode: this.getOutgoingConnectedTopic().getModel(), + childNode: this.getModel(), + } + ); + } + this._isInWorkspace = true; + this._adjustShapes(); + }, + + /** */ + isInWorkspace: function () { + return this._isInWorkspace; + }, + + /** */ + createDragNode: function (layoutManager) { + var result = this.parent(layoutManager); + + // Is the node already connected ? + var targetTopic = this.getOutgoingConnectedTopic(); + if ($defined(targetTopic)) { + result.connectTo(targetTopic); + result.setVisibility(false); + } + + // If a drag node is create for it, let's hide the editor. + this._getTopicEventDispatcher().close(); + + return result; + }, + + _adjustShapes: function () { + if (this._isInWorkspace) { + var textShape = this.getTextShape(); + if (this.getShapeType() != TopicShape.IMAGE) { + var textWidth = textShape.getWidth(); + + var textHeight = textShape.getHeight(); + textHeight = textHeight != 0 ? textHeight : 20; + + var topicPadding = TopicStyle.getInnerPadding(this); + + // Adjust the icon size to the size of the text ... + var iconGroup = this.getOrBuildIconGroup(); + var fontHeight = this.getTextShape().getFontHeight(); + iconGroup.setPosition(topicPadding, topicPadding); + iconGroup.seIconSize(fontHeight, fontHeight); + + // Add a extra padding between the text and the icons + var iconsWidth = iconGroup.getSize().width; + if (iconsWidth != 0) { + iconsWidth = iconsWidth + textHeight / 4; + } + + var height = textHeight + topicPadding * 2; + var width = textWidth + iconsWidth + topicPadding * 2; + + this.setSize({ width: width, height: height }); + + // Position node ... + textShape.setPosition(topicPadding + iconsWidth, topicPadding); + } else { + // In case of images, the size if fixed ... + var size = this.getModel().getImageSize(); + this.setSize(size); + } + } + }, + + _flatten2DElements: function (topic) { + var result = []; + + var children = topic.getChildren(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + result.push(child); + result.push(child.getOutgoingLine()); + + var relationships = child.getRelationships(); + result = result.concat(relationships); + + if (!child.areChildrenShrunken()) { + var innerChilds = this._flatten2DElements(child); + result = result.concat(innerChilds); + } + } + return result; + }, + + /** + * @param childTopic + * @return {Boolean} true if childtopic is a child topic of this topic or the topic itself + */ + isChildTopic: function (childTopic) { + var result = this.getId() == childTopic.getId(); + if (!result) { + var children = this.getChildren(); + for (var i = 0; i < children.length; i++) { + var parent = children[i]; + result = parent.isChildTopic(childTopic); + if (result) { + break; + } + } + } + return result; + }, + + /** @return {Boolean} true if the topic is the central topic of the map */ + isCentralTopic: function () { + return this.getModel().getType() == INodeModel.CENTRAL_TOPIC_TYPE; + }, + } +); + +/** + * @constant + * @type {Number} + * @default + */ +Topic.CONNECTOR_WIDTH = 6; +/** + * @constant + * @type {Object} + * @default + */ +Topic.OUTER_SHAPE_ATTRIBUTES = { + fillColor: 'rgb(252,235,192)', + stroke: '1 dot rgb(241,163,39)', + x: 0, + y: 0, +}; +/** + * @constant + * @type {Object} + * @default + */ +Topic.OUTER_SHAPE_ATTRIBUTES_FOCUS = { fillColor: 'rgb(244,184,45)', x: 0, y: 0 }; +/** + * @constant + * @type {Object} + * @default + * */ +Topic.INNER_RECT_ATTRIBUTES = { stroke: '2 solid' }; + +export default Topic; diff --git a/packages/mindplot/lib/components/TopicEventDispatcher.js b/packages/mindplot/lib/components/TopicEventDispatcher.js new file mode 100644 index 00000000..36a22302 --- /dev/null +++ b/packages/mindplot/lib/components/TopicEventDispatcher.js @@ -0,0 +1,87 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('./Events').default; +const MultilineTextEditor = require('./MultilineTextEditor').default; +const TopicEvent = require('./Topic'); +const { TopicShape } = require('./model/INodeModel'); + +const TopicEventDispatcher = new Class({ + Extends: Events, + Static: { + _instance: null, + + configure: function (readOnly) { + this._instance = new TopicEventDispatcher(readOnly); + }, + + getInstance: function () { + return this._instance; + }, + }, + + initialize: function (readOnly) { + this._readOnly = readOnly; + this._activeEditor = null; + this._multilineEditor = new MultilineTextEditor(); + }, + + close: function (update) { + if (this.isVisible()) { + this._activeEditor.close(update); + this._activeEditor = null; + } + }, + + show: function (topic, options) { + this.process(TopicEvent.EDIT, topic, options); + }, + + process: function (eventType, topic, options) { + $assert(eventType, 'eventType can not be null'); + + // Close all previous open editor .... + if (this.isVisible()) { + this.close(); + } + + // Open the new editor ... + var model = topic.getModel(); + if ( + model.getShapeType() != TopicShape.IMAGE && + !this._readOnly && + eventType == TopicEvent.EDIT + ) { + this._multilineEditor.show(topic, options ? options.text : null); + this._activeEditor = this._multilineEditor; + } else { + this.fireEvent(eventType, { model: model, readOnly: this._readOnly }); + } + }, + + isVisible: function () { + return this._activeEditor != null && this._activeEditor.isVisible(); + }, +}); + +TopicEvent = { + EDIT: 'editnode', + CLICK: 'clicknode', +}; + +export { TopicEvent }; +export default TopicEvent; diff --git a/packages/mindplot/lib/components/TopicFeature.js b/packages/mindplot/lib/components/TopicFeature.js new file mode 100644 index 00000000..84e718e1 --- /dev/null +++ b/packages/mindplot/lib/components/TopicFeature.js @@ -0,0 +1,98 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** */ +const IconModel = require('./model/IconModel').default; +const ImageIcon = require('./ImageIcon').default; +const LinkModel = require('./model/LinkModel').default; +const LinkIcon = require('./LinkIcon').default; +const NoteModel = require('./model/NoteModel').default; +const NoteIcon = require('./NoteIcon').default; + +const TopicFeature = { + /** the icon object */ + Icon: { + id: IconModel.FEATURE_TYPE, + model: IconModel, + icon: ImageIcon + }, + + /** the link object */ + Link: { + id: LinkModel.FEATURE_TYPE, + model: LinkModel, + icon: LinkIcon + }, + + /** the note object */ + Note: { + id: NoteModel.FEATURE_TYPE, + model: NoteModel, + icon: NoteIcon + }, + + /** + * @param id the feature metadata id + * @return {Boolean} returns true if the given id is contained in the metadata array + */ + isSupported: function (id) { + return TopicFeature._featuresMetadataById.some(function (elem) { + return elem.id == id; + }); + }, + + /** + * @param type + * @param attributes + * @throws will throw an error if type is null or undefined + * @throws will throw an error if attributes is null or undefined + * @return {mindplot.model.FeatureModel} a new instance of the feature model subclass matching + * the topic feature + */ + createModel: function (type, attributes) { + $assert(type, 'type can not be null'); + $assert(attributes, 'attributes can not be null'); + + var model = TopicFeature._featuresMetadataById.filter(function (elem) { + return elem.id == type; + })[0].model; + return new model(attributes); + }, + + /** + * @param {mindplot.Topic} topic + * @param {mindplot.model.FeatureModel} model + * @param {Boolean} readOnly true if the editor is running in read-only mode + * @throws will throw an error if topic is null or undefined + * @throws will throw an error if model is null or undefined + * @return {mindplot.Icon} a new instance of the icon subclass matching the topic feature + */ + createIcon: function (topic, model, readOnly) { + $assert(topic, 'topic can not be null'); + $assert(model, 'model can not be null'); + + var icon = TopicFeature._featuresMetadataById.filter(function (elem) { + return elem.id == model.getType(); + })[0].icon; + return new icon(topic, model, readOnly); + } +}; + +TopicFeature._featuresMetadataById = [TopicFeature.Icon, TopicFeature.Link, TopicFeature.Note]; + +export default TopicFeature; diff --git a/packages/mindplot/lib/components/TopicStyle.js b/packages/mindplot/lib/components/TopicStyle.js new file mode 100644 index 00000000..60079f94 --- /dev/null +++ b/packages/mindplot/lib/components/TopicStyle.js @@ -0,0 +1,132 @@ +/* + * Copyright [2011] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const { TopicShape } = require('./model/INodeModel'); + +const TopicStyle = new Class({ + Static: { + _getStyles: function (topic) { + $assert(topic, 'topic can not be null'); + + var result; + if (topic.isCentralTopic()) { + result = TopicStyle.STYLES.CENTRAL_TOPIC; + } else { + var targetTopic = topic.getOutgoingConnectedTopic(); + if ($defined(targetTopic)) { + if (targetTopic.isCentralTopic()) { + result = TopicStyle.STYLES.MAIN_TOPIC; + } else { + result = TopicStyle.STYLES.SUB_TOPIC; + } + } else { + result = TopicStyle.STYLES.ISOLATED_TOPIC; + } + } + return result; + }, + + defaultText: function (topic) { + var msgKey = this._getStyles(topic).msgKey; + return $msg(msgKey); + }, + + defaultFontStyle: function (topic) { + return this._getStyles(topic).fontStyle; + }, + + defaultBackgroundColor: function (topic) { + return this._getStyles(topic).backgroundColor; + }, + + defaultBorderColor: function (topic) { + return this._getStyles(topic).borderColor; + }, + + getInnerPadding: function (topic) { + return this._getStyles(topic).innerPadding; + }, + + defaultShapeType: function (topic) { + return this._getStyles(topic).shapeType; + }, + }, +}); + +TopicStyle.STYLES = { + CENTRAL_TOPIC: { + borderColor: 'rgb(57,113,177)', + backgroundColor: 'rgb(80,157,192)', + fontStyle: { + font: 'Verdana', + size: 10, + style: 'normal', + weight: 'bold', + color: '#ffffff', + }, + msgKey: 'CENTRAL_TOPIC', + innerPadding: 11, + shapeType: TopicShape.ROUNDED_RECT, + }, + + MAIN_TOPIC: { + borderColor: 'rgb(2,59,185)', + backgroundColor: 'rgb(224,229,239)', + fontStyle: { + font: 'Arial', + size: 8, + style: 'normal', + weight: 'normal', + color: 'rgb(82,92,97)', + }, + msgKey: 'MAIN_TOPIC', + innerPadding: 3, + shapeType: TopicShape.LINE, + }, + + SUB_TOPIC: { + borderColor: 'rgb(2,59,185)', + backgroundColor: 'rgb(224,229,239)', + fontStyle: { + font: 'Arial', + size: 6, + style: 'normal', + weight: 'normal', + color: 'rgb(82,92,97)', + }, + msgKey: 'SUB_TOPIC', + innerPadding: 3, + shapeType: TopicShape.LINE, + }, + + ISOLATED_TOPIC: { + borderColor: 'rgb(2,59,185)', + backgroundColor: 'rgb(224,229,239)', + fontStyle: { + font: 'Verdana', + size: 8, + style: 'normal', + weight: 'normal', + color: 'rgb(82,92,97)', + }, + msgKey: 'ISOLATED_TOPIC', + innerPadding: 4, + shapeType: TopicShape.LINE, + }, +}; + +export default TopicStyle; diff --git a/packages/mindplot/lib/components/Workspace.js b/packages/mindplot/lib/components/Workspace.js new file mode 100644 index 00000000..571a9bbd --- /dev/null +++ b/packages/mindplot/lib/components/Workspace.js @@ -0,0 +1,229 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const web2D = require('@wismapping/web2d') +const web2d = web2D(); + +const Workspace = new Class({ + initialize: function (screenManager, zoom) { + // Create a suitable container ... + $assert(screenManager, 'Div container can not be null'); + $assert(zoom, 'zoom container can not be null'); + + this._zoom = zoom; + this._screenManager = screenManager; + + var divContainer = screenManager.getContainer(); + this._screenWidth = parseInt(divContainer.css('width')); + this._screenHeight = parseInt(divContainer.css('height')); + + // Initialize web2d workspace. + var workspace = this._createWorkspace(); + this._workspace = workspace; + + // Append to the workspace... + workspace.addItAsChildTo(divContainer); + this.setZoom(zoom, true); + + // Register drag events ... + this._registerDragEvents(); + this._eventsEnabled = true; + }, + + _createWorkspace: function () { + // Initialize workspace ... + var coordOriginX = -(this._screenWidth / 2); + var coordOriginY = -(this._screenHeight / 2); + + var workspaceProfile = { + width: this._screenWidth + "px", + height: this._screenHeight + "px", + coordSizeWidth: this._screenWidth, + coordSizeHeight: this._screenHeight, + coordOriginX: coordOriginX, + coordOriginY: coordOriginY, + fillColor: 'transparent', + strokeWidth: 0 + }; + web2d.Toolkit.init(); + return new web2d.Workspace(workspaceProfile); + }, + + append: function (shape) { + if ($defined(shape.addToWorkspace)) { + shape.addToWorkspace(this); + } else { + this._workspace.append(shape); + } + }, + + removeChild: function (shape) { + // Element is a node, not a web2d element? + if ($defined(shape.removeFromWorkspace)) { + shape.removeFromWorkspace(this); + } else { + this._workspace.removeChild(shape); + } + }, + + addEvent: function (type, listener) { + this._workspace.addEvent(type, listener); + }, + + removeEvent: function (type, listener) { + $assert(type, 'type can not be null'); + $assert(listener, 'listener can not be null'); + this._workspace.removeEvent(type, listener); + }, + + getSize: function () { + return this._workspace.getCoordSize(); + }, + + setZoom: function (zoom, center) { + this._zoom = zoom; + var workspace = this._workspace; + + // Update coord scale... + var coordWidth = zoom * this._screenWidth; + var coordHeight = zoom * this._screenHeight; + workspace.setCoordSize(coordWidth, coordHeight); + + // View port coords ... + if (this._viewPort) { + this._viewPort.width = this._viewPort.width * zoom; + this._viewPort.height = this._viewPort.height * zoom; + } + + // Center topic.... + var coordOriginX; + var coordOriginY; + + if (center) { + if (this._viewPort) { + coordOriginX = -(this._viewPort.width / 2); + coordOriginY = -(this._viewPort.height / 2); + } else { + coordOriginX = -(coordWidth / 2); + coordOriginY = -(coordHeight / 2); + } + } else { + var coordOrigin = workspace.getCoordOrigin(); + coordOriginX = coordOrigin.x; + coordOriginY = coordOrigin.y; + } + + workspace.setCoordOrigin(coordOriginX, coordOriginY); + + // Update screen. + this._screenManager.setOffset(coordOriginX, coordOriginY); + this._screenManager.setScale(zoom); + + // Some changes in the screen. Let's fire an update event... + this._screenManager.fireEvent('update'); + }, + + getScreenManager: function () { + return this._screenManager; + }, + + enableWorkspaceEvents: function (value) { + this._eventsEnabled = value; + }, + + isWorkspaceEventsEnabled: function () { + return this._eventsEnabled; + }, + + dumpNativeChart: function () { + return this._workspace.dumpNativeChart(); + }, + + _registerDragEvents: function () { + var workspace = this._workspace; + var screenManager = this._screenManager; + var mWorkspace = this; + var mouseDownListener = function (event) { + if (!$defined(workspace._mouseMoveListener)) { + if (mWorkspace.isWorkspaceEventsEnabled()) { + mWorkspace.enableWorkspaceEvents(false); + + var mouseDownPosition = screenManager.getWorkspaceMousePosition(event); + var originalCoordOrigin = workspace.getCoordOrigin(); + + var wasDragged = false; + workspace._mouseMoveListener = function (event) { + + var currentMousePosition = screenManager.getWorkspaceMousePosition(event); + + var offsetX = currentMousePosition.x - mouseDownPosition.x; + var coordOriginX = -offsetX + originalCoordOrigin.x; + + var offsetY = currentMousePosition.y - mouseDownPosition.y; + var coordOriginY = -offsetY + originalCoordOrigin.y; + + workspace.setCoordOrigin(coordOriginX, coordOriginY); + + // Change cursor. + if (Browser.firefox) { + window.document.body.style.cursor = "-moz-grabbing"; + } else { + window.document.body.style.cursor = "move"; + } + event.preventDefault(); + + // Fire drag event ... + screenManager.fireEvent('update'); + wasDragged = true; + + + }; + screenManager.addEvent('mousemove', workspace._mouseMoveListener); + + // Register mouse up listeners ... + workspace._mouseUpListener = function (event) { + + screenManager.removeEvent('mousemove', workspace._mouseMoveListener); + screenManager.removeEvent('mouseup', workspace._mouseUpListener); + workspace._mouseUpListener = null; + workspace._mouseMoveListener = null; + window.document.body.style.cursor = 'default'; + + // Update screen manager offset. + var coordOrigin = workspace.getCoordOrigin(); + screenManager.setOffset(coordOrigin.x, coordOrigin.y); + mWorkspace.enableWorkspaceEvents(true); + + if (!wasDragged) { + screenManager.fireEvent('click'); + } + }; + screenManager.addEvent('mouseup', workspace._mouseUpListener); + } + } else { + workspace._mouseUpListener(); + } + }; + screenManager.addEvent('mousedown', mouseDownListener); + }, + + setViewPort: function (size) { + this._viewPort = size; + } +}); + +export default Workspace; diff --git a/packages/mindplot/lib/components/commands/AddFeatureToTopicCommand.js b/packages/mindplot/lib/components/commands/AddFeatureToTopicCommand.js new file mode 100644 index 00000000..1bb35fc0 --- /dev/null +++ b/packages/mindplot/lib/components/commands/AddFeatureToTopicCommand.js @@ -0,0 +1,69 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default; + +const AddFeatureToTopicCommand = new Class(/** @lends AddFeatureToTopicCommand */{ + Extends: Command, + /** + * @classdesc This command class handles do/undo of adding features to topics, e.g. an + * icon or a note. For a reference of existing features, refer to {@link mindplot.TopicFeature} + * @constructs + * @param {String} topicId the id of the topic + * @param {String} featureType the id of the feature type to add, e.g. "icon" + * @param {Object} attributes the attribute(s) of the respective feature model + * @extends mindplot.Command + * @see mindplot.model.FeatureModel and subclasses + */ + initialize:function (topicId, featureType, attributes) { + + $assert($defined(topicId), 'topicId can not be null'); + $assert(featureType, 'featureType can not be null'); + $assert(attributes, 'attributes can not be null'); + + this.parent(); + this._topicId = topicId; + this._featureType = featureType; + this._attributes = attributes; + this._featureModel = null; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + var topic = commandContext.findTopics(this._topicId)[0]; + + // Feature must be created only one time. + if (!this._featureModel) { + var model = topic.getModel(); + this._featureModel = model.createFeature(this._featureType, this._attributes); + } + topic.addFeature(this._featureModel); + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + var topic = commandContext.findTopics(this._topicId)[0]; + topic.removeFeature(this._featureModel); + } +}); + +export default AddFeatureToTopicCommand diff --git a/packages/mindplot/lib/components/commands/AddRelationshipCommand.js b/packages/mindplot/lib/components/commands/AddRelationshipCommand.js new file mode 100644 index 00000000..879e454d --- /dev/null +++ b/packages/mindplot/lib/components/commands/AddRelationshipCommand.js @@ -0,0 +1,53 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default + +const AddRelationshipCommand = new Class(/** @lends AddRelationshipCommand */{ + Extends:Command, + /** + * @classdesc This command class handles do/undo of adding a relationship to a topic. + * @constructs + * @param {XMLDOM} model + * @extends mindplot.Command + */ + initialize:function (model) { + $assert(model, 'Relationship model can not be null'); + + this.parent(); + this._model = model; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + var relationship = commandContext.addRelationship(this._model); + relationship.setOnFocus(true); + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + var rel = commandContext.findRelationships(this._model.getId()); + commandContext.deleteRelationship(rel[0]); + } +}); + +export default AddRelationshipCommand; diff --git a/packages/mindplot/lib/components/commands/AddTopicCommand.js b/packages/mindplot/lib/components/commands/AddTopicCommand.js new file mode 100644 index 00000000..efe49b39 --- /dev/null +++ b/packages/mindplot/lib/components/commands/AddTopicCommand.js @@ -0,0 +1,97 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default; + +const AddTopicCommand = new Class( + /** @lends AddTopicCommand */ { + Extends: Command, + /** + * @classdesc This command class handles do/undo of adding one or multiple topics to + * the mindmap. + * @constructs + * @param {Array} models one or multiple models + * @param {Array} parentTopicsId ids of the parent topics to add the children to, or null + * when attaching a dragged node or a node/branch from clipboard + * @extends mindplot.Command + */ + initialize: function (models, parentTopicsId) { + $assert(models, 'models can not be null'); + $assert( + parentTopicsId == null || parentTopicsId.length == models.length, + 'parents and models must have the same size' + ); + + this.parent(); + this._models = models; + this._parentsIds = parentTopicsId; + }, + + /** + * Overrides abstract parent method + */ + execute: function (commandContext) { + var me = this; + _.each(this._models, function (model, index) { + // Add a new topic ... + var topic = commandContext.createTopic(model); + + // Connect to topic ... + if (me._parentsIds) { + var parentId = me._parentsIds[index]; + if ($defined(parentId)) { + var parentTopic = commandContext.findTopics(parentId)[0]; + commandContext.connect(topic, parentTopic); + } + } else { + commandContext.addTopic(topic); + } + + // Select just created node ... + var designer = commandContext._designer; + designer.onObjectFocusEvent(topic); + topic.setOnFocus(true); + + // Render node ... + topic.setVisibility(true); + }); + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute: function (commandContext) { + // Delete disconnected the nodes. Create a copy of the topics ... + var clonedModel = []; + _.each(this._models, function (model) { + clonedModel.push(model.clone()); + }); + + // Finally, remove the nodes ... + _.each(this._models, function (model) { + var topicId = model.getId(); + var topic = commandContext.findTopics(topicId)[0]; + commandContext.deleteTopic(topic); + }); + + this._models = clonedModel; + }, + } +); + +export default AddTopicCommand; diff --git a/packages/mindplot/lib/components/commands/ChangeFeatureToTopicCommand.js b/packages/mindplot/lib/components/commands/ChangeFeatureToTopicCommand.js new file mode 100644 index 00000000..82ca6046 --- /dev/null +++ b/packages/mindplot/lib/components/commands/ChangeFeatureToTopicCommand.js @@ -0,0 +1,64 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default + +const ChangeFeatureToTopicCommand = new Class(/** @lends ChangeFeatureToTopicCommand */{ + Extends:Command, + /** + * @extends mindplot.Command + * @constructs + * @param topicId + * @param featureId + * @param attributes + * @throws will throw an error if topicId is null or undefined + * @throws will throw an error if featureId is null or undefined + * @throws will throw an error if attributes is null or undefined + */ + initialize: function(topicId, featureId, attributes) { + $assert($defined(topicId), 'topicId can not be null'); + $assert($defined(featureId), 'featureId can not be null'); + $assert($defined(attributes), 'attributes can not be null'); + + this.parent(); + this._topicId = topicId; + this._featureId = featureId; + this._attributes = attributes; + }, + + /** + * Overrides abstract parent method + */ + execute: function(commandContext) { + var topic = commandContext.findTopics(this._topicId)[0]; + var feature = topic.findFeatureById(this._featureId); + + var oldAttributes = feature.getAttributes(); + feature.setAttributes(this._attributes); + this._attributes = oldAttributes; + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute: function(commandContext) { + this.execute(commandContext); + } +}); + +export default ChangeFeatureToTopicCommand; diff --git a/packages/mindplot/lib/components/commands/DeleteCommand.js b/packages/mindplot/lib/components/commands/DeleteCommand.js new file mode 100644 index 00000000..0e61c998 --- /dev/null +++ b/packages/mindplot/lib/components/commands/DeleteCommand.js @@ -0,0 +1,186 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default; + +const DeleteCommand = new Class(/** @lends mindplot.commands.DeleteCommand */{ + Extends:Command, + /** + * @classdesc This command class handles do/undo of deleting a topic. + * @constructs + * @param {Array} topicIds ids of the topics to delete + * @param {Array} relIds ids of the relationships connected to the topics + * @extends mindplot.Command + */ + initialize:function (topicIds, relIds) { + $assert($defined(relIds), 'topicIds can not be null'); + + this.parent(); + this._relIds = relIds; + this._topicIds = topicIds; + this._deletedTopicModels = []; + this._deletedRelModel = []; + this._parentTopicIds = []; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + + // If a parent has been selected for deletion, the children must be excluded from the delete ... + var topics = this._filterChildren(this._topicIds, commandContext); + + if (topics.length > 0) { + _.each(topics, function (topic) { + // In case that it's editing text node, force close without update ... + topic.closeEditors(); + + var model = topic.getModel(); + + // Delete relationships + var relationships = this._collectInDepthRelationships(topic); + this._deletedRelModel.append(relationships.map(function (rel) { + return rel.getModel().clone(); + })); + + _.each(relationships, function (relationship) { + commandContext.deleteRelationship(relationship); + }); + + // Store information for undo ... + var clonedModel = model.clone(); + this._deletedTopicModels.push(clonedModel); + var outTopic = topic.getOutgoingConnectedTopic(); + var outTopicId = null; + if (outTopic != null) { + outTopicId = outTopic.getId(); + } + this._parentTopicIds.push(outTopicId); + + // Finally, delete the topic from the workspace... + commandContext.deleteTopic(topic); + + }, this); + } + + var rels = commandContext.findRelationships(this._relIds); + if (rels.length > 0) { + _.each(rels, function (rel) { + this._deletedRelModel.push(rel.getModel().clone()); + commandContext.deleteRelationship(rel); + }, this); + } + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + + // Add all the topics ... + _.each(this._deletedTopicModels, function (model) { + commandContext.createTopic(model); + }, this); + + // Do they need to be connected ? + _.each(this._deletedTopicModels, function (topicModel, index) { + var topics = commandContext.findTopics(topicModel.getId()); + + var parentId = this._parentTopicIds[index]; + if (parentId) { + var parentTopics = commandContext.findTopics(parentId); + commandContext.connect(topics[0], parentTopics[0]); + } + }, this); + + // Add rebuild relationships ... + _.each(this._deletedRelModel, function (model) { + commandContext.addRelationship(model); + }); + + // Finally display the topics ... + _.each(this._deletedTopicModels, function (topicModel) { + var topics = commandContext.findTopics(topicModel.getId()); + topics[0].setBranchVisibility(true); + }, this); + + // Focus on last recovered topic .. + if (this._deletedTopicModels.length > 0) { + var firstTopic = this._deletedTopicModels[0]; + var topic = commandContext.findTopics(firstTopic.getId())[0]; + topic.setOnFocus(true); + } + + this._deletedTopicModels = []; + this._parentTopicIds = []; + this._deletedRelModel = []; + }, + + _filterChildren:function (topicIds, commandContext) { + var topics = commandContext.findTopics(topicIds); + + var result = []; + _.each(topics, function (topic) { + var parent = topic.getParent(); + var found = false; + while (parent != null && !found) { + found = topicIds.contains(parent.getId()); + if (found) { + break; + } + parent = parent.getParent(); + } + + if (!found) { + result.push(topic); + } + }); + + return result; + }, + + _collectInDepthRelationships:function (topic) { + var result = []; + result.append(topic.getRelationships()); + + var children = topic.getChildren(); + var rels = children.map(function (topic) { + return this._collectInDepthRelationships(topic); + }, this); + result.append(rels.flatten()); + + if (result.length > 0) { + // Filter for unique ... + result = result.sort(function (a, b) { + return a.getModel().getId() - b.getModel().getId(); + }); + var ret = [result[0]]; + for (var i = 1; i < result.length; i++) { // start loop at 1 as element 0 can never be a duplicate + if (result[i - 1] !== result[i]) { + ret.push(result[i]); + } + } + result = ret; + } + return result; + } + +}); + +export default DeleteCommand; diff --git a/packages/mindplot/lib/components/commands/DragTopicCommand.js b/packages/mindplot/lib/components/commands/DragTopicCommand.js new file mode 100644 index 00000000..983f7b22 --- /dev/null +++ b/packages/mindplot/lib/components/commands/DragTopicCommand.js @@ -0,0 +1,103 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default + +const DragTopicCommand = new Class(/** @lends DragTopicCommand */{ + Extends:Command, + /** + * @classdesc This command class handles do/undo of dragging a topic to a new position. + * @constructs + * @param {String} topicId id of the topic to drag + * @param {Object} position + * @param {Number} order the order property (children of one node are displayed in order from 0 to n) + * @param {mindplot.Topic} parentTopic the topic to be made the dragged topic's new parent + * @extends mindplot.Command + */ + initialize:function (topicId, position, order, parentTopic) { + $assert(topicId, "topicId must be defined"); + + this._topicsId = topicId; + if ($defined(parentTopic)) + this._parentId = parentTopic.getId(); + + this.parent(); + this._position = position; + this._order = order; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + + var topic = commandContext.findTopics(this._topicsId)[0]; + topic.setVisibility(false); + + // Save old position ... + var origParentTopic = topic.getOutgoingConnectedTopic(); + + // In this case, topics are positioned using order ... + var origOrder = topic.getOrder(); + var origPosition = topic.getPosition(); + + // Disconnect topic .. + if ($defined(origParentTopic) && origParentTopic != this._parentId) { + commandContext.disconnect(topic); + } + + // Set topic order ... + if (this._order != null) { + topic.setOrder(this._order); + } else if (this._position != null) { + commandContext.moveTopic(topic, this._position); + } else { + $assert("Illegal command state exception."); + } + + // Finally, connect topic ... + if (origParentTopic != this._parentId) { + + if ($defined(this._parentId)) { + var parentTopic = commandContext.findTopics(this._parentId)[0]; + commandContext.connect(topic, parentTopic); + } + + // Backup old parent id ... + this._parentId = null; + if ($defined(origParentTopic)) { + this._parentId = origParentTopic.getId(); + } + } + topic.setVisibility(true); + + // Store for undo ... + this._order = origOrder; + this._position = origPosition; + + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + this.execute(commandContext); + } +}); + +export default DragTopicCommand; diff --git a/packages/mindplot/lib/components/commands/GenericFunctionCommand.js b/packages/mindplot/lib/components/commands/GenericFunctionCommand.js new file mode 100644 index 00000000..583a4333 --- /dev/null +++ b/packages/mindplot/lib/components/commands/GenericFunctionCommand.js @@ -0,0 +1,99 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default + +const GenericFunctionCommand = new Class(/** @lends GenericFunctionCommand */{ + Extends:Command, + /** + * @classdesc This command handles do/undo of different actions, e.g. moving topics to + * a different position, changing text or font,... (for full reference check the + * StandaloneActionDispatcher i.e. the ActionDispatcher subclass in use) + * @constructs + * @param {Function} commandFunc the function the command shall execute + * @param {String|Array} topicsIds the ids of the topics affected + * @param {Object} [value] value arbitrary value necessary for the execution of the function, + * e.g. color, font family or text + * @extends mindplot.Command + */ + initialize:function (commandFunc, topicsIds, value) { + $assert(commandFunc, "commandFunc must be defined"); + $assert($defined(topicsIds), "topicsIds must be defined"); + + this.parent(); + this._value = value; + this._topicsId = topicsIds; + this._commandFunc = commandFunc; + this._oldValues = []; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + if (!this.applied) { + + var topics = null; + try { + topics = commandContext.findTopics(this._topicsId); + } catch (e) { + if (this._commandFunc.commandType != "changeTextToTopic") { + // Workaround: For some reason, there is a combination of events that involves + // making some modification and firing out of focus event. This is causing + // that a remove node try to be removed. In some other life, I will come with the solution. + // Almost aways occurs with IE9. I could be related with some change of order in sets o something similar. + throw e; + } + } + + if (topics != null) { + var me = this; + _.each(topics, function (topic) { + var oldValue = me._commandFunc(topic, me._value); + me._oldValues.push(oldValue); + }); + } + this.applied = true; + + } else { + throw "Command can not be applied two times in a row."; + } + + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + if (this.applied) { + var topics = commandContext.findTopics(this._topicsId); + var me = this; + _.each(topics, function (topic, index) { + me._commandFunc(topic, me._oldValues[index]); + + }); + + this.applied = false; + this._oldValues = []; + } else { + throw "undo can not be applied."; + } + } +}); + +export default GenericFunctionCommand diff --git a/packages/mindplot/lib/components/commands/MoveControlPointCommand.js b/packages/mindplot/lib/components/commands/MoveControlPointCommand.js new file mode 100644 index 00000000..5b40c80c --- /dev/null +++ b/packages/mindplot/lib/components/commands/MoveControlPointCommand.js @@ -0,0 +1,119 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default; + +const MoveControlPointCommand = new Class( + /** @lends MoveControlPointCommand */ { + Extends: Command, + /** + * @classdesc This command handles do/undo of changing the control points of a relationship + * arrow. These are the two points that appear when the relationship is on focus. They + * influence how the arrow is drawn (not the source or the destination topic nor the arrow + * direction) + * @constructs + * @param {ControlPoint} ctrlPointController + * @param {Number} point 0 for the destination control point, 1 for the source control point + * @param ctrlPointController {ControlPoint} + * @param point {Number} 0 for the destination control point, 1 for the source control point + */ + initialize: function (ctrlPointController, point) { + $assert(ctrlPointController, 'line can not be null'); + $assert($defined(point), 'point can not be null'); + + this.parent(); + this._ctrlPointControler = ctrlPointController; + this._line = ctrlPointController._line; + this._controlPoint = this._ctrlPointControler.getControlPoint(point).clone(); + this._oldControlPoint = this._ctrlPointControler.getOriginalCtrlPoint(point).clone(); + this._originalEndPoint = this._ctrlPointControler.getOriginalEndPoint(point).clone(); + switch (point) { + case 0: + this._wasCustom = this._line.getLine().isSrcControlPointCustom(); + this._endPoint = this._line.getLine().getFrom().clone(); + break; + case 1: + this._wasCustom = this._line.getLine().isDestControlPointCustom(); + this._endPoint = this._line.getLine().getTo().clone(); + break; + } + this._point = point; + }, + + /** + * Overrides abstract parent method + */ + execute: function (commandContext) { + var model = this._line.getModel(); + switch (this._point) { + case 0: + model.setSrcCtrlPoint(this._controlPoint.clone()); + this._line.setFrom(this._endPoint.x, this._endPoint.y); + this._line.setIsSrcControlPointCustom(true); + this._line.setSrcControlPoint(this._controlPoint.clone()); + break; + case 1: + model.setDestCtrlPoint(this._controlPoint.clone()); + this._wasCustom = this._line.getLine().isDestControlPointCustom(); + this._line.setTo(this._endPoint.x, this._endPoint.y); + this._line.setIsDestControlPointCustom(true); + this._line.setDestControlPoint(this._controlPoint.clone()); + break; + } + if (this._line.isOnFocus()) { + this._line._refreshShape(); + this._ctrlPointControler.setLine(this._line); + } + this._line.getLine().updateLine(this._point); + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute: function (commandContext) { + var line = this._line; + var model = line.getModel(); + switch (this._point) { + case 0: + if ($defined(this._oldControlPoint)) { + line.setFrom(this._originalEndPoint.x, this._originalEndPoint.y); + model.setSrcCtrlPoint(this._oldControlPoint.clone()); + line.setSrcControlPoint(this._oldControlPoint.clone()); + line.setIsSrcControlPointCustom(this._wasCustom); + } + break; + case 1: + if ($defined(this._oldControlPoint)) { + line.setTo(this._originalEndPoint.x, this._originalEndPoint.y); + model.setDestCtrlPoint(this._oldControlPoint.clone()); + line.setDestControlPoint(this._oldControlPoint.clone()); + line.setIsDestControlPointCustom(this._wasCustom); + } + break; + } + this._line.getLine().updateLine(this._point); + if (this._line.isOnFocus()) { + this._ctrlPointControler.setLine(line); + line._refreshShape(); + } + }, + } +); + +export default MoveControlPointCommand; + diff --git a/packages/mindplot/lib/components/commands/RemoveFeatureFromTopicCommand.js b/packages/mindplot/lib/components/commands/RemoveFeatureFromTopicCommand.js new file mode 100644 index 00000000..389906a0 --- /dev/null +++ b/packages/mindplot/lib/components/commands/RemoveFeatureFromTopicCommand.js @@ -0,0 +1,61 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Command = require('../Command').default; + +const RemoveFeatureFromTopicCommand = new Class(/**@lends RemoveFeatureFromTopicCommand */{ + Extends:Command, + /** + * @classdesc This command handles do/undo of removing a feature from a topic, e.g. an icon or + * a note. For a reference of existing features, refer to {@link mindplot.TopicFeature}. + * @constructs + * @param {String} topicId id of the topic to remove the feature from + * @param {String} featureId id of the feature to remove + * @extends mindplot.Command + */ + initialize:function (topicId, featureId) { + $assert($defined(topicId), 'topicId can not be null'); + $assert(featureId, 'iconModel can not be null'); + + this.parent(); + this._topicId = topicId; + this._featureId = featureId; + this._oldFeature = null; + }, + + /** + * Overrides abstract parent method + */ + execute:function (commandContext) { + var topic = commandContext.findTopics(this._topicId)[0]; + var feature = topic.findFeatureById(this._featureId); + topic.removeFeature(feature); + this._oldFeature = feature; + }, + + /** + * Overrides abstract parent method + * @see {@link mindplot.Command.undoExecute} + */ + undoExecute:function (commandContext) { + var topic = commandContext.findTopics(this._topicId)[0]; + topic.addFeature(this._oldFeature); + this._oldFeature = null; + } +}); + +export default RemoveFeatureFromTopicCommand; diff --git a/packages/mindplot/lib/components/footer.js b/packages/mindplot/lib/components/footer.js new file mode 100644 index 00000000..6858d261 --- /dev/null +++ b/packages/mindplot/lib/components/footer.js @@ -0,0 +1,5 @@ +try { + $(document).trigger('loadcomplete', 'mind'); +} catch (e) { + console.error(e.stack); +} diff --git a/packages/mindplot/lib/components/header.js b/packages/mindplot/lib/components/header.js new file mode 100644 index 00000000..62bae0fb --- /dev/null +++ b/packages/mindplot/lib/components/header.js @@ -0,0 +1,35 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var mindplot = {}; +mindplot.util = {}; +mindplot.commands = {}; +mindplot.layout = {}; +mindplot.layout.boards = {}; +mindplot.layout.boards.original = {}; +mindplot.widget = {}; +mindplot.model = {}; +mindplot.collaboration = {}; +mindplot.collaboration.framework = {}; +mindplot.persistence = {}; + +mindplot.layout = {}; + +Class.Mutators.Static = function (items) { + this.extend(items); +}; diff --git a/packages/mindplot/lib/components/layout/AbstractBasicSorter.js b/packages/mindplot/lib/components/layout/AbstractBasicSorter.js new file mode 100644 index 00000000..d196f796 --- /dev/null +++ b/packages/mindplot/lib/components/layout/AbstractBasicSorter.js @@ -0,0 +1,93 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const ChildrenSorterStrategy = require('./ChildrenSorterStrategy').default + +/** + * @class + * @extends mindplot.layout.ChildrenSorterStrategy + */ +const AbstractBasicSorter = new Class(/** @lends AbstractBasicSorter */{ + Extends: ChildrenSorterStrategy, + + /** + * @param {} treeSet + * @param {} node + * @return the height of a node and its children if existing and not shrunken + */ + computeChildrenIdByHeights: function(treeSet, node) { + var result = {}; + this._computeChildrenHeight(treeSet, node, result); + return result; + }, + + _getVerticalPadding: function() { + return AbstractBasicSorter.INTERNODE_VERTICAL_PADDING; + }, + + _computeChildrenHeight : function(treeSet, node, heightCache) { + var height = node.getSize().height + (this._getVerticalPadding() * 2); // 2* Top and down padding; + + var result; + var children = treeSet.getChildren(node); + if (children.length == 0 || node.areChildrenShrunken()) { + result = height; + } else { + var childrenHeight = 0; + _.each(children, function(child) { + childrenHeight += this._computeChildrenHeight(treeSet, child, heightCache); + }, this); + + result = Math.max(height, childrenHeight); + } + + if (heightCache) { + heightCache[node.getId()] = result; + } + + return result; + }, + + _getSortedChildren:function(treeSet, node) { + var result = treeSet.getChildren(node); + result.sort(function(a, b) { + return a.getOrder() - b.getOrder() + }); + return result; + }, + + _getRelativeDirection: function(reference, position) { + var offset = position.x - reference.x; + return offset >= 0 ? 1 : -1; + } + +}); + +/** + * @constant + * @type {Number} + * @default + */ +AbstractBasicSorter.INTERNODE_VERTICAL_PADDING = 5; +/** + * @constant + * @type {Number} + * @default + */ +AbstractBasicSorter.INTERNODE_HORIZONTAL_PADDING = 30; + +export default AbstractBasicSorter; diff --git a/packages/mindplot/lib/components/layout/BalancedSorter.js b/packages/mindplot/lib/components/layout/BalancedSorter.js new file mode 100644 index 00000000..20c189af --- /dev/null +++ b/packages/mindplot/lib/components/layout/BalancedSorter.js @@ -0,0 +1,278 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const AbstractBasicSorter = require('./AbstractBasicSorter').default; + +const BalancedSorter = new Class(/** @lends BalancedSorter */{ + Extends:AbstractBasicSorter, + /** + * @constructs + * @extends mindplot.layout.AbstractBasicSorter + */ + initialize:function () { + + }, + + /** + * @param {} graph + * @param {} parent + * @param {} node + * @param {} position + * @param {Boolean} free + * @return an array with order and position + */ + predict:function (graph, parent, node, position, free) { + // If its a free node... + if (free) { + $assert($defined(position), "position cannot be null for predict in free positioning"); + $assert($defined(node), "node cannot be null for predict in free positioning"); + + var rootNode = graph.getRootNode(parent); + var direction = this._getRelativeDirection(rootNode.getPosition(), node.getPosition()); + + var limitXPos = parent.getPosition().x + direction * (parent.getSize().width / 2 + node.getSize().width / 2 + BalancedSorter.INTERNODE_HORIZONTAL_PADDING); + + var xPos = direction > 0 ? + (position.x >= limitXPos ? position.x : limitXPos) : + (position.x <= limitXPos ? position.x : limitXPos); + + return [0, {x:xPos, y:position.y}]; + } + + var rootNode = graph.getRootNode(parent); + + // If it is a dragged node... + if (node) { + $assert($defined(position), "position cannot be null for predict in dragging"); + var nodeDirection = this._getRelativeDirection(rootNode.getPosition(), node.getPosition()); + var positionDirection = this._getRelativeDirection(rootNode.getPosition(), position); + var siblings = graph.getSiblings(node); + + var sameParent = parent == graph.getParent(node); + if (siblings.length == 0 && nodeDirection == positionDirection && sameParent) { + return [node.getOrder(), node.getPosition()]; + } + } + + if (!position) { + var right = this._getChildrenForOrder(parent, graph, 0); + var left = this._getChildrenForOrder(parent, graph, 1); + } + // Filter nodes on one side.. + var order = position ? (position.x > rootNode.getPosition().x ? 0 : 1) : ((right.length - left.length) > 0 ? 1 : 0); + var direction = order % 2 == 0 ? 1 : -1; + + // Exclude the dragged node (if set) + var children = this._getChildrenForOrder(parent, graph, order).filter(function (child) { + return child != node; + }); + + // No children? + if (children.length == 0) { + return [order, {x:parent.getPosition().x + direction * (parent.getSize().width / 2 + BalancedSorter.INTERNODE_HORIZONTAL_PADDING * 2), y:parent.getPosition().y}]; + } + + // Try to fit within ... + var result = null; + var last = children.getLast(); + position = position || {x:last.getPosition().x, y:last.getPosition().y + 1}; + _.each(children, function (child, index) { + var cpos = child.getPosition(); + if (position.y > cpos.y) { + yOffset = child == last ? + child.getSize().height + BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 : + (children[index + 1].getPosition().y - child.getPosition().y) / 2; + result = [child.getOrder() + 2, {x:cpos.x, y:cpos.y + yOffset}]; + } + }); + + // Position wasn't below any node, so it must be inserted above + if (!result) { + var first = children[0]; + result = [position.x > 0 ? 0 : 1, { + x:first.getPosition().x, + y:first.getPosition().y - first.getSize().height - BalancedSorter.INTERNODE_VERTICAL_PADDING * 2 + }]; + } + + return result; + }, + + /** + * @param {} treeSet + * @param {} parent + * @param {} child + * @param {} order + */ + insert:function (treeSet, parent, child, order) { + var children = this._getChildrenForOrder(parent, treeSet, order); + + // If no children, return 0 or 1 depending on the side + if (children.length == 0) { + child.setOrder(order % 2); + return; + } + + // Shift all the elements by two, so side is the same. + // In case of balanced sorter, order don't need to be continuous... + var max = 0; + for (var i = 0; i < children.length; i++) { + var node = children[i]; + max = Math.max(max, node.getOrder()); + if (node.getOrder() >= order) { + max = Math.max(max, node.getOrder() + 2); + node.setOrder(node.getOrder() + 2); + } + } + + var newOrder = order > (max + 1) ? (max + 2) : order; + child.setOrder(newOrder); + }, + + /** + * @param {} treeSet + * @param {} node + */ + detach:function (treeSet, node) { + var parent = treeSet.getParent(node); + // Filter nodes on one side.. + var children = this._getChildrenForOrder(parent, treeSet, node.getOrder()); + + _.each(children, function (child, index) { + if (child.getOrder() > node.getOrder()) { + child.setOrder(child.getOrder() - 2); + } + }); + node.setOrder(node.getOrder() % 2 == 0 ? 0 : 1); + }, + + /** + * @param {} treeSet + * @param {} node + * @return offsets + */ + computeOffsets:function (treeSet, node) { + $assert(treeSet, "treeSet can no be null."); + $assert(node, "node can no be null."); + + var children = this._getSortedChildren(treeSet, node); + + // Compute heights ... + var heights = children.map( + function (child) { + return {id:child.getId(), order:child.getOrder(), width:child.getSize().width, height:this._computeChildrenHeight(treeSet, child)}; + }, this).reverse(); + + + // Compute the center of the branch ... + var totalPHeight = 0; + var totalNHeight = 0; + + _.each(heights, function (elem) { + if (elem.order % 2 == 0) { + totalPHeight += elem.height; + } else { + totalNHeight += elem.height; + } + }); + var psum = totalPHeight / 2; + var nsum = totalNHeight / 2; + var ysum = 0; + + // Calculate the offsets ... + var result = {}; + for (var i = 0; i < heights.length; i++) { + var direction = heights[i].order % 2 ? -1 : 1; + + if (direction > 0) { + psum = psum - heights[i].height; + ysum = psum; + } else { + nsum = nsum - heights[i].height; + ysum = nsum; + } + + var yOffset = ysum + heights[i].height / 2; + var xOffset = direction * (node.getSize().width / 2 + heights[i].width / 2 + +BalancedSorter.INTERNODE_HORIZONTAL_PADDING); + + $assert(!isNaN(xOffset), "xOffset can not be null"); + $assert(!isNaN(yOffset), "yOffset can not be null"); + + result[heights[i].id] = {x:xOffset, y:yOffset}; + } + return result; + }, + + /** + * @param {} treeSet + * @param {} node + * @throw will throw an error if order elements are missing + */ + verify:function (treeSet, node) { + // Check that all is consistent ... + var children = this._getChildrenForOrder(node, treeSet, node.getOrder()); + + // All odd ordered nodes should be "continuous" by themselves + // All even numbered nodes should be "continuous" by themselves + var factor = node.getOrder() % 2 == 0 ? 2 : 1; + for (var i = 0; i < children.length; i++) { + var order = i == 0 && factor == 1 ? 1 : (factor * i); + $assert(children[i].getOrder() == order, "Missing order elements. Missing order: " + (i * factor) + ". Parent:" + node.getId() + ",Node:" + children[i].getId()); + } + }, + + /** + * @param {} treeSet + * @param {} child + * @return the direction of the child within the treeSet + */ + getChildDirection:function (treeSet, child) { + return child.getOrder() % 2 == 0 ? 1 : -1; + }, + + /** + * @return {String} the print name of this class + */ + toString:function () { + return "Balanced Sorter"; + }, + + _getChildrenForOrder:function (parent, graph, order) { + return this._getSortedChildren(graph, parent).filter(function (child) { + return child.getOrder() % 2 == order % 2; + }); + }, + + _getVerticalPadding:function () { + return BalancedSorter.INTERNODE_VERTICAL_PADDING; + } +}); + +/** + * @constant + * @type {Number} + * @default + */ +BalancedSorter.INTERNODE_VERTICAL_PADDING = 5; +/** + * @constant + * @type {Number} + * @default + */ +BalancedSorter.INTERNODE_HORIZONTAL_PADDING = 30; + +export default BalancedSorter; diff --git a/packages/mindplot/lib/components/layout/ChangeEvent.js b/packages/mindplot/lib/components/layout/ChangeEvent.js new file mode 100644 index 00000000..6e05e369 --- /dev/null +++ b/packages/mindplot/lib/components/layout/ChangeEvent.js @@ -0,0 +1,70 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const ChangeEvent = new Class(/** @lends ChangeEvent */{ + /** + * @constructs + * @param {} id + * @throws will throw an error if the given id is not/cannot be converted to a numerical value + */ + initialize:function(id) { + $assert(!isNaN(id), "id can not be null"); + this._id = id; + this._position = null; + this._order = null; + }, + + /** @return id */ + getId:function() { + return this._id; + }, + + /** @return order */ + getOrder: function() { + return this._order; + }, + + /** @return position */ + getPosition: function() { + return this._position; + }, + + /** + * @param {} value the order to set + * @throws will throw an error if the given parameter is not/cannot be converted to a numerical + * value + */ + setOrder: function(value) { + $assert(!isNaN(value), "value can not be null"); + this._order = value; + }, + + /** @param {} value + * @throws will throw an error if the value is null or undefined*/ + setPosition: function(value) { + $assert(value, "value can not be null"); + this._position = value; + }, + + /** @return {String} order and position */ + toString: function() { + return "[order:" + this.getOrder() + ", position: {" + this.getPosition().x + "," + this.getPosition().y + "}]"; + } +}); + +export default ChangeEvent; diff --git a/packages/mindplot/lib/components/layout/ChildrenSorterStrategy.js b/packages/mindplot/lib/components/layout/ChildrenSorterStrategy.js new file mode 100644 index 00000000..09cd38a8 --- /dev/null +++ b/packages/mindplot/lib/components/layout/ChildrenSorterStrategy.js @@ -0,0 +1,69 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const ChildrenSorterStrategy = new Class(/** @lends ChildrenSorterStrategy */{ + /** + * @constructs + */ + initialize:function() { + + }, + + /** @abstract */ + computeChildrenIdByHeights: function(treeSet, node) { + throw "Method must be implemented"; + }, + + /** @abstract */ + computeOffsets:function(treeSet, node) { + throw "Method must be implemented"; + }, + + /** @abstract */ + insert: function(treeSet, parent, child, order) { + throw "Method must be implemented"; + }, + + /** @abstract */ + detach:function(treeSet, node) { + throw "Method must be implemented"; + }, + + /** @abstract */ + predict:function(treeSet, parent, node, position, free) { + throw "Method must be implemented"; + }, + + /** @abstract */ + verify:function(treeSet, node) { + throw "Method must be implemented"; + }, + + /** @abstract */ + getChildDirection: function(treeSet, node) { + throw "Method must be implemented"; + }, + + /** @abstract */ + toString:function() { + throw "Method must be implemented: print name"; + } + +}); + +export default ChildrenSorterStrategy diff --git a/packages/mindplot/lib/components/layout/EventBus.js b/packages/mindplot/lib/components/layout/EventBus.js new file mode 100644 index 00000000..f6eaf304 --- /dev/null +++ b/packages/mindplot/lib/components/layout/EventBus.js @@ -0,0 +1,48 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('../Events').default; + +const EventBus = new Class(/** @lends EventBus */{ + Implements: Events, + /** + * @constructs + * @implements mindplot.Events + */ + initialize: function() { + } +}); + +/** + * Enum for events + * @enum {String} + */ +EventBus.events = { + NodeResizeEvent:'NodeResizeEvent', + NodeMoveEvent:'NodeMoveEvent', + NodeShrinkEvent:'NodeShrinkEvent', + NodeConnectEvent:'NodeConnectEvent', + NodeDisconnectEvent:'NodeDisconnectEvent', + NodeAdded:'NodeAdded', + NodeRemoved:'NodeRemoved', + DoLayout:'DoLayout' +}; + +/** instance */ +EventBus.instance = new EventBus(); + +export default EventBus; diff --git a/packages/mindplot/lib/components/layout/EventBusDispatcher.js b/packages/mindplot/lib/components/layout/EventBusDispatcher.js new file mode 100644 index 00000000..4a63a604 --- /dev/null +++ b/packages/mindplot/lib/components/layout/EventBusDispatcher.js @@ -0,0 +1,99 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const EventBus = require('./EventBus').default + +const EventBusDispatcher = new Class(/** @lends EventBusDispatcher */{ + /** + * @constructs + */ + initialize:function() { + this.registerBusEvents(); + }, + + /** + * @param {mindplot.layout.LayoutManager} layoutManager + */ + setLayoutManager : function(layoutManager) { + this._layoutManager = layoutManager; + }, + + /** + * register bus events + */ + registerBusEvents:function () { + EventBus.instance.addEvent(EventBus.events.NodeAdded, this._nodeAdded.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeRemoved, this._nodeRemoved.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeResizeEvent, this._nodeResizeEvent.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeMoveEvent, this._nodeMoveEvent.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeDisconnectEvent, this._nodeDisconnectEvent.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeConnectEvent, this._nodeConnectEvent.bind(this)); + EventBus.instance.addEvent(EventBus.events.NodeShrinkEvent, this._nodeShrinkEvent.bind(this)); + EventBus.instance.addEvent(EventBus.events.DoLayout, this._doLayout.bind(this)); + }, + + _nodeResizeEvent: function(args) { + this._layoutManager.updateNodeSize(args.node.getId(), args.size); + }, + + _nodeMoveEvent: function(args) { + this._layoutManager.moveNode(args.node.getId(), args.position); + }, + + _nodeDisconnectEvent: function(node) { + this._layoutManager.disconnectNode(node.getId()); + }, + + _nodeConnectEvent: function(args) { + this._layoutManager.connectNode(args.parentNode.getId(), args.childNode.getId(), args.childNode.getOrder()); + + }, + + _nodeShrinkEvent: function(node) { + this._layoutManager.updateShrinkState(node.getId(), node.areChildrenShrunken()); + }, + + _nodeAdded: function(node) { + // Central topic must not be added twice ... + if (node.getId() != 0) { + this._layoutManager.addNode(node.getId(), {width:10,height:10}, node.getPosition()); + this._layoutManager.updateShrinkState(node.getId(), node.areChildrenShrunken()); + } + }, + + _nodeRemoved: function(node) { + this._layoutManager.removeNode(node.getId()); + }, + + _doLayout: function() { +// (function() { + this._layoutManager.layout(true); +// console.log("---------"); +// this._layoutManager.dump(); +// console.log("---------"); +// console.log("---------"); +// }).delay(0, this); + }, + + /** @return layout manager */ + getLayoutManager: function() { + return this._layoutManager; + } + +}); + +export default EventBusDispatcher diff --git a/packages/mindplot/lib/components/layout/GridSorter.js b/packages/mindplot/lib/components/layout/GridSorter.js new file mode 100644 index 00000000..3e061c57 --- /dev/null +++ b/packages/mindplot/lib/components/layout/GridSorter.js @@ -0,0 +1,94 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const AbstractBasicSorter = require('./AbstractBasicSorter').default + +/** + * @class + * @extends mindplot.layout.AbstractBasicSorter + */ +const GridSorter = new Class(/** @lends GridSorter */{ + Extends: AbstractBasicSorter, + + /** + * @param {} treeSet + * @param {} node + * @return offsets + */ + computeOffsets: function(treeSet, node) { + $assert(treeSet, "treeSet can no be null."); + $assert(node, "node can no be null."); + $assert("order can no be null."); + + var children = this._getSortedChildren(treeSet, node); + + // Compute heights ... + var me = this; + var heights = children.map(function(child) { + return { + id: child.getId(), + height: me._computeChildrenHeight(treeSet, child) + }; + }); + + // Calculate the offsets ... + var result = {}; + for (var i = 0; i < heights.length; i++) { + var even = i%2 == 0 ? 1 : -1; + + var zeroHeight = i == 0 ? 0 : heights[0].height/2 * even; + var middleHeight = 0; + for (var j=i-2; j>0; j=j-2) { + middleHeight += heights[j].height * even; + } + var finalHeight = i == 0 ? 0 : heights[i].height/2 * even; + + var yOffset = zeroHeight + middleHeight +finalHeight; + var xOffset = node.getSize().width + GridSorter.GRID_HORIZONTAR_SIZE; + + $assert(!isNaN(xOffset), "xOffset can not be null"); + $assert(!isNaN(yOffset), "yOffset can not be null"); + + result[heights[i].id] = {x:xOffset,y:yOffset}; + + } + return result; + }, + + /** + * @return {String} the print name of this class + */ + toString:function() { + return "Grid Sorter"; + } + +}); + +/** + * @constant + * @type {Number} + * @default + */ +GridSorter.GRID_HORIZONTAR_SIZE = 20; +/** + * @constant + * @type {Number} + * @default + */ +GridSorter.INTER_NODE_VERTICAL_DISTANCE = 50; + +export default GridSorter; diff --git a/packages/mindplot/lib/components/layout/LayoutManager.js b/packages/mindplot/lib/components/layout/LayoutManager.js new file mode 100644 index 00000000..ee5cae40 --- /dev/null +++ b/packages/mindplot/lib/components/layout/LayoutManager.js @@ -0,0 +1,271 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Events = require('../Events').default +const RootedTreeSet = require('./RootedTreeSet').default +const OriginalLayout = require('./OriginalLayout').default +const ChangeEvent = require('./ChangeEvent').default; + +const LayoutManager = new Class(/** @lends LayoutManager */{ + Extends: Events, + /** + * @constructs + * @extends mindplot.Events + * @param {} rootNodeId + * @param {} rootSize + * @throws will throw an error if the root node id is null or undefined + * @throws will throw an error if the root size is null + */ + initialize: function(rootNodeId, rootSize) { + $assert($defined(rootNodeId), "rootNodeId can not be null"); + $assert(rootSize, "rootSize can not be null"); + var position = position || {x:0, y:0}; + + this._treeSet = new RootedTreeSet(); + this._layout = new OriginalLayout(this._treeSet); + + var rootNode = this._layout.createNode(rootNodeId, rootSize, position, 'root'); + this._treeSet.setRoot(rootNode); + this._events = []; + }, + + /** + * @param id + * @param size + * @throws will throw an error if id is null or undefined + */ + updateNodeSize: function(id, size) { + $assert($defined(id), "id can not be null"); + + var node = this._treeSet.find(id); + node.setSize(size); + }, + + /** + * @param id + * @param value + * @throws will throw an error if id is null or undefined + * @throws will throw an error if value is null or undefined + * @return this + */ + updateShrinkState: function(id, value) { + $assert($defined(id), "id can not be null"); + $assert($defined(value), "value can not be null"); + + var node = this._treeSet.find(id); + node.setShrunken(value); + + return this; + }, + + /** + * @param id + * @return {@link RootedTreeSet}.find(id) + */ + find: function(id) { + return this._treeSet.find(id); + }, + + /** + * @param id + * @param position + * @throws will throw an error if id is null or undefined + * @throws will throw an error if position is null or undefined + * @throws will throw an error if the position's x property is null or undefined + * @throws will throw an error if the position's y property is null or undefined + */ + moveNode: function(id, position) { + $assert($defined(id), "id cannot be null"); + $assert($defined(position), "position cannot be null"); + $assert($defined(position.x), "x can not be null"); + $assert($defined(position.y), "y can not be null"); + + var node = this._treeSet.find(id); + // @Todo: this should not be here. This is broking the isolated node support... +// node.setFree(true); +// node.setFreeDisplacement({x:position.x - node.getPosition().x, y:position.y - node.getPosition().y}); + node.setPosition(position); + }, + + /** + * @param parentId + * @param childId + * @param order + * @throws will throw an error if parentId is null or undefined + * @throws will throw an error if childId is null or undefined + * @throws will throw an error if order is null or undefined + * @return this + */ + connectNode: function(parentId, childId, order) { + $assert($defined(parentId), "parentId cannot be null"); + $assert($defined(childId), "childId cannot be null"); + $assert($defined(order), "order cannot be null"); + + this._layout.connectNode(parentId, childId, order); + + return this; + }, + + /** + * @param id + * @throws will throw an error if id is null or undefined + * @return this + */ + disconnectNode: function(id) { + $assert($defined(id), "id can not be null"); + this._layout.disconnectNode(id); + + return this; + }, + + /** + * @param id + * @param size + * @param position + * @throws will throw an error if id is null or undefined + * @return this + */ + addNode:function(id, size, position) { + $assert($defined(id), "id can not be null"); + var result = this._layout.createNode(id, size, position, 'topic'); + this._treeSet.add(result); + + return this; + }, + + /** + * removes a node and its connection to parent if existing + * @param id + * @throws will throw an error if id is null or undefined + * @return this + */ + removeNode: function(id) { + $assert($defined(id), "id can not be null"); + var node = this._treeSet.find(id); + + // Is It connected ? + if (this._treeSet.getParent(node)) { + this.disconnectNode(id); + } + + // Remove the all the branch ... + this._treeSet.remove(id); + + return this; + }, + + /** + * @param {Number} parentId + * @param {Number=} nodeId + * @param {String=} position the position to use as mindplot.layout.Node.properties position + * property as '(x,y)' + * @param {Boolean=} free true specifies free node positioning + * @throws will throw an error if parentId is null or undefined + */ + predict: function(parentId, nodeId, position, free) { + $assert($defined(parentId), "parentId can not be null"); + + var parent = this._treeSet.find(parentId); + var node = nodeId ? this._treeSet.find(nodeId) : null; + var sorter = parent.getSorter(); + + var result = sorter.predict(this._treeSet, parent, node, position, free); + return {order:result[0],position:result[1]}; + }, + + /** + * logs dump to console + */ + dump: function() { + console.log(this._treeSet.dump()); + }, + + /** + * @param containerId + * @param {width:Number, height:Number} size + * @throws will throw an error if containerId is null or undefined + * @return canvas + */ + plot: function(containerId, size) { + $assert(containerId, "containerId cannot be null"); + size = size || {width:200,height:200}; + var squaresize = 10; + var canvas = Raphael(containerId, size.width, size.height); + canvas.drawGrid(0, 0, size.width, size.height, size.width / squaresize, size.height / squaresize); + this._treeSet.plot(canvas); + + return canvas; + }, + + /** + * initializes the layout to be updated + * @param fireEvents + * @return this + */ + layout: function(fireEvents) { + // File repositioning ... + this._layout.layout(); + + // Collect changes ... + this._collectChanges(); + + if ($(fireEvents).length>0 || fireEvents) { + this._flushEvents(); + } + + return this; + }, + + _flushEvents: function() { + _.each(this._events, function(event) { + this.fireEvent('change', event); + }, this); + this._events = []; + }, + + _collectChanges: function(nodes) { + if (!nodes) + nodes = this._treeSet.getTreeRoots(); + + _.each(nodes, function(node) { + if (node.hasOrderChanged() || node.hasPositionChanged()) { + + // Find or create a event ... + var id = node.getId(); + var event = this._events.some(function(event) { + return event.id == id; + }); + if (!event) { + event = new ChangeEvent(id); + } + + // Update nodes ... + event.setOrder(node.getOrder()); + event.setPosition(node.getPosition()); + + node.resetPositionState(); + node.resetOrderState(); + node.resetFreeState(); + this._events.push(event); + } + this._collectChanges(this._treeSet.getChildren(node)); + }, this); + } + +}); + +export default LayoutManager; diff --git a/packages/mindplot/lib/components/layout/Node.js b/packages/mindplot/lib/components/layout/Node.js new file mode 100644 index 00000000..5bf8c305 --- /dev/null +++ b/packages/mindplot/lib/components/layout/Node.js @@ -0,0 +1,222 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const Node = new Class(/** @lends Node */{ + /** + * @constructs + * @param id + * @param size + * @param position + * @param sorter + * @throws will throw an error if id is not a finite number or is null or undefined + * @throws will throw an error if size is null or undefined + * @throws will throw an error if position is null or undefined + * @throws will throw an error if sorter is null or undefined + */ + initialize:function (id, size, position, sorter) { + $assert(typeof id === 'number' && isFinite(id), "id can not be null"); + $assert(size, "size can not be null"); + $assert(position, "position can not be null"); + $assert(sorter, "sorter can not be null"); + + this._id = id; + this._sorter = sorter; + this._properties = {}; + + this.setSize(size); + this.setPosition(position); + this.setShrunken(false); + }, + + /** */ + getId:function () { + return this._id; + }, + + /** */ + setFree:function (value) { + this._setProperty('free', value); + }, + + /** */ + isFree:function () { + return this._getProperty('free'); + }, + + /** */ + hasFreeChanged:function () { + return this._isPropertyChanged('free'); + }, + + /** */ + hasFreeDisplacementChanged:function () { + return this._isPropertyChanged('freeDisplacement'); + }, + + /** */ + setShrunken:function (value) { + this._setProperty('shrink', value); + }, + + /** */ + areChildrenShrunken:function () { + return this._getProperty('shrink'); + }, + + /** */ + setOrder:function (order) { + $assert(typeof order === 'number' && isFinite(order), "Order can not be null. Value:" + order); + this._setProperty('order', order); + }, + + /** */ + resetPositionState:function () { + var prop = this._properties['position']; + if (prop) { + prop.hasChanged = false; + } + }, + + /** */ + resetOrderState:function () { + var prop = this._properties['order']; + if (prop) { + prop.hasChanged = false; + } + }, + + /** */ + resetFreeState:function () { + var prop = this._properties['freeDisplacement']; + if (prop) { + prop.hasChanged = false; + } + }, + + /** */ + getOrder:function () { + return this._getProperty('order'); + }, + + /** */ + hasOrderChanged:function () { + return this._isPropertyChanged('order'); + }, + + /** */ + hasPositionChanged:function () { + return this._isPropertyChanged('position'); + }, + + /** */ + hasSizeChanged:function () { + return this._isPropertyChanged('size'); + }, + + /** */ + getPosition:function () { + return this._getProperty('position'); + }, + + /** */ + setSize:function (size) { + $assert($defined(size), "Size can not be null"); + this._setProperty('size', Object.clone(size)); + }, + + /** */ + getSize:function () { + return this._getProperty('size'); + }, + + /** */ + setFreeDisplacement:function (displacement) { + $assert($defined(displacement), "Position can not be null"); + $assert($defined(displacement.x), "x can not be null"); + $assert($defined(displacement.y), "y can not be null"); + var oldDisplacement = this.getFreeDisplacement(); + var newDisplacement = {x:oldDisplacement.x + displacement.x, y:oldDisplacement.y + displacement.y}; + + this._setProperty('freeDisplacement', Object.clone(newDisplacement)); + }, + + /** */ + resetFreeDisplacement:function () { + this._setProperty('freeDisplacement', {x:0, y:0}); + }, + + /** */ + getFreeDisplacement:function () { + var freeDisplacement = this._getProperty('freeDisplacement'); + return (freeDisplacement || {x:0, y:0}); + }, + + /** */ + setPosition:function (position) { + $assert($defined(position), "Position can not be null"); + $assert($defined(position.x), "x can not be null"); + $assert($defined(position.y), "y can not be null"); + + // This is a performance improvement to avoid movements that really could be avoided. + var currentPos = this.getPosition(); + if (currentPos == null || Math.abs(currentPos.x - position.x) > 2 || Math.abs(currentPos.y - position.y) > 2) + this._setProperty('position', position); + }, + + _setProperty:function (key, value) { + var prop = this._properties[key]; + if (!prop) { + prop = { + hasChanged:false, + value:null, + oldValue:null + }; + } + + // Only update if the property has changed ... + if (JSON.stringify(prop.value) != JSON.stringify(value)) { + prop.oldValue = prop.value; + prop.value = value; + prop.hasChanged = true; + } + this._properties[key] = prop; + }, + + _getProperty:function (key) { + var prop = this._properties[key]; + return $defined(prop) ? prop.value : null; + }, + + _isPropertyChanged:function (key) { + var prop = this._properties[key]; + return prop ? prop.hasChanged : false; + }, + + /** */ + getSorter:function () { + return this._sorter; + }, + + /** @return {String} returns id, order, position, size and shrink information*/ + toString:function () { + return "[id:" + this.getId() + ", order:" + this.getOrder() + ", position: {" + this.getPosition().x + "," + this.getPosition().y + "}, size: {" + this.getSize().width + "," + this.getSize().height + "}, shrink:" + this.areChildrenShrunken() + "]"; + } + +}); + +export default Node; diff --git a/packages/mindplot/lib/components/layout/OriginalLayout.js b/packages/mindplot/lib/components/layout/OriginalLayout.js new file mode 100644 index 00000000..ce40cf58 --- /dev/null +++ b/packages/mindplot/lib/components/layout/OriginalLayout.js @@ -0,0 +1,258 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const Node = require('./Node').default; +const SymmetricSorter = require('./SymmetricSorter').default +const BalancedSorter = require('./BalancedSorter').default; + +const OriginalLayout = new Class(/** @lends OriginalLayout */{ + /** + * @constructs + * @param treeSet + */ + initialize:function (treeSet) { + this._treeSet = treeSet; + }, + + /** */ + createNode:function (id, size, position, type) { + $assert($defined(id), "id can not be null"); + $assert(size, "size can not be null"); + $assert(position, "position can not be null"); + $assert(type, "type can not be null"); + + var strategy = type === 'root' ? + OriginalLayout.BALANCED_SORTER : + OriginalLayout.SYMMETRIC_SORTER; + return new Node(id, size, position, strategy); + }, + + /** */ + connectNode:function (parentId, childId, order) { + + var parent = this._treeSet.find(parentId); + var child = this._treeSet.find(childId); + + // Insert the new node ... + var sorter = parent.getSorter(); + sorter.insert(this._treeSet, parent, child, order); + + // Connect the new node ... + this._treeSet.connect(parentId, childId); + + // Fire a basic validation ... + sorter.verify(this._treeSet, parent); + }, + + /** */ + disconnectNode:function (nodeId) { + var node = this._treeSet.find(nodeId); + var parent = this._treeSet.getParent(node); + $assert(parent, "Node already disconnected"); + + // Make it fixed + node.setFree(false); + node.resetFreeDisplacement(); + + // Remove from children list. + var sorter = parent.getSorter(); + sorter.detach(this._treeSet, node); + + // Disconnect the new node ... + this._treeSet.disconnect(nodeId); + + // Fire a basic validation ... + parent.getSorter().verify(this._treeSet, parent); + }, + + /** */ + layout:function () { + var roots = this._treeSet.getTreeRoots(); + _.each(roots, function (node) { + + // Calculate all node heights ... + var sorter = node.getSorter(); + + var heightById = sorter.computeChildrenIdByHeights(this._treeSet, node); + + this._layoutChildren(node, heightById); + + this._fixOverlapping(node, heightById); + }, this); + }, + + _layoutChildren:function (node, heightById) { + + var nodeId = node.getId(); + var children = this._treeSet.getChildren(node); + var parent = this._treeSet.getParent(node); + var childrenOrderMoved = children.some(function (child) { + return child.hasOrderChanged(); + }); + var childrenSizeChanged = children.some(function (child) { + return child.hasSizeChanged(); + }); + + // If ether any of the nodes has been changed of position or the height of the children is not + // the same, children nodes must be repositioned .... + var newBranchHeight = heightById[nodeId]; + + var parentHeightChanged = $defined(parent) ? parent._heightChanged : false; + var heightChanged = node._branchHeight != newBranchHeight; + node._heightChanged = heightChanged || parentHeightChanged; + + if (childrenOrderMoved || childrenSizeChanged || heightChanged || parentHeightChanged) { + var sorter = node.getSorter(); + var offsetById = sorter.computeOffsets(this._treeSet, node); + var parentPosition = node.getPosition(); + var me = this; + _.each(children, function (child) { + var offset = offsetById[child.getId()]; + + var childFreeDisplacement = child.getFreeDisplacement(); + var direction = node.getSorter().getChildDirection(me._treeSet, child); + + if ((direction > 0 && childFreeDisplacement.x < 0) || (direction < 0 && childFreeDisplacement.x > 0)) { + child.resetFreeDisplacement(); + child.setFreeDisplacement({x:-childFreeDisplacement.x, y:childFreeDisplacement.y}); + } + + offset.x += child.getFreeDisplacement().x; + offset.y += child.getFreeDisplacement().y; + + var parentX = parentPosition.x; + var parentY = parentPosition.y; + + var newPos = {x:parentX + offset.x, y:parentY + offset.y + me._calculateAlignOffset(node, child, heightById)}; + me._treeSet.updateBranchPosition(child, newPos); + }); + + node._branchHeight = newBranchHeight; + } + + // Continue reordering the children nodes ... + _.each(children, function (child) { + this._layoutChildren(child, heightById); + }, this); + }, + + _calculateAlignOffset:function (node, child, heightById) { + if (child.isFree()) { + return 0; + } + + var offset = 0; + + var nodeHeight = node.getSize().height; + var childHeight = child.getSize().height; + + if (this._treeSet.isStartOfSubBranch(child) && this._branchIsTaller(child, heightById)) { + if (this._treeSet.hasSinglePathToSingleLeaf(child)) { + offset = heightById[child.getId()] / 2 - (childHeight + child.getSorter()._getVerticalPadding() * 2) / 2; + } else { + offset = this._treeSet.isLeaf(child) ? 0 : -(childHeight - nodeHeight) / 2; + } + } else if (nodeHeight > childHeight) { + if (this._treeSet.getSiblings(child).length > 0) { + offset = 0; + } else { + offset = nodeHeight / 2 - childHeight / 2; + } + } + else if (childHeight > nodeHeight) { + if (this._treeSet.getSiblings(child).length > 0) { + offset = 0; + } else { + offset = -(childHeight / 2 - nodeHeight / 2); + } + } + + return offset; + }, + + _branchIsTaller:function (node, heightById) { + return heightById[node.getId()] > (node.getSize().height + node.getSorter()._getVerticalPadding() * 2); + }, + + _fixOverlapping:function (node, heightById) { + var children = this._treeSet.getChildren(node); + + if (node.isFree()) { + this._shiftBranches(node, heightById); + } + + _.each(children, function (child) { + this._fixOverlapping(child, heightById); + }, this); + }, + + _shiftBranches:function (node, heightById) { + var shiftedBranches = [node]; + + var siblingsToShift = this._treeSet.getSiblingsInVerticalDirection(node, node.getFreeDisplacement().y); + var last = node; + _.each(siblingsToShift, function (sibling) { + var overlappingOccurs = shiftedBranches.some(function (shiftedBranch) { + return this._branchesOverlap(shiftedBranch, sibling, heightById); + }, this); + + if (!sibling.isFree() || overlappingOccurs) { + var sAmount = node.getFreeDisplacement().y; + this._treeSet.shiftBranchPosition(sibling, 0, sAmount); + shiftedBranches.push(sibling); + } + }, this); + + var branchesToShift = this._treeSet.getBranchesInVerticalDirection(node, node.getFreeDisplacement().y).filter(function (branch) { + return !shiftedBranches.contains(branch); + }); + + _.each(branchesToShift, function (branch) { + var bAmount = node.getFreeDisplacement().y; + this._treeSet.shiftBranchPosition(branch, 0, bAmount); + shiftedBranches.push(branch); + last = branch; + }, this); + }, + + _branchesOverlap:function (branchA, branchB, heightById) { + // a branch doesn't really overlap with itself + if (branchA == branchB) { + return false; + } + + var topA = branchA.getPosition().y - heightById[branchA.getId()] / 2; + var bottomA = branchA.getPosition().y + heightById[branchA.getId()] / 2; + var topB = branchB.getPosition().y - heightById[branchB.getId()] / 2; + var bottomB = branchB.getPosition().y + heightById[branchB.getId()] / 2; + + return !(topA >= bottomB || bottomA <= topB); + } + +}); + + +/** + * @type {mindplot.layout.SymmetricSorter} + */ +OriginalLayout.SYMMETRIC_SORTER = new SymmetricSorter(); +/** + * @type {mindplot.layout.BalancedSorter} + */ +OriginalLayout.BALANCED_SORTER = new BalancedSorter(); + +export default OriginalLayout; diff --git a/packages/mindplot/lib/components/layout/RootedTreeSet.js b/packages/mindplot/lib/components/layout/RootedTreeSet.js new file mode 100644 index 00000000..907bca33 --- /dev/null +++ b/packages/mindplot/lib/components/layout/RootedTreeSet.js @@ -0,0 +1,396 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const RootedTreeSet = new Class(/** @lends RootedTreeSet */{ + /** @constructs */ + initialize:function () { + this._rootNodes = []; + }, + + /** + * @param root + * @throws will throw an error if root is null or undefined + */ + setRoot:function (root) { + $assert(root, 'root can not be null'); + this._rootNodes.push(this._decodate(root)); + }, + + /** getter */ + getTreeRoots:function () { + return this._rootNodes; + }, + + _decodate:function (node) { + node._children = []; + return node; + }, + + /** + * @param {mindplot.model.NodeModel} node + * @throws will throw an error if node is null or undefined + * @throws will throw an error if node with id already exists + * @throws will throw an error if node has been added already + */ + add:function (node) { + $assert(node, 'node can not be null'); + $assert(!this.find(node.getId(), false), 'node already exits with this id. Id:' + node.getId()); + $assert(!node._children, 'node already added'); + this._rootNodes.push(this._decodate(node)); + }, + + + /** + * @param nodeId + * @throws will throw an error if nodeId is null or undefined + */ + remove:function (nodeId) { + $assert($defined(nodeId), 'nodeId can not be null'); + var node = this.find(nodeId); + this._rootNodes.erase(node); + }, + + /** + * @param parentId + * @param childId + * @throws will throw an error if parentId is null or undefined + * @throws will throw an error if childId is null or undefined + * @throws will throw an error if node with id childId is already a child of parent + */ + connect:function (parentId, childId) { + $assert($defined(parentId), 'parent can not be null'); + $assert($defined(childId), 'child can not be null'); + + var parent = this.find(parentId); + var child = this.find(childId, true); + $assert(!child._parent, 'node already connected. Id:' + child.getId() + ",previous:" + child._parent); + + parent._children.push(child); + child._parent = parent; + this._rootNodes.erase(child); + }, + + /** + * @param nodeId + * @throws will throw an error if nodeId is null or undefined + * @throws will throw an error if node is not connected + */ + disconnect:function (nodeId) { + $assert($defined(nodeId), 'nodeId can not be null'); + var node = this.find(nodeId); + $assert(node._parent, "Node is not connected"); + + node._parent._children.erase(node); + this._rootNodes.push(node); + node._parent = null; + }, + + /** + * @param id + * @param validate + * @throws will throw an error if id is null or undefined + * @throws will throw an error if node cannot be found + * @return node + */ + find:function (id, validate) { + $assert($defined(id), 'id can not be null'); + + var graphs = this._rootNodes; + var result = null; + for (var i = 0; i < graphs.length; i++) { + var node = graphs[i]; + result = this._find(id, node); + if (result) { + break; + } + } + validate = !$defined(validate) ? true : validate; + $assert(validate ? result : true, 'node could not be found id:' + id + "\n,RootedTreeSet" + this.dump()); + return result; + + }, + + _find:function (id, parent) { + if (parent.getId() == id) { + return parent; + + } + + var result = null; + var children = parent._children; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + result = this._find(id, child); + if (result) + break; + } + + return result; + }, + + /** + * @param node + * @throws will throw an error if nodeId is null or undefined + * @return children + */ + getChildren:function (node) { + $assert(node, 'node cannot be null'); + return node._children; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return root node or the provided node, if it has no parent + */ + getRootNode:function (node) { + $assert(node, "node cannot be null"); + var parent = this.getParent(node); + if ($defined(parent)) { + return this.getRootNode(parent); + } + + return node; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return {Array} ancestors*/ + getAncestors:function (node) { + $assert(node, 'node cannot be null'); + return this._getAncestors(this.getParent(node), []); + }, + + _getAncestors:function (node, ancestors) { + var result = ancestors; + if (node) { + result.push(node); + this._getAncestors(this.getParent(node), result); + } + return result; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return {Array} siblings + */ + getSiblings:function (node) { + $assert(node, 'node cannot be null'); + if (!$defined(node._parent)) { + return []; + } + var siblings = node._parent._children.filter(function (child) { + return child != node; + }); + return siblings; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return {Boolean} whether the node has a single path to a single leaf (no branching) + */ + hasSinglePathToSingleLeaf:function (node) { + $assert(node, 'node cannot be null'); + return this._hasSinglePathToSingleLeaf(node); + }, + + _hasSinglePathToSingleLeaf:function (node) { + var children = this.getChildren(node); + + if (children.length == 1) { + return this._hasSinglePathToSingleLeaf(children[0]); + } + + return children.length == 0; + }, + + /** + * @param node + * @return {Boolean} whether the node is the start of a subbranch*/ + isStartOfSubBranch:function (node) { + return this.getSiblings(node).length > 0 && this.getChildren(node).length == 1; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return {Boolean} whether the node is a leaf + */ + isLeaf:function (node) { + $assert(node, 'node cannot be null'); + return this.getChildren(node).length == 0; + }, + + /** + * @param node + * @throws will throw an error if node is null or undefined + * @return parent + */ + getParent:function (node) { + $assert(node, 'node cannot be null'); + return node._parent; + }, + + /** + * @return result + */ + dump:function () { + var branches = this._rootNodes; + var result = ""; + for (var i = 0; i < branches.length; i++) { + var branch = branches[i]; + result += this._dump(branch, ""); + } + return result; + }, + + _dump:function (node, indent) { + var result = indent + node + "\n"; + var children = this.getChildren(node); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + result += this._dump(child, indent + " "); + } + + return result; + }, + + /** + * @param canvas + */ + plot:function (canvas) { + var branches = this._rootNodes; + for (var i = 0; i < branches.length; i++) { + var branch = branches[i]; + this._plot(canvas, branch); + } + }, + + _plot:function (canvas, node, root) { + var children = this.getChildren(node); + var cx = node.getPosition().x + canvas.width / 2 - node.getSize().width / 2; + var cy = node.getPosition().y + canvas.height / 2 - node.getSize().height / 2; + var rect = canvas.rect(cx, cy, node.getSize().width, node.getSize().height); + var order = node.getOrder() == null ? "r" : node.getOrder(); + var text = canvas.text(node.getPosition().x + canvas.width / 2, node.getPosition().y + canvas.height / 2, node.getId() + "[" + order + "]"); + text.attr('fill', '#FFF'); + var fillColor = this._rootNodes.contains(node) ? "#000" : (node.isFree() ? "#abc" : "#c00"); + rect.attr('fill', fillColor); + + var rectPosition = {x:rect.attr("x") - canvas.width / 2 + rect.attr("width") / 2, y:rect.attr("y") - canvas.height / 2 + rect.attr("height") / 2}; + var rectSize = {width:rect.attr("width"), height:rect.attr("height")}; + rect.click(function () { + console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + rectSize.width + "x" + rectSize.height + ", freeDisplacement:(" + node.getFreeDisplacement().x + "," + node.getFreeDisplacement().y + ")]"); + }); + text.click(function () { + console.log("[id:" + node.getId() + ", order:" + node.getOrder() + ", position:(" + rectPosition.x + "," + rectPosition.y + "), size:" + rectSize.width + "x" + rectSize.height + ", freeDisplacement:(" + node.getFreeDisplacement().x + "," + node.getFreeDisplacement().y + ")]"); + }); + + for (var i = 0; i < children.length; i++) { + var child = children[i]; + this._plot(canvas, child); + } + }, + + /** + * @param node + * @param position + */ + updateBranchPosition:function (node, position) { + + var oldPos = node.getPosition(); + node.setPosition(position); + + var xOffset = oldPos.x - position.x; + var yOffset = oldPos.y - position.y; + + var children = this.getChildren(node); + var me = this; + _.each(children, function (child) { + me.shiftBranchPosition(child, xOffset, yOffset); + }); + + }, + + /** + * @param node + * @param xOffset + * @param yOffset + */ + shiftBranchPosition:function (node, xOffset, yOffset) { + var position = node.getPosition(); + node.setPosition({x:position.x + xOffset, y:position.y + yOffset}); + + var children = this.getChildren(node); + var me = this; + _.each(children, function (child) { + me.shiftBranchPosition(child, xOffset, yOffset); + }); + }, + + /** + * @param node + * @param yOffset + * @return siblings in the offset (vertical) direction, i.e. with lower or higher order, respectively + */ + getSiblingsInVerticalDirection:function (node, yOffset) { + // siblings with lower or higher order, depending on the direction of the offset and on the same side as their parent + var parent = this.getParent(node); + var siblings = this.getSiblings(node).filter(function (sibling) { + var sameSide = node.getPosition().x > parent.getPosition().x ? sibling.getPosition().x > parent.getPosition().x : sibling.getPosition().x < parent.getPosition().x; + var orderOK = yOffset < 0 ? sibling.getOrder() < node.getOrder() : sibling.getOrder() > node.getOrder(); + return orderOK && sameSide; + }); + + if (yOffset < 0) { + siblings.reverse(); + } + + return siblings; + }, + + /** + * @param node + * @param yOffset + * @return branches of the root node on the same side as the given node's, in the given + * vertical direction + */ + getBranchesInVerticalDirection:function (node, yOffset) { + // direct descendants of the root that do not contain the node and are on the same side + // and on the direction of the offset + var rootNode = this.getRootNode(node); + var branches = this.getChildren(rootNode).filter(function (child) { + return this._find(node.getId(), child); + }, this); + + var branch = branches[0]; + var rootDescendants = this.getSiblings(branch).filter(function (sibling) { + var sameSide = node.getPosition().x > rootNode.getPosition().x ? sibling.getPosition().x > rootNode.getPosition().x : sibling.getPosition().x < rootNode.getPosition().x; + var sameDirection = yOffset < 0 ? sibling.getOrder() < branch.getOrder() : sibling.getOrder() > branch.getOrder(); + return sameSide && sameDirection; + }, this); + + return rootDescendants; + } + +}); + +export default RootedTreeSet; diff --git a/packages/mindplot/lib/components/layout/SymmetricSorter.js b/packages/mindplot/lib/components/layout/SymmetricSorter.js new file mode 100644 index 00000000..ed290052 --- /dev/null +++ b/packages/mindplot/lib/components/layout/SymmetricSorter.js @@ -0,0 +1,283 @@ +/* + * Copyright [2015] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const AbstractBasicSorter = require('./AbstractBasicSorter').default; + +const SymmetricSorter = new Class(/** @lends SymmetricSorter */{ + Extends: AbstractBasicSorter, + /** + * @constructs + * @extends mindplot.layout.AbstractBasicSorter + */ + initialize:function () { + + }, + + /** + * Predict the order and position of a dragged node. + * + * @param graph The tree set + * @param parent The parent of the node + * @param node The node + * @param position The position of the drag + * @param free Free drag or not + * @return {*} + */ + predict:function (graph, parent, node, position, free) { + + var self = this; + var rootNode = graph.getRootNode(parent); + + // If its a free node... + if (free) { + $assert($defined(position), "position cannot be null for predict in free positioning"); + $assert($defined(node), "node cannot be null for predict in free positioning"); + + var direction = this._getRelativeDirection(rootNode.getPosition(), parent.getPosition()); + var limitXPos = parent.getPosition().x + direction * (parent.getSize().width / 2 + node.getSize().width / 2 + SymmetricSorter.INTERNODE_HORIZONTAL_PADDING); + + var xPos = direction > 0 ? + (position.x >= limitXPos ? position.x : limitXPos) : + (position.x <= limitXPos ? position.x : limitXPos); + + return [0, {x:xPos, y:position.y}]; + } + + // Its not a dragged node (it is being added) + if (!node) { + var parentDirection = self._getRelativeDirection(rootNode.getPosition(), parent.getPosition()); + var position = { + x:parent.getPosition().x + parentDirection * (parent.getSize().width + SymmetricSorter.INTERNODE_HORIZONTAL_PADDING), + y:parent.getPosition().y + }; + return [graph.getChildren(parent).length, position]; + } + + // If it is a dragged node... + $assert($defined(position), "position cannot be null for predict in dragging"); + var nodeDirection = this._getRelativeDirection(rootNode.getPosition(), node.getPosition()); + var positionDirection = this._getRelativeDirection(rootNode.getPosition(), position); + var siblings = graph.getSiblings(node); + + // node has no siblings and its trying to reconnect to its own parent + var sameParent = parent == graph.getParent(node); + if (siblings.length == 0 && nodeDirection == positionDirection && sameParent) { + return [node.getOrder(), node.getPosition()]; + } + + var parentChildren = graph.getChildren(parent); + + if (parentChildren.length == 0) { + // Fit as a child of the parent node... + var position = { + x:parent.getPosition().x + positionDirection * (parent.getSize().width + SymmetricSorter.INTERNODE_HORIZONTAL_PADDING), + y:parent.getPosition().y + }; + return [0, position]; + } else { + // Try to fit within ... + var result = null; + var last = parentChildren.getLast(); + for (var i = 0; i < parentChildren.length; i++) { + var parentChild = parentChildren[i]; + var nodeAfter = (i + 1) == parentChild.length ? null : parentChildren[i + 1]; + + // Fit at the bottom + if (!nodeAfter && position.y > parentChild.getPosition().y) { + var order = (graph.getParent(node) && graph.getParent(node).getId() == parent.getId()) ? + last.getOrder() : last.getOrder() + 1; + var position = { + x:parentChild.getPosition().x, + y:parentChild.getPosition().y + parentChild.getSize().height + SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 + }; + return [order, position]; + } + + // Fit after this node + if (nodeAfter && position.y > parentChild.getPosition().y && position.y < nodeAfter.getPosition().y) { + if (nodeAfter.getId() == node.getId() || parentChild.getId() == node.getId()) { + return [node.getOrder(), node.getPosition()]; + } else { + var order = position.y > node.getPosition().y ? + nodeAfter.getOrder() - 1 : parentChild.getOrder() + 1; + var position = { + x:parentChild.getPosition().x, + y:parentChild.getPosition().y + (nodeAfter.getPosition().y - parentChild.getPosition().y) / 2 + }; + + return [order, position]; + } + } + } + } + + // Position wasn't below any node, so it must be fitted above the first + var first = parentChildren[0]; + var position = { + x:first.getPosition().x, + y:first.getPosition().y - first.getSize().height - SymmetricSorter.INTERNODE_VERTICAL_PADDING * 2 + }; + return [0, position]; + }, + + /** + * @param treeSet + * @param parent + * @param child + * @param order + * @throws will throw an error if the order is not strictly continuous + */ + insert:function (treeSet, parent, child, order) { + var children = this._getSortedChildren(treeSet, parent); + $assert(order <= children.length, "Order must be continues and can not have holes. Order:" + order); + + // Shift all the elements in one . + for (var i = order; i < children.length; i++) { + var node = children[i]; + node.setOrder(i + 1); + } + child.setOrder(order); + }, + + /** + * @param treeSet + * @param node + * @throws will throw an error if the node is in the wrong position*/ + detach:function (treeSet, node) { + var parent = treeSet.getParent(node); + var children = this._getSortedChildren(treeSet, parent); + var order = node.getOrder(); + $assert(children[order] === node, "Node seems not to be in the right position"); + + // Shift all the nodes ... + for (var i = node.getOrder() + 1; i < children.length; i++) { + var child = children[i]; + child.setOrder(child.getOrder() - 1); + } + node.setOrder(0); + }, + + /** + * @param treeSet + * @param node + * @throws will throw an error if treeSet is null or undefined + * @throws will throw an error if node is null or undefined + * @throws will throw an error if the calculated x offset cannot be converted to a numeric + * value, is null or undefined + * @throws will throw an error if the calculated y offset cannot be converted to a numeric + * value, is null or undefined + * @return offsets + */ + computeOffsets:function (treeSet, node) { + $assert(treeSet, "treeSet can no be null."); + $assert(node, "node can no be null."); + + var children = this._getSortedChildren(treeSet, node); + + // Compute heights ... + var heights = children.map( + function (child) { + return {id:child.getId(), order:child.getOrder(), position:child.getPosition(), width:child.getSize().width, height:this._computeChildrenHeight(treeSet, child)}; + }, this).reverse(); + + // Compute the center of the branch ... + var totalHeight = 0; + _.each(heights, function (elem) { + totalHeight += elem.height; + }); + var ysum = totalHeight / 2; + + // Calculate the offsets ... + var result = {}; + for (var i = 0; i < heights.length; i++) { + ysum = ysum - heights[i].height; + var childNode = treeSet.find(heights[i].id); + var direction = this.getChildDirection(treeSet, childNode); + + var yOffset = ysum + heights[i].height / 2; + var xOffset = direction * (heights[i].width / 2 + node.getSize().width / 2 + SymmetricSorter.INTERNODE_HORIZONTAL_PADDING); + + $assert(!isNaN(xOffset), "xOffset can not be null"); + $assert(!isNaN(yOffset), "yOffset can not be null"); + + result[heights[i].id] = {x:xOffset, y:yOffset}; + } + return result; + }, + + /** + * @param treeSet + * @param node + * @throws will throw an error if order elements are missing + */ + verify:function (treeSet, node) { + // Check that all is consistent ... + var children = this._getSortedChildren(treeSet, node); + + for (var i = 0; i < children.length; i++) { + $assert(children[i].getOrder() == i, "missing order elements"); + } + }, + + /** + * @param treeSet + * @param child + * @return direction of the given child from its parent or from the root node, if isolated*/ + getChildDirection:function (treeSet, child) { + $assert(treeSet, "treeSet can no be null."); + $assert(treeSet.getParent(child), "This should not happen"); + + var result; + var rootNode = treeSet.getRootNode(child); + if (treeSet.getParent(child) == rootNode) { + // This is the case of a isolated child ... In this case, the directions is based on the root. + result = Math.sign(rootNode.getPosition().x); + } else { + // if this is not the case, honor the direction of the parent ... + var parent = treeSet.getParent(child); + var grandParent = treeSet.getParent(parent); + var sorter = grandParent.getSorter(); + result = sorter.getChildDirection(treeSet, parent); + + } + return result; + }, + + /** @return {String} the print name of this class */ + toString:function () { + return "Symmetric Sorter"; + }, + + _getVerticalPadding:function () { + return SymmetricSorter.INTERNODE_VERTICAL_PADDING; + } +}); + +/** + * @constant + * @type {Number} + * @default + */ +SymmetricSorter.INTERNODE_VERTICAL_PADDING = 5; +/** + * @constant + * @type {Number} + * @default + */ +SymmetricSorter.INTERNODE_HORIZONTAL_PADDING = 30; + +export default SymmetricSorter diff --git a/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.Request.js b/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.Request.js new file mode 100644 index 00000000..a9c7eee9 --- /dev/null +++ b/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.Request.js @@ -0,0 +1,51 @@ +const BootstrapDialog = require('./BootstrapDialog').default + +BootstrapDialog.Request = new Class({ + + Extends: BootstrapDialog, + + initialize: function(url, title, options) { + this.parent(title, options); + this.requestOptions = {}; + this.requestOptions.cache = false; + var me = this; + this.requestOptions.fail = function(xhr) { + // Intercept form requests ... + console.log("Failure:"); + console.log(xhr); + }; + + this.requestOptions.success = function() { + // Intercept form requests ... + var forms = me._native.find('form'); + _.each(forms, function(form) { + $(form).on('submit', function(event) { + // Intercept form ... + me.requestOptions.url = form.action; + me.requestOptions.method = form.method ? form.method : 'post'; + $.ajax(me.requestOptions); + event.stopPropagation(); + return false; + }); + }); + }; + + this._native.find('.modal-body').load(url, function () { + me.acceptButton.unbind('click').click(function () { + submitDialogForm(); + }); + me._native.on('hidden.bs.modal', function () { + $(this).remove(); + }); + me.show(); + }); + }, + + onDialogShown: function() { + if (typeof(onDialogShown) == "function") { + onDialogShown(); + } + } + + +}); diff --git a/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.js b/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.js new file mode 100644 index 00000000..62d2eefc --- /dev/null +++ b/packages/mindplot/lib/components/libraries/bootstrap/BootstrapDialog.js @@ -0,0 +1,115 @@ +const Options = require('../../Options').default; + +const BootstrapDialog = new Class({ + Implements: Options, + + options: { + cancelButton: false, + closeButton: false, + acceptButton: true, + removeButton:false, + errorMessage: false, + onEventData:{} + }, + + initialize: function (title, options) { + this.setOptions(options); + this.options.onEventData.dialog = this; + this._native = $('').append(''); + var content = $(''); + var header = this._buildHeader(title); + if (header) { + content.append(header); + } + var body = $(''); + if(this.options.errorMessage){ + var error = $('
'); + error.hide(); + body.append(error); + } + content.append(body); + var footer = this._buildFooter(); + if (footer) { + content.append(footer); + } + this._native.find(".modal-dialog").append(content); + this._native.on('hidden.bs.modal', function() { + $(this).remove(); + }); + this._native.on('shown.bs.modal', this.onDialogShown); + }, + + _buildFooter: function() { + var footer = null; + if (this.options.acceptButton || this.options.removeButton || this.options.cancelButton) { + footer = $('