diff --git a/dist/api/classes/baseapp.html b/dist/api/classes/baseapp.html index 18c4a9b..5cb45eb 100644 --- a/dist/api/classes/baseapp.html +++ b/dist/api/classes/baseapp.html @@ -176,7 +176,7 @@
Inherited from MainFrame.addDocumentControls
Inherited from BaseApp._messageBox
Inherited from BaseApp._toggleEdgeLabelHandlers
Inherited from BaseApp.updateTheme
Overrides MainFrame.updateTheme
TWO nodes are required to start relation path discovery.
These items will be deleted. Are you sure?
emit
Parameters
@@ -485,7 +485,7 @@fire
Parameters
@@ -512,7 +512,7 @@fits
Parameters
@@ -538,7 +538,7 @@flagNodes
Parameters
@@ -565,7 +565,7 @@focusNodes
Parameters
@@ -589,7 +589,7 @@getGraphService
Returns GraphService
@@ -607,7 +607,7 @@getNodeById
Parameters
@@ -631,7 +631,7 @@getRequiredControl
Parameters
@@ -655,7 +655,7 @@getRequiredControlLike
Type parameters
@@ -685,7 +685,7 @@getScreenData
Returns NodeEdgeSet
@@ -703,7 +703,7 @@insertEdges
Parameters
@@ -727,7 +727,7 @@insertNodes
loadGraph
loadGson
Parameters
@@ -835,7 +835,7 @@lockScale
Parameters
@@ -862,7 +862,7 @@notifyClearAll
Returns void
@@ -880,7 +880,7 @@off
Parameters
@@ -925,7 +925,7 @@on
Parameters
@@ -969,7 +969,7 @@Protected
_completed: boolean = false
@@ -147,7 +147,7 @@ _pointer: number = 0
@@ -157,7 +157,7 @@ _taskId: number = 0
@@ -167,7 +167,7 @@ _timerId: number = 0
@@ -177,7 +177,7 @@ paths: RELATION_PATH[] = []
@@ -194,7 +194,7 @@
Parameters
@@ -992,7 +992,7 @@pickup
Parameters
@@ -1037,7 +1037,7 @@placeNodes
Parameters
@@ -1061,7 +1061,7 @@redraw
Returns void
@@ -1079,7 +1079,7 @@removeControlLike
Type parameters
@@ -1109,7 +1109,7 @@scaleTo
Parameters
@@ -1133,7 +1133,7 @@search
Parameters
@@ -1177,7 +1177,7 @@showGraph
Parameters
@@ -1216,7 +1216,7 @@showNodesOfCategory
Parameters
@@ -1257,7 +1257,7 @@toggleDraggable
Parameters
@@ -1280,7 +1280,7 @@toggleEdgeColor
Parameters
@@ -1303,7 +1303,7 @@toggleEdges
Parameters
@@ -1326,7 +1326,7 @@toggleFaces
Parameters
@@ -1349,7 +1349,7 @@toggleNavigationButtons
Parameters
@@ -1372,7 +1372,7 @@toggleNodeBorder
Parameters
@@ -1395,7 +1395,7 @@toggleShadow
Parameters
@@ -1418,7 +1418,7 @@toggleShowEdgeLabelAlways
Parameters
@@ -1441,7 +1441,7 @@toggleWeights
Parameters
@@ -1465,7 +1465,7 @@updateEdges
Parameters
@@ -1489,7 +1489,7 @@updateGraph
Parameters
@@ -1528,7 +1528,7 @@updateNetworkOptions
Parameters
@@ -1552,7 +1552,7 @@updateNodes
Parameters
@@ -1576,7 +1576,7 @@updateTheme
Parameters
diff --git a/dist/api/classes/communityctrl.html b/dist/api/classes/communityctrl.html index e2cfe72..bb7e5ce 100644 --- a/dist/api/classes/communityctrl.html +++ b/dist/api/classes/communityctrl.html @@ -228,7 +228,7 @@bind
Parameters
@@ -354,7 +354,7 @@getTypeName
Returns string
@@ -468,7 +468,7 @@onCreate
Parameters
@@ -492,7 +492,7 @@onDestroy
Parameters
@@ -774,7 +774,7 @@toggle
Parameters
diff --git a/dist/api/classes/connectctrl.html b/dist/api/classes/connectctrl.html index e6e07d8..9c9c061 100644 --- a/dist/api/classes/connectctrl.html +++ b/dist/api/classes/connectctrl.html @@ -436,7 +436,7 @@getTypeName
Returns string
@@ -521,7 +521,7 @@loadGsonString
Returns void
@@ -538,7 +538,7 @@loadGsonUrl
Returns void
@@ -555,7 +555,7 @@loadRemoteServer
Returns void
@@ -619,7 +619,7 @@onBindElement
Parameters
@@ -699,7 +699,7 @@onResize
Parameters
diff --git a/dist/api/classes/controlfactory.html b/dist/api/classes/controlfactory.html index 4844848..a0e8f38 100644 --- a/dist/api/classes/controlfactory.html +++ b/dist/api/classes/controlfactory.html @@ -103,7 +103,7 @@constructor
Returns ControlFactory
@@ -123,7 +123,7 @@Static createControl
Parameters
diff --git a/dist/api/classes/expansionctrl.html b/dist/api/classes/expansionctrl.html index 290a4cb..ecd5651 100644 --- a/dist/api/classes/expansionctrl.html +++ b/dist/api/classes/expansionctrl.html @@ -230,7 +230,7 @@clear
Returns void
@@ -247,7 +247,7 @@collapse
Parameters
@@ -353,7 +353,7 @@expand
Parameters
@@ -396,7 +396,7 @@getTypeName
Returns string
@@ -413,7 +413,7 @@isExpanded
Parameters
@@ -533,7 +533,7 @@onCreate
Parameters
@@ -557,7 +557,7 @@onDestroy
Parameters
diff --git a/dist/api/classes/findrelationstask.html b/dist/api/classes/findrelationstask.html index 2df63a1..cabf497 100644 --- a/dist/api/classes/findrelationstask.html +++ b/dist/api/classes/findrelationstask.html @@ -115,7 +115,7 @@constructor
Parameters
@@ -137,7 +137,7 @@_completed
_pointer
_taskId
_timerId
paths
readMore
Parameters
@@ -217,7 +217,7 @@start
Parameters
@@ -249,7 +249,7 @@stop
Returns void
diff --git a/dist/api/classes/findrelationstaskmanager.html b/dist/api/classes/findrelationstaskmanager.html index 8916b26..3633e9b 100644 --- a/dist/api/classes/findrelationstaskmanager.html +++ b/dist/api/classes/findrelationstaskmanager.html @@ -98,7 +98,7 @@createTask
Returns FindRelationsTask
@@ -115,7 +115,7 @@getTask
Parameters
diff --git a/dist/api/classes/graphexplorer.html b/dist/api/classes/graphexplorer.html index b673581..7ca638e 100644 --- a/dist/api/classes/graphexplorer.html +++ b/dist/api/classes/graphexplorer.html @@ -165,7 +165,7 @@constructor
Parameters
@@ -188,7 +188,7 @@Protected _ctrls
@@ -199,7 +199,7 @@Protected _messageBox
Inherited from BaseApp._messageBox
-- Defined in app/app.ts:11
+ - Defined in app/app.ts:11
@@ -210,7 +210,7 @@Protected _selector
@@ -221,7 +221,7 @@Protected _toggleEdge
Inherited from BaseApp._toggleEdgeLabelHandlers
-- Defined in app/app.ts:10
+ - Defined in app/app.ts:10
@@ -239,7 +239,7 @@Protected _notifyControl
Parameters
@@ -266,7 +266,7 @@addControl
Type parameters
@@ -296,7 +296,7 @@Protected addDocument
@@ -445,7 +445,7 @@
@@ -748,7 +748,7 @@
@@ -794,7 +794,7 @@
Inherited from MainFrame.addDocumentControls
-- Defined in mainframe.ts:134
+ - Defined in mainframe.ts:134
Parameters
@@ -323,7 +323,7 @@clearScreen
Returns void
@@ -341,7 +341,7 @@connect
Parameters
@@ -368,7 +368,7 @@connectService
Parameters
@@ -395,7 +395,7 @@deleteNodes
emit
Parameters
@@ -472,7 +472,7 @@fire
Parameters
@@ -499,7 +499,7 @@fits
Parameters
@@ -526,7 +526,7 @@flagNodes
Parameters
@@ -553,7 +553,7 @@focusNodes
Parameters
@@ -577,7 +577,7 @@getGraphService
Returns GraphService
@@ -595,7 +595,7 @@getNodeById
Parameters
@@ -619,7 +619,7 @@getRequiredControl
Parameters
@@ -643,7 +643,7 @@getRequiredControlLike
Type parameters
@@ -673,7 +673,7 @@getScreenData
Returns NodeEdgeSet
@@ -691,7 +691,7 @@insertEdges
Parameters
@@ -715,7 +715,7 @@insertNodes
loadGraph
loadGson
Parameters
@@ -824,7 +824,7 @@lockScale
Parameters
@@ -851,7 +851,7 @@notifyClearAll
Returns void
@@ -869,7 +869,7 @@off
Parameters
@@ -914,7 +914,7 @@on
Parameters
@@ -959,7 +959,7 @@Protected onCreateF
Parameters
@@ -983,7 +983,7 @@pickup
Parameters
@@ -1028,7 +1028,7 @@placeNodes
Parameters
@@ -1052,7 +1052,7 @@redraw
Returns void
@@ -1070,7 +1070,7 @@removeControlLike
Type parameters
@@ -1100,7 +1100,7 @@scaleTo
Parameters
@@ -1124,7 +1124,7 @@search
Parameters
@@ -1169,7 +1169,7 @@showGraph
Parameters
@@ -1208,7 +1208,7 @@showNodesOfCategory
Parameters
@@ -1250,7 +1250,7 @@toggleDraggable
Parameters
@@ -1274,7 +1274,7 @@toggleEdgeColor
Parameters
@@ -1298,7 +1298,7 @@toggleEdges
Parameters
@@ -1322,7 +1322,7 @@toggleFaces
Parameters
@@ -1346,7 +1346,7 @@toggleNavigationButtons
Parameters
@@ -1370,7 +1370,7 @@toggleNodeBorder
Parameters
@@ -1394,7 +1394,7 @@toggleShadow
Parameters
@@ -1418,7 +1418,7 @@toggleShowEdgeLabelAlways
Parameters
@@ -1442,7 +1442,7 @@toggleWeights
Parameters
@@ -1466,7 +1466,7 @@updateEdges
Parameters
@@ -1490,7 +1490,7 @@updateGraph
Parameters
@@ -1529,7 +1529,7 @@updateNetworkOptions
Parameters
@@ -1553,7 +1553,7 @@updateNodes
Parameters
@@ -1578,7 +1578,7 @@updateTheme
Inherited from BaseApp.updateTheme
Overrides MainFrame.updateTheme
-- Defined in app/app.ts:182
+ - Defined in app/app.ts:182
Parameters
diff --git a/dist/api/classes/graphnavigator.html b/dist/api/classes/graphnavigator.html index 8817b66..d20e83b 100644 --- a/dist/api/classes/graphnavigator.html +++ b/dist/api/classes/graphnavigator.html @@ -165,7 +165,7 @@constructor
Parameters
@@ -188,7 +188,7 @@Protected _ctrls
@@ -199,7 +199,7 @@Protected _messageBox
Inherited from BaseApp._messageBox
-- Defined in app/app.ts:11
+ - Defined in app/app.ts:11
@@ -210,7 +210,7 @@Protected _selector
@@ -221,7 +221,7 @@Protected _toggleEdge
Inherited from BaseApp._toggleEdgeLabelHandlers
-- Defined in app/app.ts:10
+ - Defined in app/app.ts:10
@@ -239,7 +239,7 @@Protected _notifyControl
Parameters
@@ -266,7 +266,7 @@addControl
Type parameters
@@ -296,7 +296,7 @@Protected addDocument
@@ -445,7 +445,7 @@
@@ -748,7 +748,7 @@
@@ -794,7 +794,7 @@
Inherited from MainFrame.addDocumentControls
-- Defined in mainframe.ts:134
+ - Defined in mainframe.ts:134
Parameters
@@ -323,7 +323,7 @@clearScreen
Returns void
@@ -341,7 +341,7 @@connect
Parameters
@@ -368,7 +368,7 @@connectService
Parameters
@@ -395,7 +395,7 @@deleteNodes
emit
Parameters
@@ -472,7 +472,7 @@fire
Parameters
@@ -499,7 +499,7 @@fits
Parameters
@@ -526,7 +526,7 @@flagNodes
Parameters
@@ -553,7 +553,7 @@focusNodes
Parameters
@@ -577,7 +577,7 @@getGraphService
Returns GraphService
@@ -595,7 +595,7 @@getNodeById
Parameters
@@ -619,7 +619,7 @@getRequiredControl
Parameters
@@ -643,7 +643,7 @@getRequiredControlLike
Type parameters
@@ -673,7 +673,7 @@getScreenData
Returns NodeEdgeSet
@@ -691,7 +691,7 @@insertEdges
Parameters
@@ -715,7 +715,7 @@insertNodes
loadGraph
loadGson
Parameters
@@ -824,7 +824,7 @@lockScale
Parameters
@@ -851,7 +851,7 @@notifyClearAll
Returns void
@@ -869,7 +869,7 @@off
Parameters
@@ -914,7 +914,7 @@on
Parameters
@@ -959,7 +959,7 @@Protected onCreateF
RESOURCE_BUNDLE: any
@@ -131,7 +131,7 @@
MESSAGES: object
@@ -185,7 +185,7 @@ default: object = i18n.MESSAGES_EN
@@ -206,7 +206,7 @@ en: object = i18n.MESSAGES_EN
@@ -228,7 +228,7 @@ MESSAGES_EN: object
@@ -237,7 +237,7 @@ INITIALING: string = "initializing..."
@@ -247,7 +247,7 @@ LOADING_GRAPH: string = "loading graph..."
diff --git a/dist/api/classes/infoboxctrl.html b/dist/api/classes/infoboxctrl.html
index 1e55996..99ccf72 100644
--- a/dist/api/classes/infoboxctrl.html
+++ b/dist/api/classes/infoboxctrl.html
@@ -433,7 +433,7 @@
Parameters
@@ -983,7 +983,7 @@pickup
Parameters
@@ -1028,7 +1028,7 @@placeNodes
Parameters
@@ -1052,7 +1052,7 @@redraw
Returns void
@@ -1070,7 +1070,7 @@removeControlLike
Type parameters
@@ -1100,7 +1100,7 @@scaleTo
Parameters
@@ -1124,7 +1124,7 @@search
Parameters
@@ -1169,7 +1169,7 @@showGraph
Parameters
@@ -1208,7 +1208,7 @@showNodesOfCategory
Parameters
@@ -1250,7 +1250,7 @@toggleDraggable
Parameters
@@ -1274,7 +1274,7 @@toggleEdgeColor
Parameters
@@ -1298,7 +1298,7 @@toggleEdges
Parameters
@@ -1322,7 +1322,7 @@toggleFaces
Parameters
@@ -1346,7 +1346,7 @@toggleNavigationButtons
Parameters
@@ -1370,7 +1370,7 @@toggleNodeBorder
Parameters
@@ -1394,7 +1394,7 @@toggleShadow
Parameters
@@ -1418,7 +1418,7 @@toggleShowEdgeLabelAlways
Parameters
@@ -1442,7 +1442,7 @@toggleWeights
Parameters
@@ -1466,7 +1466,7 @@updateEdges
Parameters
@@ -1490,7 +1490,7 @@updateGraph
Parameters
@@ -1529,7 +1529,7 @@updateNetworkOptions
Parameters
@@ -1553,7 +1553,7 @@updateNodes
Parameters
@@ -1578,7 +1578,7 @@updateTheme
Inherited from BaseApp.updateTheme
Overrides MainFrame.updateTheme
-- Defined in app/app.ts:182
+ - Defined in app/app.ts:182
Parameters
diff --git a/dist/api/classes/highlightctrl.html b/dist/api/classes/highlightctrl.html index bd23f29..4935997 100644 --- a/dist/api/classes/highlightctrl.html +++ b/dist/api/classes/highlightctrl.html @@ -230,7 +230,7 @@clear
Returns void
@@ -350,7 +350,7 @@getTypeName
Returns string
@@ -367,7 +367,7 @@highlightNodes
Parameters
@@ -487,7 +487,7 @@onCreate
Parameters
@@ -511,7 +511,7 @@onDestroy
Parameters
@@ -793,7 +793,7 @@toggleNode
Parameters
@@ -816,7 +816,7 @@unhighlightNodes
Parameters
diff --git a/dist/api/classes/i18n.html b/dist/api/classes/i18n.html index 006c43a..e0ffabd 100644 --- a/dist/api/classes/i18n.html +++ b/dist/api/classes/i18n.html @@ -114,7 +114,7 @@Static RESOURCE_BUNDLE
Static getMessage
Parameters
@@ -154,7 +154,7 @@Static setLanguage
Parameters
@@ -176,7 +176,7 @@Static MESSAGES
default
en
Static MESSAGES_EN
INITIALING
LOADING_GRAPH
getTypeName
Returns string
@@ -565,7 +565,7 @@onBindElement
Parameters
diff --git a/dist/api/classes/localgraph.html b/dist/api/classes/localgraph.html index 9f9a9bf..9b33721 100644 --- a/dist/api/classes/localgraph.html +++ b/dist/api/classes/localgraph.html @@ -118,7 +118,7 @@_async
Parameters
@@ -159,7 +159,7 @@findRelations
Parameters
@@ -194,7 +194,7 @@requestConnect
Parameters
@@ -229,7 +229,7 @@requestFilterNodesByCategory
Parameters
@@ -276,7 +276,7 @@requestFindRelations
Parameters
@@ -326,7 +326,7 @@requestGetCommunityData
Parameters
@@ -367,7 +367,7 @@requestGetMoreRelations
Parameters
@@ -411,7 +411,7 @@requestGetNeighbours
Parameters
@@ -458,7 +458,7 @@requestGetNodeCategories
Parameters
@@ -499,7 +499,7 @@requestGetNodeInfos
Parameters
@@ -543,7 +543,7 @@requestLoadGraph
Parameters
@@ -590,7 +590,7 @@requestSearch
Parameters
@@ -638,7 +638,7 @@requestStopFindRelations
Parameters
@@ -661,7 +661,7 @@Static fromGson
Parameters
@@ -684,7 +684,7 @@Static fromGsonFile
Parameters
@@ -710,7 +710,7 @@Static fromGsonString<
_ctrls: Map<string, Control> = new Map<string, Control>()
@@ -191,7 +191,7 @@
Parameters
diff --git a/dist/api/classes/mainframe.html b/dist/api/classes/mainframe.html index 11aa8c0..d32ed17 100644 --- a/dist/api/classes/mainframe.html +++ b/dist/api/classes/mainframe.html @@ -146,7 +146,7 @@constructor
Parameters
@@ -174,7 +174,7 @@Protected _ctrls
Protected _notifyControl
Parameters
@@ -217,7 +217,7 @@addControl
Type parameters
@@ -246,7 +246,7 @@Protected addDocument
@@ -364,7 +364,7 @@
@@ -629,7 +629,7 @@
@@ -674,7 +674,7 @@
x: number
@@ -146,7 +146,7 @@ y: number
@@ -163,7 +163,7 @@
x1: number
@@ -155,7 +155,7 @@ x2: number
@@ -165,7 +165,7 @@ y1: number
@@ -175,7 +175,7 @@ y2: number
@@ -192,7 +192,7 @@
Parameters
@@ -272,7 +272,7 @@clearScreen
Returns void
@@ -289,7 +289,7 @@connectService
Parameters
@@ -315,7 +315,7 @@deleteNodes
emit
Parameters
@@ -390,7 +390,7 @@fire
Parameters
@@ -416,7 +416,7 @@fits
Parameters
@@ -442,7 +442,7 @@focusNodes
Parameters
@@ -465,7 +465,7 @@getGraphService
Returns GraphService
@@ -482,7 +482,7 @@getNodeById
Parameters
@@ -505,7 +505,7 @@getRequiredControl
Parameters
@@ -528,7 +528,7 @@getRequiredControlLike
Type parameters
@@ -557,7 +557,7 @@getScreenData
Returns NodeEdgeSet
@@ -574,7 +574,7 @@insertEdges
Parameters
@@ -597,7 +597,7 @@insertNodes
loadGraph
lockScale
Parameters
@@ -700,7 +700,7 @@notifyClearAll
Returns void
@@ -717,7 +717,7 @@off
Parameters
@@ -761,7 +761,7 @@on
Parameters
@@ -805,7 +805,7 @@placeNodes
Parameters
@@ -828,7 +828,7 @@redraw
Returns void
@@ -845,7 +845,7 @@removeControlLike
Type parameters
@@ -874,7 +874,7 @@scaleTo
Parameters
@@ -897,7 +897,7 @@search
Parameters
@@ -941,7 +941,7 @@showNodesOfCategory
Parameters
@@ -982,7 +982,7 @@updateEdges
Parameters
@@ -1005,7 +1005,7 @@updateGraph
Parameters
@@ -1043,7 +1043,7 @@updateNetworkOptions
Parameters
@@ -1066,7 +1066,7 @@updateNodes
Parameters
@@ -1089,7 +1089,7 @@updateTheme
Parameters
diff --git a/dist/api/classes/messageboxctrl.html b/dist/api/classes/messageboxctrl.html index 5ee2a0c..c3a09a1 100644 --- a/dist/api/classes/messageboxctrl.html +++ b/dist/api/classes/messageboxctrl.html @@ -435,7 +435,7 @@getTypeName
Returns string
@@ -470,7 +470,7 @@hideMessage
Returns void
@@ -584,7 +584,7 @@onBindElement
Parameters
@@ -664,7 +664,7 @@onResize
Parameters
@@ -1009,7 +1009,7 @@showMessage
Parameters
diff --git a/dist/api/classes/point.html b/dist/api/classes/point.html index 682f9d0..9b9bf7a 100644 --- a/dist/api/classes/point.html +++ b/dist/api/classes/point.html @@ -111,7 +111,7 @@constructor
Parameters
@@ -136,7 +136,7 @@x
y
delta
Parameters
@@ -186,7 +186,7 @@expand
Parameters
diff --git a/dist/api/classes/rect.html b/dist/api/classes/rect.html index 84b15be..ce7f5b6 100644 --- a/dist/api/classes/rect.html +++ b/dist/api/classes/rect.html @@ -114,7 +114,7 @@constructor
Parameters
@@ -145,7 +145,7 @@x1
x2
y1
y2
center
Returns Point
@@ -209,7 +209,7 @@height
Returns number
@@ -226,7 +226,7 @@width
Returns number
diff --git a/dist/api/classes/relfinder.html b/dist/api/classes/relfinder.html index 90760a4..d77536d 100644 --- a/dist/api/classes/relfinder.html +++ b/dist/api/classes/relfinder.html @@ -168,7 +168,7 @@constructor
Parameters
@@ -194,7 +194,7 @@Protected _ctrls
@@ -205,7 +205,7 @@Protected _messageBox
Inherited from BaseApp._messageBox
-- Defined in app/app.ts:11
+ - Defined in app/app.ts:11
@@ -216,7 +216,7 @@Protected _selector
@@ -227,7 +227,7 @@Protected _toggleEdge
Inherited from BaseApp._toggleEdgeLabelHandlers
-- Defined in app/app.ts:10
+ - Defined in app/app.ts:10
@@ -245,7 +245,7 @@Protected _notifyControl
Parameters
@@ -272,7 +272,7 @@addControl
Type parameters
@@ -302,7 +302,7 @@Protected addDocument
@@ -451,7 +451,7 @@
@@ -754,7 +754,7 @@
@@ -800,7 +800,7 @@
Inherited from MainFrame.addDocumentControls
-- Defined in mainframe.ts:134
+ - Defined in mainframe.ts:134
Parameters
@@ -329,7 +329,7 @@clearScreen
Returns void
@@ -347,7 +347,7 @@connect
Parameters
@@ -374,7 +374,7 @@connectService
Parameters
@@ -401,7 +401,7 @@deleteNodes
emit
Parameters
@@ -478,7 +478,7 @@fire
Parameters
@@ -505,7 +505,7 @@fits
Parameters
@@ -532,7 +532,7 @@flagNodes
Parameters
@@ -559,7 +559,7 @@focusNodes
Parameters
@@ -583,7 +583,7 @@getGraphService
Returns GraphService
@@ -601,7 +601,7 @@getNodeById
Parameters
@@ -625,7 +625,7 @@getRequiredControl
Parameters
@@ -649,7 +649,7 @@getRequiredControlLike
Type parameters
@@ -679,7 +679,7 @@getScreenData
Returns NodeEdgeSet
@@ -697,7 +697,7 @@insertEdges
Parameters
@@ -721,7 +721,7 @@insertNodes
loadGraph
loadGson
Parameters
@@ -830,7 +830,7 @@lockScale
Parameters
@@ -857,7 +857,7 @@notifyClearAll
Returns void
@@ -875,7 +875,7 @@off
Parameters
@@ -920,7 +920,7 @@on
Parameters
@@ -965,7 +965,7 @@Protected onCreateF
_input: JQuery<HTMLElement> = null
@@ -444,7 +444,7 @@
@@ -160,7 +160,7 @@
@@ -211,7 +211,7 @@
ADD_CONTROL: = "ADD_CONTROL"
@@ -120,7 +120,7 @@ CREATE_CONTROL: = "CREATE_CONTROL"
@@ -130,7 +130,7 @@ DESTROY_CONTROL: = "DESTROY_CONTROL"
@@ -140,7 +140,7 @@ FOCUS_NODES: = "FOCUS_NODES"
@@ -150,7 +150,7 @@ FRAME_CLEAR_ALL_FLAGS: = "FRAME_CLEAR_ALL_FLAGS"
@@ -160,7 +160,7 @@ FRAME_CREATED: = "FRAME_CREATED"
@@ -170,7 +170,7 @@ FRAME_RESIZE: = "FRAME_RESIZE"
@@ -180,7 +180,7 @@ GRAPH_CONNECTED: = "GRAPH_CONNECTED"
@@ -190,7 +190,7 @@ GRAPH_LOADED: = "GRAPH_LOADED"
@@ -200,7 +200,7 @@ INSERT_NODES: = "INSERT_NODES"
@@ -210,7 +210,7 @@ NETWORK_AFTER_DRAWING: = "NETWORK_END_DRAWING"
@@ -220,7 +220,7 @@ NETWORK_BEFORE_DRAWING: = "NETWORK_BEFORE_DRAWING"
@@ -230,7 +230,7 @@ NETWORK_CLICK: = "NETWORK_CLICK"
@@ -240,7 +240,7 @@ NETWORK_DBLCLICK: = "NETWORK_DBLCLICK"
@@ -250,7 +250,7 @@ NETWORK_DESELECT_EDGES: = "NETWORK_DESELECT_EDGES"
@@ -260,7 +260,7 @@ NETWORK_DESELECT_NODES: = "NETWORK_DESELECT_NODES"
@@ -270,7 +270,7 @@ NETWORK_DRAGGING: = "NETWORK_DRAGGING"
@@ -280,7 +280,7 @@ NETWORK_SELECT_EDGES: = "NETWORK_SELECT_EDGES"
@@ -290,7 +290,7 @@ NETWORK_SELECT_NODES: = "NETWORK_SELECT_NODES"
@@ -300,7 +300,7 @@ RELFINDER_START: = "RELFINDER_START"
@@ -310,7 +310,7 @@ RELFINDER_STARTED: = "RELFINDER_STARTED"
@@ -320,7 +320,7 @@ RELFINDER_STOP: = "RELFINDER_STOP"
@@ -330,7 +330,7 @@ RELFINDER_STOPPED: = "RELFINDER_STOPPED"
@@ -340,7 +340,7 @@ REMOVE_CONTROL: = "REMOVE_CONTROL"
@@ -350,7 +350,7 @@ SHOW_INFO: = "SHOW_INFO"
@@ -360,7 +360,7 @@ THEME_CHANGED: = "THEME_CHANGED"
diff --git a/dist/api/index.html b/dist/api/index.html
index e03b1ad..c6898e7 100644
--- a/dist/api/index.html
+++ b/dist/api/index.html
@@ -155,7 +155,7 @@ CANVAS_PADDING: number = 80
@@ -165,7 +165,7 @@ MAX_EDGES_COUNT: number = 5000
@@ -175,7 +175,7 @@ MAX_NODES_COUNT: number = 5000
diff --git a/dist/api/interfaces/button_options.html b/dist/api/interfaces/button_options.html
index 0d43f62..7d67aea 100644
--- a/dist/api/interfaces/button_options.html
+++ b/dist/api/interfaces/button_options.html
@@ -99,7 +99,7 @@ caption: string
@@ -109,7 +109,7 @@ checked: boolean
@@ -119,7 +119,7 @@ click: Function
@@ -129,7 +129,7 @@ disabled: boolean
@@ -139,7 +139,7 @@ icon: string
@@ -149,7 +149,7 @@ Position: string
@@ -159,7 +159,7 @@ tooltip: string
diff --git a/dist/api/interfaces/community.html b/dist/api/interfaces/community.html
index 1d32cb2..2f32161 100644
--- a/dist/api/interfaces/community.html
+++ b/dist/api/interfaces/community.html
@@ -103,7 +103,7 @@ borderColor: string
@@ -113,7 +113,7 @@ fillColor: string
@@ -123,7 +123,7 @@ id: string
@@ -133,7 +133,7 @@ outline: POINT[]
diff --git a/dist/api/interfaces/communitydata.html b/dist/api/interfaces/communitydata.html
index 279226b..e700ae2 100644
--- a/dist/api/interfaces/communitydata.html
+++ b/dist/api/interfaces/communitydata.html
@@ -94,7 +94,7 @@ communities: Community[]
@@ -104,7 +104,7 @@ nodeMap: NodeCommunityEntry[]
diff --git a/dist/api/interfaces/event_args_frame.html b/dist/api/interfaces/event_args_frame.html
index 50d213c..7135254 100644
--- a/dist/api/interfaces/event_args_frame.html
+++ b/dist/api/interfaces/event_args_frame.html
@@ -116,7 +116,7 @@ htmlMainFrame: HTMLElement
@@ -126,7 +126,7 @@ mainFrame: MainFrame
@@ -136,7 +136,7 @@ network: GraphNetwork
@@ -146,7 +146,7 @@ theme: Theme
diff --git a/dist/api/interfaces/event_args_frame_drawing.html b/dist/api/interfaces/event_args_frame_drawing.html
index 801c368..9c94685 100644
--- a/dist/api/interfaces/event_args_frame_drawing.html
+++ b/dist/api/interfaces/event_args_frame_drawing.html
@@ -102,7 +102,7 @@ context2d: CanvasRenderingContext2D
@@ -113,7 +113,7 @@
Parameters
@@ -989,7 +989,7 @@pickup
Parameters
@@ -1034,7 +1034,7 @@placeNodes
Parameters
@@ -1058,7 +1058,7 @@redraw
Returns void
@@ -1076,7 +1076,7 @@removeControlLike
Type parameters
@@ -1106,7 +1106,7 @@scaleTo
Parameters
@@ -1130,7 +1130,7 @@search
Parameters
@@ -1175,7 +1175,7 @@showGraph
Parameters
@@ -1214,7 +1214,7 @@showNodesOfCategory
Parameters
@@ -1255,7 +1255,7 @@startQuery
Parameters
@@ -1281,7 +1281,7 @@startQueryWithPrompt
Parameters
@@ -1307,7 +1307,7 @@stopQuery
Returns void
@@ -1325,7 +1325,7 @@toggleDraggable
Parameters
@@ -1349,7 +1349,7 @@toggleEdgeColor
Parameters
@@ -1373,7 +1373,7 @@toggleEdges
Parameters
@@ -1397,7 +1397,7 @@toggleFaces
Parameters
@@ -1421,7 +1421,7 @@toggleNavigationButtons
Parameters
@@ -1445,7 +1445,7 @@toggleNodeBorder
Parameters
@@ -1469,7 +1469,7 @@toggleShadow
Parameters
@@ -1493,7 +1493,7 @@toggleShowEdgeLabelAlways
Parameters
@@ -1517,7 +1517,7 @@toggleWeights
Parameters
@@ -1541,7 +1541,7 @@updateEdges
Parameters
@@ -1565,7 +1565,7 @@updateGraph
Parameters
@@ -1604,7 +1604,7 @@updateNetworkOptions
Parameters
@@ -1628,7 +1628,7 @@updateNodes
Parameters
@@ -1653,7 +1653,7 @@updateTheme
Inherited from BaseApp.updateTheme
Overrides MainFrame.updateTheme
-- Defined in app/app.ts:182
+ - Defined in app/app.ts:182
Parameters
diff --git a/dist/api/classes/relfinderctrl.html b/dist/api/classes/relfinderctrl.html index 2902128..47e1a40 100644 --- a/dist/api/classes/relfinderctrl.html +++ b/dist/api/classes/relfinderctrl.html @@ -331,7 +331,7 @@getTypeName
Returns string
@@ -445,7 +445,7 @@onCreate
Parameters
@@ -469,7 +469,7 @@onDestroy
Parameters
@@ -751,7 +751,7 @@startQuery
Parameters
@@ -780,7 +780,7 @@stopQuery
Returns void
diff --git a/dist/api/classes/relfinderdialogctrl.html b/dist/api/classes/relfinderdialogctrl.html index 7a49ed2..2cee331 100644 --- a/dist/api/classes/relfinderdialogctrl.html +++ b/dist/api/classes/relfinderdialogctrl.html @@ -434,7 +434,7 @@getSelectedNodeIds
Returns string[]
@@ -452,7 +452,7 @@getTypeName
Returns string
@@ -584,7 +584,7 @@onBindElement
Parameters
@@ -921,7 +921,7 @@selectNodes
Parameters
diff --git a/dist/api/classes/remotegraph.html b/dist/api/classes/remotegraph.html index 3f7075a..bd48696 100644 --- a/dist/api/classes/remotegraph.html +++ b/dist/api/classes/remotegraph.html @@ -119,7 +119,7 @@constructor
Parameters
@@ -145,7 +145,7 @@requestConnect
Parameters
@@ -180,7 +180,7 @@requestFilterNodesByCategory
Parameters
@@ -227,7 +227,7 @@requestFindRelations
Parameters
@@ -277,7 +277,7 @@requestGetCommunityData
Parameters
@@ -318,7 +318,7 @@requestGetMoreRelations
Parameters
@@ -362,7 +362,7 @@requestGetNeighbours
Parameters
@@ -409,7 +409,7 @@requestGetNodeCategories
Parameters
@@ -450,7 +450,7 @@requestGetNodeInfos
Parameters
@@ -494,7 +494,7 @@requestLoadGraph
Parameters
@@ -541,7 +541,7 @@requestSearch
Parameters
@@ -589,7 +589,7 @@requestStopFindRelations
Parameters
diff --git a/dist/api/classes/searchboxctrl.html b/dist/api/classes/searchboxctrl.html index b8ad812..506e7f3 100644 --- a/dist/api/classes/searchboxctrl.html +++ b/dist/api/classes/searchboxctrl.html @@ -184,7 +184,7 @@_input
getTypeName
Returns string
@@ -576,7 +576,7 @@onBindElement
Parameters
diff --git a/dist/api/classes/selectionctrl.html b/dist/api/classes/selectionctrl.html index c80410d..4d1324f 100644 --- a/dist/api/classes/selectionctrl.html +++ b/dist/api/classes/selectionctrl.html @@ -229,7 +229,7 @@clear
Returns void
@@ -329,7 +329,7 @@flagNodes
Parameters
@@ -372,7 +372,7 @@getTypeName
Returns string
@@ -486,7 +486,7 @@onCreate
Parameters
@@ -510,7 +510,7 @@onDestroy
Parameters
@@ -792,7 +792,7 @@unflagNodes
Parameters
diff --git a/dist/api/classes/statusbarctrl.html b/dist/api/classes/statusbarctrl.html index d7b7b42..30bbc70 100644 --- a/dist/api/classes/statusbarctrl.html +++ b/dist/api/classes/statusbarctrl.html @@ -434,7 +434,7 @@getTypeName
Returns string
@@ -991,7 +991,7 @@showMessage
Parameters
diff --git a/dist/api/classes/toolbarctrl.html b/dist/api/classes/toolbarctrl.html index 0b29e45..ecca6e3 100644 --- a/dist/api/classes/toolbarctrl.html +++ b/dist/api/classes/toolbarctrl.html @@ -239,7 +239,7 @@addButton
Parameters
@@ -262,7 +262,7 @@addButtons
Parameters
@@ -331,7 +331,7 @@addTool
Parameters
@@ -505,7 +505,7 @@getTypeName
Returns string
@@ -692,7 +692,7 @@onDestroy
Parameters
diff --git a/dist/api/classes/utils.html b/dist/api/classes/utils.html index f293287..2f41afa 100644 --- a/dist/api/classes/utils.html +++ b/dist/api/classes/utils.html @@ -104,7 +104,7 @@Static deepClone
Parameters
@@ -127,7 +127,7 @@Static deepExtend
Static distinct
Parameters
@@ -183,7 +183,7 @@Static evaluate
Static flatMap
Parameters
@@ -255,7 +255,7 @@Static partOf
Parameters
@@ -283,7 +283,7 @@Static toArray
Type parameters
@@ -312,7 +312,7 @@Static toMap
Parameters
diff --git a/dist/api/enums/frameeventname.html b/dist/api/enums/frameeventname.html index 9c66854..465c889 100644 --- a/dist/api/enums/frameeventname.html +++ b/dist/api/enums/frameeventname.html @@ -110,7 +110,7 @@ADD_CONTROL
CREATE_CONTROL
DESTROY_CONTROL
FOCUS_NODES
FRAME_CLEAR_ALL_FLAGS
FRAME_CREATED
FRAME_RESIZE
GRAPH_CONNECTED
GRAPH_LOADED
INSERT_NODES
NETWORK_AFTER_DRAWING
NETWORK_BEFORE_DRAWING
NETWORK_CLICK
NETWORK_DBLCLICK
NETWORK_DESELECT_EDGES
NETWORK_DESELECT_NODES
NETWORK_DRAGGING
NETWORK_SELECT_EDGES
NETWORK_SELECT_NODES
RELFINDER_START
RELFINDER_STARTED
RELFINDER_STOP
RELFINDER_STOPPED
REMOVE_CONTROL
SHOW_INFO
THEME_CHANGED
CANVAS_PADDING
MAX_EDGES_COUNT
MAX_NODES_COUNT
Optional caption
Optional checked
Optional click
Optional disabled
Optional icon
Optional iconPosition
iconOptional tooltip
borderColor
fillColor
id
outline
communities
nodeMap
htmlMainFrame
mainFrame
network
theme
context2d
htmlMainFrame
@@ -124,7 +124,7 @@mainFrame
@@ -135,7 +135,7 @@network
@@ -146,7 +146,7 @@theme
diff --git a/dist/api/interfaces/event_args_frame_input.html b/dist/api/interfaces/event_args_frame_input.html index b7aac3b..8603db5 100644 --- a/dist/api/interfaces/event_args_frame_input.html +++ b/dist/api/interfaces/event_args_frame_input.html @@ -108,7 +108,7 @@edges
@@ -119,7 +119,7 @@htmlMainFrame
@@ -130,7 +130,7 @@mainFrame
@@ -141,7 +141,7 @@network
@@ -152,7 +152,7 @@nodes
@@ -162,7 +162,7 @@Optional previousSelectio
previousSelection: NodeEdgeIds
@@ -173,7 +173,7 @@ height: number
@@ -116,7 +116,7 @@ oldHeight: number
@@ -158,7 +158,7 @@ oldWidth: number
@@ -169,7 +169,7 @@ width: number
diff --git a/dist/api/interfaces/event_args_frame_show_info.html b/dist/api/interfaces/event_args_frame_show_info.html
index 0bb2fda..b8a9800 100644
--- a/dist/api/interfaces/event_args_frame_show_info.html
+++ b/dist/api/interfaces/event_args_frame_show_info.html
@@ -108,7 +108,7 @@ htmlInfoBox: HTMLElement
@@ -129,7 +129,7 @@ edges: any[]
@@ -115,7 +115,7 @@ nodes: any[]
@@ -157,7 +157,7 @@ option: object
@@ -168,7 +168,7 @@ maxDepth: number
@@ -135,7 +135,7 @@ showDegrees: boolean
@@ -109,7 +109,7 @@ showEdges: boolean
@@ -119,7 +119,7 @@ showFaces: boolean
@@ -129,7 +129,7 @@ showGroups: boolean
@@ -139,7 +139,7 @@ showLabels: boolean
@@ -149,7 +149,7 @@ showNodes: boolean
@@ -159,7 +159,7 @@ showTitles: boolean
diff --git a/dist/api/interfaces/graphservice.html b/dist/api/interfaces/graphservice.html
index 2bd15c0..cead873 100644
--- a/dist/api/interfaces/graphservice.html
+++ b/dist/api/interfaces/graphservice.html
@@ -114,7 +114,7 @@
@@ -156,7 +156,7 @@
@@ -210,7 +210,7 @@
@@ -267,7 +267,7 @@
@@ -313,7 +313,7 @@
@@ -364,7 +364,7 @@
@@ -418,7 +418,7 @@
@@ -464,7 +464,7 @@
@@ -515,7 +515,7 @@
@@ -569,7 +569,7 @@
@@ -623,7 +623,7 @@
diff --git a/dist/api/interfaces/gson.html b/dist/api/interfaces/gson.html
index dc3d990..b32e35e 100644
--- a/dist/api/interfaces/gson.html
+++ b/dist/api/interfaces/gson.html
@@ -97,7 +97,7 @@ categories: object
@@ -107,7 +107,7 @@ data: object
@@ -131,7 +131,7 @@ dbinfo: object
@@ -141,7 +141,7 @@ option: object
@@ -159,7 +159,7 @@ translator: object
diff --git a/dist/api/interfaces/loadgraphoption.html b/dist/api/interfaces/loadgraphoption.html
index 9d9ecf9..828ad6e 100644
--- a/dist/api/interfaces/loadgraphoption.html
+++ b/dist/api/interfaces/loadgraphoption.html
@@ -93,7 +93,7 @@ autoLayout: boolean
diff --git a/dist/api/interfaces/nodecommunityentry.html b/dist/api/interfaces/nodecommunityentry.html
index 9203431..48a355a 100644
--- a/dist/api/interfaces/nodecommunityentry.html
+++ b/dist/api/interfaces/nodecommunityentry.html
@@ -94,7 +94,7 @@ community: string
@@ -104,7 +104,7 @@ node: string
diff --git a/dist/api/interfaces/nodeedgeids.html b/dist/api/interfaces/nodeedgeids.html
index aacbf42..a5e69eb 100644
--- a/dist/api/interfaces/nodeedgeids.html
+++ b/dist/api/interfaces/nodeedgeids.html
@@ -102,7 +102,7 @@ edges: string[]
@@ -112,7 +112,7 @@ nodes: string[]
diff --git a/dist/api/interfaces/nodeedgeset.html b/dist/api/interfaces/nodeedgeset.html
index fd54815..40b14b4 100644
--- a/dist/api/interfaces/nodeedgeset.html
+++ b/dist/api/interfaces/nodeedgeset.html
@@ -94,7 +94,7 @@ edges: GraphEdgeSet
@@ -104,7 +104,7 @@ nodes: GraphNodeSet
diff --git a/dist/api/interfaces/nodesedges.html b/dist/api/interfaces/nodesedges.html
index f562bfa..294725a 100644
--- a/dist/api/interfaces/nodesedges.html
+++ b/dist/api/interfaces/nodesedges.html
@@ -94,7 +94,7 @@ edges: any[]
@@ -104,7 +104,7 @@ nodes: any[]
diff --git a/dist/api/interfaces/pair.html b/dist/api/interfaces/pair.html
index 8b23134..04fd342 100644
--- a/dist/api/interfaces/pair.html
+++ b/dist/api/interfaces/pair.html
@@ -105,7 +105,7 @@ _1: K
@@ -115,7 +115,7 @@ _2: V
diff --git a/dist/api/interfaces/point.html b/dist/api/interfaces/point.html
index d92a35f..b8c3431 100644
--- a/dist/api/interfaces/point.html
+++ b/dist/api/interfaces/point.html
@@ -94,7 +94,7 @@ x: number
@@ -104,7 +104,7 @@ y: number
diff --git a/dist/api/interfaces/query_results.html b/dist/api/interfaces/query_results.html
index 35fcfc5..22e275c 100644
--- a/dist/api/interfaces/query_results.html
+++ b/dist/api/interfaces/query_results.html
@@ -94,7 +94,7 @@ completed: boolean
@@ -104,7 +104,7 @@ paths: RELATION_PATH[]
diff --git a/dist/api/interfaces/rect.html b/dist/api/interfaces/rect.html
index 3dc7ab3..93e89c6 100644
--- a/dist/api/interfaces/rect.html
+++ b/dist/api/interfaces/rect.html
@@ -96,7 +96,7 @@ bottom: number
@@ -106,7 +106,7 @@ left: number
@@ -116,7 +116,7 @@ right: number
@@ -126,7 +126,7 @@ top: number
diff --git a/dist/api/interfaces/relation_path.html b/dist/api/interfaces/relation_path.html
index ec8c149..62fed96 100644
--- a/dist/api/interfaces/relation_path.html
+++ b/dist/api/interfaces/relation_path.html
@@ -94,7 +94,7 @@ edges: any[]
@@ -104,7 +104,7 @@ nodes: any[]
diff --git a/dist/examples/lib/interactive-graph-0.1.0/interactive-graph.min.js b/dist/examples/lib/interactive-graph-0.1.0/interactive-graph.min.js
index 5fc2a86..ab85233 100644
--- a/dist/examples/lib/interactive-graph-0.1.0/interactive-graph.min.js
+++ b/dist/examples/lib/interactive-graph-0.1.0/interactive-graph.min.js
@@ -56,5 +56,5 @@ function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__es
;this.frame.canvas.width===r&&this.frame.canvas.height===a||this._getCameraState(s),this.frame.canvas.width!==r&&(this.frame.canvas.width=r,i=!0),this.frame.canvas.height!==a&&(this.frame.canvas.height=a,i=!0)}return!0===i&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(n/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");var e=1;return"undefined"!=typeof window&&(e=window.devicePixelRatio||1),e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var t=this.getContext();if(void 0===t)throw new Error("Could not get canvax context");t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(2),l=i(76).default,d=function(){function t(e,i){var n=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",this.fit.bind(this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",this.releaseNode.bind(this))}return(0,a.default)(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,n=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),!0===e){var o=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];!0===r.predefinedPosition&&(o+=1)}if(o>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=l.getRange(this.body.nodes,t.nodes);n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;n*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=l.getRange(this.body.nodes,t.nodes);var a=1.1*Math.abs(i.maxX-i.minX),h=1.1*Math.abs(i.maxY-i.minY),d=this.canvas.frame.canvas.clientWidth/a,u=this.canvas.frame.canvas.clientHeight/h;n=d<=u?d:u}n>1?n=1:0===n&&(n=1);var c=l.findCenter(i),p={position:c,scale:n,animation:t.animation};this.moveTo(p)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0===t)return void(t={});void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},n=this.body.view.translation,o={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e.default=d},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(2),l=i(233).default,d=i(104).default,u=function(){function t(e,i,n){(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.navigationHandler=new l(e,i),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0},h.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];h.selectiveNotDeepExtend(e,this.options,t),h.mergeOptions(this.options,t,"keyboard"),t.tooltip&&(h.extend(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=h.parseColor(t.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-h.getAbsoluteLeft(this.canvas.frame.canvas),y:t.y-h.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(t){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.selectionHandler.getSelection(),o=!1;o=!0===i?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var s=this.selectionHandler.getSelection(),r=this._determineDifference(n,s),a=this._determineDifference(s,n);r.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,n),o=!0),r.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,n),o=!0),a.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",e,t),o=!0),a.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",e,t),o=!0),!0===o&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineDifference",value:function(t,e){var i=function(t,e){for(var i=[],n=0;n10&&(t=10);var n=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=t/i,r=(1-s)*e.x+o.x*s,a=(1-s)*e.y+o.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=n){var h=this.canvas.canvasToDOM(n);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&!1===s){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,g=[],v=0;v0&&(this.popupObj=f[g[g.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==o&&(void 0===this.popup&&(this.popup=new d(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var n=this.selectionHandler.getNodeAt(t);i=void 0!==n&&n.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(10),l=i(37),d=i(35),u=function(){function t(e,i){var n=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){n.activated=!0,n.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){n.activated=!1,n.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==n.keycharm&&n.keycharm.destroy()}),this.options={}}return(0,a.default)(t,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=d({container:window,preventDefault:!0}):this.keycharm=d({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(47).default,l=i(74).default,d=i(2),u=function(){function t(e,i){var n=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},d.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){n.updateSelection()})}return(0,a.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){var e=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];d.selectiveDeepExtend(e,this.options,t)}}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&(e=!0,!0===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"_generateClickEvent",value:function(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this._initBaseEvent(e,i);if(!0===o)s.nodes=[],s.edges=[];else{var r=this.getSelection();s.nodes=r.nodes,s.edges=r.edges}void 0!==n&&(s.previousSelection=n),"click"==t&&(s.items=this.getClickedItems(i)),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof h&&!0===e&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,n=0;n1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),n=this._getAllNodesOverlappingWith(i);return n.length>0?!0===e?this.body.nodes[n[n.length-1]]:n[n.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,n=0;n1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),n=10,o=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,n=void 0
;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties";if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],n=this.body.nodeIndices,o=this.body.nodes,s=n.length-1;s>=0;s--){var r=o[n[s]],a=r.getItemsOnPoint(e);i.push.apply(i,a)}for(var h=this.body.edgeIndices,l=this.body.edges,d=h.length-1;d>=0;d--){var u=l[h[d]],c=u.getItemsOnPoint(e);i.push.apply(i,c)}return i}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(30),s=n(o),r=i(6),a=n(r),h=i(8),l=n(h),d=i(0),u=n(d),c=i(1),p=n(c),f=i(2),m=i(76).default,g=i(236),v=g.HorizontalStrategy,y=g.VerticalStrategy,b=function(){function t(){(0,u.default)(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return(0,p.default)(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,i={};return function t(n){if(void 0!==i[n])return i[n];var o=e.levels[n];if(e.childrenReference[n]){var s=e.childrenReference[n];if(s.length>0)for(var r=0;r0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===n)return this.body.emitter.emit("refresh"),f.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===(0,a.default)(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var n=t.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(i=n.type),this.optionsBackup.edges={smooth:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection},t.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:i,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var e=t.length+50,i=0;i150){for(var s=t.length;t.length>150&&n<=10;){n+=1;var r=t.length;n%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);if(r==t.length&&n%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var a=0;a0){var t=void 0,e=void 0,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new b;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0!==t.options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):n=!0);if(!0===n&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===n){var o=this.options.hierarchical.sortMethod;"hubsize"===o?this._determineLevelsByHubsize():"directed"===o?this._determineLevelsDirected():"custom"===o&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&this.hierarchical.ensureLevel(s);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},n=function(e,i){var n=t.hierarchical.trees;for(var o in n)n.hasOwnProperty(o)&&n[o]===e&&t.direction.shift(o,i)},o=function(){for(var e=[],i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,n=1e9,o=1e9,r=1e9,a=-1e9;for(var h in e)if(e.hasOwnProperty(h)){var l=t.body.nodes[h],d=t.hierarchical.levels[l.id],u=t.direction.getPosition(l),c=t._getSpaceAroundNode(l,e),p=(0,s.default)(c,2),f=p[0],m=p[1];n=Math.min(f,n),o=Math.min(m,o),d<=i&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,n,o]},h=function(e,i){var n=t.hierarchical.getMaxLevel(e.id),o=t.hierarchical.getMaxLevel(i.id);return Math.min(n,o)},l=function(e,i,n){for(var o=t.hierarchical,s=0;s1)for(var h=0;h2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(i),l=t.direction.getPosition(n),d=Math.abs(l-s),u=t.options.hierarchical.nodeSpacing;if(d>u){var c={},p={};r(i,c),r(n,p);var f=h(i,n),m=a(c,f),g=a(p,f),v=m[1],y=g[0],b=g[2];if(Math.abs(v-y)>u){var _=v-y+u;_<-b+u&&(_=-b+u),_<0&&(t._shiftBlock(n.id,_),e=!0,!0===o&&t._centerParent(n))}}},u=function(n,o){for(var h=o.id,l=o.edges,d=t.hierarchical.levels[o.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;f0?p=Math.min(c,u-t.options.hierarchical.nodeSpacing):c<0&&(p=-Math.min(-c,d-t.options.hierarchical.nodeSpacing)),0!=p&&(t._shiftBlock(o.id,p),e=!0)}(_),_=b(n,l),function(i){var n=t.direction.getPosition(o),r=t._getSpaceAroundNode(o),a=(0,s.default)(r,2),h=a[0],l=a[1],d=i-n,u=n;d>0?u=Math.min(n+(l-t.options.hierarchical.nodeSpacing),i):d<0&&(u=Math.max(n-(h-t.options.hierarchical.nodeSpacing),i)),u!==n&&(t.direction.setPosition(o,u),e=!0)}(_)};!0===this.options.hierarchical.blockShifting&&(function(i){var n=t.hierarchical.getLevels();n=n.reverse();for(var o=0;o0&&Math.abs(p)0&&(a=this.direction.getPosition(i[o-1])+r),this.direction.setPosition(s,a,e),this._validatePositionAndContinue(s,e,a),n++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i=this.hierarchical.childrenReference[t];if(void 0!==i){for(var n=[],o=0;oe&&void 0===this.positionedNodes[r.id]))return;var h=this.options.hierarchical.nodeSpacing,l=void 0;l=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(n[s-1])+h,this.direction.setPosition(r,l,a),this._validatePositionAndContinue(r,a,l)}var d=this._getCenterPosition(n);this.direction.setPosition(this.body.nodes[t],d,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-nt.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],n={},o=function i(o,s){if(void 0===n[o.id]){t.hierarchical.setTreeIndex(o,s),n[o.id]=!0;for(var r=void 0,a=t._getActiveEdges(o),h=0;h2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),m=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,l.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.x||void 0===e.x?0:t.x-e.x})}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),e}(f),g=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,l.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.y||void 0===e.y?0:t.y-e.y})}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),e}(f);e.HorizontalStrategy=g,e.VerticalStrategy=m},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(8),s=n(o),r=i(19),a=n(r),h=i(6),l=n(h),d=i(0),u=n(d),c=i(1),p=n(c),f=i(2),m=i(10),g=i(37),v=function(){function t(e,i,n){var o=this;(0,u.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},f.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){o._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}return(0,p.default)(t,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,f.deepExtend(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var t=this.selectionHandler._getSelectedNodeCount(),e=this.selectionHandler._getSelectedEdgeCount(),i=t+e,n=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(n),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(n)),1===t&&"function"==typeof this.options.editNode?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(n)):1===e&&0===t&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(n)),0!==i&&(t>0&&!1!==this.options.deleteNode?(!0===o&&this._createSeperator(4),this._createDeleteButton(n)):0===t&&!1!==this.options.deleteEdge&&(!0===o&&this._createSeperator(4),this._createDeleteButton(n))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var i=f.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"===(0,l.default)(this.options.editEdge)&&"function"==typeof this.options.editEdge.editWithoutDrag&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId)){var t=this.body.edges[this.edgeBeingEditedId];return void this._performEditEdge(t.from,t.to)}if(!0===this.guiEnabled){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var i=this.body.edges[this.edgeBeingEditedId],n=this._getNewTargetNode(i.from.x,i.from.y),o=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(n.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(t){var e=i.edgeType.findBorderPositions(t);!1===n.selected&&(n.x=e.from.x,n.y=e.from.y),!1===o.selected&&(o.x=e.to.x,o.y=e.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),n=void 0;if(e.length>0){for(var o=0;o0&&"function"==typeof this.options.deleteEdge&&(n=this.options.deleteEdge);if("function"==typeof n){var s={nodes:e,edges:i};if(2!==n.length)throw new Error("The function for delete does not support two arguments (data, callback)");n(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=f.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+f.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var n=this.body.functions.createNode(i);return n.shape.boundingBox={left:t,right:t,top:e,bottom:e},n}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},f.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(f.recursiveDOMDelete(this.editModeDiv),f.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){var e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=n,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+(0,a.default)((0,s.default)(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t=0;r--)if(o[r]!==this.selectedControlNode.id){s=this.body.nodes[o[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(!0===s.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,n.to.id):this._performEditEdge(n.from.id,s.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=f.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);var o=this.body.functions.createEdge({id:"connectionEdge"+f.randomUUID(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(o.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var n=e.x-this.lastTouch.x,o=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+n,y:this.lastTouch.translation.y+o}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=void 0;void 0!==this.temporaryIds.edges[0]&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=o.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(o[r])){s=this.body.nodes[o[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(!0===s.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[n]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(n,s.id)),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:f.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,n={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(n,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,n={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges._data[this.edgeBeingEditedId].label},o=this.options.editEdge;if("object"===(void 0===o?"undefined":(0,l.default)(o))&&(o=o.editWithoutDrag),"function"==typeof o){if(2!==o.length)throw new Error("The function for edit does not support two arguments (data, callback)");o(n,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[n.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e.default=v},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(30),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(239),u=n(d),c=function(){function t(e,i,n){(0,a.default)(this,t),this.body=e,this.springLength=i,this.springConstant=n,this.distanceSolver=new u.default}return(0,l.default)(t,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();for(var o=0,r=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),a=1e9,h=0,l=0,d=0,u=0,c=0;a>.01&&o1&&c<5;){c+=1,this._moveNode(h,l,d);var m=this._getEnergy(h),g=(0,s.default)(m,3);u=g[0],l=g[1],d=g[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=0,o=e[0],r=0,a=0,h=0;h0?arguments[0]:void 0)}},{add:function(t){return n.def(o(this,"Set"),t=0===t?0:t,t)}},n)},function(t,e,i){var n=i(8);n(n.P+n.R,"Set",{toJSON:i(75)("Set")})},function(t,e,i){i(76)("Set")},function(t,e,i){i(77)("Set")},function(t,e,i){var n=i(5),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(18),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(7),y=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._mapNodeId2SelectionFlag=new s.default,t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"SelectionCtrl"}},{key:"flagNodes",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2SelectionFlag.set(t,!0)})}},{key:"unflagNodes",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2SelectionFlag.set(t,!1)})}},{key:"clear",value:function(){this._mapNodeId2SelectionFlag.clear()}},{key:"onCreate",value:function(t){var e=this,i=t.mainFrame;e.on(g.FrameEventName.FRAME_CLEAR_ALL_FLAGS,function(t){e.clear()}),i.on(g.FrameEventName.NETWORK_AFTER_DRAWING,function(t){var n=t.context2d;n.save(),e._mapNodeId2SelectionFlag.forEach(function(e,o,s){if(e){var r=t.network.getPositions([o]),a=i.getNodeById(o);if(null!=a&&!a.hidden){var r=t.network.getPositions([o]),h=r[o],l=t.network.getBoundingBox(o),d=h.y-l.top,u=d/1.414,c=h.x+u,p=h.y-u;n.font="30px FontAwesome",n.fillStyle="rgba(0, 236, 0, 0.9)",n.fillText("",c-5,p-5)}}}),n.restore()})}},{key:"onDestroy",value:function(t){}}]),e}(v.BGControl);e.SelectionCtrl=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(58),m=i(148),g=i(32),v=i(33),y=function(t){function e(t){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0}))}return(0,p.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var e=t.mainFrame,i=(e.addControl(new m.ExpansionCtrl),e.getRequiredControlLike(new g.ToolbarCtrl)),n=e.addControl(new f.ConnectCtrl);i.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),i.addButton({icon:"fa fa-folder-open-o",tooltip:"load GSON url",click:function(t){n.loadGsonUrl()}}),i.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}})}}]),e}(v.BaseApp);e.GraphExplorer=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(18),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(7),y=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._mapNodeId2ExpansionValue=new s.default,t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"ExpansionCtrl"}},{key:"collapse",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2ExpansionValue.set(t,-1)})}},{key:"isExpanded",value:function(t){return-1!=this._mapNodeId2ExpansionValue.get(t)}},{key:"clear",value:function(){this._mapNodeId2ExpansionValue.clear()}},{key:"expand",value:function(t){var e=this;this._frame.getGraphService().requestGetNeighbours(t,function(i,n){e._frame.insertNodes(i),e._frame.insertEdges(n),e._mapNodeId2ExpansionValue.set(t,n.length)})}},{key:"onCreate",value:function(t){var e=t.mainFrame;this._frame=e;var i=this;i.on(g.FrameEventName.FRAME_CLEAR_ALL_FLAGS,function(t){i.clear()}),e.on(g.FrameEventName.NETWORK_AFTER_DRAWING,function(t){var n=t.context2d;n.save(),n.lineWidth=1,n.strokeStyle=t.theme.expansion.fontColor,i._mapNodeId2ExpansionValue.forEach(function(i,o,s){if(!0!==e.getNodeById(o).hidden){var r=t.network.getPositions([o]),a=r[o],h=t.network.getBoundingBox(o),l=a.y-h.top,d=l/1.414,u=a.x+d,c=a.y+d;n.circle(u,c,-1==i?6:10),n.fillStyle=-1==i?t.theme.expansion.backgroudColorCollapsed:t.theme.expansion.backgroudColorExpanded,n.fill(),n.font="10px Arail";var p=-1==i?"?":""+i;n.strokeText(p,u-2.5*p.length,c-5)}}),n.restore()}),e.off(g.FrameEventName.INSERT_NODES),e.on(g.FrameEventName.INSERT_NODES,function(t){i.collapse(t.nodes)}),e.on(g.FrameEventName.NETWORK_DBLCLICK,function(t){t.nodes.forEach(function(t){i.isExpanded(t)||i.expand(t)})})}},{key:"onDestroy",value:function(t){}}]),e}(v.BGControl);e.ExpansionCtrl=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(23),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(58),v=i(90),y=i(150),b=i(84),_=i(32),w=i(6),x=i(33),k=function(t){function e(t,i){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0},{showDialog:i}))}return(0,m.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var e=t.mainFrame,i=this,n=(e.addControl(new v.HighlightCtrl),e.addControl(new g.ConnectCtrl)),o=e.getRequiredControlLike(new _.ToolbarCtrl);o.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),o.addButton({icon:"fa fa-folder-open-o",tooltip:"load GSON url",click:function(t){n.loadGsonUrl()}}),o.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}}),this._relfinderDlg=e.getRequiredControlLike(new b.RelFinderDialogCtrl),this._relfinder=e.addControl(new y.RelFinderCtrl),e.updateNetworkOptions(function(t){t.edges.physics=!1,t.edges.length=.5,t.physics.timestep=.1}),e.on(w.FrameEventName.RELFINDER_START,function(t){i.startQueryWithPrompt(500,t.maxDepth)}),e.on(w.FrameEventName.RELFINDER_STOP,function(t){i.stopQuery()}),e.on(w.FrameEventName.RELFINDER_STARTED,function(t){i._relfinderDlg.emit(w.FrameEventName.RELFINDER_STARTED,t)}),e.on(w.FrameEventName.RELFINDER_STOPPED,function(t){i._relfinderDlg.emit(w.FrameEventName.RELFINDER_STOPPED,t)}),this._dlgNoEnoughNodesSelected=$(' ').appendTo($(t.htmlMainFrame)).hide(),this._dlgClearScreenAlert=$(' ').appendTo($(t.htmlMainFrame)).hide()}},{key:"startQueryWithPrompt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=this;return 2!=this._relfinderDlg.getSelectedNodeIds().length?void this._dlgNoEnoughNodesSelected.dialog({modal:!0,resizable:!1,height:"auto",width:400,buttons:{"I see":function(){$(this).dialog("close")}}}):(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"getScreenData",this).call(this).edges.length>0?void this._dlgClearScreenAlert.dialog({resizable:!1,height:"auto",width:400,modal:!0,buttons:{"Delete all items":function(){$(this).dialog("close"),n.startQuery(t,i)},Cancel:function(){$(this).dialog("close")}}}):void n.startQuery(t,i)}},{key:"startQuery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=this._relfinderDlg.getSelectedNodeIds();(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"deleteNodes",this).call(this,function(t){return n.indexOf(t.id)<0}),this._relfinder.startQuery(n,t,i)}},{key:"stopQuery",value:function(){this._relfinder.stopQuery()}},{key:"pickup",value:function(t,i){var n=this;(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"pickup",this).call(this,t,function(t){n._relfinderDlg.selectNodes(t),void 0!==i&&i(t)})}}]),e}(x.BaseApp);e.RelFinder=k},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(88),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(31),y=i(7),b=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._pathColors=["#fd740b","#ed00ff","#63b706","#17b7fe","#fb3a71","#d66dfe"],t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"RelFinderCtrl"}},{key:"onCreate",value:function(t){var e=t.mainFrame;this._frame=e;var i=function(t){var i=this;if(void 0!==this._queryStartNodeIds){var n=[],o=[],r=t.nodes,a=t.edges,h=0,l=[];1==r.length&&this._queryStartNodeIds.indexOf(r[0])<0&&(this._consumedPaths.forEach(function(t){var e=!1,d=!0,u=!1,c=void 0;try{for(var p,f=(0,s.default)(t.nodes);!(d=(p=f.next()).done);d=!0){var m=p.value;if(r.indexOf(m.id)>=0){e=!0;break}}}catch(t){u=!0,c=t}finally{try{!d&&f.return&&f.return()}finally{if(u)throw c}}if(!e){var g=!0,v=!1,y=void 0;try{for(var b,_=(0,s.default)(t.edges);!(g=(b=_.next()).done);g=!0){var m=b.value;if(a.indexOf(m.id)>=0){e=!0;break}}}catch(t){v=!0,y=t}finally{try{!g&&_.return&&_.return()}finally{if(v)throw y}}}e&&(t.nodes.forEach(function(t){n.push(t.id)}),t.edges.forEach(function(t){o.push(t.id);var e=i._pathColors[h%i._pathColors.length];l.push({id:t.id,chosen:{edge:function(t,i,n,o){n&&(t.color=e,t.width=2,t.opacity=.9)}}})})),h++}),e.updateEdges(l),console.log(l),t.network.selectNodes(v.Utils.distinct(n)),t.network.selectEdges(v.Utils.distinct(o)))}};e.updateNetworkOptions(function(t){t.edges.width=1,t.edges.font.size=11}),e.off(g.FrameEventName.NETWORK_SELECT_EDGES),e.off(g.FrameEventName.NETWORK_DESELECT_EDGES),e.on(g.FrameEventName.NETWORK_CLICK,i.bind(this))}},{key:"_retrieveMoreRelations",value:function(t){var e=this;window.setTimeout(function(){e._frame.getGraphService().requestGetMoreRelations(t,function(i){if(i.paths.forEach(function(t){e._collectedPaths.push(t)}),!e._stopped)return i.completed?void(e._queryCompleted=!0):void e._retrieveMoreRelations(t)})},1e3)}},{key:"startQuery",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6;this._stopped=!1,this._queryCompleted=!1,this._frame.placeNodes(t),this._frame.focusNodes(t);var n=this;this._collectedPaths=[],this._consumedPaths=[],this._queryStartNodeIds=t,this._consumeTimer=window.setInterval(function(){if(n._collectedPaths.length>0){var t=n._collectedPaths.shift();n._frame.insertNodes(t.nodes),n._frame.insertEdges(t.edges),n._consumedPaths.push(t)}else n._queryCompleted&&n.stopQuery()},e),this._frame.getGraphService().requestFindRelations(t[0],t[1],i,function(t){n._queryId=t,n._retrieveMoreRelations(t)}),this._frame.emit(g.FrameEventName.RELFINDER_STARTED,{ctrl:this})}},{key:"stopQuery",value:function(){this._stopped||(this._stopped=!0,window.clearInterval(this._consumeTimer),this._frame.getGraphService().requestStopFindRelations(this._queryId),this._frame.emit(g.FrameEventName.RELFINDER_STOPPED,{ctrl:this}))}},{key:"onDestroy",value:function(t){}}]),e}(y.BGControl);e.RelFinderCtrl=b},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(23),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(152),v=i(58),y=i(90),b=i(83),_=i(55),w=i(32),x=i(49),k=i(6),C=i(33),D=i(87),E=function(t){function e(t){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showTitles:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0}))}return(0,m.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var i=t.mainFrame;this._searchBar=i.getRequiredControlLike(new _.SearchBoxCtrl),this._infoBox=i.getRequiredControlLike(new b.InfoBoxCtrl),this._statusBar=i.getRequiredControlLike(new D.StatusBarCtrl);var n=i.addControl(new v.ConnectCtrl),o=i.addControl(new y.HighlightCtrl),r=i.addControl(new g.CommunityCtrl),a=i.getRequiredControlLike(new w.ToolbarCtrl),h=this;a.addButton({icon:"fa fa-user-circle-o",checked:!0,tooltip:"show faces",click:function(t){h.toggleFaces(t)}}),a.addButton({icon:"fa fa-sliders",checked:!0,tooltip:"show degrees",click:function(t){h.toggleWeights(t)}}),a.addButton({icon:"fa fa-share-alt",checked:!0,tooltip:"show edges",click:function(t){h.toggleEdges(t)}}),a.addButton({icon:"fa fa-strikethrough",checked:!1,tooltip:"always show edge's label",click:function(t){h.toggleShowEdgeLabelAlways(t)}}),a.addButton({icon:"fa fa-circle-o",checked:!1,tooltip:"show border",click:function(t){h.toggleNodeBorder(t)}}),a.addButton({icon:"fa fa-transgender-alt",checked:!1,tooltip:"show edge color",click:function(t){h.toggleEdgeColor(t)}}),a.addButton({icon:"fa fa-clone",checked:!1,tooltip:"show shadow",click:function(t){h.toggleShadow(t)}}),a.addButton({
-icon:"fa fa-anchor",checked:!0,tooltip:"show navigation buttons",click:function(t){h.toggleNavigationButtons(t)}}),a.addButton({icon:"fa fa-search",checked:!0,tooltip:"show search bar",click:function(t){h.toggleSearchBar(t)}}),a.addButton({icon:"fa fa-info-circle",checked:!0,tooltip:"show info",click:function(t){h.toggleInfoBox(t)}}),a.addButton({icon:"fa fa-expand",checked:!0,tooltip:"undraggable/draggable",click:function(t){h.toggleDraggable(t)}}),a.addButton({icon:"fa fa-cloud",checked:!0,tooltip:"show communities/hide communities",click:function(t){r.toggle(t),i.redraw()}}),a.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),a.addButton({icon:"fa fa-folder-open-o",tooltip:"load remote GSON",click:function(t){n.loadGsonUrl()}}),a.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}}),this.addScaleSlider(a,i),this._addThemeSelect(a),(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"on",this).call(this,k.FrameEventName.GRAPH_CONNECTED,function(t){i.getGraphService().requestGetNodeCategories(function(t){h._addCategoriesSelect(a,t),o.clear(),h._infoBox.hide(),i.getGraphService().requestGetCommunityData(function(t){r.bind(t),h.showGraph({},function(){})})})}),(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"on",this).call(this,k.FrameEventName.GRAPH_LOADED,function(t){h._statusBar.showMessage("nodes: "+t.nodes.length+", edges: "+t.edges.length)}),this.toggleShowEdgeLabelAlways(!1)}},{key:"addScaleSlider",value:function(t,e){var i=document.createElement("div");$(i).addClass("scaleSlider"),$(i).slider({value:80,min:5,max:100,step:5,slide:function(t,i){e.scaleTo(i.value/100)}}),t.addTool(i)}},{key:"toggleInfoBox",value:function(t){t?this._infoBox.enable():this._infoBox.disable()}},{key:"toggleSearchBar",value:function(t){t?this._searchBar.show():this._searchBar.hide()}},{key:"_addCategoriesSelect",value:function(t,e){var i=this,n=document.getElementById("categories-select");null!=n&&n.remove(),n=document.createElement("span"),$(n).attr("id","categories-select");for(var o in e){var s=document.createElement("input"),r=document.createElement("label");$(s).attr("id","checkbox_"+o).appendTo($(n)).attr("key",o).attr("type","checkbox").attr("checked","true").click(function(){i.showNodesOfCategory($(this).attr("key"),$(this).prop("checked"))}),$(r).appendTo($(n)).attr("for","checkbox_"+o).text(e[o])}t.addTool(n)}},{key:"_addThemeSelect",value:function(t){var e=document.createElement("select");$("").val("DEFAULT").text("THEME_DEFAULT").appendTo($(e)),$("").val("BLACK").text("THEME_BLACK").appendTo($(e));var i=this;$(e).change(function(){var t=$(e).val(),n=x.Themes[t];i.updateTheme(n())}),t.addTool(e)}}]),e}(C.BaseApp);e.GraphNavigator=E},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(6),m=i(7),g=function(t){function e(){(0,a.default)(this,e);var t=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).apply(this,arguments));return t._showOrNot=!0,t}return(0,p.default)(e,t),(0,l.default)(e,[{key:"getTypeName",value:function(){return"CommunityCtrl"}},{key:"bind",value:function(t){this._data=t}},{key:"toggle",value:function(t){this._showOrNot=t}},{key:"onCreate",value:function(t){var e=this;t.mainFrame.on(f.FrameEventName.NETWORK_BEFORE_DRAWING,function(t){var i=t.context2d;e._showOrNot&&void 0!==e._data&&void 0!==e._data.communities&&e._drawZones(i)})}},{key:"onDestroy",value:function(t){}},{key:"_drawZones",value:function(t){var e=this;this._data.communities.forEach(function(i){e._drawZone(i,t)})}},{key:"_drawZone",value:function(t,e){var i=t.outline;if(i.length>2){var n=i[0],o=i[i.length-1];e.save(),e.beginPath(),e.moveTo(n.x,n.y);for(var s=1;s").val("DEFAULT").text("THEME_DEFAULT").appendTo($(e)),$("").val("BLACK").text("THEME_BLACK").appendTo($(e));var i=this;$(e).change(function(){var t=$(e).val(),n=x.Themes[t];i.updateTheme(n())}),t.addTool(e)}}]),e}(C.BaseApp);e.GraphNavigator=E},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(6),m=i(7),g=function(t){function e(){(0,a.default)(this,e);var t=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).apply(this,arguments));return t._showOrNot=!0,t}return(0,p.default)(e,t),(0,l.default)(e,[{key:"getTypeName",value:function(){return"CommunityCtrl"}},{key:"bind",value:function(t){this._data=t}},{key:"toggle",value:function(t){this._showOrNot=t}},{key:"onCreate",value:function(t){var e=this;t.mainFrame.on(f.FrameEventName.NETWORK_BEFORE_DRAWING,function(t){var i=t.context2d;e._showOrNot&&void 0!==e._data&&void 0!==e._data.communities&&e._drawZones(i)})}},{key:"onDestroy",value:function(t){}},{key:"_drawZones",value:function(t){var e=this;this._data.communities.forEach(function(i){e._drawZone(i,t)})}},{key:"_drawZone",value:function(t,e){var i=t.outline;if(i.length>2){var n=i[0],o=i[i.length-1];e.save(),e.beginPath(),e.moveTo(n.x,n.y);for(var s=1;s0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,n=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),!0===e){var o=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];!0===r.predefinedPosition&&(o+=1)}if(o>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=l.getRange(this.body.nodes,t.nodes);n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;n*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=l.getRange(this.body.nodes,t.nodes);var a=1.1*Math.abs(i.maxX-i.minX),h=1.1*Math.abs(i.maxY-i.minY),d=this.canvas.frame.canvas.clientWidth/a,u=this.canvas.frame.canvas.clientHeight/h;n=d<=u?d:u}n>1?n=1:0===n&&(n=1);var c=l.findCenter(i),p={position:c,scale:n,animation:t.animation};this.moveTo(p)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){if(void 0===t)return void(t={});void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),!1===t.animation&&(t.animation={duration:0}),!0===t.animation&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),this.animateView(t)}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),!0===t.locked&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},n=this.body.view.translation,o={x:n.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:n.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=!0===t?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e.default=d},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(2),l=i(233).default,d=i(104).default,u=function(){function t(e,i,n){(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.navigationHandler=new l(e,i),this.body.eventListeners.onTap=this.onTap.bind(this),this.body.eventListeners.onTouch=this.onTouch.bind(this),this.body.eventListeners.onDoubleTap=this.onDoubleTap.bind(this),this.body.eventListeners.onHold=this.onHold.bind(this),this.body.eventListeners.onDragStart=this.onDragStart.bind(this),this.body.eventListeners.onDrag=this.onDrag.bind(this),this.body.eventListeners.onDragEnd=this.onDragEnd.bind(this),this.body.eventListeners.onMouseWheel=this.onMouseWheel.bind(this),this.body.eventListeners.onPinch=this.onPinch.bind(this),this.body.eventListeners.onMouseMove=this.onMouseMove.bind(this),this.body.eventListeners.onRelease=this.onRelease.bind(this),this.body.eventListeners.onContext=this.onContext.bind(this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=this.getPointer.bind(this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0},h.extend(this.options,this.defaultOptions),this.bindEventListeners()}return(0,a.default)(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("destroy",function(){clearTimeout(t.popupTimer),delete t.body.functions.getPointer})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];h.selectiveNotDeepExtend(e,this.options,t),h.mergeOptions(this.options,t,"keyboard"),t.tooltip&&(h.extend(this.options.tooltip,t.tooltip),t.tooltip.color&&(this.options.tooltip.color=h.parseColor(t.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(t){return{x:t.x-h.getAbsoluteLeft(this.canvas.frame.canvas),y:t.y-h.getAbsoluteTop(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(t){(new Date).valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.selectionHandler.getSelection(),o=!1;o=!0===i?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var s=this.selectionHandler.getSelection(),r=this._determineDifference(n,s),a=this._determineDifference(s,n);r.edges.length>0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,n),o=!0),r.nodes.length>0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,n),o=!0),a.nodes.length>0&&(this.selectionHandler._generateClickEvent("selectNode",e,t),o=!0),a.edges.length>0&&(this.selectionHandler._generateClickEvent("selectEdge",e,t),o=!0),!0===o&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineDifference",value:function(t,e){var i=function(t,e){for(var i=[],n=0;n10&&(t=10);var n=void 0;void 0!==this.drag&&!0===this.drag.dragging&&(n=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=t/i,r=(1-s)*e.x+o.x*s,a=(1-s)*e.y+o.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=n){var h=this.canvas.canvasToDOM(n);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[u[u.length-1]],s=!0)}if(void 0===this.popupObj&&!1===s){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,g=[],v=0;v0&&(this.popupObj=f[g[g.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==o&&(void 0===this.popup&&(this.popup=new d(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e))){var n=this.selectionHandler.getNodeAt(t);i=void 0!==n&&n.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(10),l=i(37),d=i(35),u=function(){function t(e,i){var n=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){n.activated=!0,n.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){n.activated=!1,n.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==n.keycharm&&n.keycharm.destroy()}),this.options={}}return(0,a.default)(t,[{key:"setOptions",value:function(t){void 0!==t&&(this.options=t,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var t=0;t700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,n=e/t,o=(1-n)*this.canvas.canvasViewCenter.x+i.x*n,s=(1-n)*this.canvas.canvasViewCenter.y+i.y*n;this.body.view.scale=e,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=d({container:window,preventDefault:!0}):this.keycharm=d({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),s=n(o),r=i(1),a=n(r),h=i(47).default,l=i(74).default,d=i(2),u=function(){function t(e,i){var n=this;(0,s.default)(this,t),this.body=e,this.canvas=i,this.selectionObj={nodes:[],edges:[]},this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},d.extend(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){n.updateSelection()})}return(0,a.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){var e=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];d.selectiveDeepExtend(e,this.options,t)}}},{key:"selectOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);this.unselectAll(),void 0!==i&&(e=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return e}},{key:"selectAdditionalOnPoint",value:function(t){var e=!1;if(!0===this.options.selectable){var i=this.getNodeAt(t)||this.getEdgeAt(t);void 0!==i&&(e=!0,!0===i.isSelected()?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return e}},{key:"_initBaseEvent",value:function(t,e){var i={};return i.pointer={DOM:{x:e.x,y:e.y},canvas:this.canvas.DOMtoCanvas(e)},i.event=t,i}},{key:"_generateClickEvent",value:function(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this._initBaseEvent(e,i);if(!0===o)s.nodes=[],s.edges=[];else{var r=this.getSelection();s.nodes=r.nodes,s.edges=r.edges}void 0!==n&&(s.previousSelection=n),"click"==t&&(s.items=this.getClickedItems(i)),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof h&&!0===e&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){!0===t.isSelected()&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,n=0;n1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),n=this._getAllNodesOverlappingWith(i);return n.length>0?!0===e?this.body.nodes[n[n.length-1]]:n[n.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,n=0;n1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),n=10,o=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,n=void 0
;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties";if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{key:"updateSelection",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(this.body.nodes.hasOwnProperty(t)||delete this.selectionObj.nodes[t]);for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(this.body.edges.hasOwnProperty(e)||delete this.selectionObj.edges[e])}},{key:"getClickedItems",value:function(t){for(var e=this.canvas.DOMtoCanvas(t),i=[],n=this.body.nodeIndices,o=this.body.nodes,s=n.length-1;s>=0;s--){var r=o[n[s]],a=r.getItemsOnPoint(e);i.push.apply(i,a)}for(var h=this.body.edgeIndices,l=this.body.edges,d=h.length-1;d>=0;d--){var u=l[h[d]],c=u.getItemsOnPoint(e);i.push.apply(i,c)}return i}}]),t}();e.default=u},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(30),s=n(o),r=i(6),a=n(r),h=i(8),l=n(h),d=i(0),u=n(d),c=i(1),p=n(c),f=i(2),m=i(76).default,g=i(236),v=g.HorizontalStrategy,y=g.VerticalStrategy,b=function(){function t(){(0,u.default)(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return(0,p.default)(t,[{key:"addRelation",value:function(t,e){void 0===this.childrenReference[t]&&(this.childrenReference[t]=[]),this.childrenReference[t].push(e),void 0===this.parentReference[e]&&(this.parentReference[e]=[]),this.parentReference[e].push(t)}},{key:"checkIfTree",value:function(){for(var t in this.parentReference)if(this.parentReference[t].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(t,e){void 0!==e&&void 0===this.trees[t.id]&&(this.trees[t.id]=e,this.treeIndex=Math.max(e,this.treeIndex))}},{key:"ensureLevel",value:function(t){void 0===this.levels[t]&&(this.levels[t]=0)}},{key:"getMaxLevel",value:function(t){var e=this,i={};return function t(n){if(void 0!==i[n])return i[n];var o=e.levels[n];if(e.childrenReference[n]){var s=e.childrenReference[n];if(s.length>0)for(var r=0;r0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(!0===n)return this.body.emitter.emit("refresh"),f.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(!0===this.options.hierarchical.enabled){var e=this.optionsBackup.physics;void 0===t.physics||!0===t.physics?(t.physics={enabled:void 0===e.enabled||e.enabled,solver:"hierarchicalRepulsion"},e.enabled=void 0===e.enabled||e.enabled,e.solver=e.solver||"barnesHut"):"object"===(0,a.default)(t.physics)?(e.enabled=void 0===t.physics.enabled||t.physics.enabled,e.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):!1!==t.physics&&(e.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(void 0===t.edges)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1};else if(void 0===t.edges.smooth)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1;else if("boolean"==typeof t.edges.smooth)this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:i};else{var n=t.edges.smooth;void 0!==n.type&&"dynamic"!==n.type&&(i=n.type),this.optionsBackup.edges={smooth:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection},t.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:i,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(!0!==this.options.hierarchical.enabled){this.randomSeed=this.initialRandomSeed;for(var e=t.length+50,i=0;i150){for(var s=t.length;t.length>150&&n<=10;){n+=1;var r=t.length;n%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);if(r==t.length&&n%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*s)})}n>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(t,this.body.edgeIndices,!0),this._shiftToCenter();for(var a=0;a0){var t=void 0,e=void 0,i=!1,n=!1;this.lastNodeOnLevel={},this.hierarchical=new b;for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0!==t.options.level?(i=!0,this.hierarchical.levels[e]=t.options.level):n=!0);if(!0===n&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(!0===n){var o=this.options.hierarchical.sortMethod;"hubsize"===o?this._determineLevelsByHubsize():"directed"===o?this._determineLevelsDirected():"custom"===o&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&this.hierarchical.ensureLevel(s);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},n=function(e,i){var n=t.hierarchical.trees;for(var o in n)n.hasOwnProperty(o)&&n[o]===e&&t.direction.shift(o,i)},o=function(){for(var e=[],i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,n=1e9,o=1e9,r=1e9,a=-1e9;for(var h in e)if(e.hasOwnProperty(h)){var l=t.body.nodes[h],d=t.hierarchical.levels[l.id],u=t.direction.getPosition(l),c=t._getSpaceAroundNode(l,e),p=(0,s.default)(c,2),f=p[0],m=p[1];n=Math.min(f,n),o=Math.min(m,o),d<=i&&(r=Math.min(u,r),a=Math.max(u,a))}return[r,a,n,o]},h=function(e,i){var n=t.hierarchical.getMaxLevel(e.id),o=t.hierarchical.getMaxLevel(i.id);return Math.min(n,o)},l=function(e,i,n){for(var o=t.hierarchical,s=0;s1)for(var h=0;h2&&void 0!==arguments[2]&&arguments[2],s=t.direction.getPosition(i),l=t.direction.getPosition(n),d=Math.abs(l-s),u=t.options.hierarchical.nodeSpacing;if(d>u){var c={},p={};r(i,c),r(n,p);var f=h(i,n),m=a(c,f),g=a(p,f),v=m[1],y=g[0],b=g[2];if(Math.abs(v-y)>u){var _=v-y+u;_<-b+u&&(_=-b+u),_<0&&(t._shiftBlock(n.id,_),e=!0,!0===o&&t._centerParent(n))}}},u=function(n,o){for(var h=o.id,l=o.edges,d=t.hierarchical.levels[o.id],u=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,c={},p=[],f=0;f0?p=Math.min(c,u-t.options.hierarchical.nodeSpacing):c<0&&(p=-Math.min(-c,d-t.options.hierarchical.nodeSpacing)),0!=p&&(t._shiftBlock(o.id,p),e=!0)}(_),_=b(n,l),function(i){var n=t.direction.getPosition(o),r=t._getSpaceAroundNode(o),a=(0,s.default)(r,2),h=a[0],l=a[1],d=i-n,u=n;d>0?u=Math.min(n+(l-t.options.hierarchical.nodeSpacing),i):d<0&&(u=Math.max(n-(h-t.options.hierarchical.nodeSpacing),i)),u!==n&&(t.direction.setPosition(o,u),e=!0)}(_)};!0===this.options.hierarchical.blockShifting&&(function(i){var n=t.hierarchical.getLevels();n=n.reverse();for(var o=0;o0&&Math.abs(p)0&&(a=this.direction.getPosition(i[o-1])+r),this.direction.setPosition(s,a,e),this._validatePositionAndContinue(s,e,a),n++}}}}},{key:"_placeBranchNodes",value:function(t,e){var i=this.hierarchical.childrenReference[t];if(void 0!==i){for(var n=[],o=0;oe&&void 0===this.positionedNodes[r.id]))return;var h=this.options.hierarchical.nodeSpacing,l=void 0;l=0===s?this.direction.getPosition(this.body.nodes[t]):this.direction.getPosition(n[s-1])+h,this.direction.setPosition(r,l,a),this._validatePositionAndContinue(r,a,l)}var d=this._getCenterPosition(n);this.direction.setPosition(this.body.nodes[t],d,e)}}},{key:"_validatePositionAndContinue",value:function(t,e,i){if(this.hierarchical.isTree){if(void 0!==this.lastNodeOnLevel[e]){var n=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[e]]);if(i-nt.hierarchical.levels[e.id]&&t.hierarchical.addRelation(e.id,i.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],n={},o=function i(o,s){if(void 0===n[o.id]){t.hierarchical.setTreeIndex(o,s),n[o.id]=!0;for(var r=void 0,a=t._getActiveEdges(o),h=0;h2&&void 0!==arguments[2]?arguments[2]:void 0;this.fake_use(t,e,i),this.abstract()}},{key:"getTreeSize",value:function(t){return this.fake_use(t),this.abstract()}},{key:"sort",value:function(t){this.fake_use(t),this.abstract()}},{key:"fix",value:function(t,e){this.fake_use(t,e),this.abstract()}},{key:"shift",value:function(t,e){this.fake_use(t,e),this.abstract()}}]),t}(),m=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,l.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(t){return t.x}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.x=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.x||void 0===e.x?0:t.x-e.x})}},{key:"fix",value:function(t,e){t.y=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.y=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].x+=e}}]),e}(f),g=function(t){function e(t){(0,u.default)(this,e);var i=(0,a.default)(this,(e.__proto__||(0,s.default)(e)).call(this));return i.layout=t,i}return(0,l.default)(e,t),(0,p.default)(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(t){return t.y}},{key:"setPosition",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==i&&this.layout.hierarchical.addToOrdering(t,i),t.y=e}},{key:"getTreeSize",value:function(t){var e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,t);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(t){t.sort(function(t,e){return void 0===t.y||void 0===e.y?0:t.y-e.y})}},{key:"fix",value:function(t,e){t.x=this.layout.options.hierarchical.levelSeparation*e,t.options.fixed.x=!0}},{key:"shift",value:function(t,e){this.layout.body.nodes[t].y+=e}}]),e}(f);e.HorizontalStrategy=g,e.VerticalStrategy=m},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(8),s=n(o),r=i(19),a=n(r),h=i(6),l=n(h),d=i(0),u=n(d),c=i(1),p=n(c),f=i(2),m=i(10),g=i(37),v=function(){function t(e,i,n){var o=this;(0,u.default)(this,t),this.body=e,this.canvas=i,this.selectionHandler=n,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this.manipulationHammers=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},f.extend(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){o._clean()}),this.body.emitter.on("_dataChanged",this._restore.bind(this)),this.body.emitter.on("_resetData",this._restore.bind(this))}return(0,p.default)(t,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(t,e,i){void 0!==e&&(void 0!==e.locale?this.options.locale=e.locale:this.options.locale=i.locale,void 0!==e.locales?this.options.locales=e.locales:this.options.locales=i.locales),void 0!==t&&("boolean"==typeof t?this.options.enabled=t:(this.options.enabled=!0,f.deepExtend(this.options,t)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var t=this.selectionHandler._getSelectedNodeCount(),e=this.selectionHandler._getSelectedEdgeCount(),i=t+e,n=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(n),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(n)),1===t&&"function"==typeof this.options.editNode?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(n)):1===e&&0===t&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(n)),0!==i&&(t>0&&!1!==this.options.deleteNode?(!0===o&&this._createSeperator(4),this._createDeleteButton(n)):0===t&&!1!==this.options.deleteEdge&&(!0===o&&this._createSeperator(4),this._createDeleteButton(n))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var i=f.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",this._dragStartEdge.bind(this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"===(0,l.default)(this.options.editEdge)&&"function"==typeof this.options.editEdge.editWithoutDrag&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId)){var t=this.body.edges[this.edgeBeingEditedId];return void this._performEditEdge(t.from,t.to)}if(!0===this.guiEnabled){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId){var i=this.body.edges[this.edgeBeingEditedId],n=this._getNewTargetNode(i.from.x,i.from.y),o=this._getNewTargetNode(i.to.x,i.to.y);this.temporaryIds.nodes.push(n.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI("onTouch",this._controlNodeTouch.bind(this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",this._controlNodeDragStart.bind(this)),this._temporaryBindUI("onDrag",this._controlNodeDrag.bind(this)),this._temporaryBindUI("onDragEnd",this._controlNodeDragEnd.bind(this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(t){var e=i.edgeType.findBorderPositions(t);!1===n.selected&&(n.x=e.from.x,n.y=e.from.y),!1===o.selected&&(o.x=e.to.x,o.y=e.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),n=void 0;if(e.length>0){for(var o=0;o0&&"function"==typeof this.options.deleteEdge&&(n=this.options.deleteEdge);if("function"==typeof n){var s={nodes:e,edges:i};if(2!==n.length)throw new Error("The function for delete does not support two arguments (data, callback)");n(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=f.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+f.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var n=this.body.functions.createNode(i);return n.shape.boundingBox={left:t,right:t,top:e,bottom:e},n}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},f.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,!0===this.guiEnabled&&(f.recursiveDOMDelete(this.editModeDiv),f.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){var e;e=this.options.rtl?"vis-button vis-delete-rtl":"vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=n,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+(0,a.default)((0,s.default)(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t=0;r--)if(o[r]!==this.selectedControlNode.id){s=this.body.nodes[o[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(!0===s.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,n.to.id):this._performEditEdge(n.from.id,s.id)}else n.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=f.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(!0===i.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var n=this._getNewTargetNode(i.x,i.y);this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id);var o=this.body.functions.createEdge({id:"connectionEdge"+f.randomUUID(),from:i.id,to:n.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(n.id),this.temporaryIds.edges.push(o.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var n=e.x-this.lastTouch.x,o=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+n,y:this.lastTouch.translation.y+o}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),n=void 0;void 0!==this.temporaryIds.edges[0]&&(n=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=o.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(o[r])){s=this.body.nodes[o[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(!0===s.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[n]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(n,s.id)),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(t){var e=this.lastTouch;this.selectionHandler._generateClickEvent("dragStart",t,e,void 0,!0)}},{key:"_performAddNode",value:function(t){var e=this,i={id:f.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,n={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(n,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,n={id:this.edgeBeingEditedId,from:t,to:e,label:this.body.data.edges._data[this.edgeBeingEditedId].label},o=this.options.editEdge;if("object"===(void 0===o?"undefined":(0,l.default)(o))&&(o=o.editWithoutDrag),"function"==typeof o){if(2!==o.length)throw new Error("The function for edit does not support two arguments (data, callback)");o(n,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[n.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e.default=v},function(t,e,i){function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=i(30),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(239),u=n(d),c=function(){function t(e,i,n){(0,a.default)(this,t),this.body=e,this.springLength=i,this.springConstant=n,this.distanceSolver=new u.default}return(0,l.default)(t,[{key:"setOptions",value:function(t){t&&(t.springLength&&(this.springLength=t.springLength),t.springConstant&&(this.springConstant=t.springConstant))}},{key:"solve",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(n),this._createK_matrix(n),this._createE_matrix();for(var o=0,r=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),a=1e9,h=0,l=0,d=0,u=0,c=0;a>.01&&o1&&c<5;){c+=1,this._moveNode(h,l,d);var m=this._getEnergy(h),g=(0,s.default)(m,3);u=g[0],l=g[1],d=g[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,n=0,o=e[0],r=0,a=0,h=0;h0?arguments[0]:void 0)}},{add:function(t){return n.def(o(this,"Set"),t=0===t?0:t,t)}},n)},function(t,e,i){var n=i(8);n(n.P+n.R,"Set",{toJSON:i(75)("Set")})},function(t,e,i){i(76)("Set")},function(t,e,i){i(77)("Set")},function(t,e,i){var n=i(5),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(18),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(7),y=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._mapNodeId2SelectionFlag=new s.default,t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"SelectionCtrl"}},{key:"flagNodes",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2SelectionFlag.set(t,!0)})}},{key:"unflagNodes",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2SelectionFlag.set(t,!1)})}},{key:"clear",value:function(){this._mapNodeId2SelectionFlag.clear()}},{key:"onCreate",value:function(t){var e=this,i=t.mainFrame;e.on(g.FrameEventName.FRAME_CLEAR_ALL_FLAGS,function(t){e.clear()}),i.on(g.FrameEventName.NETWORK_AFTER_DRAWING,function(t){var n=t.context2d;n.save(),e._mapNodeId2SelectionFlag.forEach(function(e,o,s){if(e){var r=t.network.getPositions([o]),a=i.getNodeById(o);if(null!=a&&!a.hidden){var r=t.network.getPositions([o]),h=r[o],l=t.network.getBoundingBox(o),d=h.y-l.top,u=d/1.414,c=h.x+u,p=h.y-u;n.font="30px FontAwesome",n.fillStyle="rgba(0, 236, 0, 0.9)",n.fillText("",c-5,p-5)}}}),n.restore()})}},{key:"onDestroy",value:function(t){}}]),e}(v.BGControl);e.SelectionCtrl=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(58),m=i(148),g=i(32),v=i(33),y=function(t){function e(t){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0}))}return(0,p.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var e=t.mainFrame,i=(e.addControl(new m.ExpansionCtrl),e.getRequiredControlLike(new g.ToolbarCtrl)),n=e.addControl(new f.ConnectCtrl);i.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),i.addButton({icon:"fa fa-folder-open-o",tooltip:"load GSON url",click:function(t){n.loadGsonUrl()}}),i.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}})}}]),e}(v.BaseApp);e.GraphExplorer=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(18),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(7),y=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._mapNodeId2ExpansionValue=new s.default,t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"ExpansionCtrl"}},{key:"collapse",value:function(t){var e=this;(t instanceof Array?t:[t]).forEach(function(t){e._mapNodeId2ExpansionValue.set(t,-1)})}},{key:"isExpanded",value:function(t){return-1!=this._mapNodeId2ExpansionValue.get(t)}},{key:"clear",value:function(){this._mapNodeId2ExpansionValue.clear()}},{key:"expand",value:function(t){var e=this;this._frame.getGraphService().requestGetNeighbours(t,function(i,n){e._frame.insertNodes(i),e._frame.insertEdges(n),e._mapNodeId2ExpansionValue.set(t,n.length)})}},{key:"onCreate",value:function(t){var e=t.mainFrame;this._frame=e;var i=this;i.on(g.FrameEventName.FRAME_CLEAR_ALL_FLAGS,function(t){i.clear()}),e.on(g.FrameEventName.NETWORK_AFTER_DRAWING,function(t){var n=t.context2d;n.save(),n.lineWidth=1,n.strokeStyle=t.theme.expansion.fontColor,i._mapNodeId2ExpansionValue.forEach(function(i,o,s){if(!0!==e.getNodeById(o).hidden){var r=t.network.getPositions([o]),a=r[o],h=t.network.getBoundingBox(o),l=a.y-h.top,d=l/1.414,u=a.x+d,c=a.y+d;n.circle(u,c,-1==i?6:10),n.fillStyle=-1==i?t.theme.expansion.backgroudColorCollapsed:t.theme.expansion.backgroudColorExpanded,n.fill(),n.font="10px Arail";var p=-1==i?"?":""+i;n.strokeText(p,u-2.5*p.length,c-5)}}),n.restore()}),e.off(g.FrameEventName.INSERT_NODES),e.on(g.FrameEventName.INSERT_NODES,function(t){i.collapse(t.nodes)}),e.on(g.FrameEventName.NETWORK_DBLCLICK,function(t){t.nodes.forEach(function(t){i.isExpanded(t)||i.expand(t)})})}},{key:"onDestroy",value:function(t){}}]),e}(v.BGControl);e.ExpansionCtrl=y},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(23),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(58),v=i(90),y=i(150),b=i(84),_=i(32),w=i(6),x=i(33),k=function(t){function e(t,i){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0},{showDialog:i}))}return(0,m.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var e=t.mainFrame,i=this,n=(e.addControl(new v.HighlightCtrl),e.addControl(new g.ConnectCtrl)),o=e.getRequiredControlLike(new _.ToolbarCtrl);o.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),o.addButton({icon:"fa fa-folder-open-o",tooltip:"load GSON url",click:function(t){n.loadGsonUrl()}}),o.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}}),this._relfinderDlg=e.getRequiredControlLike(new b.RelFinderDialogCtrl),this._relfinder=e.addControl(new y.RelFinderCtrl),e.updateNetworkOptions(function(t){t.edges.physics=!1,t.edges.length=.5,t.physics.timestep=.1}),e.on(w.FrameEventName.RELFINDER_START,function(t){i.startQueryWithPrompt(500,t.maxDepth)}),e.on(w.FrameEventName.RELFINDER_STOP,function(t){i.stopQuery()}),e.on(w.FrameEventName.RELFINDER_STARTED,function(t){i._relfinderDlg.emit(w.FrameEventName.RELFINDER_STARTED,t)}),e.on(w.FrameEventName.RELFINDER_STOPPED,function(t){i._relfinderDlg.emit(w.FrameEventName.RELFINDER_STOPPED,t)}),this._dlgNoEnoughNodesSelected=$(' ').appendTo($(t.htmlMainFrame)).hide(),this._dlgClearScreenAlert=$(' ').appendTo($(t.htmlMainFrame)).hide()}},{key:"startQueryWithPrompt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=this;return 2!=this._relfinderDlg.getSelectedNodeIds().length?void this._dlgNoEnoughNodesSelected.dialog({modal:!0,resizable:!1,height:"auto",width:400,buttons:{"I see":function(){$(this).dialog("close")}}}):(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"getScreenData",this).call(this).edges.length>0?void this._dlgClearScreenAlert.dialog({resizable:!1,height:"auto",width:400,modal:!0,buttons:{"Delete all items":function(){$(this).dialog("close"),n.startQuery(t,i)},Cancel:function(){$(this).dialog("close")}}}):void n.startQuery(t,i)}},{key:"startQuery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=this._relfinderDlg.getSelectedNodeIds();(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"deleteNodes",this).call(this,function(t){return n.indexOf(t.id)<0}),this._relfinder.startQuery(n,t,i)}},{key:"stopQuery",value:function(){this._relfinder.stopQuery()}},{key:"pickup",value:function(t,i){var n=this;(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"pickup",this).call(this,t,function(t){n._relfinderDlg.selectNodes(t),void 0!==i&&i(t)})}}]),e}(x.BaseApp);e.RelFinder=k},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(88),s=n(o),r=i(2),a=n(r),h=i(0),l=n(h),d=i(1),u=n(d),c=i(3),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(6),v=i(31),y=i(7),b=function(t){function e(){(0,l.default)(this,e);var t=(0,p.default)(this,(e.__proto__||(0,a.default)(e)).apply(this,arguments));return t._pathColors=["#fd740b","#ed00ff","#63b706","#17b7fe","#fb3a71","#d66dfe"],t}return(0,m.default)(e,t),(0,u.default)(e,[{key:"getTypeName",value:function(){return"RelFinderCtrl"}},{key:"onCreate",value:function(t){var e=t.mainFrame;this._frame=e;var i=function(t){var i=this;if(void 0!==this._queryStartNodeIds){var n=[],o=[],r=t.nodes,a=t.edges,h=0,l=[];1==r.length&&this._queryStartNodeIds.indexOf(r[0])<0&&(this._consumedPaths.forEach(function(t){var e=!1,d=!0,u=!1,c=void 0;try{for(var p,f=(0,s.default)(t.nodes);!(d=(p=f.next()).done);d=!0){var m=p.value;if(r.indexOf(m.id)>=0){e=!0;break}}}catch(t){u=!0,c=t}finally{try{!d&&f.return&&f.return()}finally{if(u)throw c}}if(!e){var g=!0,v=!1,y=void 0;try{for(var b,_=(0,s.default)(t.edges);!(g=(b=_.next()).done);g=!0){var m=b.value;if(a.indexOf(m.id)>=0){e=!0;break}}}catch(t){v=!0,y=t}finally{try{!g&&_.return&&_.return()}finally{if(v)throw y}}}e&&(t.nodes.forEach(function(t){n.push(t.id)}),t.edges.forEach(function(t){o.push(t.id);var e=i._pathColors[h%i._pathColors.length];l.push({id:t.id,chosen:{edge:function(t,i,n,o){n&&(t.color=e,t.width=2,t.opacity=.9)}}})})),h++}),e.updateEdges(l),console.log(l),t.network.selectNodes(v.Utils.distinct(n)),t.network.selectEdges(v.Utils.distinct(o)))}};e.updateNetworkOptions(function(t){t.edges.width=1,t.edges.font.size=11}),e.off(g.FrameEventName.NETWORK_SELECT_EDGES),e.off(g.FrameEventName.NETWORK_DESELECT_EDGES),e.on(g.FrameEventName.NETWORK_CLICK,i.bind(this))}},{key:"_retrieveMoreRelations",value:function(t){var e=this;window.setTimeout(function(){e._frame.getGraphService().requestGetMoreRelations(t,function(i){if(i.paths.forEach(function(t){e._collectedPaths.push(t)}),!e._stopped)return i.completed?void(e._queryCompleted=!0):void e._retrieveMoreRelations(t)})},1e3)}},{key:"startQuery",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6;this._stopped=!1,this._queryCompleted=!1,this._frame.placeNodes(t),this._frame.focusNodes(t);var n=this;this._collectedPaths=[],this._consumedPaths=[],this._queryStartNodeIds=t,this._consumeTimer=window.setInterval(function(){if(n._collectedPaths.length>0){var t=n._collectedPaths.shift();n._frame.insertNodes(t.nodes),n._frame.insertEdges(t.edges),n._consumedPaths.push(t)}else n._queryCompleted&&n.stopQuery()},e),this._frame.getGraphService().requestFindRelations(t[0],t[1],i,function(t){n._queryId=t,n._retrieveMoreRelations(t)}),this._frame.emit(g.FrameEventName.RELFINDER_STARTED,{ctrl:this})}},{key:"stopQuery",value:function(){this._stopped||(this._stopped=!0,window.clearInterval(this._consumeTimer),this._frame.getGraphService().requestStopFindRelations(this._queryId),this._frame.emit(g.FrameEventName.RELFINDER_STOPPED,{ctrl:this}))}},{key:"onDestroy",value:function(t){}}]),e}(y.BGControl);e.RelFinderCtrl=b},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(23),p=n(c),f=i(4),m=n(f);Object.defineProperty(e,"__esModule",{value:!0});var g=i(152),v=i(58),y=i(90),b=i(83),_=i(55),w=i(32),x=i(49),k=i(6),C=i(33),D=i(87),E=function(t){function e(t){return(0,a.default)(this,e),(0,u.default)(this,(e.__proto__||(0,s.default)(e)).call(this,t,{showLabels:!0,showTitles:!0,showFaces:!0,showDegrees:!0,showEdges:!0,showGroups:!0}))}return(0,m.default)(e,t),(0,l.default)(e,[{key:"onCreateFrame",value:function(t){var i=t.mainFrame;this._searchBar=i.getRequiredControlLike(new _.SearchBoxCtrl),this._infoBox=i.getRequiredControlLike(new b.InfoBoxCtrl),this._statusBar=i.getRequiredControlLike(new D.StatusBarCtrl);var n=i.addControl(new v.ConnectCtrl),o=i.addControl(new y.HighlightCtrl),r=i.addControl(new g.CommunityCtrl),a=i.getRequiredControlLike(new w.ToolbarCtrl),h=this;a.addButton({icon:"fa fa-user-circle-o",checked:!0,tooltip:"show faces",click:function(t){h.toggleFaces(t)}}),a.addButton({icon:"fa fa-sliders",checked:!0,tooltip:"show degrees",click:function(t){h.toggleWeights(t)}}),a.addButton({icon:"fa fa-share-alt",checked:!0,tooltip:"show edges",click:function(t){h.toggleEdges(t)}}),a.addButton({icon:"fa fa-strikethrough",checked:!1,tooltip:"always show edge's label",click:function(t){h.toggleShowEdgeLabelAlways(t)}}),a.addButton({icon:"fa fa-circle-o",checked:!1,tooltip:"show border",click:function(t){h.toggleNodeBorder(t)}}),a.addButton({icon:"fa fa-transgender-alt",checked:!1,tooltip:"show edge color",click:function(t){h.toggleEdgeColor(t)}}),a.addButton({icon:"fa fa-clone",checked:!1,tooltip:"show shadow",click:function(t){h.toggleShadow(t)}}),a.addButton({
-icon:"fa fa-anchor",checked:!0,tooltip:"show navigation buttons",click:function(t){h.toggleNavigationButtons(t)}}),a.addButton({icon:"fa fa-search",checked:!0,tooltip:"show search bar",click:function(t){h.toggleSearchBar(t)}}),a.addButton({icon:"fa fa-info-circle",checked:!0,tooltip:"show info",click:function(t){h.toggleInfoBox(t)}}),a.addButton({icon:"fa fa-expand",checked:!0,tooltip:"undraggable/draggable",click:function(t){h.toggleDraggable(t)}}),a.addButton({icon:"fa fa-cloud",checked:!0,tooltip:"show communities/hide communities",click:function(t){r.toggle(t),i.redraw()}}),a.addButton({icon:"fa fa-file-code-o",tooltip:"load GSON string",click:function(t){n.loadGsonString()}}),a.addButton({icon:"fa fa-folder-open-o",tooltip:"load remote GSON",click:function(t){n.loadGsonUrl()}}),a.addButton({icon:"fa fa-universal-access",tooltip:"connect remote IGP server",click:function(t){n.loadRemoteServer()}}),this.addScaleSlider(a,i),this._addThemeSelect(a),(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"on",this).call(this,k.FrameEventName.GRAPH_CONNECTED,function(t){i.getGraphService().requestGetNodeCategories(function(t){h._addCategoriesSelect(a,t),o.clear(),h._infoBox.hide(),i.getGraphService().requestGetCommunityData(function(t){r.bind(t),h.showGraph({},function(){})})})}),(0,p.default)(e.prototype.__proto__||(0,s.default)(e.prototype),"on",this).call(this,k.FrameEventName.GRAPH_LOADED,function(t){h._statusBar.showMessage("nodes: "+t.nodes.length+", edges: "+t.edges.length)}),this.toggleShowEdgeLabelAlways(!1)}},{key:"addScaleSlider",value:function(t,e){var i=document.createElement("div");$(i).addClass("scaleSlider"),$(i).slider({value:80,min:5,max:100,step:5,slide:function(t,i){e.scaleTo(i.value/100)}}),t.addTool(i)}},{key:"toggleInfoBox",value:function(t){t?this._infoBox.enable():this._infoBox.disable()}},{key:"toggleSearchBar",value:function(t){t?this._searchBar.show():this._searchBar.hide()}},{key:"_addCategoriesSelect",value:function(t,e){var i=this,n=document.getElementById("categories-select");null!=n&&n.remove(),n=document.createElement("span"),$(n).attr("id","categories-select");for(var o in e){var s=document.createElement("input"),r=document.createElement("label");$(s).attr("id","checkbox_"+o).appendTo($(n)).attr("key",o).attr("type","checkbox").attr("checked","true").click(function(){i.showNodesOfCategory($(this).attr("key"),$(this).prop("checked"))}),$(r).appendTo($(n)).attr("for","checkbox_"+o).text(e[o])}t.addTool(n)}},{key:"_addThemeSelect",value:function(t){var e=document.createElement("select");$("").val("DEFAULT").text("THEME_DEFAULT").appendTo($(e)),$("").val("BLACK").text("THEME_BLACK").appendTo($(e));var i=this;$(e).change(function(){var t=$(e).val(),n=x.Themes[t];i.updateTheme(n())}),t.addTool(e)}}]),e}(C.BaseApp);e.GraphNavigator=E},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(6),m=i(7),g=function(t){function e(){(0,a.default)(this,e);var t=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).apply(this,arguments));return t._showOrNot=!0,t}return(0,p.default)(e,t),(0,l.default)(e,[{key:"getTypeName",value:function(){return"CommunityCtrl"}},{key:"bind",value:function(t){this._data=t}},{key:"toggle",value:function(t){this._showOrNot=t}},{key:"onCreate",value:function(t){var e=this;t.mainFrame.on(f.FrameEventName.NETWORK_BEFORE_DRAWING,function(t){var i=t.context2d;e._showOrNot&&void 0!==e._data&&void 0!==e._data.communities&&e._drawZones(i)})}},{key:"onDestroy",value:function(t){}},{key:"_drawZones",value:function(t){var e=this;this._data.communities.forEach(function(i){e._drawZone(i,t)})}},{key:"_drawZone",value:function(t,e){var i=t.outline;if(i.length>2){var n=i[0],o=i[i.length-1];e.save(),e.beginPath(),e.moveTo(n.x,n.y);for(var s=1;s").val("DEFAULT").text("THEME_DEFAULT").appendTo($(e)),$("").val("BLACK").text("THEME_BLACK").appendTo($(e));var i=this;$(e).change(function(){var t=$(e).val(),n=x.Themes[t];i.updateTheme(n())}),t.addTool(e)}}]),e}(C.BaseApp);e.GraphNavigator=E},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var o=i(2),s=n(o),r=i(0),a=n(r),h=i(1),l=n(h),d=i(3),u=n(d),c=i(4),p=n(c);Object.defineProperty(e,"__esModule",{value:!0});var f=i(6),m=i(7),g=function(t){function e(){(0,a.default)(this,e);var t=(0,u.default)(this,(e.__proto__||(0,s.default)(e)).apply(this,arguments));return t._showOrNot=!0,t}return(0,p.default)(e,t),(0,l.default)(e,[{key:"getTypeName",value:function(){return"CommunityCtrl"}},{key:"bind",value:function(t){this._data=t}},{key:"toggle",value:function(t){this._showOrNot=t}},{key:"onCreate",value:function(t){var e=this;t.mainFrame.on(f.FrameEventName.NETWORK_BEFORE_DRAWING,function(t){var i=t.context2d;e._showOrNot&&void 0!==e._data&&void 0!==e._data.communities&&e._drawZones(i)})}},{key:"onDestroy",value:function(t){}},{key:"_drawZones",value:function(t){var e=this;this._data.communities.forEach(function(i){e._drawZone(i,t)})}},{key:"_drawZone",value:function(t,e){var i=t.outline;if(i.length>2){var n=i[0],o=i[i.length-1];e.save(),e.beginPath(),e.moveTo(n.x,n.y);for(var s=1;s { app.toggleSearchBar(checked); }
});
+ toolbar.addButton({
+ icon: "fa fa-terminal",
+ checked: true,
+ tooltip: "show status bar",
+ click: (checked: boolean) => { app.toggleStatusBar(checked); }
+ });
+
toolbar.addButton({
icon: "fa fa-info-circle",
checked: true,
@@ -199,6 +206,15 @@ export class GraphNavigator extends BaseApp {
}
}
+ private toggleStatusBar(checked: boolean) {
+ if (checked) {
+ this._statusBar.show();
+ }
+ else {
+ this._statusBar.hide();
+ }
+ }
+
private _addCategoriesSelect(toolbar: ToolbarCtrl, map: object) {
var app = this;
var span = document.getElementById("categories-select");
theme
diff --git a/dist/api/interfaces/event_args_frame_resize.html b/dist/api/interfaces/event_args_frame_resize.html index 5044459..ea4abfc 100644 --- a/dist/api/interfaces/event_args_frame_resize.html +++ b/dist/api/interfaces/event_args_frame_resize.html @@ -105,7 +105,7 @@Optional height
htmlMainFrame
@@ -127,7 +127,7 @@mainFrame
@@ -138,7 +138,7 @@network
@@ -148,7 +148,7 @@Optional oldHeight
Optional oldWidth
theme
@@ -179,7 +179,7 @@Optional width
edges
@@ -118,7 +118,7 @@htmlInfoBox
htmlMainFrame
@@ -140,7 +140,7 @@mainFrame
@@ -151,7 +151,7 @@network
@@ -162,7 +162,7 @@nodes
@@ -173,7 +173,7 @@theme
diff --git a/dist/api/interfaces/event_args_graph_loaded.html b/dist/api/interfaces/event_args_graph_loaded.html index b7a255e..997b148 100644 --- a/dist/api/interfaces/event_args_graph_loaded.html +++ b/dist/api/interfaces/event_args_graph_loaded.html @@ -104,7 +104,7 @@edges
htmlMainFrame
@@ -126,7 +126,7 @@mainFrame
@@ -137,7 +137,7 @@network
@@ -147,7 +147,7 @@nodes
option
theme
diff --git a/dist/api/interfaces/event_args_relfinder.html b/dist/api/interfaces/event_args_relfinder.html index 1cfeb6a..7a0deed 100644 --- a/dist/api/interfaces/event_args_relfinder.html +++ b/dist/api/interfaces/event_args_relfinder.html @@ -103,7 +103,7 @@htmlMainFrame
@@ -114,7 +114,7 @@mainFrame
@@ -124,7 +124,7 @@maxDepth
network
@@ -146,7 +146,7 @@theme
diff --git a/dist/api/interfaces/frame_options.html b/dist/api/interfaces/frame_options.html index cd314ea..402a55f 100644 --- a/dist/api/interfaces/frame_options.html +++ b/dist/api/interfaces/frame_options.html @@ -99,7 +99,7 @@Optional showDegrees
Optional showEdges
Optional showFaces
Optional showGroups
Optional showLabels
Optional showNodes
Optional showTitles
requestConnect
requestFilterNodesByCategory
requestFindRelations
requestGetCommunityData
requestGetMoreRelations
requestGetNeighbours
requestGetNodeCategories
requestGetNodeInfos
requestLoadGraph
requestSearch
requestStopFindRelations
Optional categories
data
Optional dbinfo
option
Optional translator
Optional autoLayout
community
node
edges
nodes
edges
nodes
edges
nodes
_1
_2
x
y
completed
paths
bottom
left
right
top
edges
nodes
TWO nodes are required to start relation path discovery.
These items will be deleted. Are you sure?
TWO nodes are required to start relation path discovery.
These items will be deleted. Are you sure?