From 91136c2ee971725c66b6a4990d6e2aca5ffc2c97 Mon Sep 17 00:00:00 2001 From: WalterNorthwoods Date: Tue, 23 Nov 2021 10:35:44 -0500 Subject: [PATCH] 2.1.54 Changes for 2.1.54 - Fixed Diagram.viewSize when setting it to a real value and then later setting it back to a NaN value. - As with 2.1.52, fixed more scenarios with custom animations improperly adding state to the AnimationManager.defaultAnimation. - Fixed rare cases of LayeredDigraphLayout trying to get the "centerX" property of a null vertex. --- api/index.html | 2 +- api/symbols/ActionTool.html | 2 +- api/symbols/Adornment.html | 2 +- api/symbols/Animation.html | 2 +- api/symbols/AnimationManager.html | 2 +- api/symbols/AnimationTrigger.html | 2 +- api/symbols/ArrangingLayout.html | 2 +- api/symbols/BalloonLink.html | 2 +- api/symbols/Binding.html | 2 +- api/symbols/Brush.html | 2 +- api/symbols/ChangedEvent.html | 2 +- api/symbols/CircularEdge.html | 2 +- api/symbols/CircularLayout.html | 2 +- api/symbols/CircularNetwork.html | 2 +- api/symbols/CircularVertex.html | 2 +- api/symbols/ClickCreatingTool.html | 2 +- api/symbols/ClickSelectingTool.html | 2 +- api/symbols/ColumnResizingTool.html | 2 +- api/symbols/CommandHandler.html | 2 +- api/symbols/ContextMenuTool.html | 2 +- api/symbols/CurvedLinkReshapingTool.html | 2 +- api/symbols/Diagram.html | 2 +- api/symbols/DiagramEvent.html | 2 +- api/symbols/DiagramFile.html | 2 +- api/symbols/DimensioningLink.html | 2 +- api/symbols/DoubleTreeLayout.html | 2 +- api/symbols/DragCreatingTool.html | 2 +- api/symbols/DragSelectingTool.html | 2 +- api/symbols/DragZoomingTool.html | 2 +- api/symbols/DraggingInfo.html | 2 +- api/symbols/DraggingOptions.html | 2 +- api/symbols/DraggingTool.html | 2 +- api/symbols/DrawCommandHandler.html | 2 +- api/symbols/FishboneLayout.html | 2 +- api/symbols/FishboneLink.html | 2 +- api/symbols/ForceDirectedEdge.html | 2 +- api/symbols/ForceDirectedLayout.html | 2 +- api/symbols/ForceDirectedNetwork.html | 2 +- api/symbols/ForceDirectedVertex.html | 2 +- api/symbols/FreehandDrawingTool.html | 2 +- api/symbols/Geometry.html | 2 +- api/symbols/GeometryReshapingTool.html | 2 +- api/symbols/GoCloudStorage.html | 2 +- api/symbols/GoCloudStorageManager.html | 2 +- api/symbols/GoDropBox.html | 2 +- api/symbols/GoGoogleDrive.html | 2 +- api/symbols/GoLocalStorage.html | 2 +- api/symbols/GoOneDrive.html | 2 +- api/symbols/GraphLinksModel.html | 2 +- api/symbols/GraphObject.html | 2 +- api/symbols/GridLayout.html | 2 +- api/symbols/Group.html | 2 +- api/symbols/GuidedDraggingTool.html | 2 +- api/symbols/HTMLInfo.html | 2 +- api/symbols/IncrementalData.html | 2 +- api/symbols/InputEvent.html | 2 +- api/symbols/Inspector.html | 2 +- api/symbols/Iterable.html | 2 +- api/symbols/Iterator.html | 2 +- api/symbols/Layer.html | 2 +- api/symbols/LayeredDigraphEdge.html | 2 +- api/symbols/LayeredDigraphLayout.html | 2 +- api/symbols/LayeredDigraphNetwork.html | 2 +- api/symbols/LayeredDigraphVertex.html | 2 +- api/symbols/Layout.html | 2 +- api/symbols/LayoutEdge.html | 2 +- api/symbols/LayoutNetwork.html | 2 +- api/symbols/LayoutVertex.html | 2 +- api/symbols/Link.html | 2 +- api/symbols/LinkLabelDraggingTool.html | 2 +- api/symbols/LinkLabelOnPathDraggingTool.html | 2 +- api/symbols/LinkReshapingTool.html | 2 +- api/symbols/LinkShiftingTool.html | 2 +- api/symbols/LinkingBaseTool.html | 2 +- api/symbols/LinkingTool.html | 2 +- api/symbols/List.html | 2 +- api/symbols/LocalStorageCommandHandler.html | 2 +- api/symbols/Map.html | 2 +- api/symbols/Margin.html | 2 +- api/symbols/Model.html | 2 +- api/symbols/Node.html | 2 +- api/symbols/NodeLabelDraggingTool.html | 2 +- api/symbols/NonRealtimeDraggingTool.html | 2 +- api/symbols/ObjectData.html | 2 +- api/symbols/OrthogonalLinkReshapingTool.html | 2 +- api/symbols/Overview.html | 2 +- api/symbols/OverviewResizingTool.html | 2 +- api/symbols/PackedLayout.html | 2 +- api/symbols/Palette.html | 2 +- api/symbols/Panel.html | 2 +- api/symbols/PanelLayout.html | 2 +- api/symbols/PanelLayoutFlow.html | 2 +- api/symbols/PanningTool.html | 2 +- api/symbols/ParallelLayout.html | 2 +- api/symbols/ParallelRouteLink.html | 2 +- api/symbols/Part.html | 2 +- api/symbols/PathFigure.html | 2 +- api/symbols/PathSegment.html | 2 +- api/symbols/Picture.html | 2 +- api/symbols/Placeholder.html | 2 +- api/symbols/Point.html | 2 +- api/symbols/PolygonDrawingTool.html | 2 +- api/symbols/PolylineLinkingTool.html | 2 +- api/symbols/PortShiftingTool.html | 2 +- api/symbols/Quadtree.html | 2 +- api/symbols/RadialLayout.html | 2 +- api/symbols/RealtimeDragSelectingTool.html | 2 +- api/symbols/Rect.html | 2 +- api/symbols/RelinkingTool.html | 2 +- api/symbols/RescalingTool.html | 2 +- api/symbols/ResizeMultipleTool.html | 2 +- api/symbols/ResizingTool.html | 2 +- api/symbols/Robot.html | 2 +- api/symbols/RotateMultipleTool.html | 2 +- api/symbols/RotatingTool.html | 2 +- api/symbols/RowColumnDefinition.html | 2 +- api/symbols/RowResizingTool.html | 2 +- api/symbols/SectorReshapingTool.html | 2 +- api/symbols/SerpentineLayout.html | 2 +- api/symbols/Set.html | 2 +- api/symbols/Shape.html | 2 +- api/symbols/Size.html | 2 +- api/symbols/SnapLinkReshapingTool.html | 2 +- api/symbols/SpiralLayout.html | 2 +- api/symbols/Spot.html | 2 +- api/symbols/SpotRotatingTool.html | 2 +- api/symbols/SwimLaneLayout.html | 2 +- api/symbols/TableLayout.html | 2 +- api/symbols/TextBlock.html | 2 +- api/symbols/TextEditingTool.html | 2 +- api/symbols/Tool.html | 2 +- api/symbols/ToolManager.html | 2 +- api/symbols/Transaction.html | 2 +- api/symbols/TreeEdge.html | 2 +- api/symbols/TreeLayout.html | 2 +- api/symbols/TreeMapLayout.html | 2 +- api/symbols/TreeModel.html | 2 +- api/symbols/TreeNetwork.html | 2 +- api/symbols/TreeVertex.html | 2 +- api/symbols/UndoManager.html | 2 +- api/symbols/ZoomSlider.html | 2 +- changelog.html | 13 + package.json | 2 +- release/go-debug-module.js | 900 +++++++------- release/go-debug.d.ts | 2 +- release/go-debug.js | 900 +++++++------- release/go-debug.mjs | 900 +++++++------- release/go-module.d.ts | 2 +- release/go-module.js | 1160 +++++++++--------- release/go.d.ts | 2 +- release/go.js | 1160 +++++++++--------- release/go.mjs | 1160 +++++++++--------- 152 files changed, 3248 insertions(+), 3235 deletions(-) diff --git a/api/index.html b/api/index.html index 1fe9df4d5..6f5d1ea33 100644 --- a/api/index.html +++ b/api/index.html @@ -81,7 +81,7 @@

GoJS

GoJS API

diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 3096b07cd..4a4acb01e 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -81,7 +81,7 @@

GoJS

Class ActionTool

diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 19e7177d1..b5b197f7d 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -81,7 +81,7 @@

GoJS

Class Adornment

diff --git a/api/symbols/Animation.html b/api/symbols/Animation.html index 3485610ac..0894916c8 100644 --- a/api/symbols/Animation.html +++ b/api/symbols/Animation.html @@ -81,7 +81,7 @@

GoJS

Class Animation

diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 30c3cf030..d896b7be4 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -81,7 +81,7 @@

GoJS

Class AnimationManager

diff --git a/api/symbols/AnimationTrigger.html b/api/symbols/AnimationTrigger.html index b2e806dc2..843aa32ad 100644 --- a/api/symbols/AnimationTrigger.html +++ b/api/symbols/AnimationTrigger.html @@ -81,7 +81,7 @@

GoJS

Class AnimationTrigger

diff --git a/api/symbols/ArrangingLayout.html b/api/symbols/ArrangingLayout.html index c5ba3215c..8af4dd471 100644 --- a/api/symbols/ArrangingLayout.html +++ b/api/symbols/ArrangingLayout.html @@ -81,7 +81,7 @@

GoJS

Class ArrangingLayout

diff --git a/api/symbols/BalloonLink.html b/api/symbols/BalloonLink.html index e8fb81e6f..e1117f82b 100644 --- a/api/symbols/BalloonLink.html +++ b/api/symbols/BalloonLink.html @@ -81,7 +81,7 @@

GoJS

Class BalloonLink

diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 4e8e56357..eca915dd8 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -81,7 +81,7 @@

GoJS

Class Binding

diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 93ebc2204..bfd7e91a0 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -81,7 +81,7 @@

GoJS

Class Brush

diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index ce53eb383..3acb3930d 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -81,7 +81,7 @@

GoJS

Class ChangedEvent

diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index d99ec9179..bbfef6ed6 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -81,7 +81,7 @@

GoJS

Class CircularEdge

diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index 2b94f433b..e54f1297f 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -81,7 +81,7 @@

GoJS

Class CircularLayout

diff --git a/api/symbols/CircularNetwork.html b/api/symbols/CircularNetwork.html index 96c6eb400..adeee40ba 100644 --- a/api/symbols/CircularNetwork.html +++ b/api/symbols/CircularNetwork.html @@ -81,7 +81,7 @@

GoJS

Class CircularNetwork

diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index d375ce3da..841866206 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -81,7 +81,7 @@

GoJS

Class CircularVertex

diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index 3a0cb2493..a4313dd65 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -81,7 +81,7 @@

GoJS

Class ClickCreatingTool

diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index 64ff76995..91ad7fc80 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -81,7 +81,7 @@

GoJS

Class ClickSelectingTool

diff --git a/api/symbols/ColumnResizingTool.html b/api/symbols/ColumnResizingTool.html index ba9837266..3675e263b 100644 --- a/api/symbols/ColumnResizingTool.html +++ b/api/symbols/ColumnResizingTool.html @@ -81,7 +81,7 @@

GoJS

Class ColumnResizingTool

diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index 52188150b..202b4a3c1 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -81,7 +81,7 @@

GoJS

Class CommandHandler

diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index e9a628521..54ba725f6 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -81,7 +81,7 @@

GoJS

Class ContextMenuTool

diff --git a/api/symbols/CurvedLinkReshapingTool.html b/api/symbols/CurvedLinkReshapingTool.html index fe66795a9..12baf4ba9 100644 --- a/api/symbols/CurvedLinkReshapingTool.html +++ b/api/symbols/CurvedLinkReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class CurvedLinkReshapingTool

diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index e1e13bd28..e686114fc 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -81,7 +81,7 @@

GoJS

Class Diagram

diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index ce11e742a..be360bb87 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -81,7 +81,7 @@

GoJS

Class DiagramEvent

diff --git a/api/symbols/DiagramFile.html b/api/symbols/DiagramFile.html index f64d6fd85..9308148ea 100644 --- a/api/symbols/DiagramFile.html +++ b/api/symbols/DiagramFile.html @@ -81,7 +81,7 @@

GoJS

Interface DiagramFile

diff --git a/api/symbols/DimensioningLink.html b/api/symbols/DimensioningLink.html index 967400181..2d17ffc2a 100644 --- a/api/symbols/DimensioningLink.html +++ b/api/symbols/DimensioningLink.html @@ -81,7 +81,7 @@

GoJS

Class DimensioningLink

diff --git a/api/symbols/DoubleTreeLayout.html b/api/symbols/DoubleTreeLayout.html index 2c8cfeb1e..9b596a7b8 100644 --- a/api/symbols/DoubleTreeLayout.html +++ b/api/symbols/DoubleTreeLayout.html @@ -81,7 +81,7 @@

GoJS

Class DoubleTreeLayout

diff --git a/api/symbols/DragCreatingTool.html b/api/symbols/DragCreatingTool.html index ad5a9236e..99e737b13 100644 --- a/api/symbols/DragCreatingTool.html +++ b/api/symbols/DragCreatingTool.html @@ -81,7 +81,7 @@

GoJS

Class DragCreatingTool

diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index 0847a7305..8661f7918 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -81,7 +81,7 @@

GoJS

Class DragSelectingTool

diff --git a/api/symbols/DragZoomingTool.html b/api/symbols/DragZoomingTool.html index 90bf984ea..6ca02d007 100644 --- a/api/symbols/DragZoomingTool.html +++ b/api/symbols/DragZoomingTool.html @@ -81,7 +81,7 @@

GoJS

Class DragZoomingTool

diff --git a/api/symbols/DraggingInfo.html b/api/symbols/DraggingInfo.html index 9879c7589..a1976a0dc 100644 --- a/api/symbols/DraggingInfo.html +++ b/api/symbols/DraggingInfo.html @@ -81,7 +81,7 @@

GoJS

Class DraggingInfo

diff --git a/api/symbols/DraggingOptions.html b/api/symbols/DraggingOptions.html index b31a1979a..4149b2a4c 100644 --- a/api/symbols/DraggingOptions.html +++ b/api/symbols/DraggingOptions.html @@ -81,7 +81,7 @@

GoJS

Class DraggingOptions

diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index e51aecdb1..7a14b7d0e 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class DraggingTool

diff --git a/api/symbols/DrawCommandHandler.html b/api/symbols/DrawCommandHandler.html index 6d1985622..af92d772c 100644 --- a/api/symbols/DrawCommandHandler.html +++ b/api/symbols/DrawCommandHandler.html @@ -81,7 +81,7 @@

GoJS

Class DrawCommandHandler

diff --git a/api/symbols/FishboneLayout.html b/api/symbols/FishboneLayout.html index 05bb6c899..dafd951e0 100644 --- a/api/symbols/FishboneLayout.html +++ b/api/symbols/FishboneLayout.html @@ -81,7 +81,7 @@

GoJS

Class FishboneLayout

diff --git a/api/symbols/FishboneLink.html b/api/symbols/FishboneLink.html index 197b64d88..046394fb0 100644 --- a/api/symbols/FishboneLink.html +++ b/api/symbols/FishboneLink.html @@ -81,7 +81,7 @@

GoJS

Class FishboneLink

diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index 37dfafe48..4696898a9 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -81,7 +81,7 @@

GoJS

Class ForceDirectedEdge

diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index b27b28940..eb808a6e8 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -81,7 +81,7 @@

GoJS

Class ForceDirectedLayout

diff --git a/api/symbols/ForceDirectedNetwork.html b/api/symbols/ForceDirectedNetwork.html index 9134bf2d2..5e74d4f78 100644 --- a/api/symbols/ForceDirectedNetwork.html +++ b/api/symbols/ForceDirectedNetwork.html @@ -81,7 +81,7 @@

GoJS

Class ForceDirectedNetwork

diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index 4ed2ccc1f..12a3d81b7 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -81,7 +81,7 @@

GoJS

Class ForceDirectedVertex

diff --git a/api/symbols/FreehandDrawingTool.html b/api/symbols/FreehandDrawingTool.html index c80ad75e1..f30056010 100644 --- a/api/symbols/FreehandDrawingTool.html +++ b/api/symbols/FreehandDrawingTool.html @@ -81,7 +81,7 @@

GoJS

Class FreehandDrawingTool

diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index 740b664bb..728335f55 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -81,7 +81,7 @@

GoJS

Class Geometry

diff --git a/api/symbols/GeometryReshapingTool.html b/api/symbols/GeometryReshapingTool.html index 527b28bea..15537e3fd 100644 --- a/api/symbols/GeometryReshapingTool.html +++ b/api/symbols/GeometryReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class GeometryReshapingTool

diff --git a/api/symbols/GoCloudStorage.html b/api/symbols/GoCloudStorage.html index 8b6759409..13a5f3fb4 100644 --- a/api/symbols/GoCloudStorage.html +++ b/api/symbols/GoCloudStorage.html @@ -81,7 +81,7 @@

GoJS

Class GoCloudStorage

diff --git a/api/symbols/GoCloudStorageManager.html b/api/symbols/GoCloudStorageManager.html index 9abee88d0..55a0a27e6 100644 --- a/api/symbols/GoCloudStorageManager.html +++ b/api/symbols/GoCloudStorageManager.html @@ -81,7 +81,7 @@

GoJS

Class GoCloudStorageManager

diff --git a/api/symbols/GoDropBox.html b/api/symbols/GoDropBox.html index 66b665d1b..bc8ca767c 100644 --- a/api/symbols/GoDropBox.html +++ b/api/symbols/GoDropBox.html @@ -81,7 +81,7 @@

GoJS

Class GoDropBox

diff --git a/api/symbols/GoGoogleDrive.html b/api/symbols/GoGoogleDrive.html index 901854c63..d1839bc06 100644 --- a/api/symbols/GoGoogleDrive.html +++ b/api/symbols/GoGoogleDrive.html @@ -81,7 +81,7 @@

GoJS

Class GoGoogleDrive

diff --git a/api/symbols/GoLocalStorage.html b/api/symbols/GoLocalStorage.html index 1cdf7da26..004fc953c 100644 --- a/api/symbols/GoLocalStorage.html +++ b/api/symbols/GoLocalStorage.html @@ -81,7 +81,7 @@

GoJS

Class GoLocalStorage

diff --git a/api/symbols/GoOneDrive.html b/api/symbols/GoOneDrive.html index 9c568770c..460ce7926 100644 --- a/api/symbols/GoOneDrive.html +++ b/api/symbols/GoOneDrive.html @@ -81,7 +81,7 @@

GoJS

Class GoOneDrive

diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index f0b567206..c126ada50 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -81,7 +81,7 @@

GoJS

Class GraphLinksModel

diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index 8a814153d..1157158db 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -81,7 +81,7 @@

GoJS

Class GraphObject

diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index 1719dc9a0..baa2575f4 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -81,7 +81,7 @@

GoJS

Class GridLayout

diff --git a/api/symbols/Group.html b/api/symbols/Group.html index f9e99c717..f0a51be9d 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -81,7 +81,7 @@

GoJS

Class Group

diff --git a/api/symbols/GuidedDraggingTool.html b/api/symbols/GuidedDraggingTool.html index a65ffe9c0..d642e7c83 100644 --- a/api/symbols/GuidedDraggingTool.html +++ b/api/symbols/GuidedDraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class GuidedDraggingTool

diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index 0ca977396..c8dce5048 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -81,7 +81,7 @@

GoJS

Class HTMLInfo

diff --git a/api/symbols/IncrementalData.html b/api/symbols/IncrementalData.html index 2c05ef7c0..2569f7c56 100644 --- a/api/symbols/IncrementalData.html +++ b/api/symbols/IncrementalData.html @@ -81,7 +81,7 @@

GoJS

Interface IncrementalData

diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index 2071ca5c7..629b1f907 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -81,7 +81,7 @@

GoJS

Class InputEvent

diff --git a/api/symbols/Inspector.html b/api/symbols/Inspector.html index affb605d2..169cd8226 100644 --- a/api/symbols/Inspector.html +++ b/api/symbols/Inspector.html @@ -81,7 +81,7 @@

GoJS

Class Inspector

diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index b9f4c5cb6..ba7c0db1a 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -81,7 +81,7 @@

GoJS

Interface Iterable<T>

diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index 1389960e7..bb6e7b2b8 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -81,7 +81,7 @@

GoJS

Interface Iterator<T>

diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index 5b684fdc0..46c53b47e 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -81,7 +81,7 @@

GoJS

Class Layer

diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index f6f7cfbb4..e2146579d 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -81,7 +81,7 @@

GoJS

Class LayeredDigraphEdge

diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index bf99e9d03..3383de4d4 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -81,7 +81,7 @@

GoJS

Class LayeredDigraphLayout

diff --git a/api/symbols/LayeredDigraphNetwork.html b/api/symbols/LayeredDigraphNetwork.html index 49461e17b..cae43caed 100644 --- a/api/symbols/LayeredDigraphNetwork.html +++ b/api/symbols/LayeredDigraphNetwork.html @@ -81,7 +81,7 @@

GoJS

Class LayeredDigraphNetwork

diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index 7c1b0365d..b767972f9 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -81,7 +81,7 @@

GoJS

Class LayeredDigraphVertex

diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index ac67b724f..cec07afee 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -81,7 +81,7 @@

GoJS

Class Layout

diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index a11d85f0e..a6f298bc3 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -81,7 +81,7 @@

GoJS

Class LayoutEdge

diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index 671eaa454..621ae9d4c 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -81,7 +81,7 @@

GoJS

Class LayoutNetwork

diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index 238fe1341..0410f3e31 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -81,7 +81,7 @@

GoJS

Class LayoutVertex

diff --git a/api/symbols/Link.html b/api/symbols/Link.html index 6052f85d1..2365add9d 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -81,7 +81,7 @@

GoJS

Class Link

diff --git a/api/symbols/LinkLabelDraggingTool.html b/api/symbols/LinkLabelDraggingTool.html index 62a752575..d6e977c75 100644 --- a/api/symbols/LinkLabelDraggingTool.html +++ b/api/symbols/LinkLabelDraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkLabelDraggingTool

diff --git a/api/symbols/LinkLabelOnPathDraggingTool.html b/api/symbols/LinkLabelOnPathDraggingTool.html index 8fd6ee572..e14115a8d 100644 --- a/api/symbols/LinkLabelOnPathDraggingTool.html +++ b/api/symbols/LinkLabelOnPathDraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkLabelOnPathDraggingTool

diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index a6cd1a890..44ae191a9 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkReshapingTool

diff --git a/api/symbols/LinkShiftingTool.html b/api/symbols/LinkShiftingTool.html index 2aa00f6af..358c6fc96 100644 --- a/api/symbols/LinkShiftingTool.html +++ b/api/symbols/LinkShiftingTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkShiftingTool

diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html index c8d45eee5..a9f0e34fd 100644 --- a/api/symbols/LinkingBaseTool.html +++ b/api/symbols/LinkingBaseTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkingBaseTool

diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index ecfd27d60..ae03cd200 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -81,7 +81,7 @@

GoJS

Class LinkingTool

diff --git a/api/symbols/List.html b/api/symbols/List.html index df9da5fd2..a97370ab4 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -81,7 +81,7 @@

GoJS

Class List<T>

diff --git a/api/symbols/LocalStorageCommandHandler.html b/api/symbols/LocalStorageCommandHandler.html index 9b48ced74..45270b79a 100644 --- a/api/symbols/LocalStorageCommandHandler.html +++ b/api/symbols/LocalStorageCommandHandler.html @@ -81,7 +81,7 @@

GoJS

Class LocalStorageCommandHandler

diff --git a/api/symbols/Map.html b/api/symbols/Map.html index 7c1197156..56babc294 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -81,7 +81,7 @@

GoJS

Class Map<K, V>

diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 15e2cf93c..376f7fe4c 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -81,7 +81,7 @@

GoJS

Class Margin

diff --git a/api/symbols/Model.html b/api/symbols/Model.html index 704dde5de..4077dbc6d 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -81,7 +81,7 @@

GoJS

Class Model

diff --git a/api/symbols/Node.html b/api/symbols/Node.html index 91ab2979e..0d4574633 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -81,7 +81,7 @@

GoJS

Class Node

diff --git a/api/symbols/NodeLabelDraggingTool.html b/api/symbols/NodeLabelDraggingTool.html index 01c052a0b..18bd9c197 100644 --- a/api/symbols/NodeLabelDraggingTool.html +++ b/api/symbols/NodeLabelDraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class NodeLabelDraggingTool

diff --git a/api/symbols/NonRealtimeDraggingTool.html b/api/symbols/NonRealtimeDraggingTool.html index 0fb63350b..fd0c5d035 100644 --- a/api/symbols/NonRealtimeDraggingTool.html +++ b/api/symbols/NonRealtimeDraggingTool.html @@ -81,7 +81,7 @@

GoJS

Class NonRealtimeDraggingTool

diff --git a/api/symbols/ObjectData.html b/api/symbols/ObjectData.html index efc7f74c0..018769f26 100644 --- a/api/symbols/ObjectData.html +++ b/api/symbols/ObjectData.html @@ -81,7 +81,7 @@

GoJS

Interface ObjectData

diff --git a/api/symbols/OrthogonalLinkReshapingTool.html b/api/symbols/OrthogonalLinkReshapingTool.html index f326fd1f3..647097a74 100644 --- a/api/symbols/OrthogonalLinkReshapingTool.html +++ b/api/symbols/OrthogonalLinkReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class OrthogonalLinkReshapingTool

diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index bcca24de0..8340bb177 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -81,7 +81,7 @@

GoJS

Class Overview

diff --git a/api/symbols/OverviewResizingTool.html b/api/symbols/OverviewResizingTool.html index e014c2675..0f0522d92 100644 --- a/api/symbols/OverviewResizingTool.html +++ b/api/symbols/OverviewResizingTool.html @@ -81,7 +81,7 @@

GoJS

Class OverviewResizingTool

diff --git a/api/symbols/PackedLayout.html b/api/symbols/PackedLayout.html index 11dc9fdcc..85c289a8a 100644 --- a/api/symbols/PackedLayout.html +++ b/api/symbols/PackedLayout.html @@ -81,7 +81,7 @@

GoJS

Class PackedLayout

diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index a62f4dd08..30a85232c 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -81,7 +81,7 @@

GoJS

Class Palette

diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index 599f31376..b048f94df 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -81,7 +81,7 @@

GoJS

Class Panel

diff --git a/api/symbols/PanelLayout.html b/api/symbols/PanelLayout.html index b137e81fa..633a6ee0f 100644 --- a/api/symbols/PanelLayout.html +++ b/api/symbols/PanelLayout.html @@ -81,7 +81,7 @@

GoJS

Class PanelLayout

diff --git a/api/symbols/PanelLayoutFlow.html b/api/symbols/PanelLayoutFlow.html index f15eb52f4..7e692239c 100644 --- a/api/symbols/PanelLayoutFlow.html +++ b/api/symbols/PanelLayoutFlow.html @@ -81,7 +81,7 @@

GoJS

Class PanelLayoutFlow

diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html index f585e19e7..194967fc8 100644 --- a/api/symbols/PanningTool.html +++ b/api/symbols/PanningTool.html @@ -81,7 +81,7 @@

GoJS

Class PanningTool

diff --git a/api/symbols/ParallelLayout.html b/api/symbols/ParallelLayout.html index 1b39f0732..9dd30c49a 100644 --- a/api/symbols/ParallelLayout.html +++ b/api/symbols/ParallelLayout.html @@ -81,7 +81,7 @@

GoJS

Class ParallelLayout

diff --git a/api/symbols/ParallelRouteLink.html b/api/symbols/ParallelRouteLink.html index dd0c99e2d..e4175564c 100644 --- a/api/symbols/ParallelRouteLink.html +++ b/api/symbols/ParallelRouteLink.html @@ -81,7 +81,7 @@

GoJS

Class ParallelRouteLink

diff --git a/api/symbols/Part.html b/api/symbols/Part.html index 45ba9b9a6..72a65506e 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -81,7 +81,7 @@

GoJS

Class Part

diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index 5f1a137ee..0f577b21f 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -81,7 +81,7 @@

GoJS

Class PathFigure

diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index 4ec0d2cd5..aa9cb597c 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -81,7 +81,7 @@

GoJS

Class PathSegment

diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index 2e0b12950..c9934f2f1 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -81,7 +81,7 @@

GoJS

Class Picture

diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index ec1d7c6a2..b2f93aee2 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -81,7 +81,7 @@

GoJS

Class Placeholder

diff --git a/api/symbols/Point.html b/api/symbols/Point.html index 0fbf107ed..cd4cc9c04 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -81,7 +81,7 @@

GoJS

Class Point

diff --git a/api/symbols/PolygonDrawingTool.html b/api/symbols/PolygonDrawingTool.html index a9ab71dcb..d26f0ab4c 100644 --- a/api/symbols/PolygonDrawingTool.html +++ b/api/symbols/PolygonDrawingTool.html @@ -81,7 +81,7 @@

GoJS

Class PolygonDrawingTool

diff --git a/api/symbols/PolylineLinkingTool.html b/api/symbols/PolylineLinkingTool.html index cb1759823..fff313de4 100644 --- a/api/symbols/PolylineLinkingTool.html +++ b/api/symbols/PolylineLinkingTool.html @@ -81,7 +81,7 @@

GoJS

Class PolylineLinkingTool

diff --git a/api/symbols/PortShiftingTool.html b/api/symbols/PortShiftingTool.html index e523f0519..881eec49a 100644 --- a/api/symbols/PortShiftingTool.html +++ b/api/symbols/PortShiftingTool.html @@ -81,7 +81,7 @@

GoJS

Class PortShiftingTool

diff --git a/api/symbols/Quadtree.html b/api/symbols/Quadtree.html index c4455bb61..e65a82669 100644 --- a/api/symbols/Quadtree.html +++ b/api/symbols/Quadtree.html @@ -81,7 +81,7 @@

GoJS

Class Quadtree<T>

diff --git a/api/symbols/RadialLayout.html b/api/symbols/RadialLayout.html index eb6aa28d6..60cc679d8 100644 --- a/api/symbols/RadialLayout.html +++ b/api/symbols/RadialLayout.html @@ -81,7 +81,7 @@

GoJS

Class RadialLayout

diff --git a/api/symbols/RealtimeDragSelectingTool.html b/api/symbols/RealtimeDragSelectingTool.html index cd2549cbc..2830de483 100644 --- a/api/symbols/RealtimeDragSelectingTool.html +++ b/api/symbols/RealtimeDragSelectingTool.html @@ -81,7 +81,7 @@

GoJS

Class RealtimeDragSelectingTool

diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index 5c6679524..0163e2d19 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -81,7 +81,7 @@

GoJS

Class Rect

diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index 7e82bf10c..847879aa9 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -81,7 +81,7 @@

GoJS

Class RelinkingTool

diff --git a/api/symbols/RescalingTool.html b/api/symbols/RescalingTool.html index a7ca687f1..961d28d1f 100644 --- a/api/symbols/RescalingTool.html +++ b/api/symbols/RescalingTool.html @@ -81,7 +81,7 @@

GoJS

Class RescalingTool

diff --git a/api/symbols/ResizeMultipleTool.html b/api/symbols/ResizeMultipleTool.html index 5e6173e88..c56bf8a92 100644 --- a/api/symbols/ResizeMultipleTool.html +++ b/api/symbols/ResizeMultipleTool.html @@ -81,7 +81,7 @@

GoJS

Class ResizeMultipleTool

diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index ee7146fbd..a341859e5 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -81,7 +81,7 @@

GoJS

Class ResizingTool

diff --git a/api/symbols/Robot.html b/api/symbols/Robot.html index d0228f0d5..c5e1f511e 100644 --- a/api/symbols/Robot.html +++ b/api/symbols/Robot.html @@ -81,7 +81,7 @@

GoJS

Class Robot

diff --git a/api/symbols/RotateMultipleTool.html b/api/symbols/RotateMultipleTool.html index 71f805205..cc328617e 100644 --- a/api/symbols/RotateMultipleTool.html +++ b/api/symbols/RotateMultipleTool.html @@ -81,7 +81,7 @@

GoJS

Class RotateMultipleTool

diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 0262d3f65..5a239b33a 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -81,7 +81,7 @@

GoJS

Class RotatingTool

diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index e08674083..1ef76d27c 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -81,7 +81,7 @@

GoJS

Class RowColumnDefinition

diff --git a/api/symbols/RowResizingTool.html b/api/symbols/RowResizingTool.html index 38f1588b7..488c8f154 100644 --- a/api/symbols/RowResizingTool.html +++ b/api/symbols/RowResizingTool.html @@ -81,7 +81,7 @@

GoJS

Class RowResizingTool

diff --git a/api/symbols/SectorReshapingTool.html b/api/symbols/SectorReshapingTool.html index 5a12bcd9e..aadc94968 100644 --- a/api/symbols/SectorReshapingTool.html +++ b/api/symbols/SectorReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class SectorReshapingTool

diff --git a/api/symbols/SerpentineLayout.html b/api/symbols/SerpentineLayout.html index 9e597e217..fab35b0c3 100644 --- a/api/symbols/SerpentineLayout.html +++ b/api/symbols/SerpentineLayout.html @@ -81,7 +81,7 @@

GoJS

Class SerpentineLayout

diff --git a/api/symbols/Set.html b/api/symbols/Set.html index cc9bee134..8d8690490 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -81,7 +81,7 @@

GoJS

Class Set<T>

diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 438a032df..076c5b163 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -81,7 +81,7 @@

GoJS

Class Shape

diff --git a/api/symbols/Size.html b/api/symbols/Size.html index 0e8cc1e48..ccc5c4c81 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -81,7 +81,7 @@

GoJS

Class Size

diff --git a/api/symbols/SnapLinkReshapingTool.html b/api/symbols/SnapLinkReshapingTool.html index 095a976bb..2e0742ce2 100644 --- a/api/symbols/SnapLinkReshapingTool.html +++ b/api/symbols/SnapLinkReshapingTool.html @@ -81,7 +81,7 @@

GoJS

Class SnapLinkReshapingTool

diff --git a/api/symbols/SpiralLayout.html b/api/symbols/SpiralLayout.html index 70f707508..003013e39 100644 --- a/api/symbols/SpiralLayout.html +++ b/api/symbols/SpiralLayout.html @@ -81,7 +81,7 @@

GoJS

Class SpiralLayout

diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 3ad4e0d6e..ce92033bf 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -81,7 +81,7 @@

GoJS

Class Spot

diff --git a/api/symbols/SpotRotatingTool.html b/api/symbols/SpotRotatingTool.html index 4ee89c235..09c30dee7 100644 --- a/api/symbols/SpotRotatingTool.html +++ b/api/symbols/SpotRotatingTool.html @@ -81,7 +81,7 @@

GoJS

Class SpotRotatingTool

diff --git a/api/symbols/SwimLaneLayout.html b/api/symbols/SwimLaneLayout.html index 05a8661c0..401564281 100644 --- a/api/symbols/SwimLaneLayout.html +++ b/api/symbols/SwimLaneLayout.html @@ -81,7 +81,7 @@

GoJS

Class SwimLaneLayout

diff --git a/api/symbols/TableLayout.html b/api/symbols/TableLayout.html index 96de13944..ca199b508 100644 --- a/api/symbols/TableLayout.html +++ b/api/symbols/TableLayout.html @@ -81,7 +81,7 @@

GoJS

Class TableLayout

diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index daac314ae..c0e96be5f 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -81,7 +81,7 @@

GoJS

Class TextBlock

diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index eed6d05ce..4d9e12535 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -81,7 +81,7 @@

GoJS

Class TextEditingTool

diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index 2b7222480..98fec1491 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -81,7 +81,7 @@

GoJS

Class Tool

diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index 2f9e6743f..13cdbd3f2 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -81,7 +81,7 @@

GoJS

Class ToolManager

diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index e101eefa3..5a8d67b80 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -81,7 +81,7 @@

GoJS

Class Transaction

diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index e1a440930..e06575704 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -81,7 +81,7 @@

GoJS

Class TreeEdge

diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index c7492b764..d19a0698e 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -81,7 +81,7 @@

GoJS

Class TreeLayout

diff --git a/api/symbols/TreeMapLayout.html b/api/symbols/TreeMapLayout.html index 8b6da42d9..f16241758 100644 --- a/api/symbols/TreeMapLayout.html +++ b/api/symbols/TreeMapLayout.html @@ -81,7 +81,7 @@

GoJS

Class TreeMapLayout

diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index 24f7385c0..7cb7c5ae0 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -81,7 +81,7 @@

GoJS

Class TreeModel

diff --git a/api/symbols/TreeNetwork.html b/api/symbols/TreeNetwork.html index 3323218e2..c5446e31c 100644 --- a/api/symbols/TreeNetwork.html +++ b/api/symbols/TreeNetwork.html @@ -81,7 +81,7 @@

GoJS

Class TreeNetwork

diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index aa051e3df..c7c4dad15 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -81,7 +81,7 @@

GoJS

Class TreeVertex

diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index c1b871b05..0136e3d0c 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -81,7 +81,7 @@

GoJS

Class UndoManager

diff --git a/api/symbols/ZoomSlider.html b/api/symbols/ZoomSlider.html index cb7b048f8..41ccd784d 100644 --- a/api/symbols/ZoomSlider.html +++ b/api/symbols/ZoomSlider.html @@ -81,7 +81,7 @@

GoJS

Class ZoomSlider

diff --git a/changelog.html b/changelog.html index 55824ea3d..88f75e8fd 100644 --- a/changelog.html +++ b/changelog.html @@ -178,6 +178,19 @@

Improved Support For Data Synchronization


+

Changes for 2.1.54

+ +

Changes for 2.1.53

  • diff --git a/package.json b/package.json index ad9b8f513..557b9ffac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "2.1.53", + "version": "2.1.54", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "diagram", "chart", "tree", "flowchart", "orgchart", "uml", "bpmn", "graph", "editor", "drawing", "canvas", "svg", "hierarchy", "family-tree", "decision-tree", "mindmap", "treeview", "genogram", "ivr-tree", "parse-tree", "concept-map", "visualization", "entity-relationship", "er-diagram", "radial", "sankey", "pert", "gantt", "timeline", "swimlane", "workflow", "flow", "process", "state", "sequential-function", "grafcet", "sequence", "circuit", "dataflow", "data-flow", "planogram", "floorplan", "seating", "pipes", "layout", "tree-layout", "force-directed", "layered", "hierarchical", "circular", "fishbone", "ishikawa", "treemap", "tree-map", "subgraph", "network", "library", "javascript", "js", "typescript", "html", "html5" ], "homepage": "https://gojs.net", diff --git a/release/go-debug-module.js b/release/go-debug-module.js index 986838a89..c82e4e0db 100644 --- a/release/go-debug-module.js +++ b/release/go-debug-module.js @@ -1,8 +1,8 @@ /* - * GoJS v2.1.53 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.1.54 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.53/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.54/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;ga&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.G=a*b-d*c;this.H=d*b+a*c;return this};t=J.prototype; t.scale=function(a,b){F&&(C(a,J,"scale:sx"),C(b,J,"scale:sy"),this.ha());this.G*=a;this.H*=b;return this};t.Ve=function(a){F&&w(a,J,J,"distanceSquaredPoint:p");var b=a.x-this.G;a=a.y-this.H;return b*b+a*a};t.wd=function(a,b){F&&(C(a,J,"distanceSquared:px"),C(b,J,"distanceSquared:py"));a-=this.G;b-=this.H;return a*a+b*b};t.normalize=function(){F&&this.ha();var a=this.G,b=this.H,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} @@ -112,7 +112,7 @@ J.distanceSquared=Jb;J.direction=Kb;function Fb(a,b){void 0===a?this.ea=this.fa= Fb.prototype.Ug=function(a,b){F&&(A(a,"number",Fb,"setTo:w"),A(b,"number",Fb,"setTo:h"),0>a&&za(a,">= 0",Fb,"setTo:w"),0>b&&za(b,">= 0",Fb,"setTo:h"),this.ha());this.fa=a;this.ea=b;return this};Fb.prototype.set=function(a){F&&(w(a,Fb,Fb,"set:s"),this.ha());this.fa=a.fa;this.ea=a.ea;return this};Fb.prototype.copy=function(){var a=new Fb;a.fa=this.fa;a.ea=this.ea;return a};t=Fb.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function $b(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Fb(c,e)}return new Fb}function ac(a){F&&w(a,Fb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.A=function(a){return a instanceof Fb?this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b){return this.fa===a&&this.ea===b}; -t.Wa=function(a){return K.B(this.fa,a.width)&&K.B(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; +t.Wa=function(a){return K.C(this.fa,a.width)&&K.C(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; na.Object.defineProperties(Fb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){F&&(A(a,"number",Fb,"width"),this.ha(a));0>a&&za(a,">= 0",Fb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea},set:function(a){F&&(A(a,"number",Fb,"height"),this.ha(a));0>a&&za(a,">= 0",Fb,"height");this.ea=a}}});Fb.prototype.isReal=Fb.prototype.o;Fb.prototype.equalsApprox=Fb.prototype.Wa;Fb.prototype.equalTo=Fb.prototype.qj; Fb.prototype.equals=Fb.prototype.A;Fb.prototype.set=Fb.prototype.set;Fb.prototype.setTo=Fb.prototype.Ug;var bc=[];Fb.className="Size";Fb.parse=$b;Fb.stringify=ac;Fb.ZeroSize=Rb=(new Fb(0,0)).ia();Fb.OneSize=Sb=(new Fb(1,1)).ia();Fb.SixSize=Tb=(new Fb(6,6)).ia();Fb.EightSize=Ub=(new Fb(8,8)).ia();Fb.TenSize=Vb=(new Fb(10,10)).ia();Fb.InfiniteSize=Wb=(new Fb(Infinity,Infinity)).ia();Fb.NoSize=Zb=(new Fb(NaN,NaN)).ia();Fb.parse=$b;Fb.stringify=ac; function L(a,b,c,d){void 0===a?this.ea=this.fa=this.H=this.G=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.G=Math.min(c,d),this.H=Math.min(a,b),this.fa=Math.abs(c-d),this.ea=Math.abs(a-b)):b instanceof Fb?(this.G=c,this.H=a,this.fa=b.width,this.ea=b.height):v("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.G=a,this.H=b,this.fa=c,this.ea=d):v("Invalid arguments to Rect constructor: "+ @@ -120,7 +120,7 @@ a+", "+b+", "+c+", "+d);this.s=!1}t=L.prototype;t.assign=function(a){this.G=a.G; t.set=function(a){F&&(w(a,L,L,"set:r"),this.ha());this.G=a.G;this.H=a.H;this.fa=a.fa;this.ea=a.ea;return this};t.Wc=function(a){F&&(w(a,J,L,"setPoint:p"),this.ha());this.G=a.x;this.H=a.y;return this};t.vB=function(a){F&&(w(a,Fb,L,"setSize:s"),this.ha());this.fa=a.width;this.ea=a.height;return this};L.prototype.copy=function(){var a=new L;a.G=this.G;a.H=this.H;a.fa=this.fa;a.ea=this.ea;return a};t=L.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function dc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new L(c,e,f,g)}return new L}function ec(a){F&&w(a,L);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.B(this.G,a.x)&&K.B(this.H,a.y)&&K.B(this.fa,a.width)&&K.B(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.C(this.G,a.x)&&K.C(this.H,a.y)&&K.C(this.fa,a.width)&&K.C(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} t.ca=function(a){F&&w(a,J,L,"containsPoint:p");return this.G<=a.x&&this.G+this.fa>=a.x&&this.H<=a.y&&this.H+this.ea>=a.y};t.Te=function(a){F&&w(a,L,L,"containsRect:r");return this.G<=a.x&&a.x+a.width<=this.G+this.fa&&this.H<=a.y&&a.y+a.height<=this.H+this.ea}; t.contains=function(a,b,c,d){F?(C(a,L,"contains:x"),C(b,L,"contains:y"),void 0===c?c=0:C(c,L,"contains:w"),void 0===d?d=0:C(d,L,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.G<=a&&a+c<=this.G+this.fa&&this.H<=b&&b+d<=this.H+this.ea};t.offset=function(a,b){F&&(C(a,L,"offset:dx"),C(b,L,"offset:dy"),this.ha());this.G+=a;this.H+=b;return this}; t.Pc=function(a,b){F&&(C(a,L,"inflate:w"),C(b,L,"inflate:h"));return gc(this,b,a,b,a)};t.Hq=function(a){F&&w(a,hc,L,"addMargin:m");return gc(this,a.top,a.right,a.bottom,a.left)};t.Xw=function(a){F&&w(a,hc,L,"subtractMargin:m");return gc(this,-a.top,-a.right,-a.bottom,-a.left)};t.MA=function(a,b,c,d){F&&(C(a,L,"grow:t"),C(b,L,"grow:r"),C(c,L,"grow:b"),C(d,L,"grow:l"));return gc(this,a,b,c,d)}; @@ -145,7 +145,7 @@ hc.prototype.Ug=function(a,b,c,d){F&&(A(a,"number",hc,"setTo:t"),A(b,"number",hc t.ia=function(){this.s=!0;Object.freeze(this);return this};t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function wc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new hc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new hc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new hc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new hc(c,e):new hc(c,e,f,g)}return new hc} function xc(a){F&&w(a,hc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.A=function(a){return a instanceof hc?this.Qe===a.top&&this.Oe===a.right&&this.se===a.bottom&&this.Fe===a.left:!1};t.qj=function(a,b,c,d){return this.Qe===a&&this.Oe===b&&this.se===c&&this.Fe===d}; -t.Wa=function(a){return K.B(this.Qe,a.top)&&K.B(this.Oe,a.right)&&K.B(this.se,a.bottom)&&K.B(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; +t.Wa=function(a){return K.C(this.Qe,a.top)&&K.C(this.Oe,a.right)&&K.C(this.se,a.bottom)&&K.C(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; na.Object.defineProperties(hc.prototype,{top:{configurable:!0,get:function(){return this.Qe},set:function(a){F&&(C(a,hc,"top"),this.ha(a));this.Qe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){F&&(C(a,hc,"right"),this.ha(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.se},set:function(a){F&&(C(a,hc,"bottom"),this.ha(a));this.se=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){F&& (C(a,hc,"left"),this.ha(a));this.Fe=a}}});hc.prototype.isReal=hc.prototype.o;hc.prototype.equalsApprox=hc.prototype.Wa;hc.prototype.equalTo=hc.prototype.qj;hc.prototype.equals=hc.prototype.A;hc.prototype.set=hc.prototype.set;hc.prototype.setTo=hc.prototype.Ug;var zc=null,Ac=null,yc=[];hc.className="Margin";hc.parse=wc;hc.stringify=xc;hc.ZeroMargin=zc=(new hc(0,0,0,0)).ia();hc.TwoMargin=Ac=(new hc(2,2,2,2)).ia();hc.parse=wc;hc.stringify=xc; function N(a,b,c,d){void 0===a?this.ie=this.he=this.H=this.G=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.s=!1}var Bc,Ec,Fc,Gc,Hc,Kc,Lc,Mc,Nc,Oc,Pc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,ad,bd,cd,dd,ed,fd,gd,hd,kd,ld,md,nd,od,pd,qd,rd;N.prototype.assign=function(a){this.G=a.G;this.H=a.H;this.he=a.he;this.ie=a.ie;return this}; @@ -175,7 +175,7 @@ t.Pd=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=a.x,d=a.y;retur t.ex=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,r=d*f+c*h+l,q=d*g+c*k+m;c=b*f+e*h+l;b=b*g+e*k+m;f=d*f+e*h+l;d=d*g+e*k+m;e=Math.min(n,r);n=Math.max(n,r);r=Math.min(p,q);p=Math.max(p,q);e=Math.min(e,c);n=Math.max(n,c);r=Math.min(r,b);p=Math.max(p,b);e=Math.min(e,f);n=Math.max(n,f);r=Math.min(r,d);p=Math.max(p,d);a.h(e,r,n-e,p-r);return a};Gb.alloc=function(){var a=yd.pop();return void 0===a?new Gb:a}; Gb.free=function(a){yd.push(a)};Gb.prototype.transformRect=Gb.prototype.ex;Gb.prototype.transformPoint=Gb.prototype.Aa;Gb.prototype.scale=Gb.prototype.scale;Gb.prototype.translate=Gb.prototype.translate;Gb.prototype.rotate=Gb.prototype.rotate;Gb.prototype.invert=Gb.prototype.eu;Gb.prototype.multiplyInverted=Gb.prototype.xw;Gb.prototype.multiply=Gb.prototype.multiply;Gb.prototype.reset=Gb.prototype.reset;Gb.prototype.isIdentity=Gb.prototype.gu;Gb.prototype.equals=Gb.prototype.A;Gb.prototype.set=Gb.prototype.set; var yd=[];Gb.className="Transform";Gb.xF="54a702f3e53909c447824c6706603faf4c"; -var K={FB:"7da71ca0ad381e90",Wg:(Math.sqrt(2)-1)/3*4,yx:null,sqrt:function(a){if(0>=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Lt:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Tb(a,b,g,h,n,c,d)&&K.Tb(a,b,g,h,n,e,f))return K.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var y=(d+q)/2,x=(c+u)/2;return K.Lt(a, b,p,r,d,c,y,x,k,l,m,n)||K.Lt(y,x,q,u,e,f,g,h,k,l,m,n)},Pz:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Oz:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Kb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Im:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))kc(l,a,b,0,0),kc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ 2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Im(a,b,m,n,d,c,q,u,k,l);K.Im(q,u,p,r,e,f,g,h,k,l)}return l},Se:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Se(a,b,m,n,d,c,q,u,k,l);K.Se(q,u,p,r,e,f,g,h,k,l)}return l},Ew:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,e,f,l,c,d))return K.Tb(a, @@ -183,7 +183,7 @@ b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2 h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;K.ir(a,b,k,l,m,n,g,h);K.ir(m,n,c,d,e,f,g,h)}return h},Jq:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(K.Tb(a,b,g,h,p,c,d)&&K.Tb(a,b,g,h,p,e,f)){if(!K.Qm(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/ 2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2,D=Infinity,G=!1,M=0,Y=0;K.Jq(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(bb)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2;r+=K.Kq(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=K.Kq(z,B,y,x,e,f,g,h,k,l,m,n,p)}return r},ai:function(a,b,c,d,e,f,g){if(K.da(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.da(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; +d=c;if(ea)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; k.h(a,c);return!0}g=(d-b)/(c-a);if(K.da(h,g))return K.ai(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.da(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.ai(a,b,c,d,e,g*(e-a)+b,k)},NB:function(a,b,c,d,e){return K.Ze(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},MB:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Of:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ze(a,b,a,d,e,f, g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},LB:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a,h=(f- @@ -195,8 +195,8 @@ m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Ma function zd(a){F&&1a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Kd:var b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+ " "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ld:b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ad:b="";c=this.figures.j;for(var d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.aj=0,F&&C(d,we,"x1"),this.bj=Math.max(d,0),F&&C(e,we,"y1"),this.Bh=Math.max(e,0),this.Yl="boolean"===typeof g?g:"number"===typeof g?!!g:!1,this.ql=!!h):(F&&C(d,we,"x1"),this.Ne=d, F&&C(e,we,"y1"),this.aj=e,F&&C(f,we,"x2"),a===ne&&(f=Math.max(f,0)),this.bj=f,"number"===typeof g?(a===ne&&(g=Math.max(g,0)),this.Bh=g):this.Bh=0,this.ql=this.Yl=!1);this.$j=!1;this.xa=!0;this.Wd=null}we.prototype.copy=function(){var a=new we;a.sa=this.sa;a.nc=this.nc;a.tc=this.tc;a.Ne=this.Ne;a.aj=this.aj;a.bj=this.bj;a.Bh=this.Bh;a.Yl=this.Yl;a.ql=this.ql;a.$j=this.$j;a.xa=this.xa;return a};t=we.prototype; -t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case le:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y)&&K.B(this.point2X,a.point2X)&&K.B(this.point2Y,a.point2Y);case me:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y);case ne:return K.B(this.startAngle, -a.startAngle)&&K.B(this.sweepAngle,a.sweepAngle)&&K.B(this.centerX,a.centerX)&&K.B(this.centerY,a.centerY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.B(this.xAxisRotation,a.xAxisRotation)&&K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; +t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY);case le:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y)&&K.C(this.point2X,a.point2X)&&K.C(this.point2Y,a.point2Y);case me:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y);case ne:return K.C(this.startAngle, +a.startAngle)&&K.C(this.sweepAngle,a.sweepAngle)&&K.C(this.centerX,a.centerX)&&K.C(this.centerY,a.centerY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.C(this.xAxisRotation,a.xAxisRotation)&&K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case ke:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Id:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case le:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case me:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ne:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case oe:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ @@ -264,26 +264,26 @@ a;this.xa=!0}},point2Y:{configurable:!0,get:function(){return this.Bh},set:funct get:function(){return this.bj},set:function(a){F&&C(a,we,"radiusX");0>a&&za(a,">= zero",we,"radiusX");this.s&&va(this,a);this.bj=a;this.xa=!0}},radiusY:{configurable:!0,get:function(){return this.Bh},set:function(a){F&&C(a,we,"radiusY");0>a&&za(a,">= zero",we,"radiusY");this.s&&va(this,a);this.Bh=a;this.xa=!0}},startAngle:{configurable:!0,get:function(){return this.nc},set:function(a){this.nc!==a&&(this.s&&va(this,a),F&&C(a,we,"startAngle"),a%=360,0>a&&(a+=360),this.nc= a,this.xa=!0)}},sweepAngle:{configurable:!0,get:function(){return this.tc},set:function(a){F&&C(a,we,"sweepAngle");this.s&&va(this,a);360a&&(a=-360);this.tc=a;this.xa=!0}},isClockwiseArc:{configurable:!0,get:function(){return this.ql},set:function(a){this.s&&va(this,a);this.ql=a;this.xa=!0}},isLargeArc:{configurable:!0,get:function(){return this.Yl},set:function(a){this.s&&va(this,a);this.Yl=a;this.xa=!0}},xAxisRotation:{configurable:!0, get:function(){return this.Ne},set:function(a){F&&C(a,we,"xAxisRotation");a%=360;0>a&&(a+=360);this.s&&va(this,a);this.Ne=a;this.xa=!0}}});we.prototype.equalsApprox=we.prototype.Wa;var ke=new E(we,"Move",0),Id=new E(we,"Line",1),le=new E(we,"Bezier",2),me=new E(we,"QuadraticBezier",3),ne=new E(we,"Arc",4),oe=new E(we,"SvgArc",4);we.className="PathSegment";we.Move=ke;we.Line=Id;we.Bezier=le;we.QuadraticBezier=me;we.Arc=ne;we.SvgArc=oe; -function ye(){this.C=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; -ye.prototype.clone=function(a){a.C=this.C;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; +function ye(){this.B=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; +ye.prototype.clone=function(a){a.B=this.B;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; ye.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};ye.prototype.Wq=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);return b}; ye.prototype.GA=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);b.assign(c.Bu(b));return b}; -na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= +na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= a}},button:{configurable:!0,get:function(){return this.Lr},set:function(a){this.Lr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.Mr},set:function(a){this.Mr=a}},key:{configurable:!0,get:function(){return this.Oi},set:function(a){this.Oi=a}},down:{configurable:!0,get:function(){return this.fs},set:function(a){this.fs=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ft},set:function(a){this.Ft=a}},clickCount:{configurable:!0,get:function(){return this.Or},set:function(a){this.Or=a}},delta:{configurable:!0,get:function(){return this.cs},set:function(a){this.cs=a}},isMultiTouch:{configurable:!0,get:function(){return this.zs},set:function(a){this.zs=a}},handled:{configurable:!0,get:function(){return this.ps},set:function(a){this.ps=a}},bubbles:{configurable:!0, get:function(){return this.ah},set:function(a){this.ah=a}},event:{configurable:!0,get:function(){return this.ls},set:function(a){this.ls=a}},isTouchEvent:{configurable:!0,get:function(){var a=qa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=qa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.At},set:function(a){this.At=a}},targetDiagram:{configurable:!0, get:function(){return this.zt},set:function(a){this.zt=a}},targetObject:{configurable:!0,get:function(){return this.vd},set:function(a){this.vd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons& -4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.C=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.C=this.C;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; +4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.B=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.B=this.B;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; Ae.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; -function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}; -Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.C=this.C;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; +na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; +function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}; +Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.B=this.B;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; Be.prototype.toString=function(){var a="";a=this.change===De?a+"* ":this.change===Ce?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===De?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qa(this.object)),null!==this.oldValue&&(a+=" old: "+Qa(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Qa(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};Be.prototype.J=function(a){return a?this.oldValue:this.newValue};Be.prototype.IA=function(a){return a?this.oldParam:this.newParam};Be.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; Be.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};Be.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};Be.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, +na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, enumerable:!0,get:function(){return this.uf},set:function(a){F&&"string"!==typeof a&&A(a,"function",Be,"propertyName");this.uf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Jn===De&&("CommittedTransaction"===this.uf||"FinishedUndo"===this.uf||"FinishedRedo"===this.uf)}},object:{configurable:!0,get:function(){return this.Bp},set:function(a){this.Bp=a}},oldValue:{configurable:!0,get:function(){return this.Dp},set:function(a){this.Dp= a}},oldParam:{configurable:!0,get:function(){return this.Cp},set:function(a){this.Cp=a}},newValue:{configurable:!0,get:function(){return this.wp},set:function(a){this.wp=a}},newParam:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}}});Be.prototype.redo=Be.prototype.redo;Be.prototype.canRedo=Be.prototype.canRedo;Be.prototype.undo=Be.prototype.undo;Be.prototype.canUndo=Be.prototype.canUndo;Be.prototype.getParam=Be.prototype.IA; Be.prototype.getValue=Be.prototype.J;Be.prototype.clear=Be.prototype.clear;var De=new E(Be,"Transaction",-1),Ce=new E(Be,"Property",0),Le=new E(Be,"Insert",1),Me=new E(Be,"Remove",2);Be.className="ChangedEvent";Be.Transaction=De;Be.Property=Ce;Be.Insert=Le;Be.Remove=Me;function Ne(){this.w=(new H).freeze();this.va="";this.l=!1} @@ -294,7 +294,7 @@ na.Object.defineProperties(Ne.prototype,{changes:{configurable:!0,get:function() Ne.prototype.clear=Ne.prototype.clear;Ne.className="Transaction";function Oe(){this.tv=new I;this.sd=!1;this.L=(new H).freeze();this.ce=-1;this.w=999;this.Ce=!1;this.Zr=null;this.ij=0;this.l=!1;F&&(this.l=!0);this.Je=(new H).freeze();this.fm=new H;this.cv=!0;this.iv=this.xs=this.mv=this.lv=!1} Oe.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Ea("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Gb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.M(d),null!==f&&f.clear(),b.jb(d),a.xs=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.M(0),null!==f&&f.clear(),b.jb(0),a.ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.ce++);b.freeze()}a.isInternalTransaction||a.Gb("CommittedTransaction",c,e)}else{a.Ce=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -306,12 +306,12 @@ Oe.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Oe.prototype,{models:{configurable:!0,get:function(){return this.tv.iterator}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){this.sd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||v (e*=a.scrollHorizontalLineChange/16,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", -Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ca;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} +na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", +Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ea;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} ma(Ta,Qe);Ta.prototype.initializeStandardTools=function(){};Ta.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ve&&this.Yr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ta.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Xe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ye){b.bubbles=!0;return}if(this.gestureBehavior===Xe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;F&&c.checksTransactionLevel&&0!==c.transactionLevel&&Ea("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;L.free(f); f=a.vt;g=new Bb;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.J(l),null!==m&&(m.points=l.points,Df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Jd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.J(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ya(),g.add(k,a.Jd(h))));J.free(h);a.copiedParts=g;kf(a,g.Wf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,Df(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -420,7 +420,7 @@ enumerable:!0,get:function(){return this.Pa},set:function(a){A(a,"boolean",Tf,"i get:function(){return this.Ar},set:function(a){null!==a&&A(a,"function",Tf,"portTargeted");this.Ar=a}}});Tf.className="LinkingBaseTool";function hg(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ca(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ea(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= this.computeMinSize(),this.Zu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.od();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Ta();this.transactionResult=this.name;a.U("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -492,7 +492,7 @@ set:function(a){w(a,J,vg,"oppositePoint");this.Us.A(a)||this.Us.assign(a)}},orig function Pg(){0c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.ja(b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.bt=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Pg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Pg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; @@ -508,7 +508,7 @@ Rg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Rg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.il;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Rg.prototype.doStop=function(){this.il=null};Rg.className="ActionTool";function Sg(){Qe.call(this);0a.lastInput.clickCount?!1:!0};hh.prototype.doStart=function(){rh=this;null!==this.textBlock&&this.doActivate()}; hh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ac(a.lastInput.documentPoint));if(null!==b&&b instanceof ih&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.oa=oh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Kh=this.textBlock.copy();var d=new L(this.textBlock.ja(Ec),this.textBlock.ja(Oc));a.Ow(d);c.show(b,a,this);this.currentTextEditor=c}}}};hh.prototype.doCancel=function(){this.stopTool()}; hh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};hh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(sh)};hh.prototype.acceptText=function(a){switch(a){case sh:if(this.oa===uh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this);break;case xh:case mh:case nh:if(mh!==a||!0!==this.textBlock.isMultiline)if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this)}}; -function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ca(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} +function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ea(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} hh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};hh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};hh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.oa=kh,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};hh.prototype.doStop=function(){rh=null}; hh.prototype.isValidText=function(a,b,c){w(a,ih,hh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};hh.prototype.Zy=function(a){var b=this.Kh;b.text=a;b.measure(this.textBlock.Pi,Infinity);return b}; na.Object.defineProperties(hh.prototype,{textBlock:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,ih,hh,"textBlock");this.Qa=a}},currentTextEditor:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}},defaultTextEditor:{configurable:!0,get:function(){return this.l},set:function(a){!F||a instanceof ef||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.l=a}},starting:{configurable:!0, @@ -562,169 +562,169 @@ get:function(){return this.Pa},set:function(a){gb(a,hh,hh,"starting");this.Pa=a} "boolean",hh,"selectsTextOnActivate");this.W=a}},state:{configurable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(gb(a,hh,hh,"starting"),this.oa=a)}}});hh.prototype.measureTemporaryTextBlock=hh.prototype.Zy; var xh=new E(hh,"LostFocus",0),sh=new E(hh,"MouseDown",1),nh=new E(hh,"Tab",2),mh=new E(hh,"Enter",3),yh=new E(hh,"SingleClick",0),jh=new E(hh,"SingleClickSelected",1),th=new E(hh,"DoubleClick",2),kh=new E(hh,"StateNone",0),oh=new E(hh,"StateActive",1),ph=new E(hh,"StateEditing",2),vh=new E(hh,"StateValidating",3),qh=new E(hh,"StateInvalid",4),uh=new E(hh,"StateValidated",5),rh=null;hh.className="TextEditingTool";hh.LostFocus=xh;hh.MouseDown=sh;hh.Tab=nh;hh.Enter=mh;hh.SingleClick=yh; hh.SingleClickSelected=jh;hh.DoubleClick=th;hh.StateNone=kh;hh.StateActive=oh;hh.StateEditing=ph;hh.StateValidating=vh;hh.StateInvalid=qh;hh.StateValidated=uh;Sa("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.fb("TextEditing",a,this.mouseUpTools)}); -function zh(){Ah||(Bh(),Ah=!0);this.C=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.C=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} -function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();return a.yc=!0} -function Gh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.C,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Hh&&b.rc.clear(),a.gy=a.Nl===Ih&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Jh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), -qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Lh(c),a.yc=!1,a.sf=!1,b.start(),Mh(a),c.Ta(),Nh(b,0),Rf(c,!0),Oh(a),c.U("AnimationStarting",a))}))}}function ai(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; -function bi(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function zh(){Ah||(Bh(),Ah=!0);this.B=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.B=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} +function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();Gh(a.B);return a.yc=!0} +function Hh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.B,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Ih&&b.rc.clear(),a.gy=a.Nl===Jh&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Kh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Lh&&null!==d&&(delete d.start.scale,delete d.end.scale), +qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Mh(c),a.yc=!1,a.sf=!1,b.start(),Nh(a),c.Ta(),Oh(b,0),Rf(c,!0),ai(a),c.U("AnimationStarting",a))}))}}function bi(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; +function ci(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function Bh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new Bb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&za(a,">= 1",zh,"duration");this.kh=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.pc}},isTicking:{configurable:!0,get:function(){return this.Cs}},isInitial:{configurable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",zh,"isInitial");this.Ki=a}},defaultAnimation:{configurable:!0,get:function(){return this.Xd}},activeAnimations:{configurable:!0,get:function(){return this.Kj}},initialAnimationStyle:{configurable:!0,get:function(){return this.Nl},set:function(a){F&& -gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ii=null,Ah=!1,Ch=new E(zh,"Default",1),Ih=new E(zh,"AnimateLocations",2),Hh=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ii.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Ih;zh.None=Hh; -function Dh(){this.Kv=this.by=this.$c=this.C=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ji;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=ki}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;ci(this,!0);Mh(this.$c);Rf(this.C);Oh(this.$c);this.C.redraw()}; -function Jh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} -function Nh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ii,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; -t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.C,c=this.$c;this.Vl=this.pc=c.Ml=!1;Mh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ii;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);Oh(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Jh(this,null),c.Lm(this),b.Jb())}}; +gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ji=null,Ah=!1,Ch=new E(zh,"Default",1),Jh=new E(zh,"AnimateLocations",2),Ih=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ji.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Jh;zh.None=Ih; +function Dh(){this.Kv=this.by=this.$c=this.B=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ki;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=li}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;di(this,!0);Nh(this.$c);Rf(this.B);ai(this.$c);this.B.redraw()}; +function Kh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} +function Oh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ji,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; +t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.B,c=this.$c;this.Vl=this.pc=c.Ml=!1;Nh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ji;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);ai(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Kh(this,null),c.Lm(this),b.Jb())}}; t.yk=function(a,b){var c=b.actualBounds,d=null;b instanceof If&&(d=b.placeholder);null!==d?(c=d.ja(Ec),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof If)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.yk(d,b)}; t.wk=function(a,b){if(a.isVisible()){var c=null;b instanceof If&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.J(a).Gw=!0);if(a instanceof If)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.wk(c,b)}};t.JA=function(a){var b=this.vv.get(a);null===b&&(b={},this.vv.add(a,b));return b}; na.Object.defineProperties(Dh.prototype,{duration:{configurable:!0,get:function(){return this.kh},set:function(a){A(a,"number",Dh,"duration");1>a&&za(a,">= 1",Dh,"duration");this.kh=a}},reversible:{configurable:!0,get:function(){return this.Sp},set:function(a){this.Sp=a}},runCount:{configurable:!0,get:function(){return this.Av},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function li(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ji;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=li; -function ri(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}ri.className="AnimationState";function si(a,b,c){this.vd=null;this.uf=a;this.qq=c||ti;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=ui))}si.prototype.copy=function(){var a=new si(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; -function vi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -na.Object.defineProperties(si.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,si,si,"startCondition");this.qq=a}}});var ti=new E(si,"Default",1),ui=new E(si,"Immediate",2),wi=new E(si,"Bundled",3);si.className="AnimationTrigger"; -si.Default=ti;si.Immediate=ui;si.Bundled=wi;function xi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ja.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function mi(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ki;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=mi; +function si(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}si.className="AnimationState";function ti(a,b,c){this.vd=null;this.uf=a;this.qq=c||ui;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=vi))}ti.prototype.copy=function(){var a=new ti(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; +function wi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} +na.Object.defineProperties(ti.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,ti,ti,"startCondition");this.qq=a}}});var ui=new E(ti,"Default",1),vi=new E(ti,"Immediate",2),xi=new E(ti,"Bundled",3);ti.className="AnimationTrigger"; +ti.Default=ui;ti.Immediate=vi;ti.Bundled=xi;function yi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ka.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0c.kp||h.height*e>c.kp?b.sc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Ai(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Ai(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Ai(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ja;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Bi(this,a,b);return a}; -t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ja;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; -function Bi(a,b,c){b=Ci(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ja.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Bi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Bi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Bi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ka;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Ci(this,a,b);return a}; +t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ka;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; +function Ci(a,b,c){b=Di(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ka.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< e&&(k=a.M(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(xi.prototype,{parts:{configurable:!0,get:function(){return this.Ja.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ja.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.C}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",xi,"name");var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ja.iterator;a.next();)a.value.layerName=this.va}}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",xi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.Ra.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Xi(a){var b=a.Da.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, +function Yi(a){var b=a.Fa.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, "mouseout",a.Uk,!1)),a.addEventListener(b,"mouseenter",a.eA,!1),a.addEventListener(b,"mouseleave",a.fA,!1),a.addEventListener(b,"wheel",a.Wk,!1),a.addEventListener(b,"keydown",a.VA,!1),a.addEventListener(b,"keyup",a.WA,!1),a.addEventListener(b,"blur",a.Rz,!1),a.addEventListener(b,"focus",a.Sz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Da.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Fa/e.width*e.left,b.pageY-qa.scrollY-a.Ea/e.height*e.top); +Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Fa.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Ca/e.width*e.left,b.pageY-qa.scrollY-a.Ba/e.height*e.top); c=a.hm*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(qa,"resize",a.mx,!1))}function lf(a){30p&&(this.position=q.h(-(this.kt.scrollWidth-this.Fa)+u-this.Fa/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.kt.scrollHeight-this.Ea)+a.scrollTop-this.Ea/c+d))),J.free(q),ij(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.kt.scrollWidth-this.Ca)+u-this.Ca/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.kt.scrollHeight-this.Ba)+a.scrollTop-this.Ba/c+d))),J.free(q),jj(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.dj;this.dj=ki;this.scale=mj(this,qj);a!==ki&&(lj(this,!1),nj(this,this.documentBounds,this.Fa/this.Ga,this.Ea/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; -t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Fa;var f=this.Ea;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function mj(a,b){var c=a.co;if(null===a.Fa)return c;a.Ya();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.Ca+(a.kf?a.wb:0),g=a.Ba+(a.ze?a.wb:0),h=f/e,k=g/d;return b===qj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.dj;this.dj=li;this.scale=mj(this,qj);a!==li&&(lj(this,!1),nj(this,this.documentBounds,this.Ca/this.Ga,this.Ba/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; +t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ca;var f=this.Ba;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Kz=function(a,b){this.Ya();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.EA=function(a){if(a instanceof O){this.po=a;var b=J.alloc();this.qo=this.vr(a.ja(Ec,b));J.free(b)}else this.po=null,this.qo=Qb}; -function nj(a,b,c,d,e,f){var g=J.allocAt(a.ra.x,a.ra.y),h=g.x,k=g.y;if(null!==a.po){var l=J.alloc();l=a.po.ja(Ec,l);h=l.x-a.qo.x/a.scale;k=l.y-a.qo.y/a.scale;e=Bc;J.free(l)}if(f||a.scrollMode===ki)e.eb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Da;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Fa/c.width*c.left,b.clientY-a.Ea/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||jj(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),ij(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; +R.prototype.WA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return Bj(b,c,a)}; +R.prototype.eA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return Bj(b,c,a)};R.prototype.fA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return Bj(b,c,a)}; +R.prototype.getMouse=function(a){var b=this.Fa;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.Ca/c.width*c.left;a=a.clientY-this.Ba/c.height*c.top;return null!==this.xb?Hb(new J(b,a),this.xb):new J(b,a)}; +function wj(a,b,c){var d=a.Fa,e=a.Ca,f=a.Ba,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.xb?(b=J.allocAt(g,h),a.xb.Pd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ze(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Fa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ca/c.width*c.left,b.clientY-a.Ba/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||Gh(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),jj(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; t.$z=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Hc();b.isEnabled=!1;Rf(this);this.Ae=!1;this.ft=new J(NaN,NaN);b.isEnabled=c;this.gc=!0;var d=this;null!==a&&ta(function(){d.gc=!1;Eh(b,"Model");a(d)},1)};t.Jb=function(a){void 0===a&&(a=!1);if(!0!==this.Re&&!(this.Yb||!1===a&&this.gc)){this.Re=!0;var b=this;qa.requestAnimationFrame(function(){b.Re&&b.od()})}};t.od=function(){if(!this.Wj||this.Re)this.Wj&&(this.Wj=!1),Rf(this)}; -function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||$i(a)||(b&&jj(a),c&&lj(a,!1))} -function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ka||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} +function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||hj(a)||(b&&Gh(a),c&&lj(a,!1))} +function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ia||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} t.lx=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof If||(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof If&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ve&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Hj(a,b){for(var c=Ma(),d=Ma(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof If?(Ij(f)||Jj(f)||Kj(f))&&Hj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): -(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===ki&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Fa,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ea,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Fa,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1c&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): +(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===li&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Ca,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ba,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Ca,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1G+1&&(k=a.position.x*y));if(a.Tl)switch(a.et){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(x+1n+1&&(b.scrollTop= -a.position.y*y));l=a.Fa;m=a.Ea;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; +a.position.y*y));l=a.Ca;m=a.Ba;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; t.add=function(a){w(a,U,R,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Jk(a.layerName),null===b&&(b=this.Jk("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.zj(99999999,a,a.diagram===this);0<=c&&this.ab(Le,"parts",b,null,a,null,c);b.isTemporary||this.Ta();a.D(1);c=a.layerChanged;null!==c&&c(a,null, b)}};t.zj=function(a){this.partManager.zj(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Ve||a instanceof If&&null!==a.placeholder)&&a.u();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Cd.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()}; t.Rc=function(a){a.Ak();this.partManager.Rc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Cd.remove(a);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()};t.remove=function(a){w(a,U,R,"remove:part");bk(this,a,!0)}; @@ -735,28 +735,28 @@ c.value,d,e)}else if(c instanceof S)for(b.add(c,a.Jd(e,c)),c=c.labelNodes;c.next function Ff(a,b,c,d,e){if(null!==b&&(w(b,Bb,R,"moveParts:parts"),0!==b.count)){var f=J.alloc(),g=J.alloc();g.assign(c);isNaN(g.x)&&(g.x=0);isNaN(g.y)&&(g.y=0);(c=a.sq)||mf(a,b);for(var h=Ma(),k=Ma(),l=b.iterator,m=J.alloc();l.next();){var n=l.key,p=l.value;if(n.Tc()){var r=ek(a,n,b);if(null!==r)h.push(new fk(n,p,r));else if(!e||n.canMove())r=p.point,f.assign(r),a.computeMove(n,f.add(g),d,m),n.location=m,void 0===p.shifted&&(p.shifted=new J),p.shifted.assign(m.oe(r))}else l.key instanceof S&&k.push(l.qa)}J.free(m); e=h.length;for(l=0;ld&&this.Ta()}; t.Ez=function(a,b){hk(this,a,b);a.me(this);var c=this.Ra,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.ab(Me,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ta()}; -t.mB=function(a){w(a,xi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ja.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.mB=function(a){w(a,yi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ka.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.my=function(a){A(a,"function",R,"addModelChangedListener:listener");null===this.He&&(this.He=new H);this.He.add(a);this.model.Sh(a)};t.oB=function(a){A(a,"function",R,"removeModelChangedListener:listener");null!==this.He&&(this.He.remove(a),0===this.He.count&&(this.He=null));this.model.dl(a)};t.Sh=function(a){A(a,"function",R,"addChangedListener:listener");null===this.$f&&(this.$f=new H);this.$f.add(a)}; t.dl=function(a){A(a,"function",R,"removeChangedListener:listener");null!==this.$f&&(this.$f.remove(a),0===this.$f.count&&(this.$f=null))};t.Mt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.pw(a);a.change!==De&&(this.isModified=!0);if(null!==this.$f)for(var b=this.$f,c=b.length,d=0;dn.Ja.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof xi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.Ca=function(a){return this.undoManager.Ca(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):lk(g,h,b?void 0:k));else if(g instanceof yi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.Rc(m?h:-1,k,m)):g.zj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof yi&&(b?this.Ra.jb(h):(k.me(this),this.Ra.Bb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Me){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof O?b?n.Bb(p,r):n.Rc(p): +"number"===typeof p&&r instanceof jk&&(r.isRow?kk(n,p,b?r:void 0):lk(n,p,b?r:void 0));else if(n instanceof yi){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ka.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof yi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.Ea=function(a){return this.undoManager.Ea(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.xr=function(){this.partManager.xr()}; -function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);else if(null===a.Da)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Fa,g=a.Ea;e.width=a.Fa/b;e.height=a.Ea/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);a.P();oj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);ij(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= -Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Fa;this.Oc.yw.height=this.Ea;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; +function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);else if(null===a.Fa)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Ca,g=a.Ba;e.width=a.Ca/b;e.height=a.Ba/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);a.P();oj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);jj(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Lh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= +Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Ca;this.Oc.yw.height=this.Ba;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; function Ej(a,b){void 0===b&&(b=null);var c=a.Ob;if(null!==c&&c.visible){for(var d=Fb.alloc(),e=1,f=1,g=c.$.j,h=g.length,k=0;km||(nk(l.figure)?f=f*m/K.Jy(f,m):e=e*m/K.Jy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=L.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){L.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;L.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();K.Tq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);Fb.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.U("ChangingSelection",b);for(var c=b.ta(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jj(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||Gh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; -function Fi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.wA=function(){return this.Oh.iterator};t.YA=function(a){Gh(this);a&&uk(this,!0);this.gc?Fj(this,!1):(this.Tj=!0,Rf(this))};function uk(a,b){for(var c=a.Oh.iterator;c.next();)vk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.D())}function vk(a,b,c){if(null!==b){for(var d=b.em.iterator;d.next();)vk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.D())}} +function Fj(a,b){if(a.Zg&&!a.bs){var c=a.ba;a.ba=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Gh(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||Hh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; +function Gi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.es=c;a.ds=d} function Qj(a,b){var c=a.ds.J(b);return null!==c?c:a.ds.J(b.toLowerCase())}function xk(a,b){var c=a.es.J(b);if(null!==c)return c;c=a.es.J(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.xk=function(a,b){A(a,"string",R,"addDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.add(b)};t.Zm=function(a,b){A(a,"string",R,"removeDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.remove(b)}; t.U=function(a,b,c){F&&A(a,"string",R,"raiseDiagramEvent:name");var d=xk(this,a),e=new Ae;e.diagram=this;a=Qj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.M(0)(e);else if(0!==b)for(d=d.ta(),c=0;cx?(g=x,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=x,f=z.width,z=z.height);null!==m?(f+=k,z+=T):m=new hc(0);null!==h&&(x=h.width,h=h.height, "SVG"!==c&&e&&!Wk&&F&&(f>x||z>h)&&(Ea("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Wk=!0),isNaN(x)&&(x=2E3),isNaN(h)&&(h=2E3),isFinite(x)&&(f=Math.min(f,x)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Qq=q;Oj(a,d.context,m,new Fb(Math.ceil(f), Math.ceil(z)),g,B,l,n,u,b);return d.context}a.Dl=!1;Oj(a,y,m,new Fb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Dl=!0;return p.context} -na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ka},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ka!==a){var b=this.Ka;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Da&&(b=this.Da.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, -"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Da.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Da=null,this.removeEventListener(qa,"resize",this.mx,!1), -this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ka=null;if(null!==a){if(b=a.C)b.div=null;Pi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, +na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ia},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ia!==a){var b=this.Ia;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Fa&&(b=this.Fa.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, +"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Fa.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Fa=null,this.removeEventListener(qa,"resize",this.mx,!1), +this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ia=null;if(null!==a){if(b=a.B)b.div=null;Qi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, draggedLink:{configurable:!0,get:function(){return this.gs},set:function(a){this.gs!==a&&(this.gs=a,null!==a&&(this.Ss=a.fromPort,this.Ts=a.toPort))}},$y:{configurable:!0,get:function(){return this.Ss},set:function(a){this.Ss=a}},az:{configurable:!0,get:function(){return this.Ts},set:function(a){this.Ts=a}},animationManager:{configurable:!0,get:function(){return this.$c}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}}, skipsUndoManager:{configurable:!0,get:function(){return this.Hg},set:function(a){A(a,"boolean",R,"skipsUndoManager");this.Hg=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.bs},set:function(a){this.bs=a}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",R,"opacity"),(0>a||1a&&za(a,">= 0",R,"scrollHorizontalLineChange"),this.it=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"number",R,"scrollVerticalLineChange"),0>a&&za(a,">= 0",R,"scrollVerticalLineChange"),this.mt=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.th},set:function(a){F&&w(a,ye,R,"lastInput");this.th=a}},previousInput:{configurable:!0, -enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Da,c=this.Ka;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== +enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Fa,c=this.Ia;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.bo},set:function(a){""===a&&(a="auto");var b=this.bo;b!==a&&(A(a,"string",R,"defaultCursor"),this.bo=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.ag},set:function(a){var b=this.ag;b!== a&&(null!==a&&A(a,"function",R,"click"),this.ag=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&(null!==a&&A(a,"function",R,"doubleClick"),this.fg=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.bg},set:function(a){var b=this.bg;b!==a&&(null!==a&&A(a,"function",R,"contextClick"),this.bg=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0, get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(null!==a&&A(a,"function",R,"mouseOver"),this.xg=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.vg},set:function(a){var b=this.vg;b!==a&&(null!==a&&A(a,"function",R,"mouseHover"),this.vg=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;b!==a&&(null!==a&&A(a,"function",R,"mouseHold"),this.ug=a,this.g("mouseHold", @@ -830,137 +830,137 @@ get:function(){return this.Xr},set:function(a){var b=this.Xr;null!==b&&(b.isActi b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.yp},set:function(a){var b=this.yp;b!==a&&(w(a,Ve,R,"nodeSelectionAdornmentTemplate"),this.yp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, enumerable:!0,get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(w(a,Ve,R,"groupSelectionAdornmentTemplate"),this.Do=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(w(a,Ve,R,"linkSelectionAdornmentTemplate"),this.Yo=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.ev}},isModified:{configurable:!0, enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Jo&&this.ce!==a.historyIndex:this.Jo},set:function(a){if(this.Jo!==a){A(a,"boolean",R,"isModified");this.Jo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.ce=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){w(a,X,R,"model");this.currentTool.doCancel();null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Hc(!0);var c=Si(this,!0);this.Ae=!1;this.Wj=!0;this.ce=-2;this.Re=!1;var d=this.gc;this.gc=!0;Eh(this.animationManager,"Model");null!==b&&(null!==this.He&&this.He.each(function(a){b.dl(a)}),b.dl(this.Zc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)): -za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj; -b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(), -this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ii,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0, -get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Ni,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a= -this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Gi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b=this.Dn;C(a,R,"scale");b!==a&&(this.Dn= -a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); +enumerable:!0,get:function(){return this.ra},set:function(a){var b=J.alloc().assign(this.ra);if(!b.A(a)){w(a,J,R,"position");var c=this.viewportBounds.copy();this.ra.assign(a);hi(this.animationManager,b,this.ra);this.Yb||null===this.Fa&&!this.Fm.o()||(this.Yb=!0,a=this.scale,nj(this,this.eo,this.Ca/a,this.Ba/a,this.Pj,!1),this.Yb=!1);if(!this.Yb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ga,!1)}J.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ss}, +set:function(a){this.ss.A(a)||(w(a,J,R,"initialPosition"),this.ss=a.K())}},initialScale:{configurable:!0,get:function(){return this.ts},set:function(a){this.ts!==a&&(A(a,"number",R,"initialScale"),this.ts=a)}},grid:{configurable:!0,get:function(){null===this.Ob&&Zi(this);return this.Ob},set:function(a){var b=this.Ob;if(b!==a){null===b&&(Zi(this),b=this.Ob);w(a,W,R,"grid");a.type!==W.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b); +this.Ob=a;a.name="GRID";null!==c&&c.add(a);Ej(this);this.P();this.g("grid",b,a)}}},viewportBounds:{configurable:!0,get:function(){var a=this.hy,b=this.ra,c=this.Ga;a.h(b.x,b.y,Math.max(this.Ca,0)/c,Math.max(this.Ba,0)/c);return a}},viewSize:{configurable:!0,get:function(){return this.Fm},set:function(a){var b=this.viewSize;b.A(a)||(w(a,Fb,R,"viewSize"),this.Fm=a=a.K(),this.Ba=this.Ca=0,a.o()?(this.Ca=a.width,this.Ba=a.height):null!==this.Ia&&(this.Ca=this.Ia.clientWidth|| +1,this.Ba=this.Ia.clientHeight||1),this.Ta(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.ns},set:function(a){var b=this.ns;b.A(a)||(w(a,L,R,"fixedBounds"),(F&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.ns=a=a.K(),this.Ta(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.cj},set:function(a){"number"=== +typeof a?a=new hc(a):w(a,hc,R,"scrollMargin");var b=this.cj;b.A(a)||(this.cj=a=a.K(),this.g("scrollMargin",b,a),this.lr())}},scrollMode:{configurable:!0,get:function(){return this.dj},set:function(a){var b=this.dj;b!==a&&(gb(a,R,R,"scrollMode"),this.dj=a,a===li&&lj(this,!1),this.g("scrollMode",b,a),this.P())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.nt},set:function(a){var b=this.nt;b!==a&&(A(a,"boolean",R,"scrollsPageOnFocus"),this.nt=a,this.g("scrollsPageOnFocus", +b,a))}},positionComputation:{configurable:!0,get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(null!==a&&A(a,"function",R,"positionComputation"),this.$s=a,lj(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.gt},set:function(a){var b=this.gt;b!==a&&(null!==a&&A(a,"function",R,"scaleComputation"),this.gt=a,mk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0, +enumerable:!0,get:function(){return this.eo}},isVirtualized:{configurable:!0,get:function(){return this.Es},set:function(a){var b=this.Es;b!==a&&(A(a,"boolean",R,"isVirtualized"),this.Es=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ga},set:function(a){var b=this.Ga;C(a,R,"scale");b!==a&&mk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.co},set:function(a){F&&C(a,R,"defaultScale");!F||0this.scale&&(this.scale=a)):za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0, +enumerable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj;b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a): +w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ji,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}}, +parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Oi,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren", +b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Hi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b= +this.Dn;C(a,R,"scale");b!==a&&(this.Dn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); R.prototype.makeImageData=R.prototype.Xy;R.prototype.makeImage=R.prototype.$A;R.prototype.addRenderer=R.prototype.Iz;R.prototype.makeSVG=R.prototype.ww;R.prototype.makeSvg=R.prototype.mu;R.prototype.stopAutoScroll=R.prototype.Vf;R.prototype.doAutoScroll=R.prototype.Rt;R.prototype.isUnoccupied=R.prototype.Pk;R.prototype.raiseDiagramEvent=R.prototype.U;R.prototype.removeDiagramListener=R.prototype.Zm;R.prototype.addDiagramListener=R.prototype.xk;R.prototype.findTreeRoots=R.prototype.DA; R.prototype.layoutDiagram=R.prototype.YA;R.prototype.findTopLevelGroups=R.prototype.wA;R.prototype.findTopLevelNodesAndLinks=R.prototype.xA;R.prototype.ensureBounds=R.prototype.Ya;R.prototype.findLinksByExample=R.prototype.Ut;R.prototype.findNodesByExample=R.prototype.Vt;R.prototype.findLinkForData=R.prototype.Ec;R.prototype.findNodeForData=R.prototype.rj;R.prototype.findPartForData=R.prototype.Fc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Hb; R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Sd;R.prototype.transformViewToDoc=R.prototype.Bu;R.prototype.transformRectDocToView=R.prototype.CB;R.prototype.transformDocToView=R.prototype.vr;R.prototype.centerRect=R.prototype.Nt;R.prototype.scrollToRect=R.prototype.Ow;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.PA;R.prototype.highlight=R.prototype.OA;R.prototype.selectCollection=R.prototype.tB;R.prototype.select=R.prototype.select; -R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ca;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; +R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ea;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; R.prototype.removeModelChangedListener=R.prototype.oB;R.prototype.addModelChangedListener=R.prototype.my;R.prototype.findLayer=R.prototype.Jk;R.prototype.removeLayer=R.prototype.mB;R.prototype.addLayerAfter=R.prototype.Ez;R.prototype.addLayerBefore=R.prototype.ky;R.prototype.addLayer=R.prototype.Hm;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.Fk;R.prototype.removeParts=R.prototype.tu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add; R.prototype.clearDelayedGeometries=R.prototype.Uv;R.prototype.setProperties=R.prototype.Tw;R.prototype.resetInputOptions=R.prototype.Kw;R.prototype.setInputOption=R.prototype.uB;R.prototype.getInputOption=R.prototype.Pm;R.prototype.resetRenderingHints=R.prototype.Lw;R.prototype.setRenderingHint=R.prototype.iz;R.prototype.getRenderingHint=R.prototype.Xe;R.prototype.maybeUpdate=R.prototype.od;R.prototype.requestUpdate=R.prototype.Jb;R.prototype.delayInitialization=R.prototype.$z; R.prototype.isUpdateRequested=R.prototype.UA;R.prototype.invalidateDocumentBounds=R.prototype.Ta;R.prototype.findObjectsNear=R.prototype.Qg;R.prototype.findPartsNear=R.prototype.tA;R.prototype.findObjectsIn=R.prototype.Lf;R.prototype.findPartsIn=R.prototype.Iy;R.prototype.findObjectsAt=R.prototype.sj;R.prototype.findPartsAt=R.prototype.sA;R.prototype.findObjectAt=R.prototype.ac;R.prototype.findPartAt=R.prototype.Nm;R.prototype.focusObject=R.prototype.EA;R.prototype.alignDocument=R.prototype.Kz; R.prototype.zoomToRect=R.prototype.GB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.xy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){gh=a?void 0!==qa.document:!1};R.isUsingDOM=function(){return gh}; -var Re=null,Hi=new Bb,Wi=null,Vi=null,gh=void 0!==qa.document,Qi=null,Ri="",Kh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),ki=new E(R,"DocumentScroll",1),mi=new E(R,"InfiniteScroll",2),Gi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, -"AnyParentsCollapsed",23),$k=new H,al="2.1.53",Uk="image",Wk=!1,bl=null,Di=!1; -function Ei(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; -bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=qj;R.UniformToFill=rj; -R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=ki;R.InfiniteScroll=mi;R.TreeParentCollapsed=Gi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Oi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} +var Re=null,Ii=new Bb,Xi=null,Wi=null,gh=void 0!==qa.document,Ri=null,Si="",Lh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),li=new E(R,"DocumentScroll",1),ni=new E(R,"InfiniteScroll",2),Hi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, +"AnyParentsCollapsed",23),$k=new H,al="2.1.54",Uk="image",Wk=!1,bl=null,Ei=!1; +function Fi(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; +bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Lh;R.Uniform=qj;R.UniformToFill=rj; +R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=li;R.InfiniteScroll=ni;R.TreeParentCollapsed=Hi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Pi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} function Nj(a,b){b.Mb.setTransform(b.Zb,0,0,b.Zb,0,0);if(null===a.gf)a:{b="f";var c=qa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.gf=!0;if(gh){var d=R[Va("76a115b6ed251eaf4692")];if(d)for(var e=$k.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ra[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Va("76ad18b4f73e")];for(g=c[Va("73a612b6fb191d")](Va("35e7"))+2;gf&&Va(d[2])!==Va("7da71ca0ad381e90")&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.gf=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(qa.document[Va("78a712aa")]){if(qa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g),h=qa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8")),qa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.gf=!1;break}else if(Wa||Za||$a||ab)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.Dd++:a.Dd=1;c.clickCount=a.Dd;a.dk=b.timeStamp;a.To.Ug(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault(): Bj(a,c,b)}};a.$k=function(b){if(a.isEnabled){a.kg=!0;var c=a.nk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=Aj(a,b,b,null!==c[1]),c.targetDiagram=xj(b),a.doMouseMove(),Bj(a,c,b))}};a.bl=function(b){if(a.isEnabled){a.kg=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ys;if(c&&a.uk)delete d[b.pointerId],b.preventDefault();else if(d=a.nk,null!==d[0]&& -d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&wj(e.C,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== -b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Xi(a)}}Oi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} +d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&wj(e.B,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== +b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Yi(a)}}Pi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} na.Object.defineProperties(pf.prototype,{point:{configurable:!0,get:function(){return this.l},set:function(a){this.l=a}},shifted:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}}});var cl="DraggingInfo";pf.className="DraggingInfo";function fk(a,b,c){this.node=a;this.info=b;this.ow=c}fk.className="DraggingNodeInfoPair";function hf(){this.reset()} hf.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Fb(NaN,NaN)).freeze();this.gridSnapCellSpot=Ec;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};hf.className="DraggingOptions";function el(a){1 b.updateDelay?b.P():b.w||(b.w=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Ud=function(){null!==b.observed&&jl(b)};this.autoScale=qj;this.Yb=!1}ma(hl,R);hl.prototype.computePixelRatio=function(){return 1}; -hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Da,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Da=this.sm,this.Mb=this.Da.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Da.width,this.Da.height),kl(this)}finally{this.Da=a,this.Mb=b}}}R.prototype.redraw.call(this)}; -hl.prototype.sc=function(){null===this.Ka&&v("No div specified");null===this.Da&&v("No canvas specified");if(!(this.Da instanceof Sj)&&(yi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Da;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Fa,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Fa=this.sm,this.Mb=this.Fa.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Fa.width,this.Fa.height),kl(this)}finally{this.Fa=a,this.Mb=b}}}R.prototype.redraw.call(this)}; +hl.prototype.sc=function(){null===this.Ia&&v("No div specified");null===this.Fa&&v("No canvas specified");if(!(this.Fa instanceof Sj)&&(zi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Fa;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Zb,this.Zb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ra.j;for(var c=b.length,d=0;da&&(a=0);this.kb!==a&&(this.kb=a)}}});hl.className="Overview";function il(){gf.call(this);this.l=null}ma(il,gf); il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))}; -ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +ll.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ri=null,Si="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Sm()&&(d=c.Ek,c.Ek=this.copiesParentKey),c.Ok()&&(e=c.Dk,c.Dk=this.copiesGroupKey),f=b.Fk(a,null,!0)}finally{c.Sm()&&(c.Ek=d),c.Ok()&&(c.Dk=e),c=new H,c.addAll(f),Ri=c,Si=b.model.dataFormat}}b.U("ClipboardChanged",c)}; +ll.prototype.pasteFromClipboard=function(){var a=new I,b=Ri;if(null===b)return a;var c=this.diagram;if(Si!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Sm()&&(e=d.Ek,d.Ek=this.copiesParentKey),d.Ok()&&(f=d.Dk,d.Dk=this.copiesGroupKey),g=c.Fk(b,c,!1)}finally{for(d.Sm()&&(d.Ek=e),d.Ok()&&(d.Dk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +ll.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.U("ChangingSelection",b.selection);b.Ea("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))}; +ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Lh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; ll.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Gh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Hh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; ll.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,U,ll,"part");var b=this.diagram;b.Ya();if(null===a){try{null!==this.Dg&&(this.Dg.next()?a=this.Dg.value:this.Dg=null)}catch(k){this.Dg=null}null===a&&(0l.width+n||n>Y+m||D>l.height+p||p>Q+D)}if(m){m=0!==(this.I&256);a.clipInsteadOfFill&&(m=!1);this instanceof ih&&(a.font=this.font);if(m){F&&F.iA&&Ea("clip"+this.toString());D=g.pe()?g.naturalBounds:g.actualBounds;null!==this.gb?(n=this.gb,Y=n.x,Q=n.y,l=n.width,n=n.height):(Y=Math.max(d.x,D.x),Q=Math.max(d.y,D.y),l=Math.min(d.right,D.right)-Y,n=Math.min(d.bottom,D.bottom)-Q);if(Y>d.width+ -d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Ai(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): -a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Ai(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- +d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Bi(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): +a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Bi(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- n/2,Y-n/2,Q+n,l+n));F&&F.Jm&&F.hA&&F.hA(a,this);k&&(null!==this.rb||null!==this.kc||null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)?(Ql(this,!0),null===this.shadowVisible&&Nl(a)):Ql(this,!1);this.pj(a,b);k&&0!==(this.I&512)===!0&&Ml(a);this.Rf()&&k&&Nl(a);m?(a.restore(),this instanceof W?a.Ac(!0):a.Ac(!1)):c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha= -f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Ai(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Ai(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; -function Ai(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Bi(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Bi(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; +function Bi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=y;q+=y;if(c.type===Ul)m=b.createLinearGradient(n,p,r,q);else if(c.type===Pl)y=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,y=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,y);else if(c.type===Tl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else ya(c.type,"Brush type");if(c.type!==Tl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ue=m,null!== m&&(c.sl=h,c.Nu=k),null===m&&c.type===Tl&&-1!==c.sl)){c.sl=-1;var x=a.diagram;null!==x&&-1===c.sl&&ta(function(){x.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Sg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Sf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Sf():!0}; t.Tg=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; @@ -1001,11 +1001,11 @@ function Vl(a,b){a.I=b?a.I|2048:a.I&-2049}function Wl(a,b){a.I=b?a.I|4096:a.I&-4 function am(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Jl(b,a)}}function bm(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.yd():a.fl(a,function(a){am(a)}):am(a))}t.bind=function(a){a.vd=this;var b=this.tj();null!==b&&cm(b)&&v("Cannot add a Binding to a template that has already been copied: "+a);null===this.lb&&(this.lb=new H);this.lb.add(a)}; t.tj=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.xi)return a;a=a.panel}return null};t.Tw=function(a){Pj(this,a)};t.gx=function(a){a.vd=this;null===this.Yg&&(this.Yg=new Bb);this.Yg.add(a.propertyName,a)}; function dm(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new ib;for(c in b)"row"!== c&&"column"!==c&&(e[c]=b[c]);Pj(a,e)}else Pj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function im(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();F&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);em.add(a,b)} function jm(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} @@ -1050,14 +1050,14 @@ b.mouseLeave=function(a,b){b.Tg()&&b instanceof W&&(a=b.ib("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.ib("ButtonBorder"),b instanceof Uf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Ui("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Vi("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});im("ToolTip",function(){return dm(Ve,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},dm(Uf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new N(0,0,4,6),spot2:new N(1,1,-4,-4)}))}); -im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ui("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); -im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Ui("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); -a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ca("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); -im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Ui("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ca("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Vi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); +im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Vi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); +a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); +im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Vi("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.cb("checkbox")}}};return a}); im("CheckBox",function(a){a=jm(a);a=dm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hc(0,1,0,0)});var b=dm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=zg=new E(O,"None",0);O.Default=pl=new E(O,"Default",0);O.Vertical=rl=new E(O,"Vertical",4);O.Horizontal=ql=new E(O,"Horizontal",5);O.Fill=Bd=new E(O,"Fill",3);O.Uniform=Og=new E(O,"Uniform",1); @@ -1095,12 +1095,12 @@ function Nl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function Ml(a) R.prototype.mu=function(a){var b=new Sj(this,qa.document);void 0===a&&(a=new ib);var c=this;return Sk(this,function(a,e){a=Tk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.mu;R.prototype.ww=function(a){return this.mu(a)};R.prototype.makeSVG=R.prototype.ww; O.prototype.Ay=function(a,b){if(!(a instanceof pm))return!1;if(!this.visible)return!0;var c=null,d=a.iu;if(this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn))return Kl(this,a,b),!0;var e=this.Cb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.I&4096)===!0&&Ll(this);var h=0!==(this.I&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof ih&&(a.font=this.font);if(h){k=g.pe()?g.naturalBounds:g.actualBounds;if(null!==this.gb){var l= this.gb;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;qm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Rf()&&!this.isVisible())return!0;a.Ue.Ua=[1,0,0,1,0,0];(this instanceof ih&&1a)&&za(a,"0 <= loc <= 1",Ol,"addColorStop:loc");A(b,"string",Ol,"addColorStop:color");F&&!xm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.te&&(this.te=new Bb);this.te.add(a,b);this.sa===Rl&&(this.type=Ul);this.ue=null;return this}; function xm(a){if("black"===a)return!0;if(""===a)return!1;F&&A(a,"string",Ol,"isValidColor");vm||(wm(),vm=!0);var b=ym;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} -t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(b,c)} -t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(-b,c)} -function Dm(a,b,c){ni(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;ni(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} +t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(b,c)} +t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(-b,c)} +function Dm(a,b,c){oi(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;oi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} t.Vy=function(){if(this.type===Rl)return Fm(this.color);if((this.type===Ul||this.type===Pl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Pl)return Fm(a.first().value);if(null!==a.get(.5))return Fm(a.get(.5));if(2===a.count)return a=a.ta(),Fm(Dm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return Fm(Dm(a.get(c),a.get(d),1-f/e))}return!1}; -function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();ni(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} +function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();oi(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} function Am(a,b){switch(b){case zm:b=100*Gm(Em.l);var c=100*Gm(Em.L),d=100*Gm(Em.w);Hm.l=.4124564*b+.3575761*c+.1804375*d;Hm.L=.2126729*b+.7151522*c+.072175*d;Hm.w=.0193339*b+.119192*c+.9503041*d;Hm.W=Em.W;b=Im(Hm.l/Jm[0]);c=Im(Hm.L/Jm[1]);d=Im(Hm.w/Jm[2]);Km.l=116*c-16;Km.L=500*(b-c);Km.w=200*(c-d);Km.W=Hm.W;Km.l=Math.min(100,Math.max(0,Km.l+100*a));a=(Km.l+16)/116;b=a-Km.w/200;Hm.l=Jm[0]*Lm(Km.L/500+a);Hm.L=Jm[1]*(Km.l>Mm*Nm?Math.pow(a,3):Km.l/Mm);Hm.w=Jm[2]*Lm(b);Hm.W=Km.W;a=-.969266*Hm.l+1.8760108* -Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return oi(),pi.w=Math.min(100,Math.max(0,pi.w+100*a)),"hsla("+pi.l+", "+pi.L+"%, "+pi.w+"%, "+ -pi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ni(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} -function oi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}pi.l=Math.round(g);pi.L=Math.round(100*a);pi.w=Math.round(100*e);pi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return pi(),qi.w=Math.min(100,Math.max(0,qi.w+100*a)),"hsla("+qi.l+", "+qi.L+"%, "+qi.w+"%, "+ +qi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function oi(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} +function pi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}qi.l=Math.round(g);qi.L=Math.round(100*a);qi.w=Math.round(100*e);qi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Im(a){return a>Nm?Math.pow(a,1/3):(Mm*a+16)/116}function Lm(a){var b=a*a*a;return b>Nm?b:(116*a-16)/Mm}function km(a,b){"string"===typeof a?F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Ol||v("Value for "+b+" must be a color string or a Brush, not "+a)}function wm(){ym=gh?(new Vk(null)).context:null} na.Object.defineProperties(Ol.prototype,{type:{configurable:!0,get:function(){return this.sa},set:function(a){this.s&&va(this,a);gb(a,Ol,Ol,"type");this.sa=a;this.start.Sb()&&(a===Ul?this.start=Fc:a===Pl&&(this.start=Kc));this.end.Sb()&&(a===Ul?this.end=Nc:a===Pl&&(this.end=Kc));this.ue=null}},color:{configurable:!0,get:function(){return this.rl},set:function(a){this.s&&va(this,a);F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color');this.rl=a;this.ue= null}},start:{configurable:!0,get:function(){return this.Kd},set:function(a){this.s&&va(this,a);w(a,N,Ol,"start");this.Kd=a.K();this.ue=null}},end:{configurable:!0,get:function(){return this.El},set:function(a){this.s&&va(this,a);w(a,N,Ol,"end");this.El=a.K();this.ue=null}},startRadius:{configurable:!0,get:function(){return this.wt},set:function(a){this.s&&va(this,a);C(a,Ol,"startRadius");0>a&&za(a,">= zero",Ol,"startRadius");this.wt=a;this.ue=null}},endRadius:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.s&&va(this,a);C(a,Ol,"endRadius");0>a&&za(a,">= zero",Ol,"endRadius");this.ks=a;this.ue=null}},colorStops:{configurable:!0,get:function(){return this.te},set:function(a){this.s&&va(this,a);F&&w(a,Bb,Ol,"colorStops");this.te=a;this.ue=null}},pattern:{configurable:!0,get:function(){return this.Xs},set:function(a){this.s&&va(this,a);this.Xs=a;this.ue=null}}});Ol.prototype.isDark=Ol.prototype.Vy; -Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,pi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); +Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,qi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); Ol.randomColor=function(a,b){void 0===a&&(a=128);F&&(C(a,Ol,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ a};Ol.isValidColor=xm;Ol.lighten=function(a){return Bm(a)};Ol.lightenBy=Bm;Ol.darken=function(a){return Cm(a)};Ol.darkenBy=Cm;Ol.mix=Dm;Ol.isDark=Fm;function hm(){this.va="Base"}hm.prototype.measure=function(){};hm.prototype.bB=function(a,b,c,d,e){a.measure(b,c,d,e)};hm.prototype.arrange=function(){};hm.prototype.Mz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};hm.prototype.kB=function(a){a.Nk()};hm.prototype.sc=function(){}; na.Object.defineProperties(hm.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},classType:{configurable:!0,get:function(){return W}}});hm.prototype.remeasureObject=hm.prototype.kB;hm.prototype.arrangeElement=hm.prototype.Mz;hm.prototype.measureElement=hm.prototype.bB;hm.className="PanelLayout";function Qm(){this.va="Base"}ma(Qm,hm); @@ -1185,9 +1185,9 @@ cn.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.$.j,u=q.length,y=0;yB)){x=nk(x.figure);for(var D=0;DB&&z.push(G))}}}}q= -a.$.j;u=q.length;for(y=0;ye*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)x.measure(Infinity,Infinity,0,0),z=x.measuredBounds,b.Xc(z),a.l.push(z);else{var B=x.segmentIndex,D=x.segmentFraction,G=x.alignmentFocus;G.Sb()&&(G=Kc);var M=x.segmentOrientation,Y=x.segmentOffset;if(isNaN(B)){var Q=k.ua;z=Ma();Q.mw(D,z);var ca=J.allocAt(z[0],z[1]);ca.add(k.i(0)); Q.type===Gd?ca.offset(-Q.startX,-Q.startY):(Q=Q.figures.first(),ca.offset(-Q.startX,-Q.startY));Q=z[2];if(M!==ng){var T=k.computeAngle(x,M,Q);x.dc=T}T=ca.x-m.x;var P=ca.y-m.y;J.free(ca);Oa(z)}else if(B<-f||B>=f)P=k.midPoint,Q=k.midAngle,M!==ng&&(T=k.computeAngle(x,M,Q),x.dc=T),T=P.x-m.x,P=P.y-m.y;else{T=0;0<=B?(P=n.M(B),z=Bxa+ @@ -1222,9 +1222,9 @@ W.prototype.copy=function(){var a=O.prototype.copy.call(this);if(null!==a){for(v t.Ap=function(a){O.prototype.Ap.call(this,a);for(var b=this.$.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Ai(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function un(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Bi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ob;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Qt()}}}} -function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Ai(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Bi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function nk(a){return"LineV"===a||"BarV"===a} t.Lk=function(a,b,c,d,e){var f=this.pe(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,K.Of(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=K.Of(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.$.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.sa===W.Spot;u&&(q=J.alloc(),p=this.yb(),(l=p.Lk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var y=0;yd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; @@ -1262,12 +1262,12 @@ g&&null!==g.lb)for(var h=g.lb.iterator;h.next();){var k=h.value;k.vd=g;k.uq=2;k. g=d.targetProperty;var k=g.indexOf(".");0=c.elements.count&&!(c instanceof U)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Ea("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Fn=!0)}}))} t.Xz=function(a){void 0===a&&(a=!1);var b=this.copy();wn(b,function(a){a instanceof W&&(a.xi=null,a.tb=null);var b=a.lb;null!==b&&(a.lb=null,b.each(function(b){a.bind(b.copy())}));b=a.Yg;null!==b&&(a.Yg=null,b.each(function(b){a.gx(b.value.copy())}))});a&&yg(b);return b}; -t.Ia=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; +t.Ja=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; else continue;var f=this,g=c.Ij;if(-1!==g){if(f=this.Tt(g),null===f)continue}else null!==c.vd&&(f=c.vd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.uq;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.getColumnDefinition(c.Bm):2===e&&(f=f.getRowDefinition(c.Bm))}void 0!==f&&c.jx(f,d)}}}; function Gn(a,b){a=a.$.j;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.Rc(this.$.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Ui("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), +function Hn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Vi("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), d.tb=b,Ln(a,e,c),d.tb=null,d.data=b)}}function Ln(a,b,c){for(a=a.$;ba)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.u(),this.g("topIndex",b,a))}}},leftIndex:{configurable:!0,get:function(){return void 0===this.Ri?0:this.Ri},set:function(a){if(void 0!==this.Ri){var b=this.Ri;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+ a),this.Ri=a,this.u(),this.g("leftIndex",b,a))}}},data:{configurable:!0,get:function(){return this.tb},set:function(a){var b=this.tb;if(b!==a){var c=this instanceof U&&!(this instanceof Ve);c&&A(a,"object",W,"data");yg(this);this.tb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.ef.remove(b),null!==a&&c.ef.add(a,this)):this instanceof U&&(null!==b&&c.ff.remove(b),null!==a&&c.ff.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b), -null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ia()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; +null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ja()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Ni=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.ru()}}},itemTemplate:{configurable:!0,get:function(){return null===this.De?null:this.De.J("")},set:function(a){if(null===this.De){if(null===a)return;this.De=new Bb}var b=this.De.J("");b!==a&&(w(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+ a),this.De.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.ru())}},itemTemplateMap:{configurable:!0,get:function(){return this.De},set:function(a){var b=this.De;if(b!==a){w(a,Bb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;F&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}this.De=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| this.ru()}}},itemCategoryProperty:{configurable:!0,get:function(){return this.Wl},set:function(a){var b=this.Wl;b!==a&&("string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",W,"itemCategoryProperty"),this.Wl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.I&1048576)},set:function(a){var b=0!==(this.I&1048576);b!==a&&(A(a,"boolean",W,"isAtomic"),this.I^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0, @@ -1295,7 +1295,7 @@ this.I^=33554432,this.u(),this.g("isOpposite",b,a))}},isEnabled:{configurable:!0 A(a,"string",W,"alignmentFocusName"),this.Xg=a,this.u(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return gm.J("Position")}},Horizontal:{configurable:!0,get:function(){return gm.J("Horizontal")}},Vertical:{configurable:!0,get:function(){return gm.J("Vertical")}},Spot:{configurable:!0,get:function(){return gm.J("Spot")}},Auto:{configurable:!0,get:function(){return gm.J("Auto")}},Table:{configurable:!0,get:function(){return gm.J("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return gm.J("Viewbox")}},TableRow:{configurable:!0,get:function(){return gm.J("TableRow")}},TableColumn:{configurable:!0,get:function(){return gm.J("TableColumn")}},Link:{configurable:!0,get:function(){return gm.J("Link")}},Grid:{configurable:!0,get:function(){return gm.J("Grid")}},Graduated:{configurable:!0,get:function(){return gm.J("Graduated")}}});W.prototype.findItemPanelForData=W.prototype.Gy; -W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ia;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; +W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ja;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Bb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.ib;W.prototype.findInVisualTree=W.prototype.Mm;W.prototype.walkVisualTreeFrom=W.prototype.fl;W.prototype.findMainElement=W.prototype.yb;var Fn=!1,Jn=!1,Kn=null,gm=new Bb;W.className="Panel";W.definePanelLayout=Nn;Nn("Position",new Qm);Nn("Vertical",new Tm);Nn("Auto",new Vm);Nn("Link",new fn); function jk(){eb(this);this.Ag=null;this.As=!0;this.Xa=0;this.gd=NaN;this.zh=0;this.xh=Infinity;this.Db=fd;this.ra=this.hc=this.na=0;this.lb=null;this.lq=On;this.Pe=pl;this.hq=this.Eg=null;this.iq=NaN;this.rb=this.sk=null;this.Vn=!1} jk.prototype.copy=function(){var a=new jk;a.As=this.As;a.Xa=this.Xa;a.gd=this.gd;a.zh=this.zh;a.xh=this.xh;a.Db=this.Db;a.na=this.na;a.hc=this.hc;a.ra=this.ra;a.Pe=this.Pe;a.lq=this.lq;null===this.Eg?a.Eg=null:a.Eg=this.Eg.K();a.hq=this.hq;a.iq=this.iq;a.sk=null;null!==this.sk&&(a.separatorDashArray=Ja(this.separatorDashArray));a.rb=this.rb;a.Vn=this.Vn;a.lb=this.lb;return a};t=jk.prototype; @@ -1320,7 +1320,7 @@ Uf.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a); t.pb=function(a){a===zg||a===Og||a===sl||a===pl?this.geometryStretch=a:O.prototype.pb.call(this,a)};t.toString=function(){return"Shape("+("None"!==this.figure?this.figure:"None"!==this.toArrow?this.toArrow:this.fromArrow)+")#"+ob(this)}; function Pn(a,b,c,d){var e=c.length;if(!(4>e)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,y=Ma(),x=2;xn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;x=0;q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Oa(y);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.pj(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){x++;if(x===y.length){Oa(y);return}q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Oa(y)}} -t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Ai(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Ai(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, +t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Bi(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Bi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, a.miterLimit=this.tk);e=!1;g&&b.Xe("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.St(h,this.Gh));var k=this.ua;if(null!==k){if(k.type===Gd)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.Hj();else if(k.type===Kd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.We(d);if(null!==c){g&& e&&Nl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.Hj();g&&e&&Ml(a)}}else if(k.type===Ld)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+K.Wg*k,h-p,l+k,h-K.Wg*p,l+k,h),a.bezierCurveTo(l+k,h+K.Wg*p,l+K.Wg*k,h+p,l,h+p),a.bezierCurveTo(l-K.Wg*k,h+p,l-k,h+K.Wg*p,l-k,h),a.bezierCurveTo(l-k,h-K.Wg*p,l-K.Wg*k,h-p,l,h-p),a.closePath(),null!==d&&a.We(d),null!==c&& (g&&e?(Nl(a),a.Hj(),Ml(a)):a.Hj());else if(k.type===Ad)for(h=k.figures,k=h.length,p=0;pp*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& +t.pj=function(a,b){if(null!==this.Nc&&0!==this.$b.length&&null!==this.xe){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=mo(this),h=a.textAlign=this.fj,k=b.Tl;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.Mi;var l=this.Li;Bi(this,a,this.Nc,!0,!1,c,d);(k||l)&&Bi(this,a,this.Nc,!1,!1,c,d);d=0;c=!1;var m=J.allocAt(0,0);this.Md.Aa(m);var n=J.allocAt(0,g);this.Md.Aa(n);var p=m.Ve(n);J.free(m);J.free(n);m=b.scale;8>p*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& (c=!1);b=this.zf;p=this.Af;switch(this.flip){case ul:a.translate(e,0);a.scale(-1,1);break;case tl:a.translate(0,f);a.scale(1,-1);break;case vl:a.translate(e,f),a.scale(-1,-1)}m=this.ed;n=(b+g+p)*m;f>n&&(d=this.lj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.we)p=this.Ab,p>e&&(p=e),this.oj(this.we,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Wb&&null!==this.qb)for(n=0;ne&&(r=e);d+=b;this.oj(this.qb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case ul:a.scale(-1,1);a.translate(-e, 0);break;case tl:a.scale(1,-1);a.translate(0,-f);break;case vl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.oj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==no?no(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==oo?oo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1408,9 +1408,9 @@ metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wb?this.Wb:[t var no=null,oo=null,yo=new E(ih,"None",0),vo=new E(ih,"WrapFit",1),jo=new E(ih,"WrapDesiredSize",2),Ao=new E(ih,"WrapBreakAll",3),io=new E(ih,"OverflowClip",0),so=new E(ih,"OverflowEllipsis",1),ko=new E(ih,"FormatTrim",0),Co=new E(ih,"FormatNone",0),Bo=/[ \u200b\u00ad]/,Do=new ib,Eo=0,Fo=new ib,Go=0,uo="...",po="",ho=null,go=!1;ih.className="TextBlock";ih.getEllipsis=function(){return uo};ih.setEllipsis=function(a){uo=a;Fo=new ib;Go=0};ih.getBaseline=function(){return no}; ih.setBaseline=function(a){no=a};ih.getUnderline=function(){return oo};ih.setUnderline=function(a){oo=a};ih.isValidFont=lo;ih.None=yo;ih.WrapFit=vo;ih.WrapDesiredSize=jo;ih.WrapBreakAll=Ao;ih.OverflowClip=io;ih.OverflowEllipsis=so;function Ho(){this.Wb=[];this.qb=[]}Ho.prototype.reset=function(){this.Wb=[];this.qb=[]};Ho.prototype.vy=function(a){this.Wb=Ja(a.Wb);this.qb=Ja(a.qb)};Ho.className="TextBlockMetrics"; function rk(){O.call(this);this.lh=null;this.nq="";this.Eh=vc;this.Ll=Bd;this.Ih=this.rd=null;this.Kl=Kc;this.Zd=zg;this.Am=null;this.Ho=!1;this.Gl=!0;this.am=!1;this.tm=null}ma(rk,O);rk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.lh;a.nq=this.nq;a.Eh=this.Eh.K();a.Ll=this.Ll;a.Zd=this.Zd;a.rd=this.rd;a.Ih=this.Ih;a.Kl=this.Kl.K();a.Gl=this.Gl;a.tm=this.tm}; -rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ti(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} +rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ui(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} function Ko(a,b){b.wz||(b.qv=function(c){b.ys=!0;b.Eo=!1;var d=b.ih.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.Bg.J(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Og:case sl:p===Og?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===sl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Mf()*b.scale;var q=m*p*n*p,u=h*g/q,y=c.__goCache;p=null;var x=Lo;if(c.ys&&void 0!==y&&4x*x)for(null===y.nj&&(Mo(y,4,k,l,c),Mo(y,16,k,l,c)),k=y.nj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +t.BA=function(a){void 0===a&&(a=Infinity);A(a,"number",V,"findTreeParts:level");var b=new I;ml(b,this,!1,a,!0);return b};V.prototype.collapseTree=function(a){void 0===a&&(a=1);C(a,V,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function tp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);C(a,V,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function vp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Sq():a.Od();k.next();){var l=k.value;l.isTreeLink&&(h||l.Ad||l.Za(),l=l.Xq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.Zh(),g&&e.yk(l,f)),2l&&(n=-n),u= -(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.B(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.B(c,0)?h=0l&&(n=-n),u= +(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.C(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ke(d),this.Hf(f,h),this.ke(e);else{this.ke(d);this.ke(e);h=L.alloc();b.xj(h);k=h.ca(e);p.xj(h);l=h.ca(d);if(k||l)g=b.ja(Np(g),new J),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ja(Np(c),new J),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));L.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Bk();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(y+=Math.abs(B)*(m?1:2)),0===r?q=y:90===r?u=y:180===r?q=-y:270===r?u=-y:(q=y*Math.cos(r*Math.PI/180),u=y*Math.sin(r*Math.PI/180)),g.Sb()&&l&&(y=b.ja(Kc,J.alloc()),x=J.allocAt(y.x+1E3*q,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,x,!0,n),J.free(y),J.free(x));y=this.getLinkPoint(d,e,c,!1,m,a,b);var D=z=x=0;if(m||!k||l){var G=this.computeEndSegmentLength(d,e, c,!1);D=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(D+=m?0:30,0>B&&(D+=180));0>D?D+=360:360<=D&&(D-=360);l&&(G+=Math.abs(B)*(m?1:2));0===D?x=G:90===D?z=G:180===D?x=-G:270===D?z=-G:(x=G*Math.cos(D*Math.PI/180),z=G*Math.sin(D*Math.PI/180));c.Sb()&&l&&(c=e.ja(Kc,J.alloc()),g=J.allocAt(c.x+1E3*x,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),J.free(c),J.free(g))}c=n;if(m||!h||l)c=new J(n.x+q,n.y+u);g=y;if(m||!k||l)g=new J(y.x+x,y.y+z);!p&&!m&&h&&3k?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);K.da(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.O(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case Dp:f=this.i(a);n=this.i(c);if(!f.Wa(b)||!n.Wa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Pc(Vp,Vp);k.Pc(Vp,Vp);h.af(a);k.af(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ca(a)|| h.ca(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yk.bottom&&a.x>k.left&&a.xh.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new J(a.x,Math.min((a.y+c.y)/2,a.y)),m=new J(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, -g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= +Wp(u,a,b,r,d,h,!0);k=Xp(u,r.x,r.y);!u.abort&&k>=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.C(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, +g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.C(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= !0}else b=!1}}}else b=!1;b||(this.ke(l),this.ke(m))}};S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function gk(a){if(null===a.diagram||!a.isAvoiding||!yk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=zk(a.diagram,!0,a.containingGroup,null);for(var d=1;d$p&&Xp(b,m,n)!==l-1&&(Xp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Xp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Xp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Xp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>$p&&Xp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>$p)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ @@ -1662,18 +1662,18 @@ Math.min(h.x,f.x),f.y=Math.min(h.y,f.y);else for(d=3;d=b&&(d=b-1),k= (e=aq(this,e,!1,f)),Td(h,b,c,b,c,e.x,e.y);else if(this.isOrthogonal){f=new J(d,k);e=this.i(1).copy();g=new J(d,k);b=new J(d,k);c=this.i(0);for(var l,m=this.smoothness/3,n=1;ny?q>r?(g.x=x-B,g.y=r-B,b.x=x+u,b.y= r+u):(g.x=x-B,g.y=r+B,b.x=x+u,b.y=r-u):q>r?(g.x=x+B,g.y=r-B,b.x=x-u,b.y=r+u):(g.x=x+B,g.y=r+B,b.x=x-u,b.y=r-u));K.da(y,x)&&K.da(r,q)&&(r>p?(z>x?(g.x=x-B,g.y=r-B,b.x=x+u):(g.x=x+B,g.y=r-B,b.x=x-u),b.y=r+u):(z>x?(g.x=x-B,g.y=r+B,b.x=x+u):(g.x=x+B,g.y=r+B,b.x=x-u),b.y=r-u));if(K.da(y,x)&&K.da(x,z)||K.da(p,r)&&K.da(r,q))y=.5*(y+z),p=.5*(p+q),g.x=y,g.y=p,b.x=y,b.y=p;1===n?(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y)):2===n&&K.da(c.x,this.i(0).x)&&K.da(c.y,this.i(0).y)&&(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y));Td(h,e.x- d,e.y-k,g.x-d,g.y-k,l.x-d,l.y-k);f.set(g);e.set(b);c=l}}f=c.x;c=c.y;e=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(e=aq(this,e.copy(),!1,Mb));f=.5*(f+e.x);c=.5*(c+e.y);Td(h,b.x-d,b.y-k,f-d,c-k,e.x-d,e.y-k)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=aq(this,g.copy(),!1,Mb)),Td(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=J.alloc();f.assign(this.i(0));e=J.alloc();e.assign(f);g=this.computeCorner();n=1;for(l= -0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ -z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.B(f.x,p.x)&&K.B(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.B(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, +0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ +z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.C(f.x,p.x)&&K.C(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.C(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, e,!0,f)),0!==this.computeShortLength(!1)&&(h=aq(this,h,!1,f)),a.type=Gd,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.on=!0;return a};function cq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return K.da(a,0)?b:K.da(b,0)?a:Math.sqrt(a*a+b*b)} function aq(a,b,c,d){var e=a.pointsCount;if(2>e)return b;if(c){var f=a.i(1);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!0);a>e&&(a=e);e=a*(f-b.y)/d;b.x+=a*(c-b.x)/d;b.y+=e}else{f=a.i(e-2);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!1);a>e&&(a=e);e=a*(b.y-f)/d;b.x-=a*(b.x-c)/d;b.y-=e}return b} function bq(a,b,c,d){for(var e=a.pointsCount,f=b;K.da(b.x,f.x)&&K.da(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.da(b.x,f.x)&&!K.da(b.y,f.y))return c-1;for(var g=f;K.da(b.x,f.x)&&K.da(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.da(b.y,f.y)&&K.da(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.i(c++)}return c-2}S.prototype.computeJumpLength=function(){return 10}; -function dq(a,b,c,d,e,f,g){if(!g&&Fp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=eq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.B(e.x,f.x))if(e.yn-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===mg?Pd(b,r,m,!1):Td(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function eq(a,b,c,d){var e=a.diagram;if(null===e||b.A(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ja.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.B(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.B(n,r)&& -K.B(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} -S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ja.j;for(var g=e.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.C(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.C(n,r)&& +K.C(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} +S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ka.j;for(var g=e.length,h=0;hb.Gc?1:a.angleb.angle?1:0}; Qp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Bc,b.fromPort===this.port),d=a.Yq;if(0>d)return c;var e=a.Km;if(1>=e||!b.isOrthogonal)return c;b=a.Cw;var f=a.dr;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ni.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ni.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} -function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Ni.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ni.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ni.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ni.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ni.prototype.workerLayout=function(){return!1}; -function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ni.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; +yl.prototype.copy=function(){var a=new yl;a.oh=this.oh.K();a.Nh=this.Nh.K();a.mh=this.mh;a.Lh=this.Lh;a.nh=this.nh;a.Mh=this.Mh;a.ro=this.ro;a.xq=this.xq;a.so=this.so;a.yq=this.yq;return a};yl.className="LinkSettings";function Oi(){0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Oi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Oi.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} +function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Oi.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Oi.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Oi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Oi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Oi.prototype.workerLayout=function(){return!1}; +function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Oi.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; function yq(a,b){var c=xq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function xq(a){var b=null;if("function"===typeof a){if(b=zq.get(a),!b){var c=Pa(a);b=zq.get(c);b||(b=new Aq,b.Yv=a,b.name=c,b.l=a.name,b.Ry=Bq,zq.set(c,b),zq.set(a,b),zq.set(a.name,b))}}else"string"===typeof a&&(b=zq.get(a));return b} -Ni.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= +Oi.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)Ea("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Tm.get(c.id)){a.Tm.remove(c.id);b.Jt=!1;b.rk=null;if(b.yt)b.yt=!1,b.Kg=null;else{var d=Dq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}vq(b,c.time);c=b.Kg;if(null!==c)b.Kg=null;else for(d=a.Tm.iteratorValues;d.next();){var e=d.value;c=e.Kg;if(null!==c){e.Kg=null;break}}null!==c&&Eq(b,c)}},a.bf.postMessage({_GoJS:"_GoJS", url:a.Ry}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.bf.postMessage({_GoJS:"_GoJS",url:b})}),a.bf.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.rk?this.Kg=this.network:Eq(this,this.network);vq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Eq(a,b){a.Jt=!0;var c=xq(a.constructor),d=Fq(a,b,!0);d._GoJS="_GoJS";c.bf.postMessage(d);c.Tm.set(ob(a),a);a.rk=b} function Fq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?ob(a):a.id,layout:Pa(a.constructor),p:d,DB:e,jA:f};a.onNetworkSerialization(2,c,b,d);return d} function Dq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.DB,g=new Bb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Hb(a.key));null!==b?b=e.zk(b):(b=e.createVertex(),e.Ng(b));c&&null!==a.key&&(b.data={Oi:a.key});g.set(a.id,b)});var h=b.jA,k=new Bb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Gm(f);f.link=b;c&&null!==a.key&&(f.data={Oi:a.key});k.set(a.id, -f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ni.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ni.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){null!==a&&w(a,R,Ni,"diagram");this.C=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Ni,"group"),this.w=a,null!==a&&(this.C=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Ni,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, -enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Ni,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Ni,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Ni,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, -set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Ni,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Ni,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Ni,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, -set:function(a){this.In!==a&&(null!==a&&A(a,"function",Ni,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Ni,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", -Ni,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Ni,"workerStateChanged"),this.Dq=a)}}});Ni.prototype.useWorker=Ni.prototype.kx;Ni.declareWorkerLayout=yq;Ni.prototype.cancelWorker=Ni.prototype.Qz;Ni.prototype.collectParts=Ni.prototype.qy;Ni.prototype.getLayoutBounds=Ni.prototype.yj;Ni.prototype.invalidateLayout=Ni.prototype.D; -var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ni.className="Layout";Ni.GoJSScriptURL=Bq;Ni.declareWorkerLayout=yq; +f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Oi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Oi.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){null!==a&&w(a,R,Oi,"diagram");this.B=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Oi,"group"),this.w=a,null!==a&&(this.B=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Oi,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, +enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Oi,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Oi,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Oi,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, +set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Oi,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Oi,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Oi,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, +set:function(a){this.In!==a&&(null!==a&&A(a,"function",Oi,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Oi,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", +Oi,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Oi,"workerStateChanged"),this.Dq=a)}}});Oi.prototype.useWorker=Oi.prototype.kx;Oi.declareWorkerLayout=yq;Oi.prototype.cancelWorker=Oi.prototype.Qz;Oi.prototype.collectParts=Oi.prototype.qy;Oi.prototype.getLayoutBounds=Oi.prototype.yj;Oi.prototype.invalidateLayout=Oi.prototype.D; +var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Oi.className="Layout";Oi.GoJSScriptURL=Bq;Oi.declareWorkerLayout=yq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=xq(a.layout));var d=null;c&&c.Yv&&(d=new c.Yv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Dq(d,a,!0); d.workerLayout=function(){var a=Fq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Aq(){this.Yv=null;this.Ry=this.l=this.name="";this.scripts=[];this.bf=null;this.Tm=new Bb}function sq(a){eb(this);F&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.qc=a;this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb} sq.prototype.clear=function(){if(this.Ff)for(var a=this.Ff.iterator;a.next();)a.value.clear();if(this.ve)for(a=this.ve.iterator;a.next();)a.value.clear();this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb}; @@ -1795,10 +1795,10 @@ Hq.prototype.serializeEdgeProperties=function(a){a.id=ob(this);a.key=this.link?t Hq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+ob(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ca("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +break;case Qq:e.sort(this.comparer);break;case Sq:e.sort(this.comparer),e.reverse()}var f=this.wrappingColumn;isNaN(f)&&(f=0);var g=this.wrappingWidth;isNaN(g)&&null!==a?(b=a.padding,g=Math.max(a.viewportBounds.width-b.left-b.right,0)):g=Math.max(this.wrappingWidth,0);0>=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ea("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new L(0,u,g+h,x)),y=0,q=r,u+=x,x=0;x=Math.max(x,M);switch(p){case Vq:D=-D.width;break;default:D=0}B.moveTo(q+D,u);switch(p){case Vq:q-=G;break;default:q+=G}y++}d.push(new L(0,u,g+h,x));L.free(l);break;case Oq:k=g;m=f;n=b;p=c;g=L.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=B=0;G=Math.max(this.cellSize.height,1);D=f=0;M=!0;y=J.alloc();for(Y=0;Yn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ii.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ia(a);for(b=this.nodes.iterator;b.next();)b.value.Ia(a);for(b=this.links.iterator;b.next();)b.value.Ia(a)}; -Ii.prototype.xr=function(){for(var a=this.C.model,b=new I,c=a.nodeDataArray,d=0;dn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ji.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ja(a);for(b=this.nodes.iterator;b.next();)b.value.Ja(a);for(b=this.links.iterator;b.next();)b.value.Ja(a)}; +Ji.prototype.xr=function(){for(var a=this.B.model,b=new I,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1911,10 +1911,10 @@ t.dl=function(a){A(a,"function",X,"removeChangedListener:listener");this.pv.remo function Mr(a,b,c,d,e,f,g,h,k){void 0===h&&(h=null);void 0===k&&(k=null);var l=new Be;l.model=a;l.change=c;l.modelChange=b;l.propertyName=d;l.object=e;l.oldValue=f;l.oldParam=h;l.newValue=g;l.newParam=k;a.Mt(l)} X.prototype.changeState=function(a,b){if(null!==a&&a.model===this)if(a.change===Ce){var c=a.object,d=a.propertyName,e=a.J(b);d===this.nodeKeyProperty&&this.$a(c)&&(b=a.J(!b),void 0!==b&&this.bb.remove(b),void 0!==e&&this.bb.add(e,c));ik(c,d,e)}else a.change===Le?(c=a.newParam,"nodeDataArray"===a.modelChange?(a=a.newValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)):(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)))):""===a.modelChange? ((d=a.object)&&!Ha(d)&&a.propertyName&&(d=Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.newValue,b?La(d,c):Ka(d,c,a))):v("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Me?(c=a.oldParam,"nodeDataArray"===a.modelChange?(a=a.oldValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)):(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)))):""===a.modelChange?((d=a.object)&&!Ha(d)&&a.propertyName&&(d= -Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ca=function(a){return this.undoManager.Ca(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; -X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ia=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} +Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ea=function(a){return this.undoManager.Ea(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; +X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ja=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} t.pa=function(a){if(null!==a){var b=this.Yi;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for node data "+a+" is not a number or a string: "+b)}}}; -t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; +t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; t.Qb=function(a){null===a&&v("Model.findNodeDataForKey:key must not be null");return void 0!==a&&lr(a)?this.bb.J(a):null}; t.lu=function(a){if(null!==a){var b=this.Yi;if(""!==b){var c=this.pa(a);if(void 0===c||this.bb.contains(c)){var d=this.bm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.bb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.bb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.bb.count-1;this.bb.contains(c);)c--;ik(a,b,c)}else F&&v("Model.getKeyForNodeData returned something other than a string or a number: "+c)}}}}; t.Gf=function(a){null!==a&&(rb(a),this.$a(a)||dr(this,a,!0))};function dr(a,b,c){var d=a.pa(b);if(void 0===d||a.bb.J(d)!==b)a.lu(b),d=a.pa(b),void 0===d?v("Model.makeNodeDataKeyUnique failed on "+b+". Data not added to Model."):(a.bb.add(d,b),d=null,c&&(d=a.xc.length,Ka(a.xc,d,b)),Mr(a,"nodeDataArray",Le,"nodeDataArray",a,null,b,null,d),a.dn(b),a.cn(b))}t.Hz=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",Le,"",a,null,c,null,b)}; t.Hw=function(a,b){void 0===b&&(b=-1);F&&(Ia(a,X,"removeArrayItem:arr"),C(b,X,"removeArrayItem:idx"));a===this.xc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",Me,"",a,c,null,b,null)};t.Vq=function(a){if(null===a)return"";var b=this.jk;if(""===b)return"";b=Mn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Li(){return new X} +t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Mi(){return new X} function Fr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Fr(a,b.constructor);return typeof b}function Kr(a){return Qr[a]?Qr[a]:void 0!==qa.go&&qa.go[a]?qa.go[a]:null}function Mn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){F&&Ea("property get error: "+d.toString())}return c} function ik(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){F&&Ea("property set error: "+d.toString())}} na.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(A(a,"string",X,"name"),this.va=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Yn},set:function(a){var b=this.Yn;b!==a&&(A(a,"string",X,"dataFormat"),this.Yn=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ia(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, +X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ja(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Hg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Me){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.bc(a),b?(this.mg.add(a),this.fd[c]!==a&&this.fd.splice(c,0,a),void 0!==d&&this.mb.add(d,a)):(this.mg.remove(a),this.fd[c]=== a&&this.fd.splice(c,1),void 0!==d&&this.mb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Nf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Um=function(a){if(void 0!==a){var b=this.Mj;if(null!==b){var c=this.Qb(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Gf(c))}return a}}; t.My=function(a){return jr(this,a,!0)};t.Pw=function(a,b){rr(this,a,b,!0)};t.Py=function(a){return jr(this,a,!1)};t.Uw=function(a,b){rr(this,a,b,!1)};function jr(a,b,c){if(null!==b&&(a=c?a.nf:a.pf,""!==a&&(a=Mn(b,a),void 0!==a))){if(lr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function rr(a,b,c,d){null===c&&(c=void 0);void 0===c||lr(c)||ya(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.nf:a.pf;if(""!==e)if(c=a.Um(c),a.Dc(b)){var f=Mn(b,e);f!==c&&(pr(a,f,b),ik(b,e,c),null===a.Qb(c)&&qr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}}t.Ny=function(a){return ir(this,a,!0)};t.Qw=function(a,b){sr(this,a,b,!0)};t.Qy=function(a){return ir(this,a,!1)}; -t.Vw=function(a,b){sr(this,a,b,!1)};function ir(a,b,c){if(null===b)return"";a=c?a.fk:a.gk;if(""===a)return"";b=Mn(b,a);return void 0===b?"":b}function sr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.fk:a.gk;if(""!==e)if(a.Dc(b)){var f=Mn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}} -t.Nf=function(a){if(null===a)return Vr;var b=this.ge;if(""===b)return Vr;a=Mn(a,b);return void 0===a?Vr:a};t.wu=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ge;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Dc(a)&&(pr(this,b,a),Mr(this,"linkLabelKeys",Me,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c))}else ik(a,c,b)}}; +t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c))}else ik(a,c,b)}}; t.Pg=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&lr(a)?this.mb.J(a):null}; t.er=function(a){if(null!==a){var b=this.Si;if(""!==b){var c=this.bc(a);if(void 0===c||this.mb.contains(c)){var d=this.cm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.mb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.mb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.mb.count-1;this.mb.contains(c);)c--;ik(a,b,c)}else F&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; t.Dc=function(a){return null===a?!1:this.mg.contains(a)};t.mj=function(a){null!==a&&(rb(a),this.Dc(a)||nr(this,a,!0))};function nr(a,b,c){if(""!==a.linkKeyProperty){var d=a.bc(b);if(void 0!==d&&a.mb.J(d)===b)return;a.er(b);d=a.bc(b);if(void 0===d){v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.mb.add(d,b)}a.mg.add(b);d=null;c&&(d=a.fd.length,a.fd.splice(d,0,b));Mr(a,"linkDataArray",Le,"linkDataArray",a,null,b,null,d);Wr(a,b)} @@ -1993,17 +1993,17 @@ t.nB=function(a){if(Array.isArray(a))for(var b=a.length,c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ur;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.M(k));if(k+1>=d.length)break;c.add(d.M(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gthis.Om||Math.abs(a)=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right:B<=n.bounds.x)M= -(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q-1).x,x=b.i(q- -1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]);G=Math.max(10, -this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D=u.centerY,p?180===this.N||0===this.N? -(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++,B,D),b.m(q++,B,D+G)):270===this.N? -(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y),D),b.m(q++,y,z),b.m(q++,B,z)))}null!== -d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right: +B<=n.bounds.x)M=(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q- +1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]); +G=Math.max(10,this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););if(null===u)break;u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D= +u.centerY,p?180===this.N||0===this.N?(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++, +B,D),b.m(q++,B,D+G)):270===this.N?(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y), +D),b.m(q++,y,z),b.m(q++,B,z)))}null!==d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.mdb.md?1:a.Bcb.Bc?1:0:0};t.fz=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0}; -t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; +t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.C=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; t.Gj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ie.length){var d=[];for(var e=0;ee?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(Qe?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(QXa&&(Qu(a,-Xa,0,xa,Aa-1),Ru(D,-Xa,0),Ru(G,-Xa,0),Xa=0)}Ua.V.h(Xa,ca);x=Math.max(x,M);z=Math.max(z,B+(0===T?0:q)+tb.height);Q=M}else{0n&&(caXa&&(Qu(a,0,-Xa,xa,Aa-1),Ru(D,0,-Xa),Ru(G,0,-Xa),Xa=0);Ua.V.h(Q,Xa);z=Math.max(z,Y);x=Math.max(x,B+(0===T?0:q)+tb.width);ca=Y}P++}0l&&(l=0),135u&&(u=0),k===vu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>x&&(x=Wu(k,d-x,0),g=x.x,h=x.y,x=d,l=0):x=Uu(a,x,l),0>l&&(g-=l,l=0),135z&&(z=Wu(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=Vu(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(l+d,0),T[1].h(T[0].x,y),T[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(0,u+y),T[1].h(d,T[0].y),T[2].xd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yn&&(n=0),135x&&(x=0));b.la.h(n,x);b.Ba.h(B,D)}} -function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Ba.width,e=a.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), +1].V.y+e[g-1].la.y+2*e[g-1].focus.y-l)/2-b.focus.y-q/2);break;case Gu:c?(n-=q,B+=q):(x-=q,D+=q);break;case Hu:c?(n+=B-b.width+q,B+=q):(x+=D-b.height+q,D+=q);break;case tu:case ju:c?1n&&(n=0),135x&&(x=0));b.la.h(n,x);b.Da.h(B,D)}} +function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Da.width,e=a.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), 0>b.V.x&&(c=$u(a,b.V.x,!1,c,g))):(b.V.h(d+h,c+g/2-b.focus.y-b.la.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.la.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.V.y&&(c=$u(a,b.V.y,!0,c,g))));return new L(c,0,d,e)} -function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Ba.width,e=b.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Da.width,e=b.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.V.x&&(c=$u(a,h.V.x,!1,c,g))):(h.V.h(-d-l.width-q,c+g/2-h.focus.y-h.la.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.la.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.V.y&&(c=$u(a,h.V.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case Gu:return a.width>b?a.width:b;case Hu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case tu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case uu:return a.width-a.focus.x+a.nodeSpacing/2+b;case vu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Vu(a,b,c){F&&w(a,Yt,Z,"calculateSubheight:v");switch(a.alignment){case Tu:case Su:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Gu:return a.height>b?a.height:b;case Hu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case tu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case uu:return a.height-a.focus.y+a.nodeSpacing/2+b;case vu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Wu(a,b,c){F&&w(a,E,Z,"alignOffset:align");switch(a){case Su:b/=2;c/=2;break;case Tu:b/=2;c/=2;break;case Gu:c=b=0;break;case Hu:break;default:v("Unhandled alignment value "+a.toString())}return new J(b,c)}function Nu(a,b,c,d,e,f){F&&w(a,Yt,Z,"shiftRelPosAlign:v");F&&w(b,E,Z,"shiftRelPosAlign:align");b=Wu(b,c,d);Qu(a,b.x,b.y,e,f)}function Qu(a,b,c,d,e){F&&w(a,Yt,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].V;f.x+=b;f.y+=c}} function Ou(a,b,c,d){F&&(w(b,Yt,Z,"recordMidPoints:v"),A(c,"number",Z,"recordMidPoints:x"),A(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.qd){case Tt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case $t:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.qd.toString())}}function Ru(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c= +function Pu(a,b,c,d,e,f,g,h){F&&w(b,Yt,Z,"mergeFringes:parent");F&&w(c,Yt,Z,"mergeFringes:child");var k=Fu(b),l=90===k||270===k,m=b.nodeSpacing;b=d;var n=e;d=f;var p=g,r=c.cr,q=c.qr;g=c.Da;var u=l?Math.max(p,g.height):Math.max(d,g.width);if(null===r||k!==Fu(c))r=Mu(a,2),q=Mu(a,2),l?(r[0].h(0,0),r[1].h(0,g.height),q[0].h(g.width,0),q[1].h(q[0].x,r[1].y)):(r[0].h(0,0),r[1].h(g.width,0),q[0].h(0,g.height),q[1].h(r[1].x,q[0].y));if(l){p=9999999;if(!(null===n||2>n.length||null===r||2>r.length))for(e=c= 0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Mu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Mu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Mu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, k.y);f=Mu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Mu(a,e);for(c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Ju(c))))):c.alignment===Gu?(e=d.top+b.y,0===b.y&&m.y * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go-debug.js b/release/go-debug.js index e476c8f36..39cebd19b 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,8 +1,8 @@ /* - * GoJS v2.1.53 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.1.54 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.53/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.54/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;ga&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.G=a*b-d*c;this.H=d*b+a*c;return this};t=J.prototype; t.scale=function(a,b){F&&(C(a,J,"scale:sx"),C(b,J,"scale:sy"),this.ha());this.G*=a;this.H*=b;return this};t.Ve=function(a){F&&w(a,J,J,"distanceSquaredPoint:p");var b=a.x-this.G;a=a.y-this.H;return b*b+a*a};t.wd=function(a,b){F&&(C(a,J,"distanceSquared:px"),C(b,J,"distanceSquared:py"));a-=this.G;b-=this.H;return a*a+b*b};t.normalize=function(){F&&this.ha();var a=this.G,b=this.H,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} @@ -112,7 +112,7 @@ J.distanceSquared=Jb;J.direction=Kb;function Fb(a,b){void 0===a?this.ea=this.fa= Fb.prototype.Ug=function(a,b){F&&(A(a,"number",Fb,"setTo:w"),A(b,"number",Fb,"setTo:h"),0>a&&za(a,">= 0",Fb,"setTo:w"),0>b&&za(b,">= 0",Fb,"setTo:h"),this.ha());this.fa=a;this.ea=b;return this};Fb.prototype.set=function(a){F&&(w(a,Fb,Fb,"set:s"),this.ha());this.fa=a.fa;this.ea=a.ea;return this};Fb.prototype.copy=function(){var a=new Fb;a.fa=this.fa;a.ea=this.ea;return a};t=Fb.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function $b(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Fb(c,e)}return new Fb}function ac(a){F&&w(a,Fb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.A=function(a){return a instanceof Fb?this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b){return this.fa===a&&this.ea===b}; -t.Wa=function(a){return K.B(this.fa,a.width)&&K.B(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; +t.Wa=function(a){return K.C(this.fa,a.width)&&K.C(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; na.Object.defineProperties(Fb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){F&&(A(a,"number",Fb,"width"),this.ha(a));0>a&&za(a,">= 0",Fb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea},set:function(a){F&&(A(a,"number",Fb,"height"),this.ha(a));0>a&&za(a,">= 0",Fb,"height");this.ea=a}}});Fb.prototype.isReal=Fb.prototype.o;Fb.prototype.equalsApprox=Fb.prototype.Wa;Fb.prototype.equalTo=Fb.prototype.qj; Fb.prototype.equals=Fb.prototype.A;Fb.prototype.set=Fb.prototype.set;Fb.prototype.setTo=Fb.prototype.Ug;var bc=[];Fb.className="Size";Fb.parse=$b;Fb.stringify=ac;Fb.ZeroSize=Rb=(new Fb(0,0)).ia();Fb.OneSize=Sb=(new Fb(1,1)).ia();Fb.SixSize=Tb=(new Fb(6,6)).ia();Fb.EightSize=Ub=(new Fb(8,8)).ia();Fb.TenSize=Vb=(new Fb(10,10)).ia();Fb.InfiniteSize=Wb=(new Fb(Infinity,Infinity)).ia();Fb.NoSize=Zb=(new Fb(NaN,NaN)).ia();Fb.parse=$b;Fb.stringify=ac; function L(a,b,c,d){void 0===a?this.ea=this.fa=this.H=this.G=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.G=Math.min(c,d),this.H=Math.min(a,b),this.fa=Math.abs(c-d),this.ea=Math.abs(a-b)):b instanceof Fb?(this.G=c,this.H=a,this.fa=b.width,this.ea=b.height):v("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.G=a,this.H=b,this.fa=c,this.ea=d):v("Invalid arguments to Rect constructor: "+ @@ -120,7 +120,7 @@ a+", "+b+", "+c+", "+d);this.s=!1}t=L.prototype;t.assign=function(a){this.G=a.G; t.set=function(a){F&&(w(a,L,L,"set:r"),this.ha());this.G=a.G;this.H=a.H;this.fa=a.fa;this.ea=a.ea;return this};t.Wc=function(a){F&&(w(a,J,L,"setPoint:p"),this.ha());this.G=a.x;this.H=a.y;return this};t.vB=function(a){F&&(w(a,Fb,L,"setSize:s"),this.ha());this.fa=a.width;this.ea=a.height;return this};L.prototype.copy=function(){var a=new L;a.G=this.G;a.H=this.H;a.fa=this.fa;a.ea=this.ea;return a};t=L.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function dc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new L(c,e,f,g)}return new L}function ec(a){F&&w(a,L);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.B(this.G,a.x)&&K.B(this.H,a.y)&&K.B(this.fa,a.width)&&K.B(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.C(this.G,a.x)&&K.C(this.H,a.y)&&K.C(this.fa,a.width)&&K.C(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} t.ca=function(a){F&&w(a,J,L,"containsPoint:p");return this.G<=a.x&&this.G+this.fa>=a.x&&this.H<=a.y&&this.H+this.ea>=a.y};t.Te=function(a){F&&w(a,L,L,"containsRect:r");return this.G<=a.x&&a.x+a.width<=this.G+this.fa&&this.H<=a.y&&a.y+a.height<=this.H+this.ea}; t.contains=function(a,b,c,d){F?(C(a,L,"contains:x"),C(b,L,"contains:y"),void 0===c?c=0:C(c,L,"contains:w"),void 0===d?d=0:C(d,L,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.G<=a&&a+c<=this.G+this.fa&&this.H<=b&&b+d<=this.H+this.ea};t.offset=function(a,b){F&&(C(a,L,"offset:dx"),C(b,L,"offset:dy"),this.ha());this.G+=a;this.H+=b;return this}; t.Pc=function(a,b){F&&(C(a,L,"inflate:w"),C(b,L,"inflate:h"));return gc(this,b,a,b,a)};t.Hq=function(a){F&&w(a,hc,L,"addMargin:m");return gc(this,a.top,a.right,a.bottom,a.left)};t.Xw=function(a){F&&w(a,hc,L,"subtractMargin:m");return gc(this,-a.top,-a.right,-a.bottom,-a.left)};t.MA=function(a,b,c,d){F&&(C(a,L,"grow:t"),C(b,L,"grow:r"),C(c,L,"grow:b"),C(d,L,"grow:l"));return gc(this,a,b,c,d)}; @@ -145,7 +145,7 @@ hc.prototype.Ug=function(a,b,c,d){F&&(A(a,"number",hc,"setTo:t"),A(b,"number",hc t.ia=function(){this.s=!0;Object.freeze(this);return this};t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function wc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new hc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new hc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new hc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new hc(c,e):new hc(c,e,f,g)}return new hc} function xc(a){F&&w(a,hc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.A=function(a){return a instanceof hc?this.Qe===a.top&&this.Oe===a.right&&this.se===a.bottom&&this.Fe===a.left:!1};t.qj=function(a,b,c,d){return this.Qe===a&&this.Oe===b&&this.se===c&&this.Fe===d}; -t.Wa=function(a){return K.B(this.Qe,a.top)&&K.B(this.Oe,a.right)&&K.B(this.se,a.bottom)&&K.B(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; +t.Wa=function(a){return K.C(this.Qe,a.top)&&K.C(this.Oe,a.right)&&K.C(this.se,a.bottom)&&K.C(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; na.Object.defineProperties(hc.prototype,{top:{configurable:!0,get:function(){return this.Qe},set:function(a){F&&(C(a,hc,"top"),this.ha(a));this.Qe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){F&&(C(a,hc,"right"),this.ha(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.se},set:function(a){F&&(C(a,hc,"bottom"),this.ha(a));this.se=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){F&& (C(a,hc,"left"),this.ha(a));this.Fe=a}}});hc.prototype.isReal=hc.prototype.o;hc.prototype.equalsApprox=hc.prototype.Wa;hc.prototype.equalTo=hc.prototype.qj;hc.prototype.equals=hc.prototype.A;hc.prototype.set=hc.prototype.set;hc.prototype.setTo=hc.prototype.Ug;var zc=null,Ac=null,yc=[];hc.className="Margin";hc.parse=wc;hc.stringify=xc;hc.ZeroMargin=zc=(new hc(0,0,0,0)).ia();hc.TwoMargin=Ac=(new hc(2,2,2,2)).ia();hc.parse=wc;hc.stringify=xc; function N(a,b,c,d){void 0===a?this.ie=this.he=this.H=this.G=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.s=!1}var Bc,Ec,Fc,Gc,Hc,Kc,Lc,Mc,Nc,Oc,Pc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,ad,bd,cd,dd,ed,fd,gd,hd,kd,ld,md,nd,od,pd,qd,rd;N.prototype.assign=function(a){this.G=a.G;this.H=a.H;this.he=a.he;this.ie=a.ie;return this}; @@ -175,7 +175,7 @@ t.Pd=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=a.x,d=a.y;retur t.ex=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,r=d*f+c*h+l,q=d*g+c*k+m;c=b*f+e*h+l;b=b*g+e*k+m;f=d*f+e*h+l;d=d*g+e*k+m;e=Math.min(n,r);n=Math.max(n,r);r=Math.min(p,q);p=Math.max(p,q);e=Math.min(e,c);n=Math.max(n,c);r=Math.min(r,b);p=Math.max(p,b);e=Math.min(e,f);n=Math.max(n,f);r=Math.min(r,d);p=Math.max(p,d);a.h(e,r,n-e,p-r);return a};Gb.alloc=function(){var a=yd.pop();return void 0===a?new Gb:a}; Gb.free=function(a){yd.push(a)};Gb.prototype.transformRect=Gb.prototype.ex;Gb.prototype.transformPoint=Gb.prototype.Aa;Gb.prototype.scale=Gb.prototype.scale;Gb.prototype.translate=Gb.prototype.translate;Gb.prototype.rotate=Gb.prototype.rotate;Gb.prototype.invert=Gb.prototype.eu;Gb.prototype.multiplyInverted=Gb.prototype.xw;Gb.prototype.multiply=Gb.prototype.multiply;Gb.prototype.reset=Gb.prototype.reset;Gb.prototype.isIdentity=Gb.prototype.gu;Gb.prototype.equals=Gb.prototype.A;Gb.prototype.set=Gb.prototype.set; var yd=[];Gb.className="Transform";Gb.xF="54a702f3e53909c447824c6706603faf4c"; -var K={FB:"7da71ca0ad381e90",Wg:(Math.sqrt(2)-1)/3*4,yx:null,sqrt:function(a){if(0>=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Lt:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Tb(a,b,g,h,n,c,d)&&K.Tb(a,b,g,h,n,e,f))return K.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var y=(d+q)/2,x=(c+u)/2;return K.Lt(a, b,p,r,d,c,y,x,k,l,m,n)||K.Lt(y,x,q,u,e,f,g,h,k,l,m,n)},Pz:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Oz:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Kb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Im:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))kc(l,a,b,0,0),kc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ 2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Im(a,b,m,n,d,c,q,u,k,l);K.Im(q,u,p,r,e,f,g,h,k,l)}return l},Se:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Se(a,b,m,n,d,c,q,u,k,l);K.Se(q,u,p,r,e,f,g,h,k,l)}return l},Ew:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,e,f,l,c,d))return K.Tb(a, @@ -183,7 +183,7 @@ b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2 h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;K.ir(a,b,k,l,m,n,g,h);K.ir(m,n,c,d,e,f,g,h)}return h},Jq:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(K.Tb(a,b,g,h,p,c,d)&&K.Tb(a,b,g,h,p,e,f)){if(!K.Qm(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/ 2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2,D=Infinity,G=!1,M=0,Y=0;K.Jq(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(bb)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2;r+=K.Kq(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=K.Kq(z,B,y,x,e,f,g,h,k,l,m,n,p)}return r},ai:function(a,b,c,d,e,f,g){if(K.da(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.da(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; +d=c;if(ea)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; k.h(a,c);return!0}g=(d-b)/(c-a);if(K.da(h,g))return K.ai(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.da(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.ai(a,b,c,d,e,g*(e-a)+b,k)},NB:function(a,b,c,d,e){return K.Ze(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},MB:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Of:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ze(a,b,a,d,e,f, g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},LB:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a,h=(f- @@ -195,8 +195,8 @@ m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Ma function zd(a){F&&1a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Kd:var b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+ " "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ld:b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ad:b="";c=this.figures.j;for(var d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.aj=0,F&&C(d,we,"x1"),this.bj=Math.max(d,0),F&&C(e,we,"y1"),this.Bh=Math.max(e,0),this.Yl="boolean"===typeof g?g:"number"===typeof g?!!g:!1,this.ql=!!h):(F&&C(d,we,"x1"),this.Ne=d, F&&C(e,we,"y1"),this.aj=e,F&&C(f,we,"x2"),a===ne&&(f=Math.max(f,0)),this.bj=f,"number"===typeof g?(a===ne&&(g=Math.max(g,0)),this.Bh=g):this.Bh=0,this.ql=this.Yl=!1);this.$j=!1;this.xa=!0;this.Wd=null}we.prototype.copy=function(){var a=new we;a.sa=this.sa;a.nc=this.nc;a.tc=this.tc;a.Ne=this.Ne;a.aj=this.aj;a.bj=this.bj;a.Bh=this.Bh;a.Yl=this.Yl;a.ql=this.ql;a.$j=this.$j;a.xa=this.xa;return a};t=we.prototype; -t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case le:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y)&&K.B(this.point2X,a.point2X)&&K.B(this.point2Y,a.point2Y);case me:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y);case ne:return K.B(this.startAngle, -a.startAngle)&&K.B(this.sweepAngle,a.sweepAngle)&&K.B(this.centerX,a.centerX)&&K.B(this.centerY,a.centerY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.B(this.xAxisRotation,a.xAxisRotation)&&K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; +t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY);case le:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y)&&K.C(this.point2X,a.point2X)&&K.C(this.point2Y,a.point2Y);case me:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y);case ne:return K.C(this.startAngle, +a.startAngle)&&K.C(this.sweepAngle,a.sweepAngle)&&K.C(this.centerX,a.centerX)&&K.C(this.centerY,a.centerY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.C(this.xAxisRotation,a.xAxisRotation)&&K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case ke:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Id:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case le:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case me:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ne:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case oe:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ @@ -264,26 +264,26 @@ a;this.xa=!0}},point2Y:{configurable:!0,get:function(){return this.Bh},set:funct get:function(){return this.bj},set:function(a){F&&C(a,we,"radiusX");0>a&&za(a,">= zero",we,"radiusX");this.s&&va(this,a);this.bj=a;this.xa=!0}},radiusY:{configurable:!0,get:function(){return this.Bh},set:function(a){F&&C(a,we,"radiusY");0>a&&za(a,">= zero",we,"radiusY");this.s&&va(this,a);this.Bh=a;this.xa=!0}},startAngle:{configurable:!0,get:function(){return this.nc},set:function(a){this.nc!==a&&(this.s&&va(this,a),F&&C(a,we,"startAngle"),a%=360,0>a&&(a+=360),this.nc= a,this.xa=!0)}},sweepAngle:{configurable:!0,get:function(){return this.tc},set:function(a){F&&C(a,we,"sweepAngle");this.s&&va(this,a);360a&&(a=-360);this.tc=a;this.xa=!0}},isClockwiseArc:{configurable:!0,get:function(){return this.ql},set:function(a){this.s&&va(this,a);this.ql=a;this.xa=!0}},isLargeArc:{configurable:!0,get:function(){return this.Yl},set:function(a){this.s&&va(this,a);this.Yl=a;this.xa=!0}},xAxisRotation:{configurable:!0, get:function(){return this.Ne},set:function(a){F&&C(a,we,"xAxisRotation");a%=360;0>a&&(a+=360);this.s&&va(this,a);this.Ne=a;this.xa=!0}}});we.prototype.equalsApprox=we.prototype.Wa;var ke=new E(we,"Move",0),Id=new E(we,"Line",1),le=new E(we,"Bezier",2),me=new E(we,"QuadraticBezier",3),ne=new E(we,"Arc",4),oe=new E(we,"SvgArc",4);we.className="PathSegment";we.Move=ke;we.Line=Id;we.Bezier=le;we.QuadraticBezier=me;we.Arc=ne;we.SvgArc=oe; -function ye(){this.C=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; -ye.prototype.clone=function(a){a.C=this.C;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; +function ye(){this.B=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; +ye.prototype.clone=function(a){a.B=this.B;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; ye.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};ye.prototype.Wq=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);return b}; ye.prototype.GA=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);b.assign(c.Bu(b));return b}; -na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= +na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= a}},button:{configurable:!0,get:function(){return this.Lr},set:function(a){this.Lr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.Mr},set:function(a){this.Mr=a}},key:{configurable:!0,get:function(){return this.Oi},set:function(a){this.Oi=a}},down:{configurable:!0,get:function(){return this.fs},set:function(a){this.fs=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ft},set:function(a){this.Ft=a}},clickCount:{configurable:!0,get:function(){return this.Or},set:function(a){this.Or=a}},delta:{configurable:!0,get:function(){return this.cs},set:function(a){this.cs=a}},isMultiTouch:{configurable:!0,get:function(){return this.zs},set:function(a){this.zs=a}},handled:{configurable:!0,get:function(){return this.ps},set:function(a){this.ps=a}},bubbles:{configurable:!0, get:function(){return this.ah},set:function(a){this.ah=a}},event:{configurable:!0,get:function(){return this.ls},set:function(a){this.ls=a}},isTouchEvent:{configurable:!0,get:function(){var a=qa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=qa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.At},set:function(a){this.At=a}},targetDiagram:{configurable:!0, get:function(){return this.zt},set:function(a){this.zt=a}},targetObject:{configurable:!0,get:function(){return this.vd},set:function(a){this.vd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons& -4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.C=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.C=this.C;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; +4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.B=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.B=this.B;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; Ae.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; -function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}; -Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.C=this.C;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; +na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; +function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}; +Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.B=this.B;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; Be.prototype.toString=function(){var a="";a=this.change===De?a+"* ":this.change===Ce?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===De?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qa(this.object)),null!==this.oldValue&&(a+=" old: "+Qa(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Qa(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};Be.prototype.J=function(a){return a?this.oldValue:this.newValue};Be.prototype.IA=function(a){return a?this.oldParam:this.newParam};Be.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; Be.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};Be.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};Be.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, +na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, enumerable:!0,get:function(){return this.uf},set:function(a){F&&"string"!==typeof a&&A(a,"function",Be,"propertyName");this.uf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Jn===De&&("CommittedTransaction"===this.uf||"FinishedUndo"===this.uf||"FinishedRedo"===this.uf)}},object:{configurable:!0,get:function(){return this.Bp},set:function(a){this.Bp=a}},oldValue:{configurable:!0,get:function(){return this.Dp},set:function(a){this.Dp= a}},oldParam:{configurable:!0,get:function(){return this.Cp},set:function(a){this.Cp=a}},newValue:{configurable:!0,get:function(){return this.wp},set:function(a){this.wp=a}},newParam:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}}});Be.prototype.redo=Be.prototype.redo;Be.prototype.canRedo=Be.prototype.canRedo;Be.prototype.undo=Be.prototype.undo;Be.prototype.canUndo=Be.prototype.canUndo;Be.prototype.getParam=Be.prototype.IA; Be.prototype.getValue=Be.prototype.J;Be.prototype.clear=Be.prototype.clear;var De=new E(Be,"Transaction",-1),Ce=new E(Be,"Property",0),Le=new E(Be,"Insert",1),Me=new E(Be,"Remove",2);Be.className="ChangedEvent";Be.Transaction=De;Be.Property=Ce;Be.Insert=Le;Be.Remove=Me;function Ne(){this.w=(new H).freeze();this.va="";this.l=!1} @@ -294,7 +294,7 @@ na.Object.defineProperties(Ne.prototype,{changes:{configurable:!0,get:function() Ne.prototype.clear=Ne.prototype.clear;Ne.className="Transaction";function Oe(){this.tv=new I;this.sd=!1;this.L=(new H).freeze();this.ce=-1;this.w=999;this.Ce=!1;this.Zr=null;this.ij=0;this.l=!1;F&&(this.l=!0);this.Je=(new H).freeze();this.fm=new H;this.cv=!0;this.iv=this.xs=this.mv=this.lv=!1} Oe.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Ea("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Gb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.M(d),null!==f&&f.clear(),b.jb(d),a.xs=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.M(0),null!==f&&f.clear(),b.jb(0),a.ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.ce++);b.freeze()}a.isInternalTransaction||a.Gb("CommittedTransaction",c,e)}else{a.Ce=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -306,12 +306,12 @@ Oe.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Oe.prototype,{models:{configurable:!0,get:function(){return this.tv.iterator}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){this.sd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||v (e*=a.scrollHorizontalLineChange/16,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", -Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ca;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} +na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", +Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ea;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} ma(Ta,Qe);Ta.prototype.initializeStandardTools=function(){};Ta.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ve&&this.Yr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ta.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Xe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ye){b.bubbles=!0;return}if(this.gestureBehavior===Xe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;F&&c.checksTransactionLevel&&0!==c.transactionLevel&&Ea("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;L.free(f); f=a.vt;g=new Bb;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.J(l),null!==m&&(m.points=l.points,Df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Jd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.J(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ya(),g.add(k,a.Jd(h))));J.free(h);a.copiedParts=g;kf(a,g.Wf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,Df(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -420,7 +420,7 @@ enumerable:!0,get:function(){return this.Pa},set:function(a){A(a,"boolean",Tf,"i get:function(){return this.Ar},set:function(a){null!==a&&A(a,"function",Tf,"portTargeted");this.Ar=a}}});Tf.className="LinkingBaseTool";function hg(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ca(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ea(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= this.computeMinSize(),this.Zu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.od();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Ta();this.transactionResult=this.name;a.U("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -492,7 +492,7 @@ set:function(a){w(a,J,vg,"oppositePoint");this.Us.A(a)||this.Us.assign(a)}},orig function Pg(){0c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.ja(b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.bt=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Pg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Pg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; @@ -508,7 +508,7 @@ Rg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Rg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.il;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Rg.prototype.doStop=function(){this.il=null};Rg.className="ActionTool";function Sg(){Qe.call(this);0a.lastInput.clickCount?!1:!0};hh.prototype.doStart=function(){rh=this;null!==this.textBlock&&this.doActivate()}; hh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ac(a.lastInput.documentPoint));if(null!==b&&b instanceof ih&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.oa=oh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Kh=this.textBlock.copy();var d=new L(this.textBlock.ja(Ec),this.textBlock.ja(Oc));a.Ow(d);c.show(b,a,this);this.currentTextEditor=c}}}};hh.prototype.doCancel=function(){this.stopTool()}; hh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};hh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(sh)};hh.prototype.acceptText=function(a){switch(a){case sh:if(this.oa===uh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this);break;case xh:case mh:case nh:if(mh!==a||!0!==this.textBlock.isMultiline)if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this)}}; -function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ca(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} +function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ea(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} hh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};hh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};hh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.oa=kh,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};hh.prototype.doStop=function(){rh=null}; hh.prototype.isValidText=function(a,b,c){w(a,ih,hh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};hh.prototype.Zy=function(a){var b=this.Kh;b.text=a;b.measure(this.textBlock.Pi,Infinity);return b}; na.Object.defineProperties(hh.prototype,{textBlock:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,ih,hh,"textBlock");this.Qa=a}},currentTextEditor:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}},defaultTextEditor:{configurable:!0,get:function(){return this.l},set:function(a){!F||a instanceof ef||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.l=a}},starting:{configurable:!0, @@ -562,169 +562,169 @@ get:function(){return this.Pa},set:function(a){gb(a,hh,hh,"starting");this.Pa=a} "boolean",hh,"selectsTextOnActivate");this.W=a}},state:{configurable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(gb(a,hh,hh,"starting"),this.oa=a)}}});hh.prototype.measureTemporaryTextBlock=hh.prototype.Zy; var xh=new E(hh,"LostFocus",0),sh=new E(hh,"MouseDown",1),nh=new E(hh,"Tab",2),mh=new E(hh,"Enter",3),yh=new E(hh,"SingleClick",0),jh=new E(hh,"SingleClickSelected",1),th=new E(hh,"DoubleClick",2),kh=new E(hh,"StateNone",0),oh=new E(hh,"StateActive",1),ph=new E(hh,"StateEditing",2),vh=new E(hh,"StateValidating",3),qh=new E(hh,"StateInvalid",4),uh=new E(hh,"StateValidated",5),rh=null;hh.className="TextEditingTool";hh.LostFocus=xh;hh.MouseDown=sh;hh.Tab=nh;hh.Enter=mh;hh.SingleClick=yh; hh.SingleClickSelected=jh;hh.DoubleClick=th;hh.StateNone=kh;hh.StateActive=oh;hh.StateEditing=ph;hh.StateValidating=vh;hh.StateInvalid=qh;hh.StateValidated=uh;Sa("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.fb("TextEditing",a,this.mouseUpTools)}); -function zh(){Ah||(Bh(),Ah=!0);this.C=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.C=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} -function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();return a.yc=!0} -function Gh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.C,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Hh&&b.rc.clear(),a.gy=a.Nl===Ih&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Jh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), -qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Lh(c),a.yc=!1,a.sf=!1,b.start(),Mh(a),c.Ta(),Nh(b,0),Rf(c,!0),Oh(a),c.U("AnimationStarting",a))}))}}function ai(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; -function bi(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function zh(){Ah||(Bh(),Ah=!0);this.B=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.B=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} +function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();Gh(a.B);return a.yc=!0} +function Hh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.B,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Ih&&b.rc.clear(),a.gy=a.Nl===Jh&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Kh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Lh&&null!==d&&(delete d.start.scale,delete d.end.scale), +qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Mh(c),a.yc=!1,a.sf=!1,b.start(),Nh(a),c.Ta(),Oh(b,0),Rf(c,!0),ai(a),c.U("AnimationStarting",a))}))}}function bi(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; +function ci(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function Bh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new Bb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&za(a,">= 1",zh,"duration");this.kh=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.pc}},isTicking:{configurable:!0,get:function(){return this.Cs}},isInitial:{configurable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",zh,"isInitial");this.Ki=a}},defaultAnimation:{configurable:!0,get:function(){return this.Xd}},activeAnimations:{configurable:!0,get:function(){return this.Kj}},initialAnimationStyle:{configurable:!0,get:function(){return this.Nl},set:function(a){F&& -gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ii=null,Ah=!1,Ch=new E(zh,"Default",1),Ih=new E(zh,"AnimateLocations",2),Hh=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ii.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Ih;zh.None=Hh; -function Dh(){this.Kv=this.by=this.$c=this.C=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ji;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=ki}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;ci(this,!0);Mh(this.$c);Rf(this.C);Oh(this.$c);this.C.redraw()}; -function Jh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} -function Nh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ii,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; -t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.C,c=this.$c;this.Vl=this.pc=c.Ml=!1;Mh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ii;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);Oh(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Jh(this,null),c.Lm(this),b.Jb())}}; +gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ji=null,Ah=!1,Ch=new E(zh,"Default",1),Jh=new E(zh,"AnimateLocations",2),Ih=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ji.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Jh;zh.None=Ih; +function Dh(){this.Kv=this.by=this.$c=this.B=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ki;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=li}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;di(this,!0);Nh(this.$c);Rf(this.B);ai(this.$c);this.B.redraw()}; +function Kh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} +function Oh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ji,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; +t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.B,c=this.$c;this.Vl=this.pc=c.Ml=!1;Nh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ji;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);ai(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Kh(this,null),c.Lm(this),b.Jb())}}; t.yk=function(a,b){var c=b.actualBounds,d=null;b instanceof If&&(d=b.placeholder);null!==d?(c=d.ja(Ec),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof If)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.yk(d,b)}; t.wk=function(a,b){if(a.isVisible()){var c=null;b instanceof If&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.J(a).Gw=!0);if(a instanceof If)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.wk(c,b)}};t.JA=function(a){var b=this.vv.get(a);null===b&&(b={},this.vv.add(a,b));return b}; na.Object.defineProperties(Dh.prototype,{duration:{configurable:!0,get:function(){return this.kh},set:function(a){A(a,"number",Dh,"duration");1>a&&za(a,">= 1",Dh,"duration");this.kh=a}},reversible:{configurable:!0,get:function(){return this.Sp},set:function(a){this.Sp=a}},runCount:{configurable:!0,get:function(){return this.Av},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function li(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ji;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=li; -function ri(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}ri.className="AnimationState";function si(a,b,c){this.vd=null;this.uf=a;this.qq=c||ti;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=ui))}si.prototype.copy=function(){var a=new si(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; -function vi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -na.Object.defineProperties(si.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,si,si,"startCondition");this.qq=a}}});var ti=new E(si,"Default",1),ui=new E(si,"Immediate",2),wi=new E(si,"Bundled",3);si.className="AnimationTrigger"; -si.Default=ti;si.Immediate=ui;si.Bundled=wi;function xi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ja.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function mi(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ki;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=mi; +function si(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}si.className="AnimationState";function ti(a,b,c){this.vd=null;this.uf=a;this.qq=c||ui;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=vi))}ti.prototype.copy=function(){var a=new ti(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; +function wi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} +na.Object.defineProperties(ti.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,ti,ti,"startCondition");this.qq=a}}});var ui=new E(ti,"Default",1),vi=new E(ti,"Immediate",2),xi=new E(ti,"Bundled",3);ti.className="AnimationTrigger"; +ti.Default=ui;ti.Immediate=vi;ti.Bundled=xi;function yi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ka.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0c.kp||h.height*e>c.kp?b.sc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Ai(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Ai(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Ai(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ja;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Bi(this,a,b);return a}; -t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ja;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; -function Bi(a,b,c){b=Ci(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ja.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Bi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Bi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Bi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ka;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Ci(this,a,b);return a}; +t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ka;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; +function Ci(a,b,c){b=Di(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ka.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< e&&(k=a.M(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(xi.prototype,{parts:{configurable:!0,get:function(){return this.Ja.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ja.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.C}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",xi,"name");var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ja.iterator;a.next();)a.value.layerName=this.va}}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",xi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.Ra.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Xi(a){var b=a.Da.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, +function Yi(a){var b=a.Fa.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, "mouseout",a.Uk,!1)),a.addEventListener(b,"mouseenter",a.eA,!1),a.addEventListener(b,"mouseleave",a.fA,!1),a.addEventListener(b,"wheel",a.Wk,!1),a.addEventListener(b,"keydown",a.VA,!1),a.addEventListener(b,"keyup",a.WA,!1),a.addEventListener(b,"blur",a.Rz,!1),a.addEventListener(b,"focus",a.Sz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Da.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Fa/e.width*e.left,b.pageY-qa.scrollY-a.Ea/e.height*e.top); +Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Fa.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Ca/e.width*e.left,b.pageY-qa.scrollY-a.Ba/e.height*e.top); c=a.hm*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(qa,"resize",a.mx,!1))}function lf(a){30p&&(this.position=q.h(-(this.kt.scrollWidth-this.Fa)+u-this.Fa/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.kt.scrollHeight-this.Ea)+a.scrollTop-this.Ea/c+d))),J.free(q),ij(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.kt.scrollWidth-this.Ca)+u-this.Ca/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.kt.scrollHeight-this.Ba)+a.scrollTop-this.Ba/c+d))),J.free(q),jj(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.dj;this.dj=ki;this.scale=mj(this,qj);a!==ki&&(lj(this,!1),nj(this,this.documentBounds,this.Fa/this.Ga,this.Ea/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; -t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Fa;var f=this.Ea;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function mj(a,b){var c=a.co;if(null===a.Fa)return c;a.Ya();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.Ca+(a.kf?a.wb:0),g=a.Ba+(a.ze?a.wb:0),h=f/e,k=g/d;return b===qj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.dj;this.dj=li;this.scale=mj(this,qj);a!==li&&(lj(this,!1),nj(this,this.documentBounds,this.Ca/this.Ga,this.Ba/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; +t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ca;var f=this.Ba;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Kz=function(a,b){this.Ya();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.EA=function(a){if(a instanceof O){this.po=a;var b=J.alloc();this.qo=this.vr(a.ja(Ec,b));J.free(b)}else this.po=null,this.qo=Qb}; -function nj(a,b,c,d,e,f){var g=J.allocAt(a.ra.x,a.ra.y),h=g.x,k=g.y;if(null!==a.po){var l=J.alloc();l=a.po.ja(Ec,l);h=l.x-a.qo.x/a.scale;k=l.y-a.qo.y/a.scale;e=Bc;J.free(l)}if(f||a.scrollMode===ki)e.eb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Da;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Fa/c.width*c.left,b.clientY-a.Ea/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||jj(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),ij(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; +R.prototype.WA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return Bj(b,c,a)}; +R.prototype.eA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return Bj(b,c,a)};R.prototype.fA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return Bj(b,c,a)}; +R.prototype.getMouse=function(a){var b=this.Fa;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.Ca/c.width*c.left;a=a.clientY-this.Ba/c.height*c.top;return null!==this.xb?Hb(new J(b,a),this.xb):new J(b,a)}; +function wj(a,b,c){var d=a.Fa,e=a.Ca,f=a.Ba,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.xb?(b=J.allocAt(g,h),a.xb.Pd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ze(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Fa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ca/c.width*c.left,b.clientY-a.Ba/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||Gh(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),jj(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; t.$z=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Hc();b.isEnabled=!1;Rf(this);this.Ae=!1;this.ft=new J(NaN,NaN);b.isEnabled=c;this.gc=!0;var d=this;null!==a&&ta(function(){d.gc=!1;Eh(b,"Model");a(d)},1)};t.Jb=function(a){void 0===a&&(a=!1);if(!0!==this.Re&&!(this.Yb||!1===a&&this.gc)){this.Re=!0;var b=this;qa.requestAnimationFrame(function(){b.Re&&b.od()})}};t.od=function(){if(!this.Wj||this.Re)this.Wj&&(this.Wj=!1),Rf(this)}; -function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||$i(a)||(b&&jj(a),c&&lj(a,!1))} -function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ka||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} +function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||hj(a)||(b&&Gh(a),c&&lj(a,!1))} +function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ia||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} t.lx=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof If||(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof If&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ve&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Hj(a,b){for(var c=Ma(),d=Ma(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof If?(Ij(f)||Jj(f)||Kj(f))&&Hj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): -(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===ki&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Fa,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ea,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Fa,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1c&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): +(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===li&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Ca,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ba,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Ca,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1G+1&&(k=a.position.x*y));if(a.Tl)switch(a.et){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(x+1n+1&&(b.scrollTop= -a.position.y*y));l=a.Fa;m=a.Ea;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; +a.position.y*y));l=a.Ca;m=a.Ba;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; t.add=function(a){w(a,U,R,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Jk(a.layerName),null===b&&(b=this.Jk("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.zj(99999999,a,a.diagram===this);0<=c&&this.ab(Le,"parts",b,null,a,null,c);b.isTemporary||this.Ta();a.D(1);c=a.layerChanged;null!==c&&c(a,null, b)}};t.zj=function(a){this.partManager.zj(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Ve||a instanceof If&&null!==a.placeholder)&&a.u();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Cd.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()}; t.Rc=function(a){a.Ak();this.partManager.Rc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Cd.remove(a);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()};t.remove=function(a){w(a,U,R,"remove:part");bk(this,a,!0)}; @@ -735,28 +735,28 @@ c.value,d,e)}else if(c instanceof S)for(b.add(c,a.Jd(e,c)),c=c.labelNodes;c.next function Ff(a,b,c,d,e){if(null!==b&&(w(b,Bb,R,"moveParts:parts"),0!==b.count)){var f=J.alloc(),g=J.alloc();g.assign(c);isNaN(g.x)&&(g.x=0);isNaN(g.y)&&(g.y=0);(c=a.sq)||mf(a,b);for(var h=Ma(),k=Ma(),l=b.iterator,m=J.alloc();l.next();){var n=l.key,p=l.value;if(n.Tc()){var r=ek(a,n,b);if(null!==r)h.push(new fk(n,p,r));else if(!e||n.canMove())r=p.point,f.assign(r),a.computeMove(n,f.add(g),d,m),n.location=m,void 0===p.shifted&&(p.shifted=new J),p.shifted.assign(m.oe(r))}else l.key instanceof S&&k.push(l.qa)}J.free(m); e=h.length;for(l=0;ld&&this.Ta()}; t.Ez=function(a,b){hk(this,a,b);a.me(this);var c=this.Ra,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.ab(Me,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ta()}; -t.mB=function(a){w(a,xi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ja.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.mB=function(a){w(a,yi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ka.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.my=function(a){A(a,"function",R,"addModelChangedListener:listener");null===this.He&&(this.He=new H);this.He.add(a);this.model.Sh(a)};t.oB=function(a){A(a,"function",R,"removeModelChangedListener:listener");null!==this.He&&(this.He.remove(a),0===this.He.count&&(this.He=null));this.model.dl(a)};t.Sh=function(a){A(a,"function",R,"addChangedListener:listener");null===this.$f&&(this.$f=new H);this.$f.add(a)}; t.dl=function(a){A(a,"function",R,"removeChangedListener:listener");null!==this.$f&&(this.$f.remove(a),0===this.$f.count&&(this.$f=null))};t.Mt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.pw(a);a.change!==De&&(this.isModified=!0);if(null!==this.$f)for(var b=this.$f,c=b.length,d=0;dn.Ja.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof xi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.Ca=function(a){return this.undoManager.Ca(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):lk(g,h,b?void 0:k));else if(g instanceof yi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.Rc(m?h:-1,k,m)):g.zj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof yi&&(b?this.Ra.jb(h):(k.me(this),this.Ra.Bb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Me){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof O?b?n.Bb(p,r):n.Rc(p): +"number"===typeof p&&r instanceof jk&&(r.isRow?kk(n,p,b?r:void 0):lk(n,p,b?r:void 0));else if(n instanceof yi){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ka.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof yi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.Ea=function(a){return this.undoManager.Ea(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.xr=function(){this.partManager.xr()}; -function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);else if(null===a.Da)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Fa,g=a.Ea;e.width=a.Fa/b;e.height=a.Ea/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);a.P();oj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);ij(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= -Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Fa;this.Oc.yw.height=this.Ea;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; +function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);else if(null===a.Fa)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Ca,g=a.Ba;e.width=a.Ca/b;e.height=a.Ba/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);a.P();oj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);jj(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Lh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= +Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Ca;this.Oc.yw.height=this.Ba;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; function Ej(a,b){void 0===b&&(b=null);var c=a.Ob;if(null!==c&&c.visible){for(var d=Fb.alloc(),e=1,f=1,g=c.$.j,h=g.length,k=0;km||(nk(l.figure)?f=f*m/K.Jy(f,m):e=e*m/K.Jy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=L.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){L.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;L.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();K.Tq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);Fb.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.U("ChangingSelection",b);for(var c=b.ta(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jj(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||Gh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; -function Fi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.wA=function(){return this.Oh.iterator};t.YA=function(a){Gh(this);a&&uk(this,!0);this.gc?Fj(this,!1):(this.Tj=!0,Rf(this))};function uk(a,b){for(var c=a.Oh.iterator;c.next();)vk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.D())}function vk(a,b,c){if(null!==b){for(var d=b.em.iterator;d.next();)vk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.D())}} +function Fj(a,b){if(a.Zg&&!a.bs){var c=a.ba;a.ba=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Gh(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||Hh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; +function Gi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.es=c;a.ds=d} function Qj(a,b){var c=a.ds.J(b);return null!==c?c:a.ds.J(b.toLowerCase())}function xk(a,b){var c=a.es.J(b);if(null!==c)return c;c=a.es.J(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.xk=function(a,b){A(a,"string",R,"addDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.add(b)};t.Zm=function(a,b){A(a,"string",R,"removeDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.remove(b)}; t.U=function(a,b,c){F&&A(a,"string",R,"raiseDiagramEvent:name");var d=xk(this,a),e=new Ae;e.diagram=this;a=Qj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.M(0)(e);else if(0!==b)for(d=d.ta(),c=0;cx?(g=x,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=x,f=z.width,z=z.height);null!==m?(f+=k,z+=T):m=new hc(0);null!==h&&(x=h.width,h=h.height, "SVG"!==c&&e&&!Wk&&F&&(f>x||z>h)&&(Ea("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Wk=!0),isNaN(x)&&(x=2E3),isNaN(h)&&(h=2E3),isFinite(x)&&(f=Math.min(f,x)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Qq=q;Oj(a,d.context,m,new Fb(Math.ceil(f), Math.ceil(z)),g,B,l,n,u,b);return d.context}a.Dl=!1;Oj(a,y,m,new Fb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Dl=!0;return p.context} -na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ka},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ka!==a){var b=this.Ka;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Da&&(b=this.Da.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, -"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Da.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Da=null,this.removeEventListener(qa,"resize",this.mx,!1), -this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ka=null;if(null!==a){if(b=a.C)b.div=null;Pi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, +na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ia},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ia!==a){var b=this.Ia;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Fa&&(b=this.Fa.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, +"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Fa.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Fa=null,this.removeEventListener(qa,"resize",this.mx,!1), +this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ia=null;if(null!==a){if(b=a.B)b.div=null;Qi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, draggedLink:{configurable:!0,get:function(){return this.gs},set:function(a){this.gs!==a&&(this.gs=a,null!==a&&(this.Ss=a.fromPort,this.Ts=a.toPort))}},$y:{configurable:!0,get:function(){return this.Ss},set:function(a){this.Ss=a}},az:{configurable:!0,get:function(){return this.Ts},set:function(a){this.Ts=a}},animationManager:{configurable:!0,get:function(){return this.$c}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}}, skipsUndoManager:{configurable:!0,get:function(){return this.Hg},set:function(a){A(a,"boolean",R,"skipsUndoManager");this.Hg=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.bs},set:function(a){this.bs=a}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",R,"opacity"),(0>a||1a&&za(a,">= 0",R,"scrollHorizontalLineChange"),this.it=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"number",R,"scrollVerticalLineChange"),0>a&&za(a,">= 0",R,"scrollVerticalLineChange"),this.mt=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.th},set:function(a){F&&w(a,ye,R,"lastInput");this.th=a}},previousInput:{configurable:!0, -enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Da,c=this.Ka;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== +enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Fa,c=this.Ia;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.bo},set:function(a){""===a&&(a="auto");var b=this.bo;b!==a&&(A(a,"string",R,"defaultCursor"),this.bo=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.ag},set:function(a){var b=this.ag;b!== a&&(null!==a&&A(a,"function",R,"click"),this.ag=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&(null!==a&&A(a,"function",R,"doubleClick"),this.fg=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.bg},set:function(a){var b=this.bg;b!==a&&(null!==a&&A(a,"function",R,"contextClick"),this.bg=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0, get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(null!==a&&A(a,"function",R,"mouseOver"),this.xg=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.vg},set:function(a){var b=this.vg;b!==a&&(null!==a&&A(a,"function",R,"mouseHover"),this.vg=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;b!==a&&(null!==a&&A(a,"function",R,"mouseHold"),this.ug=a,this.g("mouseHold", @@ -830,137 +830,137 @@ get:function(){return this.Xr},set:function(a){var b=this.Xr;null!==b&&(b.isActi b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.yp},set:function(a){var b=this.yp;b!==a&&(w(a,Ve,R,"nodeSelectionAdornmentTemplate"),this.yp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, enumerable:!0,get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(w(a,Ve,R,"groupSelectionAdornmentTemplate"),this.Do=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(w(a,Ve,R,"linkSelectionAdornmentTemplate"),this.Yo=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.ev}},isModified:{configurable:!0, enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Jo&&this.ce!==a.historyIndex:this.Jo},set:function(a){if(this.Jo!==a){A(a,"boolean",R,"isModified");this.Jo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.ce=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){w(a,X,R,"model");this.currentTool.doCancel();null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Hc(!0);var c=Si(this,!0);this.Ae=!1;this.Wj=!0;this.ce=-2;this.Re=!1;var d=this.gc;this.gc=!0;Eh(this.animationManager,"Model");null!==b&&(null!==this.He&&this.He.each(function(a){b.dl(a)}),b.dl(this.Zc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)): -za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj; -b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(), -this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ii,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0, -get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Ni,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a= -this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Gi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b=this.Dn;C(a,R,"scale");b!==a&&(this.Dn= -a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); +enumerable:!0,get:function(){return this.ra},set:function(a){var b=J.alloc().assign(this.ra);if(!b.A(a)){w(a,J,R,"position");var c=this.viewportBounds.copy();this.ra.assign(a);hi(this.animationManager,b,this.ra);this.Yb||null===this.Fa&&!this.Fm.o()||(this.Yb=!0,a=this.scale,nj(this,this.eo,this.Ca/a,this.Ba/a,this.Pj,!1),this.Yb=!1);if(!this.Yb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ga,!1)}J.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ss}, +set:function(a){this.ss.A(a)||(w(a,J,R,"initialPosition"),this.ss=a.K())}},initialScale:{configurable:!0,get:function(){return this.ts},set:function(a){this.ts!==a&&(A(a,"number",R,"initialScale"),this.ts=a)}},grid:{configurable:!0,get:function(){null===this.Ob&&Zi(this);return this.Ob},set:function(a){var b=this.Ob;if(b!==a){null===b&&(Zi(this),b=this.Ob);w(a,W,R,"grid");a.type!==W.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b); +this.Ob=a;a.name="GRID";null!==c&&c.add(a);Ej(this);this.P();this.g("grid",b,a)}}},viewportBounds:{configurable:!0,get:function(){var a=this.hy,b=this.ra,c=this.Ga;a.h(b.x,b.y,Math.max(this.Ca,0)/c,Math.max(this.Ba,0)/c);return a}},viewSize:{configurable:!0,get:function(){return this.Fm},set:function(a){var b=this.viewSize;b.A(a)||(w(a,Fb,R,"viewSize"),this.Fm=a=a.K(),this.Ba=this.Ca=0,a.o()?(this.Ca=a.width,this.Ba=a.height):null!==this.Ia&&(this.Ca=this.Ia.clientWidth|| +1,this.Ba=this.Ia.clientHeight||1),this.Ta(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.ns},set:function(a){var b=this.ns;b.A(a)||(w(a,L,R,"fixedBounds"),(F&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.ns=a=a.K(),this.Ta(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.cj},set:function(a){"number"=== +typeof a?a=new hc(a):w(a,hc,R,"scrollMargin");var b=this.cj;b.A(a)||(this.cj=a=a.K(),this.g("scrollMargin",b,a),this.lr())}},scrollMode:{configurable:!0,get:function(){return this.dj},set:function(a){var b=this.dj;b!==a&&(gb(a,R,R,"scrollMode"),this.dj=a,a===li&&lj(this,!1),this.g("scrollMode",b,a),this.P())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.nt},set:function(a){var b=this.nt;b!==a&&(A(a,"boolean",R,"scrollsPageOnFocus"),this.nt=a,this.g("scrollsPageOnFocus", +b,a))}},positionComputation:{configurable:!0,get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(null!==a&&A(a,"function",R,"positionComputation"),this.$s=a,lj(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.gt},set:function(a){var b=this.gt;b!==a&&(null!==a&&A(a,"function",R,"scaleComputation"),this.gt=a,mk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0, +enumerable:!0,get:function(){return this.eo}},isVirtualized:{configurable:!0,get:function(){return this.Es},set:function(a){var b=this.Es;b!==a&&(A(a,"boolean",R,"isVirtualized"),this.Es=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ga},set:function(a){var b=this.Ga;C(a,R,"scale");b!==a&&mk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.co},set:function(a){F&&C(a,R,"defaultScale");!F||0this.scale&&(this.scale=a)):za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0, +enumerable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj;b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a): +w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ji,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}}, +parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Oi,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren", +b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Hi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b= +this.Dn;C(a,R,"scale");b!==a&&(this.Dn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); R.prototype.makeImageData=R.prototype.Xy;R.prototype.makeImage=R.prototype.$A;R.prototype.addRenderer=R.prototype.Iz;R.prototype.makeSVG=R.prototype.ww;R.prototype.makeSvg=R.prototype.mu;R.prototype.stopAutoScroll=R.prototype.Vf;R.prototype.doAutoScroll=R.prototype.Rt;R.prototype.isUnoccupied=R.prototype.Pk;R.prototype.raiseDiagramEvent=R.prototype.U;R.prototype.removeDiagramListener=R.prototype.Zm;R.prototype.addDiagramListener=R.prototype.xk;R.prototype.findTreeRoots=R.prototype.DA; R.prototype.layoutDiagram=R.prototype.YA;R.prototype.findTopLevelGroups=R.prototype.wA;R.prototype.findTopLevelNodesAndLinks=R.prototype.xA;R.prototype.ensureBounds=R.prototype.Ya;R.prototype.findLinksByExample=R.prototype.Ut;R.prototype.findNodesByExample=R.prototype.Vt;R.prototype.findLinkForData=R.prototype.Ec;R.prototype.findNodeForData=R.prototype.rj;R.prototype.findPartForData=R.prototype.Fc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Hb; R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Sd;R.prototype.transformViewToDoc=R.prototype.Bu;R.prototype.transformRectDocToView=R.prototype.CB;R.prototype.transformDocToView=R.prototype.vr;R.prototype.centerRect=R.prototype.Nt;R.prototype.scrollToRect=R.prototype.Ow;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.PA;R.prototype.highlight=R.prototype.OA;R.prototype.selectCollection=R.prototype.tB;R.prototype.select=R.prototype.select; -R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ca;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; +R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ea;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; R.prototype.removeModelChangedListener=R.prototype.oB;R.prototype.addModelChangedListener=R.prototype.my;R.prototype.findLayer=R.prototype.Jk;R.prototype.removeLayer=R.prototype.mB;R.prototype.addLayerAfter=R.prototype.Ez;R.prototype.addLayerBefore=R.prototype.ky;R.prototype.addLayer=R.prototype.Hm;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.Fk;R.prototype.removeParts=R.prototype.tu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add; R.prototype.clearDelayedGeometries=R.prototype.Uv;R.prototype.setProperties=R.prototype.Tw;R.prototype.resetInputOptions=R.prototype.Kw;R.prototype.setInputOption=R.prototype.uB;R.prototype.getInputOption=R.prototype.Pm;R.prototype.resetRenderingHints=R.prototype.Lw;R.prototype.setRenderingHint=R.prototype.iz;R.prototype.getRenderingHint=R.prototype.Xe;R.prototype.maybeUpdate=R.prototype.od;R.prototype.requestUpdate=R.prototype.Jb;R.prototype.delayInitialization=R.prototype.$z; R.prototype.isUpdateRequested=R.prototype.UA;R.prototype.invalidateDocumentBounds=R.prototype.Ta;R.prototype.findObjectsNear=R.prototype.Qg;R.prototype.findPartsNear=R.prototype.tA;R.prototype.findObjectsIn=R.prototype.Lf;R.prototype.findPartsIn=R.prototype.Iy;R.prototype.findObjectsAt=R.prototype.sj;R.prototype.findPartsAt=R.prototype.sA;R.prototype.findObjectAt=R.prototype.ac;R.prototype.findPartAt=R.prototype.Nm;R.prototype.focusObject=R.prototype.EA;R.prototype.alignDocument=R.prototype.Kz; R.prototype.zoomToRect=R.prototype.GB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.xy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){gh=a?void 0!==qa.document:!1};R.isUsingDOM=function(){return gh}; -var Re=null,Hi=new Bb,Wi=null,Vi=null,gh=void 0!==qa.document,Qi=null,Ri="",Kh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),ki=new E(R,"DocumentScroll",1),mi=new E(R,"InfiniteScroll",2),Gi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, -"AnyParentsCollapsed",23),$k=new H,al="2.1.53",Uk="image",Wk=!1,bl=null,Di=!1; -function Ei(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; -bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=qj;R.UniformToFill=rj; -R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=ki;R.InfiniteScroll=mi;R.TreeParentCollapsed=Gi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Oi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} +var Re=null,Ii=new Bb,Xi=null,Wi=null,gh=void 0!==qa.document,Ri=null,Si="",Lh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),li=new E(R,"DocumentScroll",1),ni=new E(R,"InfiniteScroll",2),Hi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, +"AnyParentsCollapsed",23),$k=new H,al="2.1.54",Uk="image",Wk=!1,bl=null,Ei=!1; +function Fi(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; +bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Lh;R.Uniform=qj;R.UniformToFill=rj; +R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=li;R.InfiniteScroll=ni;R.TreeParentCollapsed=Hi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Pi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} function Nj(a,b){b.Mb.setTransform(b.Zb,0,0,b.Zb,0,0);if(null===a.gf)a:{b="f";var c=qa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.gf=!0;if(gh){var d=R[Va("76a115b6ed251eaf4692")];if(d)for(var e=$k.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ra[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Va("76ad18b4f73e")];for(g=c[Va("73a612b6fb191d")](Va("35e7"))+2;gf&&Va(d[2])!==Va("7da71ca0ad381e90")&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.gf=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(qa.document[Va("78a712aa")]){if(qa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g),h=qa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8")),qa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.gf=!1;break}else if(Wa||Za||$a||ab)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.Dd++:a.Dd=1;c.clickCount=a.Dd;a.dk=b.timeStamp;a.To.Ug(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault(): Bj(a,c,b)}};a.$k=function(b){if(a.isEnabled){a.kg=!0;var c=a.nk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=Aj(a,b,b,null!==c[1]),c.targetDiagram=xj(b),a.doMouseMove(),Bj(a,c,b))}};a.bl=function(b){if(a.isEnabled){a.kg=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ys;if(c&&a.uk)delete d[b.pointerId],b.preventDefault();else if(d=a.nk,null!==d[0]&& -d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&wj(e.C,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== -b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Xi(a)}}Oi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} +d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&wj(e.B,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== +b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Yi(a)}}Pi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} na.Object.defineProperties(pf.prototype,{point:{configurable:!0,get:function(){return this.l},set:function(a){this.l=a}},shifted:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}}});var cl="DraggingInfo";pf.className="DraggingInfo";function fk(a,b,c){this.node=a;this.info=b;this.ow=c}fk.className="DraggingNodeInfoPair";function hf(){this.reset()} hf.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Fb(NaN,NaN)).freeze();this.gridSnapCellSpot=Ec;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};hf.className="DraggingOptions";function el(a){1 b.updateDelay?b.P():b.w||(b.w=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Ud=function(){null!==b.observed&&jl(b)};this.autoScale=qj;this.Yb=!1}ma(hl,R);hl.prototype.computePixelRatio=function(){return 1}; -hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Da,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Da=this.sm,this.Mb=this.Da.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Da.width,this.Da.height),kl(this)}finally{this.Da=a,this.Mb=b}}}R.prototype.redraw.call(this)}; -hl.prototype.sc=function(){null===this.Ka&&v("No div specified");null===this.Da&&v("No canvas specified");if(!(this.Da instanceof Sj)&&(yi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Da;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Fa,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Fa=this.sm,this.Mb=this.Fa.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Fa.width,this.Fa.height),kl(this)}finally{this.Fa=a,this.Mb=b}}}R.prototype.redraw.call(this)}; +hl.prototype.sc=function(){null===this.Ia&&v("No div specified");null===this.Fa&&v("No canvas specified");if(!(this.Fa instanceof Sj)&&(zi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Fa;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Zb,this.Zb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ra.j;for(var c=b.length,d=0;da&&(a=0);this.kb!==a&&(this.kb=a)}}});hl.className="Overview";function il(){gf.call(this);this.l=null}ma(il,gf); il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))}; -ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +ll.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ri=null,Si="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Sm()&&(d=c.Ek,c.Ek=this.copiesParentKey),c.Ok()&&(e=c.Dk,c.Dk=this.copiesGroupKey),f=b.Fk(a,null,!0)}finally{c.Sm()&&(c.Ek=d),c.Ok()&&(c.Dk=e),c=new H,c.addAll(f),Ri=c,Si=b.model.dataFormat}}b.U("ClipboardChanged",c)}; +ll.prototype.pasteFromClipboard=function(){var a=new I,b=Ri;if(null===b)return a;var c=this.diagram;if(Si!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Sm()&&(e=d.Ek,d.Ek=this.copiesParentKey),d.Ok()&&(f=d.Dk,d.Dk=this.copiesGroupKey),g=c.Fk(b,c,!1)}finally{for(d.Sm()&&(d.Ek=e),d.Ok()&&(d.Dk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +ll.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.U("ChangingSelection",b.selection);b.Ea("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))}; +ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Lh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; ll.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Gh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Hh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; ll.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,U,ll,"part");var b=this.diagram;b.Ya();if(null===a){try{null!==this.Dg&&(this.Dg.next()?a=this.Dg.value:this.Dg=null)}catch(k){this.Dg=null}null===a&&(0l.width+n||n>Y+m||D>l.height+p||p>Q+D)}if(m){m=0!==(this.I&256);a.clipInsteadOfFill&&(m=!1);this instanceof ih&&(a.font=this.font);if(m){F&&F.iA&&Ea("clip"+this.toString());D=g.pe()?g.naturalBounds:g.actualBounds;null!==this.gb?(n=this.gb,Y=n.x,Q=n.y,l=n.width,n=n.height):(Y=Math.max(d.x,D.x),Q=Math.max(d.y,D.y),l=Math.min(d.right,D.right)-Y,n=Math.min(d.bottom,D.bottom)-Q);if(Y>d.width+ -d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Ai(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): -a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Ai(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- +d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Bi(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): +a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Bi(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- n/2,Y-n/2,Q+n,l+n));F&&F.Jm&&F.hA&&F.hA(a,this);k&&(null!==this.rb||null!==this.kc||null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)?(Ql(this,!0),null===this.shadowVisible&&Nl(a)):Ql(this,!1);this.pj(a,b);k&&0!==(this.I&512)===!0&&Ml(a);this.Rf()&&k&&Nl(a);m?(a.restore(),this instanceof W?a.Ac(!0):a.Ac(!1)):c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha= -f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Ai(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Ai(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; -function Ai(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Bi(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Bi(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; +function Bi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=y;q+=y;if(c.type===Ul)m=b.createLinearGradient(n,p,r,q);else if(c.type===Pl)y=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,y=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,y);else if(c.type===Tl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else ya(c.type,"Brush type");if(c.type!==Tl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ue=m,null!== m&&(c.sl=h,c.Nu=k),null===m&&c.type===Tl&&-1!==c.sl)){c.sl=-1;var x=a.diagram;null!==x&&-1===c.sl&&ta(function(){x.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Sg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Sf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Sf():!0}; t.Tg=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; @@ -1001,11 +1001,11 @@ function Vl(a,b){a.I=b?a.I|2048:a.I&-2049}function Wl(a,b){a.I=b?a.I|4096:a.I&-4 function am(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Jl(b,a)}}function bm(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.yd():a.fl(a,function(a){am(a)}):am(a))}t.bind=function(a){a.vd=this;var b=this.tj();null!==b&&cm(b)&&v("Cannot add a Binding to a template that has already been copied: "+a);null===this.lb&&(this.lb=new H);this.lb.add(a)}; t.tj=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.xi)return a;a=a.panel}return null};t.Tw=function(a){Pj(this,a)};t.gx=function(a){a.vd=this;null===this.Yg&&(this.Yg=new Bb);this.Yg.add(a.propertyName,a)}; function dm(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new ib;for(c in b)"row"!== c&&"column"!==c&&(e[c]=b[c]);Pj(a,e)}else Pj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function im(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();F&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);em.add(a,b)} function jm(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} @@ -1050,14 +1050,14 @@ b.mouseLeave=function(a,b){b.Tg()&&b instanceof W&&(a=b.ib("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.ib("ButtonBorder"),b instanceof Uf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Ui("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Vi("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});im("ToolTip",function(){return dm(Ve,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},dm(Uf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new N(0,0,4,6),spot2:new N(1,1,-4,-4)}))}); -im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ui("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); -im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Ui("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); -a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ca("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); -im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Ui("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ca("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Vi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); +im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Vi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); +a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); +im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Vi("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.cb("checkbox")}}};return a}); im("CheckBox",function(a){a=jm(a);a=dm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hc(0,1,0,0)});var b=dm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=zg=new E(O,"None",0);O.Default=pl=new E(O,"Default",0);O.Vertical=rl=new E(O,"Vertical",4);O.Horizontal=ql=new E(O,"Horizontal",5);O.Fill=Bd=new E(O,"Fill",3);O.Uniform=Og=new E(O,"Uniform",1); @@ -1095,12 +1095,12 @@ function Nl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function Ml(a) R.prototype.mu=function(a){var b=new Sj(this,qa.document);void 0===a&&(a=new ib);var c=this;return Sk(this,function(a,e){a=Tk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.mu;R.prototype.ww=function(a){return this.mu(a)};R.prototype.makeSVG=R.prototype.ww; O.prototype.Ay=function(a,b){if(!(a instanceof pm))return!1;if(!this.visible)return!0;var c=null,d=a.iu;if(this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn))return Kl(this,a,b),!0;var e=this.Cb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.I&4096)===!0&&Ll(this);var h=0!==(this.I&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof ih&&(a.font=this.font);if(h){k=g.pe()?g.naturalBounds:g.actualBounds;if(null!==this.gb){var l= this.gb;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;qm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Rf()&&!this.isVisible())return!0;a.Ue.Ua=[1,0,0,1,0,0];(this instanceof ih&&1a)&&za(a,"0 <= loc <= 1",Ol,"addColorStop:loc");A(b,"string",Ol,"addColorStop:color");F&&!xm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.te&&(this.te=new Bb);this.te.add(a,b);this.sa===Rl&&(this.type=Ul);this.ue=null;return this}; function xm(a){if("black"===a)return!0;if(""===a)return!1;F&&A(a,"string",Ol,"isValidColor");vm||(wm(),vm=!0);var b=ym;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} -t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(b,c)} -t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(-b,c)} -function Dm(a,b,c){ni(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;ni(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} +t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(b,c)} +t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(-b,c)} +function Dm(a,b,c){oi(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;oi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} t.Vy=function(){if(this.type===Rl)return Fm(this.color);if((this.type===Ul||this.type===Pl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Pl)return Fm(a.first().value);if(null!==a.get(.5))return Fm(a.get(.5));if(2===a.count)return a=a.ta(),Fm(Dm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return Fm(Dm(a.get(c),a.get(d),1-f/e))}return!1}; -function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();ni(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} +function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();oi(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} function Am(a,b){switch(b){case zm:b=100*Gm(Em.l);var c=100*Gm(Em.L),d=100*Gm(Em.w);Hm.l=.4124564*b+.3575761*c+.1804375*d;Hm.L=.2126729*b+.7151522*c+.072175*d;Hm.w=.0193339*b+.119192*c+.9503041*d;Hm.W=Em.W;b=Im(Hm.l/Jm[0]);c=Im(Hm.L/Jm[1]);d=Im(Hm.w/Jm[2]);Km.l=116*c-16;Km.L=500*(b-c);Km.w=200*(c-d);Km.W=Hm.W;Km.l=Math.min(100,Math.max(0,Km.l+100*a));a=(Km.l+16)/116;b=a-Km.w/200;Hm.l=Jm[0]*Lm(Km.L/500+a);Hm.L=Jm[1]*(Km.l>Mm*Nm?Math.pow(a,3):Km.l/Mm);Hm.w=Jm[2]*Lm(b);Hm.W=Km.W;a=-.969266*Hm.l+1.8760108* -Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return oi(),pi.w=Math.min(100,Math.max(0,pi.w+100*a)),"hsla("+pi.l+", "+pi.L+"%, "+pi.w+"%, "+ -pi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ni(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} -function oi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}pi.l=Math.round(g);pi.L=Math.round(100*a);pi.w=Math.round(100*e);pi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return pi(),qi.w=Math.min(100,Math.max(0,qi.w+100*a)),"hsla("+qi.l+", "+qi.L+"%, "+qi.w+"%, "+ +qi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function oi(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} +function pi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}qi.l=Math.round(g);qi.L=Math.round(100*a);qi.w=Math.round(100*e);qi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Im(a){return a>Nm?Math.pow(a,1/3):(Mm*a+16)/116}function Lm(a){var b=a*a*a;return b>Nm?b:(116*a-16)/Mm}function km(a,b){"string"===typeof a?F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Ol||v("Value for "+b+" must be a color string or a Brush, not "+a)}function wm(){ym=gh?(new Vk(null)).context:null} na.Object.defineProperties(Ol.prototype,{type:{configurable:!0,get:function(){return this.sa},set:function(a){this.s&&va(this,a);gb(a,Ol,Ol,"type");this.sa=a;this.start.Sb()&&(a===Ul?this.start=Fc:a===Pl&&(this.start=Kc));this.end.Sb()&&(a===Ul?this.end=Nc:a===Pl&&(this.end=Kc));this.ue=null}},color:{configurable:!0,get:function(){return this.rl},set:function(a){this.s&&va(this,a);F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color');this.rl=a;this.ue= null}},start:{configurable:!0,get:function(){return this.Kd},set:function(a){this.s&&va(this,a);w(a,N,Ol,"start");this.Kd=a.K();this.ue=null}},end:{configurable:!0,get:function(){return this.El},set:function(a){this.s&&va(this,a);w(a,N,Ol,"end");this.El=a.K();this.ue=null}},startRadius:{configurable:!0,get:function(){return this.wt},set:function(a){this.s&&va(this,a);C(a,Ol,"startRadius");0>a&&za(a,">= zero",Ol,"startRadius");this.wt=a;this.ue=null}},endRadius:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.s&&va(this,a);C(a,Ol,"endRadius");0>a&&za(a,">= zero",Ol,"endRadius");this.ks=a;this.ue=null}},colorStops:{configurable:!0,get:function(){return this.te},set:function(a){this.s&&va(this,a);F&&w(a,Bb,Ol,"colorStops");this.te=a;this.ue=null}},pattern:{configurable:!0,get:function(){return this.Xs},set:function(a){this.s&&va(this,a);this.Xs=a;this.ue=null}}});Ol.prototype.isDark=Ol.prototype.Vy; -Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,pi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); +Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,qi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); Ol.randomColor=function(a,b){void 0===a&&(a=128);F&&(C(a,Ol,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ a};Ol.isValidColor=xm;Ol.lighten=function(a){return Bm(a)};Ol.lightenBy=Bm;Ol.darken=function(a){return Cm(a)};Ol.darkenBy=Cm;Ol.mix=Dm;Ol.isDark=Fm;function hm(){this.va="Base"}hm.prototype.measure=function(){};hm.prototype.bB=function(a,b,c,d,e){a.measure(b,c,d,e)};hm.prototype.arrange=function(){};hm.prototype.Mz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};hm.prototype.kB=function(a){a.Nk()};hm.prototype.sc=function(){}; na.Object.defineProperties(hm.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},classType:{configurable:!0,get:function(){return W}}});hm.prototype.remeasureObject=hm.prototype.kB;hm.prototype.arrangeElement=hm.prototype.Mz;hm.prototype.measureElement=hm.prototype.bB;hm.className="PanelLayout";function Qm(){this.va="Base"}ma(Qm,hm); @@ -1185,9 +1185,9 @@ cn.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.$.j,u=q.length,y=0;yB)){x=nk(x.figure);for(var D=0;DB&&z.push(G))}}}}q= -a.$.j;u=q.length;for(y=0;ye*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)x.measure(Infinity,Infinity,0,0),z=x.measuredBounds,b.Xc(z),a.l.push(z);else{var B=x.segmentIndex,D=x.segmentFraction,G=x.alignmentFocus;G.Sb()&&(G=Kc);var M=x.segmentOrientation,Y=x.segmentOffset;if(isNaN(B)){var Q=k.ua;z=Ma();Q.mw(D,z);var ca=J.allocAt(z[0],z[1]);ca.add(k.i(0)); Q.type===Gd?ca.offset(-Q.startX,-Q.startY):(Q=Q.figures.first(),ca.offset(-Q.startX,-Q.startY));Q=z[2];if(M!==ng){var T=k.computeAngle(x,M,Q);x.dc=T}T=ca.x-m.x;var P=ca.y-m.y;J.free(ca);Oa(z)}else if(B<-f||B>=f)P=k.midPoint,Q=k.midAngle,M!==ng&&(T=k.computeAngle(x,M,Q),x.dc=T),T=P.x-m.x,P=P.y-m.y;else{T=0;0<=B?(P=n.M(B),z=Bxa+ @@ -1222,9 +1222,9 @@ W.prototype.copy=function(){var a=O.prototype.copy.call(this);if(null!==a){for(v t.Ap=function(a){O.prototype.Ap.call(this,a);for(var b=this.$.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Ai(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function un(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Bi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ob;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Qt()}}}} -function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Ai(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Bi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function nk(a){return"LineV"===a||"BarV"===a} t.Lk=function(a,b,c,d,e){var f=this.pe(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,K.Of(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=K.Of(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.$.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.sa===W.Spot;u&&(q=J.alloc(),p=this.yb(),(l=p.Lk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var y=0;yd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; @@ -1262,12 +1262,12 @@ g&&null!==g.lb)for(var h=g.lb.iterator;h.next();){var k=h.value;k.vd=g;k.uq=2;k. g=d.targetProperty;var k=g.indexOf(".");0=c.elements.count&&!(c instanceof U)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Ea("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Fn=!0)}}))} t.Xz=function(a){void 0===a&&(a=!1);var b=this.copy();wn(b,function(a){a instanceof W&&(a.xi=null,a.tb=null);var b=a.lb;null!==b&&(a.lb=null,b.each(function(b){a.bind(b.copy())}));b=a.Yg;null!==b&&(a.Yg=null,b.each(function(b){a.gx(b.value.copy())}))});a&&yg(b);return b}; -t.Ia=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; +t.Ja=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; else continue;var f=this,g=c.Ij;if(-1!==g){if(f=this.Tt(g),null===f)continue}else null!==c.vd&&(f=c.vd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.uq;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.getColumnDefinition(c.Bm):2===e&&(f=f.getRowDefinition(c.Bm))}void 0!==f&&c.jx(f,d)}}}; function Gn(a,b){a=a.$.j;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.Rc(this.$.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Ui("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), +function Hn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Vi("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), d.tb=b,Ln(a,e,c),d.tb=null,d.data=b)}}function Ln(a,b,c){for(a=a.$;ba)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.u(),this.g("topIndex",b,a))}}},leftIndex:{configurable:!0,get:function(){return void 0===this.Ri?0:this.Ri},set:function(a){if(void 0!==this.Ri){var b=this.Ri;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+ a),this.Ri=a,this.u(),this.g("leftIndex",b,a))}}},data:{configurable:!0,get:function(){return this.tb},set:function(a){var b=this.tb;if(b!==a){var c=this instanceof U&&!(this instanceof Ve);c&&A(a,"object",W,"data");yg(this);this.tb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.ef.remove(b),null!==a&&c.ef.add(a,this)):this instanceof U&&(null!==b&&c.ff.remove(b),null!==a&&c.ff.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b), -null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ia()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; +null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ja()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Ni=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.ru()}}},itemTemplate:{configurable:!0,get:function(){return null===this.De?null:this.De.J("")},set:function(a){if(null===this.De){if(null===a)return;this.De=new Bb}var b=this.De.J("");b!==a&&(w(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+ a),this.De.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.ru())}},itemTemplateMap:{configurable:!0,get:function(){return this.De},set:function(a){var b=this.De;if(b!==a){w(a,Bb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;F&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}this.De=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| this.ru()}}},itemCategoryProperty:{configurable:!0,get:function(){return this.Wl},set:function(a){var b=this.Wl;b!==a&&("string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",W,"itemCategoryProperty"),this.Wl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.I&1048576)},set:function(a){var b=0!==(this.I&1048576);b!==a&&(A(a,"boolean",W,"isAtomic"),this.I^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0, @@ -1295,7 +1295,7 @@ this.I^=33554432,this.u(),this.g("isOpposite",b,a))}},isEnabled:{configurable:!0 A(a,"string",W,"alignmentFocusName"),this.Xg=a,this.u(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return gm.J("Position")}},Horizontal:{configurable:!0,get:function(){return gm.J("Horizontal")}},Vertical:{configurable:!0,get:function(){return gm.J("Vertical")}},Spot:{configurable:!0,get:function(){return gm.J("Spot")}},Auto:{configurable:!0,get:function(){return gm.J("Auto")}},Table:{configurable:!0,get:function(){return gm.J("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return gm.J("Viewbox")}},TableRow:{configurable:!0,get:function(){return gm.J("TableRow")}},TableColumn:{configurable:!0,get:function(){return gm.J("TableColumn")}},Link:{configurable:!0,get:function(){return gm.J("Link")}},Grid:{configurable:!0,get:function(){return gm.J("Grid")}},Graduated:{configurable:!0,get:function(){return gm.J("Graduated")}}});W.prototype.findItemPanelForData=W.prototype.Gy; -W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ia;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; +W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ja;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Bb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.ib;W.prototype.findInVisualTree=W.prototype.Mm;W.prototype.walkVisualTreeFrom=W.prototype.fl;W.prototype.findMainElement=W.prototype.yb;var Fn=!1,Jn=!1,Kn=null,gm=new Bb;W.className="Panel";W.definePanelLayout=Nn;Nn("Position",new Qm);Nn("Vertical",new Tm);Nn("Auto",new Vm);Nn("Link",new fn); function jk(){eb(this);this.Ag=null;this.As=!0;this.Xa=0;this.gd=NaN;this.zh=0;this.xh=Infinity;this.Db=fd;this.ra=this.hc=this.na=0;this.lb=null;this.lq=On;this.Pe=pl;this.hq=this.Eg=null;this.iq=NaN;this.rb=this.sk=null;this.Vn=!1} jk.prototype.copy=function(){var a=new jk;a.As=this.As;a.Xa=this.Xa;a.gd=this.gd;a.zh=this.zh;a.xh=this.xh;a.Db=this.Db;a.na=this.na;a.hc=this.hc;a.ra=this.ra;a.Pe=this.Pe;a.lq=this.lq;null===this.Eg?a.Eg=null:a.Eg=this.Eg.K();a.hq=this.hq;a.iq=this.iq;a.sk=null;null!==this.sk&&(a.separatorDashArray=Ja(this.separatorDashArray));a.rb=this.rb;a.Vn=this.Vn;a.lb=this.lb;return a};t=jk.prototype; @@ -1320,7 +1320,7 @@ Uf.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a); t.pb=function(a){a===zg||a===Og||a===sl||a===pl?this.geometryStretch=a:O.prototype.pb.call(this,a)};t.toString=function(){return"Shape("+("None"!==this.figure?this.figure:"None"!==this.toArrow?this.toArrow:this.fromArrow)+")#"+ob(this)}; function Pn(a,b,c,d){var e=c.length;if(!(4>e)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,y=Ma(),x=2;xn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;x=0;q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Oa(y);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.pj(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){x++;if(x===y.length){Oa(y);return}q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Oa(y)}} -t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Ai(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Ai(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, +t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Bi(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Bi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, a.miterLimit=this.tk);e=!1;g&&b.Xe("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.St(h,this.Gh));var k=this.ua;if(null!==k){if(k.type===Gd)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.Hj();else if(k.type===Kd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.We(d);if(null!==c){g&& e&&Nl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.Hj();g&&e&&Ml(a)}}else if(k.type===Ld)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+K.Wg*k,h-p,l+k,h-K.Wg*p,l+k,h),a.bezierCurveTo(l+k,h+K.Wg*p,l+K.Wg*k,h+p,l,h+p),a.bezierCurveTo(l-K.Wg*k,h+p,l-k,h+K.Wg*p,l-k,h),a.bezierCurveTo(l-k,h-K.Wg*p,l-K.Wg*k,h-p,l,h-p),a.closePath(),null!==d&&a.We(d),null!==c&& (g&&e?(Nl(a),a.Hj(),Ml(a)):a.Hj());else if(k.type===Ad)for(h=k.figures,k=h.length,p=0;pp*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& +t.pj=function(a,b){if(null!==this.Nc&&0!==this.$b.length&&null!==this.xe){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=mo(this),h=a.textAlign=this.fj,k=b.Tl;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.Mi;var l=this.Li;Bi(this,a,this.Nc,!0,!1,c,d);(k||l)&&Bi(this,a,this.Nc,!1,!1,c,d);d=0;c=!1;var m=J.allocAt(0,0);this.Md.Aa(m);var n=J.allocAt(0,g);this.Md.Aa(n);var p=m.Ve(n);J.free(m);J.free(n);m=b.scale;8>p*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& (c=!1);b=this.zf;p=this.Af;switch(this.flip){case ul:a.translate(e,0);a.scale(-1,1);break;case tl:a.translate(0,f);a.scale(1,-1);break;case vl:a.translate(e,f),a.scale(-1,-1)}m=this.ed;n=(b+g+p)*m;f>n&&(d=this.lj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.we)p=this.Ab,p>e&&(p=e),this.oj(this.we,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Wb&&null!==this.qb)for(n=0;ne&&(r=e);d+=b;this.oj(this.qb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case ul:a.scale(-1,1);a.translate(-e, 0);break;case tl:a.scale(1,-1);a.translate(0,-f);break;case vl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.oj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==no?no(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==oo?oo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1408,9 +1408,9 @@ metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wb?this.Wb:[t var no=null,oo=null,yo=new E(ih,"None",0),vo=new E(ih,"WrapFit",1),jo=new E(ih,"WrapDesiredSize",2),Ao=new E(ih,"WrapBreakAll",3),io=new E(ih,"OverflowClip",0),so=new E(ih,"OverflowEllipsis",1),ko=new E(ih,"FormatTrim",0),Co=new E(ih,"FormatNone",0),Bo=/[ \u200b\u00ad]/,Do=new ib,Eo=0,Fo=new ib,Go=0,uo="...",po="",ho=null,go=!1;ih.className="TextBlock";ih.getEllipsis=function(){return uo};ih.setEllipsis=function(a){uo=a;Fo=new ib;Go=0};ih.getBaseline=function(){return no}; ih.setBaseline=function(a){no=a};ih.getUnderline=function(){return oo};ih.setUnderline=function(a){oo=a};ih.isValidFont=lo;ih.None=yo;ih.WrapFit=vo;ih.WrapDesiredSize=jo;ih.WrapBreakAll=Ao;ih.OverflowClip=io;ih.OverflowEllipsis=so;function Ho(){this.Wb=[];this.qb=[]}Ho.prototype.reset=function(){this.Wb=[];this.qb=[]};Ho.prototype.vy=function(a){this.Wb=Ja(a.Wb);this.qb=Ja(a.qb)};Ho.className="TextBlockMetrics"; function rk(){O.call(this);this.lh=null;this.nq="";this.Eh=vc;this.Ll=Bd;this.Ih=this.rd=null;this.Kl=Kc;this.Zd=zg;this.Am=null;this.Ho=!1;this.Gl=!0;this.am=!1;this.tm=null}ma(rk,O);rk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.lh;a.nq=this.nq;a.Eh=this.Eh.K();a.Ll=this.Ll;a.Zd=this.Zd;a.rd=this.rd;a.Ih=this.Ih;a.Kl=this.Kl.K();a.Gl=this.Gl;a.tm=this.tm}; -rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ti(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} +rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ui(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} function Ko(a,b){b.wz||(b.qv=function(c){b.ys=!0;b.Eo=!1;var d=b.ih.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.Bg.J(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Og:case sl:p===Og?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===sl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Mf()*b.scale;var q=m*p*n*p,u=h*g/q,y=c.__goCache;p=null;var x=Lo;if(c.ys&&void 0!==y&&4x*x)for(null===y.nj&&(Mo(y,4,k,l,c),Mo(y,16,k,l,c)),k=y.nj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +t.BA=function(a){void 0===a&&(a=Infinity);A(a,"number",V,"findTreeParts:level");var b=new I;ml(b,this,!1,a,!0);return b};V.prototype.collapseTree=function(a){void 0===a&&(a=1);C(a,V,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function tp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);C(a,V,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function vp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Sq():a.Od();k.next();){var l=k.value;l.isTreeLink&&(h||l.Ad||l.Za(),l=l.Xq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.Zh(),g&&e.yk(l,f)),2l&&(n=-n),u= -(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.B(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.B(c,0)?h=0l&&(n=-n),u= +(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.C(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ke(d),this.Hf(f,h),this.ke(e);else{this.ke(d);this.ke(e);h=L.alloc();b.xj(h);k=h.ca(e);p.xj(h);l=h.ca(d);if(k||l)g=b.ja(Np(g),new J),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ja(Np(c),new J),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));L.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Bk();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(y+=Math.abs(B)*(m?1:2)),0===r?q=y:90===r?u=y:180===r?q=-y:270===r?u=-y:(q=y*Math.cos(r*Math.PI/180),u=y*Math.sin(r*Math.PI/180)),g.Sb()&&l&&(y=b.ja(Kc,J.alloc()),x=J.allocAt(y.x+1E3*q,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,x,!0,n),J.free(y),J.free(x));y=this.getLinkPoint(d,e,c,!1,m,a,b);var D=z=x=0;if(m||!k||l){var G=this.computeEndSegmentLength(d,e, c,!1);D=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(D+=m?0:30,0>B&&(D+=180));0>D?D+=360:360<=D&&(D-=360);l&&(G+=Math.abs(B)*(m?1:2));0===D?x=G:90===D?z=G:180===D?x=-G:270===D?z=-G:(x=G*Math.cos(D*Math.PI/180),z=G*Math.sin(D*Math.PI/180));c.Sb()&&l&&(c=e.ja(Kc,J.alloc()),g=J.allocAt(c.x+1E3*x,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),J.free(c),J.free(g))}c=n;if(m||!h||l)c=new J(n.x+q,n.y+u);g=y;if(m||!k||l)g=new J(y.x+x,y.y+z);!p&&!m&&h&&3k?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);K.da(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.O(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case Dp:f=this.i(a);n=this.i(c);if(!f.Wa(b)||!n.Wa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Pc(Vp,Vp);k.Pc(Vp,Vp);h.af(a);k.af(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ca(a)|| h.ca(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yk.bottom&&a.x>k.left&&a.xh.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new J(a.x,Math.min((a.y+c.y)/2,a.y)),m=new J(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, -g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= +Wp(u,a,b,r,d,h,!0);k=Xp(u,r.x,r.y);!u.abort&&k>=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.C(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, +g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.C(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= !0}else b=!1}}}else b=!1;b||(this.ke(l),this.ke(m))}};S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function gk(a){if(null===a.diagram||!a.isAvoiding||!yk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=zk(a.diagram,!0,a.containingGroup,null);for(var d=1;d$p&&Xp(b,m,n)!==l-1&&(Xp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Xp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Xp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Xp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>$p&&Xp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>$p)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ @@ -1662,18 +1662,18 @@ Math.min(h.x,f.x),f.y=Math.min(h.y,f.y);else for(d=3;d=b&&(d=b-1),k= (e=aq(this,e,!1,f)),Td(h,b,c,b,c,e.x,e.y);else if(this.isOrthogonal){f=new J(d,k);e=this.i(1).copy();g=new J(d,k);b=new J(d,k);c=this.i(0);for(var l,m=this.smoothness/3,n=1;ny?q>r?(g.x=x-B,g.y=r-B,b.x=x+u,b.y= r+u):(g.x=x-B,g.y=r+B,b.x=x+u,b.y=r-u):q>r?(g.x=x+B,g.y=r-B,b.x=x-u,b.y=r+u):(g.x=x+B,g.y=r+B,b.x=x-u,b.y=r-u));K.da(y,x)&&K.da(r,q)&&(r>p?(z>x?(g.x=x-B,g.y=r-B,b.x=x+u):(g.x=x+B,g.y=r-B,b.x=x-u),b.y=r+u):(z>x?(g.x=x-B,g.y=r+B,b.x=x+u):(g.x=x+B,g.y=r+B,b.x=x-u),b.y=r-u));if(K.da(y,x)&&K.da(x,z)||K.da(p,r)&&K.da(r,q))y=.5*(y+z),p=.5*(p+q),g.x=y,g.y=p,b.x=y,b.y=p;1===n?(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y)):2===n&&K.da(c.x,this.i(0).x)&&K.da(c.y,this.i(0).y)&&(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y));Td(h,e.x- d,e.y-k,g.x-d,g.y-k,l.x-d,l.y-k);f.set(g);e.set(b);c=l}}f=c.x;c=c.y;e=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(e=aq(this,e.copy(),!1,Mb));f=.5*(f+e.x);c=.5*(c+e.y);Td(h,b.x-d,b.y-k,f-d,c-k,e.x-d,e.y-k)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=aq(this,g.copy(),!1,Mb)),Td(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=J.alloc();f.assign(this.i(0));e=J.alloc();e.assign(f);g=this.computeCorner();n=1;for(l= -0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ -z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.B(f.x,p.x)&&K.B(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.B(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, +0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ +z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.C(f.x,p.x)&&K.C(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.C(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, e,!0,f)),0!==this.computeShortLength(!1)&&(h=aq(this,h,!1,f)),a.type=Gd,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.on=!0;return a};function cq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return K.da(a,0)?b:K.da(b,0)?a:Math.sqrt(a*a+b*b)} function aq(a,b,c,d){var e=a.pointsCount;if(2>e)return b;if(c){var f=a.i(1);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!0);a>e&&(a=e);e=a*(f-b.y)/d;b.x+=a*(c-b.x)/d;b.y+=e}else{f=a.i(e-2);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!1);a>e&&(a=e);e=a*(b.y-f)/d;b.x-=a*(b.x-c)/d;b.y-=e}return b} function bq(a,b,c,d){for(var e=a.pointsCount,f=b;K.da(b.x,f.x)&&K.da(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.da(b.x,f.x)&&!K.da(b.y,f.y))return c-1;for(var g=f;K.da(b.x,f.x)&&K.da(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.da(b.y,f.y)&&K.da(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.i(c++)}return c-2}S.prototype.computeJumpLength=function(){return 10}; -function dq(a,b,c,d,e,f,g){if(!g&&Fp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=eq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.B(e.x,f.x))if(e.yn-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===mg?Pd(b,r,m,!1):Td(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function eq(a,b,c,d){var e=a.diagram;if(null===e||b.A(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ja.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.B(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.B(n,r)&& -K.B(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} -S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ja.j;for(var g=e.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.C(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.C(n,r)&& +K.C(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} +S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ka.j;for(var g=e.length,h=0;hb.Gc?1:a.angleb.angle?1:0}; Qp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Bc,b.fromPort===this.port),d=a.Yq;if(0>d)return c;var e=a.Km;if(1>=e||!b.isOrthogonal)return c;b=a.Cw;var f=a.dr;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ni.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ni.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} -function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Ni.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ni.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ni.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ni.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ni.prototype.workerLayout=function(){return!1}; -function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ni.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; +yl.prototype.copy=function(){var a=new yl;a.oh=this.oh.K();a.Nh=this.Nh.K();a.mh=this.mh;a.Lh=this.Lh;a.nh=this.nh;a.Mh=this.Mh;a.ro=this.ro;a.xq=this.xq;a.so=this.so;a.yq=this.yq;return a};yl.className="LinkSettings";function Oi(){0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Oi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Oi.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} +function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Oi.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Oi.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Oi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Oi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Oi.prototype.workerLayout=function(){return!1}; +function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Oi.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; function yq(a,b){var c=xq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function xq(a){var b=null;if("function"===typeof a){if(b=zq.get(a),!b){var c=Pa(a);b=zq.get(c);b||(b=new Aq,b.Yv=a,b.name=c,b.l=a.name,b.Ry=Bq,zq.set(c,b),zq.set(a,b),zq.set(a.name,b))}}else"string"===typeof a&&(b=zq.get(a));return b} -Ni.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= +Oi.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)Ea("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Tm.get(c.id)){a.Tm.remove(c.id);b.Jt=!1;b.rk=null;if(b.yt)b.yt=!1,b.Kg=null;else{var d=Dq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}vq(b,c.time);c=b.Kg;if(null!==c)b.Kg=null;else for(d=a.Tm.iteratorValues;d.next();){var e=d.value;c=e.Kg;if(null!==c){e.Kg=null;break}}null!==c&&Eq(b,c)}},a.bf.postMessage({_GoJS:"_GoJS", url:a.Ry}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.bf.postMessage({_GoJS:"_GoJS",url:b})}),a.bf.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.rk?this.Kg=this.network:Eq(this,this.network);vq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Eq(a,b){a.Jt=!0;var c=xq(a.constructor),d=Fq(a,b,!0);d._GoJS="_GoJS";c.bf.postMessage(d);c.Tm.set(ob(a),a);a.rk=b} function Fq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?ob(a):a.id,layout:Pa(a.constructor),p:d,DB:e,jA:f};a.onNetworkSerialization(2,c,b,d);return d} function Dq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.DB,g=new Bb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Hb(a.key));null!==b?b=e.zk(b):(b=e.createVertex(),e.Ng(b));c&&null!==a.key&&(b.data={Oi:a.key});g.set(a.id,b)});var h=b.jA,k=new Bb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Gm(f);f.link=b;c&&null!==a.key&&(f.data={Oi:a.key});k.set(a.id, -f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ni.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ni.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){null!==a&&w(a,R,Ni,"diagram");this.C=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Ni,"group"),this.w=a,null!==a&&(this.C=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Ni,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, -enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Ni,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Ni,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Ni,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, -set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Ni,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Ni,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Ni,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, -set:function(a){this.In!==a&&(null!==a&&A(a,"function",Ni,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Ni,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", -Ni,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Ni,"workerStateChanged"),this.Dq=a)}}});Ni.prototype.useWorker=Ni.prototype.kx;Ni.declareWorkerLayout=yq;Ni.prototype.cancelWorker=Ni.prototype.Qz;Ni.prototype.collectParts=Ni.prototype.qy;Ni.prototype.getLayoutBounds=Ni.prototype.yj;Ni.prototype.invalidateLayout=Ni.prototype.D; -var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ni.className="Layout";Ni.GoJSScriptURL=Bq;Ni.declareWorkerLayout=yq; +f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Oi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Oi.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){null!==a&&w(a,R,Oi,"diagram");this.B=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Oi,"group"),this.w=a,null!==a&&(this.B=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Oi,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, +enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Oi,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Oi,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Oi,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, +set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Oi,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Oi,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Oi,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, +set:function(a){this.In!==a&&(null!==a&&A(a,"function",Oi,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Oi,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", +Oi,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Oi,"workerStateChanged"),this.Dq=a)}}});Oi.prototype.useWorker=Oi.prototype.kx;Oi.declareWorkerLayout=yq;Oi.prototype.cancelWorker=Oi.prototype.Qz;Oi.prototype.collectParts=Oi.prototype.qy;Oi.prototype.getLayoutBounds=Oi.prototype.yj;Oi.prototype.invalidateLayout=Oi.prototype.D; +var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Oi.className="Layout";Oi.GoJSScriptURL=Bq;Oi.declareWorkerLayout=yq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=xq(a.layout));var d=null;c&&c.Yv&&(d=new c.Yv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Dq(d,a,!0); d.workerLayout=function(){var a=Fq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Aq(){this.Yv=null;this.Ry=this.l=this.name="";this.scripts=[];this.bf=null;this.Tm=new Bb}function sq(a){eb(this);F&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.qc=a;this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb} sq.prototype.clear=function(){if(this.Ff)for(var a=this.Ff.iterator;a.next();)a.value.clear();if(this.ve)for(a=this.ve.iterator;a.next();)a.value.clear();this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb}; @@ -1795,10 +1795,10 @@ Hq.prototype.serializeEdgeProperties=function(a){a.id=ob(this);a.key=this.link?t Hq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+ob(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ca("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +break;case Qq:e.sort(this.comparer);break;case Sq:e.sort(this.comparer),e.reverse()}var f=this.wrappingColumn;isNaN(f)&&(f=0);var g=this.wrappingWidth;isNaN(g)&&null!==a?(b=a.padding,g=Math.max(a.viewportBounds.width-b.left-b.right,0)):g=Math.max(this.wrappingWidth,0);0>=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ea("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new L(0,u,g+h,x)),y=0,q=r,u+=x,x=0;x=Math.max(x,M);switch(p){case Vq:D=-D.width;break;default:D=0}B.moveTo(q+D,u);switch(p){case Vq:q-=G;break;default:q+=G}y++}d.push(new L(0,u,g+h,x));L.free(l);break;case Oq:k=g;m=f;n=b;p=c;g=L.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=B=0;G=Math.max(this.cellSize.height,1);D=f=0;M=!0;y=J.alloc();for(Y=0;Yn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ii.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ia(a);for(b=this.nodes.iterator;b.next();)b.value.Ia(a);for(b=this.links.iterator;b.next();)b.value.Ia(a)}; -Ii.prototype.xr=function(){for(var a=this.C.model,b=new I,c=a.nodeDataArray,d=0;dn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ji.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ja(a);for(b=this.nodes.iterator;b.next();)b.value.Ja(a);for(b=this.links.iterator;b.next();)b.value.Ja(a)}; +Ji.prototype.xr=function(){for(var a=this.B.model,b=new I,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1911,10 +1911,10 @@ t.dl=function(a){A(a,"function",X,"removeChangedListener:listener");this.pv.remo function Mr(a,b,c,d,e,f,g,h,k){void 0===h&&(h=null);void 0===k&&(k=null);var l=new Be;l.model=a;l.change=c;l.modelChange=b;l.propertyName=d;l.object=e;l.oldValue=f;l.oldParam=h;l.newValue=g;l.newParam=k;a.Mt(l)} X.prototype.changeState=function(a,b){if(null!==a&&a.model===this)if(a.change===Ce){var c=a.object,d=a.propertyName,e=a.J(b);d===this.nodeKeyProperty&&this.$a(c)&&(b=a.J(!b),void 0!==b&&this.bb.remove(b),void 0!==e&&this.bb.add(e,c));ik(c,d,e)}else a.change===Le?(c=a.newParam,"nodeDataArray"===a.modelChange?(a=a.newValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)):(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)))):""===a.modelChange? ((d=a.object)&&!Ha(d)&&a.propertyName&&(d=Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.newValue,b?La(d,c):Ka(d,c,a))):v("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Me?(c=a.oldParam,"nodeDataArray"===a.modelChange?(a=a.oldValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)):(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)))):""===a.modelChange?((d=a.object)&&!Ha(d)&&a.propertyName&&(d= -Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ca=function(a){return this.undoManager.Ca(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; -X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ia=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} +Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ea=function(a){return this.undoManager.Ea(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; +X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ja=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} t.pa=function(a){if(null!==a){var b=this.Yi;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for node data "+a+" is not a number or a string: "+b)}}}; -t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; +t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; t.Qb=function(a){null===a&&v("Model.findNodeDataForKey:key must not be null");return void 0!==a&&lr(a)?this.bb.J(a):null}; t.lu=function(a){if(null!==a){var b=this.Yi;if(""!==b){var c=this.pa(a);if(void 0===c||this.bb.contains(c)){var d=this.bm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.bb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.bb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.bb.count-1;this.bb.contains(c);)c--;ik(a,b,c)}else F&&v("Model.getKeyForNodeData returned something other than a string or a number: "+c)}}}}; t.Gf=function(a){null!==a&&(rb(a),this.$a(a)||dr(this,a,!0))};function dr(a,b,c){var d=a.pa(b);if(void 0===d||a.bb.J(d)!==b)a.lu(b),d=a.pa(b),void 0===d?v("Model.makeNodeDataKeyUnique failed on "+b+". Data not added to Model."):(a.bb.add(d,b),d=null,c&&(d=a.xc.length,Ka(a.xc,d,b)),Mr(a,"nodeDataArray",Le,"nodeDataArray",a,null,b,null,d),a.dn(b),a.cn(b))}t.Hz=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",Le,"",a,null,c,null,b)}; t.Hw=function(a,b){void 0===b&&(b=-1);F&&(Ia(a,X,"removeArrayItem:arr"),C(b,X,"removeArrayItem:idx"));a===this.xc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",Me,"",a,c,null,b,null)};t.Vq=function(a){if(null===a)return"";var b=this.jk;if(""===b)return"";b=Mn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Li(){return new X} +t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Mi(){return new X} function Fr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Fr(a,b.constructor);return typeof b}function Kr(a){return Qr[a]?Qr[a]:void 0!==qa.go&&qa.go[a]?qa.go[a]:null}function Mn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){F&&Ea("property get error: "+d.toString())}return c} function ik(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){F&&Ea("property set error: "+d.toString())}} na.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(A(a,"string",X,"name"),this.va=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Yn},set:function(a){var b=this.Yn;b!==a&&(A(a,"string",X,"dataFormat"),this.Yn=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ia(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, +X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ja(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Hg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Me){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.bc(a),b?(this.mg.add(a),this.fd[c]!==a&&this.fd.splice(c,0,a),void 0!==d&&this.mb.add(d,a)):(this.mg.remove(a),this.fd[c]=== a&&this.fd.splice(c,1),void 0!==d&&this.mb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Nf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Um=function(a){if(void 0!==a){var b=this.Mj;if(null!==b){var c=this.Qb(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Gf(c))}return a}}; t.My=function(a){return jr(this,a,!0)};t.Pw=function(a,b){rr(this,a,b,!0)};t.Py=function(a){return jr(this,a,!1)};t.Uw=function(a,b){rr(this,a,b,!1)};function jr(a,b,c){if(null!==b&&(a=c?a.nf:a.pf,""!==a&&(a=Mn(b,a),void 0!==a))){if(lr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function rr(a,b,c,d){null===c&&(c=void 0);void 0===c||lr(c)||ya(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.nf:a.pf;if(""!==e)if(c=a.Um(c),a.Dc(b)){var f=Mn(b,e);f!==c&&(pr(a,f,b),ik(b,e,c),null===a.Qb(c)&&qr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}}t.Ny=function(a){return ir(this,a,!0)};t.Qw=function(a,b){sr(this,a,b,!0)};t.Qy=function(a){return ir(this,a,!1)}; -t.Vw=function(a,b){sr(this,a,b,!1)};function ir(a,b,c){if(null===b)return"";a=c?a.fk:a.gk;if(""===a)return"";b=Mn(b,a);return void 0===b?"":b}function sr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.fk:a.gk;if(""!==e)if(a.Dc(b)){var f=Mn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}} -t.Nf=function(a){if(null===a)return Vr;var b=this.ge;if(""===b)return Vr;a=Mn(a,b);return void 0===a?Vr:a};t.wu=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ge;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Dc(a)&&(pr(this,b,a),Mr(this,"linkLabelKeys",Me,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c))}else ik(a,c,b)}}; +t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c))}else ik(a,c,b)}}; t.Pg=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&lr(a)?this.mb.J(a):null}; t.er=function(a){if(null!==a){var b=this.Si;if(""!==b){var c=this.bc(a);if(void 0===c||this.mb.contains(c)){var d=this.cm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.mb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.mb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.mb.count-1;this.mb.contains(c);)c--;ik(a,b,c)}else F&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; t.Dc=function(a){return null===a?!1:this.mg.contains(a)};t.mj=function(a){null!==a&&(rb(a),this.Dc(a)||nr(this,a,!0))};function nr(a,b,c){if(""!==a.linkKeyProperty){var d=a.bc(b);if(void 0!==d&&a.mb.J(d)===b)return;a.er(b);d=a.bc(b);if(void 0===d){v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.mb.add(d,b)}a.mg.add(b);d=null;c&&(d=a.fd.length,a.fd.splice(d,0,b));Mr(a,"linkDataArray",Le,"linkDataArray",a,null,b,null,d);Wr(a,b)} @@ -1993,17 +1993,17 @@ t.nB=function(a){if(Array.isArray(a))for(var b=a.length,c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ur;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.M(k));if(k+1>=d.length)break;c.add(d.M(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gthis.Om||Math.abs(a)=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right:B<=n.bounds.x)M= -(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q-1).x,x=b.i(q- -1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]);G=Math.max(10, -this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D=u.centerY,p?180===this.N||0===this.N? -(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++,B,D),b.m(q++,B,D+G)):270===this.N? -(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y),D),b.m(q++,y,z),b.m(q++,B,z)))}null!== -d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right: +B<=n.bounds.x)M=(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q- +1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]); +G=Math.max(10,this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););if(null===u)break;u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D= +u.centerY,p?180===this.N||0===this.N?(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++, +B,D),b.m(q++,B,D+G)):270===this.N?(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y), +D),b.m(q++,y,z),b.m(q++,B,z)))}null!==d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.mdb.md?1:a.Bcb.Bc?1:0:0};t.fz=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0}; -t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; +t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.C=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; t.Gj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ie.length){var d=[];for(var e=0;ee?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(Qe?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(QXa&&(Qu(a,-Xa,0,xa,Aa-1),Ru(D,-Xa,0),Ru(G,-Xa,0),Xa=0)}Ua.V.h(Xa,ca);x=Math.max(x,M);z=Math.max(z,B+(0===T?0:q)+tb.height);Q=M}else{0n&&(caXa&&(Qu(a,0,-Xa,xa,Aa-1),Ru(D,0,-Xa),Ru(G,0,-Xa),Xa=0);Ua.V.h(Q,Xa);z=Math.max(z,Y);x=Math.max(x,B+(0===T?0:q)+tb.width);ca=Y}P++}0l&&(l=0),135u&&(u=0),k===vu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>x&&(x=Wu(k,d-x,0),g=x.x,h=x.y,x=d,l=0):x=Uu(a,x,l),0>l&&(g-=l,l=0),135z&&(z=Wu(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=Vu(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(l+d,0),T[1].h(T[0].x,y),T[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(0,u+y),T[1].h(d,T[0].y),T[2].xd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yn&&(n=0),135x&&(x=0));b.la.h(n,x);b.Ba.h(B,D)}} -function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Ba.width,e=a.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), +1].V.y+e[g-1].la.y+2*e[g-1].focus.y-l)/2-b.focus.y-q/2);break;case Gu:c?(n-=q,B+=q):(x-=q,D+=q);break;case Hu:c?(n+=B-b.width+q,B+=q):(x+=D-b.height+q,D+=q);break;case tu:case ju:c?1n&&(n=0),135x&&(x=0));b.la.h(n,x);b.Da.h(B,D)}} +function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Da.width,e=a.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), 0>b.V.x&&(c=$u(a,b.V.x,!1,c,g))):(b.V.h(d+h,c+g/2-b.focus.y-b.la.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.la.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.V.y&&(c=$u(a,b.V.y,!0,c,g))));return new L(c,0,d,e)} -function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Ba.width,e=b.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Da.width,e=b.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.V.x&&(c=$u(a,h.V.x,!1,c,g))):(h.V.h(-d-l.width-q,c+g/2-h.focus.y-h.la.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.la.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.V.y&&(c=$u(a,h.V.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case Gu:return a.width>b?a.width:b;case Hu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case tu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case uu:return a.width-a.focus.x+a.nodeSpacing/2+b;case vu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Vu(a,b,c){F&&w(a,Yt,Z,"calculateSubheight:v");switch(a.alignment){case Tu:case Su:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Gu:return a.height>b?a.height:b;case Hu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case tu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case uu:return a.height-a.focus.y+a.nodeSpacing/2+b;case vu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Wu(a,b,c){F&&w(a,E,Z,"alignOffset:align");switch(a){case Su:b/=2;c/=2;break;case Tu:b/=2;c/=2;break;case Gu:c=b=0;break;case Hu:break;default:v("Unhandled alignment value "+a.toString())}return new J(b,c)}function Nu(a,b,c,d,e,f){F&&w(a,Yt,Z,"shiftRelPosAlign:v");F&&w(b,E,Z,"shiftRelPosAlign:align");b=Wu(b,c,d);Qu(a,b.x,b.y,e,f)}function Qu(a,b,c,d,e){F&&w(a,Yt,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].V;f.x+=b;f.y+=c}} function Ou(a,b,c,d){F&&(w(b,Yt,Z,"recordMidPoints:v"),A(c,"number",Z,"recordMidPoints:x"),A(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.qd){case Tt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case $t:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.qd.toString())}}function Ru(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c= +function Pu(a,b,c,d,e,f,g,h){F&&w(b,Yt,Z,"mergeFringes:parent");F&&w(c,Yt,Z,"mergeFringes:child");var k=Fu(b),l=90===k||270===k,m=b.nodeSpacing;b=d;var n=e;d=f;var p=g,r=c.cr,q=c.qr;g=c.Da;var u=l?Math.max(p,g.height):Math.max(d,g.width);if(null===r||k!==Fu(c))r=Mu(a,2),q=Mu(a,2),l?(r[0].h(0,0),r[1].h(0,g.height),q[0].h(g.width,0),q[1].h(q[0].x,r[1].y)):(r[0].h(0,0),r[1].h(g.width,0),q[0].h(0,g.height),q[1].h(r[1].x,q[0].y));if(l){p=9999999;if(!(null===n||2>n.length||null===r||2>r.length))for(e=c= 0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Mu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Mu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Mu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, k.y);f=Mu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Mu(a,e);for(c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Ju(c))))):c.alignment===Gu?(e=d.top+b.y,0===b.y&&m.yc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;ga&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.G=a*b-d*c;this.H=d*b+a*c;return this};t=J.prototype; t.scale=function(a,b){F&&(C(a,J,"scale:sx"),C(b,J,"scale:sy"),this.ha());this.G*=a;this.H*=b;return this};t.Ve=function(a){F&&w(a,J,J,"distanceSquaredPoint:p");var b=a.x-this.G;a=a.y-this.H;return b*b+a*a};t.wd=function(a,b){F&&(C(a,J,"distanceSquared:px"),C(b,J,"distanceSquared:py"));a-=this.G;b-=this.H;return a*a+b*b};t.normalize=function(){F&&this.ha();var a=this.G,b=this.H,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c} @@ -112,7 +112,7 @@ J.distanceSquared=Jb;J.direction=Kb;function Fb(a,b){void 0===a?this.ea=this.fa= Fb.prototype.Ug=function(a,b){F&&(A(a,"number",Fb,"setTo:w"),A(b,"number",Fb,"setTo:h"),0>a&&za(a,">= 0",Fb,"setTo:w"),0>b&&za(b,">= 0",Fb,"setTo:h"),this.ha());this.fa=a;this.ea=b;return this};Fb.prototype.set=function(a){F&&(w(a,Fb,Fb,"set:s"),this.ha());this.fa=a.fa;this.ea=a.ea;return this};Fb.prototype.copy=function(){var a=new Fb;a.fa=this.fa;a.ea=this.ea;return a};t=Fb.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function $b(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Fb(c,e)}return new Fb}function ac(a){F&&w(a,Fb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.A=function(a){return a instanceof Fb?this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b){return this.fa===a&&this.ea===b}; -t.Wa=function(a){return K.B(this.fa,a.width)&&K.B(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; +t.Wa=function(a){return K.C(this.fa,a.width)&&K.C(this.ea,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};Fb.alloc=function(){var a=bc.pop();return void 0===a?new Fb:a};Fb.free=function(a){bc.push(a)}; na.Object.defineProperties(Fb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){F&&(A(a,"number",Fb,"width"),this.ha(a));0>a&&za(a,">= 0",Fb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.ea},set:function(a){F&&(A(a,"number",Fb,"height"),this.ha(a));0>a&&za(a,">= 0",Fb,"height");this.ea=a}}});Fb.prototype.isReal=Fb.prototype.o;Fb.prototype.equalsApprox=Fb.prototype.Wa;Fb.prototype.equalTo=Fb.prototype.qj; Fb.prototype.equals=Fb.prototype.A;Fb.prototype.set=Fb.prototype.set;Fb.prototype.setTo=Fb.prototype.Ug;var bc=[];Fb.className="Size";Fb.parse=$b;Fb.stringify=ac;Fb.ZeroSize=Rb=(new Fb(0,0)).ia();Fb.OneSize=Sb=(new Fb(1,1)).ia();Fb.SixSize=Tb=(new Fb(6,6)).ia();Fb.EightSize=Ub=(new Fb(8,8)).ia();Fb.TenSize=Vb=(new Fb(10,10)).ia();Fb.InfiniteSize=Wb=(new Fb(Infinity,Infinity)).ia();Fb.NoSize=Zb=(new Fb(NaN,NaN)).ia();Fb.parse=$b;Fb.stringify=ac; function L(a,b,c,d){void 0===a?this.ea=this.fa=this.H=this.G=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.G=Math.min(c,d),this.H=Math.min(a,b),this.fa=Math.abs(c-d),this.ea=Math.abs(a-b)):b instanceof Fb?(this.G=c,this.H=a,this.fa=b.width,this.ea=b.height):v("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.G=a,this.H=b,this.fa=c,this.ea=d):v("Invalid arguments to Rect constructor: "+ @@ -120,7 +120,7 @@ a+", "+b+", "+c+", "+d);this.s=!1}t=L.prototype;t.assign=function(a){this.G=a.G; t.set=function(a){F&&(w(a,L,L,"set:r"),this.ha());this.G=a.G;this.H=a.H;this.fa=a.fa;this.ea=a.ea;return this};t.Wc=function(a){F&&(w(a,J,L,"setPoint:p"),this.ha());this.G=a.x;this.H=a.y;return this};t.vB=function(a){F&&(w(a,Fb,L,"setSize:s"),this.ha());this.fa=a.width;this.ea=a.height;return this};L.prototype.copy=function(){var a=new L;a.G=this.G;a.H=this.H;a.fa=this.fa;a.ea=this.ea;return a};t=L.prototype;t.ia=function(){this.s=!0;Object.freeze(this);return this}; t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function dc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new L(c,e,f,g)}return new L}function ec(a){F&&w(a,L);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()} -t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.B(this.G,a.x)&&K.B(this.H,a.y)&&K.B(this.fa,a.width)&&K.B(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} +t.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};t.A=function(a){return a instanceof L?this.G===a.x&&this.H===a.y&&this.fa===a.width&&this.ea===a.height:!1};t.qj=function(a,b,c,d){return this.G===a&&this.H===b&&this.fa===c&&this.ea===d};t.Wa=function(a){return K.C(this.G,a.x)&&K.C(this.H,a.y)&&K.C(this.fa,a.width)&&K.C(this.ea,a.height)};function fc(a,b){return K.da(a.G,b.x)&&K.da(a.H,b.y)&&K.da(a.fa,b.width)&&K.da(a.ea,b.height)} t.ca=function(a){F&&w(a,J,L,"containsPoint:p");return this.G<=a.x&&this.G+this.fa>=a.x&&this.H<=a.y&&this.H+this.ea>=a.y};t.Te=function(a){F&&w(a,L,L,"containsRect:r");return this.G<=a.x&&a.x+a.width<=this.G+this.fa&&this.H<=a.y&&a.y+a.height<=this.H+this.ea}; t.contains=function(a,b,c,d){F?(C(a,L,"contains:x"),C(b,L,"contains:y"),void 0===c?c=0:C(c,L,"contains:w"),void 0===d?d=0:C(d,L,"contains:h"),(0>c||0>d)&&v("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.G<=a&&a+c<=this.G+this.fa&&this.H<=b&&b+d<=this.H+this.ea};t.offset=function(a,b){F&&(C(a,L,"offset:dx"),C(b,L,"offset:dy"),this.ha());this.G+=a;this.H+=b;return this}; t.Pc=function(a,b){F&&(C(a,L,"inflate:w"),C(b,L,"inflate:h"));return gc(this,b,a,b,a)};t.Hq=function(a){F&&w(a,hc,L,"addMargin:m");return gc(this,a.top,a.right,a.bottom,a.left)};t.Xw=function(a){F&&w(a,hc,L,"subtractMargin:m");return gc(this,-a.top,-a.right,-a.bottom,-a.left)};t.MA=function(a,b,c,d){F&&(C(a,L,"grow:t"),C(b,L,"grow:r"),C(c,L,"grow:b"),C(d,L,"grow:l"));return gc(this,a,b,c,d)}; @@ -145,7 +145,7 @@ hc.prototype.Ug=function(a,b,c,d){F&&(A(a,"number",hc,"setTo:t"),A(b,"number",hc t.ia=function(){this.s=!0;Object.freeze(this);return this};t.K=function(){return this.s||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.s=!0;return this};t.ka=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.s=!1;return this};t.ha=function(a){if(F&&this.s){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; function wc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new hc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new hc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new hc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new hc(c,e):new hc(c,e,f,g)}return new hc} function xc(a){F&&w(a,hc);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.A=function(a){return a instanceof hc?this.Qe===a.top&&this.Oe===a.right&&this.se===a.bottom&&this.Fe===a.left:!1};t.qj=function(a,b,c,d){return this.Qe===a&&this.Oe===b&&this.se===c&&this.Fe===d}; -t.Wa=function(a){return K.B(this.Qe,a.top)&&K.B(this.Oe,a.right)&&K.B(this.se,a.bottom)&&K.B(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; +t.Wa=function(a){return K.C(this.Qe,a.top)&&K.C(this.Oe,a.right)&&K.C(this.se,a.bottom)&&K.C(this.Fe,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};hc.alloc=function(){var a=yc.pop();return void 0===a?new hc:a};hc.free=function(a){yc.push(a)}; na.Object.defineProperties(hc.prototype,{top:{configurable:!0,get:function(){return this.Qe},set:function(a){F&&(C(a,hc,"top"),this.ha(a));this.Qe=a}},right:{configurable:!0,get:function(){return this.Oe},set:function(a){F&&(C(a,hc,"right"),this.ha(a));this.Oe=a}},bottom:{configurable:!0,get:function(){return this.se},set:function(a){F&&(C(a,hc,"bottom"),this.ha(a));this.se=a}},left:{configurable:!0,get:function(){return this.Fe},set:function(a){F&& (C(a,hc,"left"),this.ha(a));this.Fe=a}}});hc.prototype.isReal=hc.prototype.o;hc.prototype.equalsApprox=hc.prototype.Wa;hc.prototype.equalTo=hc.prototype.qj;hc.prototype.equals=hc.prototype.A;hc.prototype.set=hc.prototype.set;hc.prototype.setTo=hc.prototype.Ug;var zc=null,Ac=null,yc=[];hc.className="Margin";hc.parse=wc;hc.stringify=xc;hc.ZeroMargin=zc=(new hc(0,0,0,0)).ia();hc.TwoMargin=Ac=(new hc(2,2,2,2)).ia();hc.parse=wc;hc.stringify=xc; function N(a,b,c,d){void 0===a?this.ie=this.he=this.H=this.G=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.s=!1}var Bc,Ec,Fc,Gc,Hc,Kc,Lc,Mc,Nc,Oc,Pc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,ad,bd,cd,dd,ed,fd,gd,hd,kd,ld,md,nd,od,pd,qd,rd;N.prototype.assign=function(a){this.G=a.G;this.H=a.H;this.he=a.he;this.ie=a.ie;return this}; @@ -175,7 +175,7 @@ t.Pd=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=a.x,d=a.y;retur t.ex=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,r=d*f+c*h+l,q=d*g+c*k+m;c=b*f+e*h+l;b=b*g+e*k+m;f=d*f+e*h+l;d=d*g+e*k+m;e=Math.min(n,r);n=Math.max(n,r);r=Math.min(p,q);p=Math.max(p,q);e=Math.min(e,c);n=Math.max(n,c);r=Math.min(r,b);p=Math.max(p,b);e=Math.min(e,f);n=Math.max(n,f);r=Math.min(r,d);p=Math.max(p,d);a.h(e,r,n-e,p-r);return a};Gb.alloc=function(){var a=yd.pop();return void 0===a?new Gb:a}; Gb.free=function(a){yd.push(a)};Gb.prototype.transformRect=Gb.prototype.ex;Gb.prototype.transformPoint=Gb.prototype.Aa;Gb.prototype.scale=Gb.prototype.scale;Gb.prototype.translate=Gb.prototype.translate;Gb.prototype.rotate=Gb.prototype.rotate;Gb.prototype.invert=Gb.prototype.eu;Gb.prototype.multiplyInverted=Gb.prototype.xw;Gb.prototype.multiply=Gb.prototype.multiply;Gb.prototype.reset=Gb.prototype.reset;Gb.prototype.isIdentity=Gb.prototype.gu;Gb.prototype.equals=Gb.prototype.A;Gb.prototype.set=Gb.prototype.set; var yd=[];Gb.className="Transform";Gb.xF="54a702f3e53909c447824c6706603faf4c"; -var K={FB:"7da71ca0ad381e90",Wg:(Math.sqrt(2)-1)/3*4,yx:null,sqrt:function(a){if(0>=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},B:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(a=a)return 0;var b=K.yx;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.yx=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},C:function(a,b){a-=b;return.5>a&&-.5a&&-5E-8=e&&(e=1E-6);if(am-l)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Lt:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Tb(a,b,g,h,n,c,d)&&K.Tb(a,b,g,h,n,e,f))return K.Tb(a,b,g,h,n,l,m);var p=(a+c)/2,r=(b+d)/2,q=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+q)/2;c=(r+u)/2;q=(q+e)/2;u=(u+f)/2;var y=(d+q)/2,x=(c+u)/2;return K.Lt(a, b,p,r,d,c,y,x,k,l,m,n)||K.Lt(y,x,q,u,e,f,g,h,k,l,m,n)},Pz:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.h((((a+c)/2+l)/2+(l+(e+g)/2)/2)/2,(((b+d)/2+m)/2+(m+(f+h)/2)/2)/2);return k},Oz:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Kb(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Im:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))kc(l,a,b,0,0),kc(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/ 2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Im(a,b,m,n,d,c,q,u,k,l);K.Im(q,u,p,r,e,f,g,h,k,l)}return l},Se:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,g,h,k,c,d)&&K.Tb(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,r=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+r)/2;p=(p+e)/2;r=(r+f)/2;var q=(d+p)/2,u=(c+r)/2;K.Se(a,b,m,n,d,c,q,u,k,l);K.Se(q,u,p,r,e,f,g,h,k,l)}return l},Ew:function(a,b,c,d,e,f,g,h,k,l){if(K.Tb(a,b,e,f,l,c,d))return K.Tb(a, @@ -183,7 +183,7 @@ b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,r=(n+d)/2 h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;K.ir(a,b,k,l,m,n,g,h);K.ir(m,n,c,d,e,f,g,h)}return h},Jq:function(a,b,c,d,e,f,g,h,k,l,m,n,p,r){if(K.Tb(a,b,g,h,p,c,d)&&K.Tb(a,b,g,h,p,e,f)){if(!K.Qm(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;r.h(((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p);return!0}var q=(a+c)/2,u=(b+d)/2,y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/ 2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2,D=Infinity,G=!1,M=0,Y=0;K.Jq(a,b,q,u,d,c,z,B,k,l,m,n,p,r)&&(a=(r.x-k)*(r.x-k)+(r.y-l)*(r.y-l),a=m)return r; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(bb)return r}else if(aa)return r;0p&&r--}else{q=(a+c)/2;u=(b+d)/2;var y=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(q+y)/2;c=(u+x)/2;y=(y+e)/2;x=(x+f)/2;var z=(d+y)/2,B=(c+x)/2;r+=K.Kq(a,b,q,u,d,c,z,B,k,l,m,n,p);r+=K.Kq(z,B,y,x,e,f,g,h,k,l,m,n,p)}return r},ai:function(a,b,c,d,e,f,g){if(K.da(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.da(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; +d=c;if(ea)return g.h(a,b),!1;g.h(e,b);return!0}e=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>e)return g.h(a,b),!1;if(1.000005b)return k.h(a,b),!1; k.h(a,c);return!0}g=(d-b)/(c-a);if(K.da(h,g))return K.ai(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.da(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.ai(a,b,c,d,e,g*(e-a)+b,k)},NB:function(a,b,c,d,e){return K.Ze(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},MB:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p,c*p-c*a+b)}return k},Of:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ze(a,b,a,d,e,f, g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},LB:function(a,b,c,d,e,f,g,h,k){c=a-c;g=e-g;0===c||0===g?0===c?(b=(f-h)/g,h=a,e=b*h+(f-b*e)):(f=(b-d)/c,h=e,e=f*h+(b-f*a)):(d=(b-d)/c,h=(f-h)/g,a=b-d*a,h=(f- @@ -195,8 +195,8 @@ m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Ma function zd(a){F&&1a?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case Kd:var b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+ " "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+"V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ld:b=new L(this.startX,this.startY,0,0);b.hx(this.endX,this.endY,0,0);if(0>a)return a=b.left.toString()+" "+(b.y+b.height/2).toString(),"M"+a+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+(b.right.toString()+" "+(b.y+b.height/2).toString())+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+a;var c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+(b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a))+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Ad:b="";c=this.figures.j;for(var d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.j,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.aj=0,F&&C(d,we,"x1"),this.bj=Math.max(d,0),F&&C(e,we,"y1"),this.Bh=Math.max(e,0),this.Yl="boolean"===typeof g?g:"number"===typeof g?!!g:!1,this.ql=!!h):(F&&C(d,we,"x1"),this.Ne=d, F&&C(e,we,"y1"),this.aj=e,F&&C(f,we,"x2"),a===ne&&(f=Math.max(f,0)),this.bj=f,"number"===typeof g?(a===ne&&(g=Math.max(g,0)),this.Bh=g):this.Bh=0,this.ql=this.Yl=!1);this.$j=!1;this.xa=!0;this.Wd=null}we.prototype.copy=function(){var a=new we;a.sa=this.sa;a.nc=this.nc;a.tc=this.tc;a.Ne=this.Ne;a.aj=this.aj;a.bj=this.bj;a.Bh=this.Bh;a.Yl=this.Yl;a.ql=this.ql;a.$j=this.$j;a.xa=this.xa;return a};t=we.prototype; -t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case le:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y)&&K.B(this.point2X,a.point2X)&&K.B(this.point2Y,a.point2Y);case me:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.point1X,a.point1X)&&K.B(this.point1Y,a.point1Y);case ne:return K.B(this.startAngle, -a.startAngle)&&K.B(this.sweepAngle,a.sweepAngle)&&K.B(this.centerX,a.centerX)&&K.B(this.centerY,a.centerY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.B(this.xAxisRotation,a.xAxisRotation)&&K.B(this.endX,a.endX)&&K.B(this.endY,a.endY)&&K.B(this.radiusX,a.radiusX)&&K.B(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; +t.Wa=function(a){if(!(a instanceof we)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ke:case Id:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY);case le:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y)&&K.C(this.point2X,a.point2X)&&K.C(this.point2Y,a.point2Y);case me:return K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.point1X,a.point1X)&&K.C(this.point1Y,a.point1Y);case ne:return K.C(this.startAngle, +a.startAngle)&&K.C(this.sweepAngle,a.sweepAngle)&&K.C(this.centerX,a.centerX)&&K.C(this.centerY,a.centerY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);case oe:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&K.C(this.xAxisRotation,a.xAxisRotation)&&K.C(this.endX,a.endX)&&K.C(this.endY,a.endY)&&K.C(this.radiusX,a.radiusX)&&K.C(this.radiusY,a.radiusY);default:return!1}};t.pb=function(a){a.classType===we?this.type=a:Da(this,a)}; t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case ke:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Id:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case le:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+ " "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case me:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ne:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+ " "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case oe:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+ @@ -264,26 +264,26 @@ a;this.xa=!0}},point2Y:{configurable:!0,get:function(){return this.Bh},set:funct get:function(){return this.bj},set:function(a){F&&C(a,we,"radiusX");0>a&&za(a,">= zero",we,"radiusX");this.s&&va(this,a);this.bj=a;this.xa=!0}},radiusY:{configurable:!0,get:function(){return this.Bh},set:function(a){F&&C(a,we,"radiusY");0>a&&za(a,">= zero",we,"radiusY");this.s&&va(this,a);this.Bh=a;this.xa=!0}},startAngle:{configurable:!0,get:function(){return this.nc},set:function(a){this.nc!==a&&(this.s&&va(this,a),F&&C(a,we,"startAngle"),a%=360,0>a&&(a+=360),this.nc= a,this.xa=!0)}},sweepAngle:{configurable:!0,get:function(){return this.tc},set:function(a){F&&C(a,we,"sweepAngle");this.s&&va(this,a);360a&&(a=-360);this.tc=a;this.xa=!0}},isClockwiseArc:{configurable:!0,get:function(){return this.ql},set:function(a){this.s&&va(this,a);this.ql=a;this.xa=!0}},isLargeArc:{configurable:!0,get:function(){return this.Yl},set:function(a){this.s&&va(this,a);this.Yl=a;this.xa=!0}},xAxisRotation:{configurable:!0, get:function(){return this.Ne},set:function(a){F&&C(a,we,"xAxisRotation");a%=360;0>a&&(a+=360);this.s&&va(this,a);this.Ne=a;this.xa=!0}}});we.prototype.equalsApprox=we.prototype.Wa;var ke=new E(we,"Move",0),Id=new E(we,"Line",1),le=new E(we,"Bezier",2),me=new E(we,"QuadraticBezier",3),ne=new E(we,"Arc",4),oe=new E(we,"SvgArc",4);we.className="PathSegment";we.Move=ke;we.Line=Id;we.Bezier=le;we.QuadraticBezier=me;we.Arc=ne;we.SvgArc=oe; -function ye(){this.C=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; -ye.prototype.clone=function(a){a.C=this.C;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; +function ye(){this.B=null;this.Lv=(new J(0,0)).freeze();this.Vu=(new J(0,0)).freeze();this.Lr=this.Ms=0;this.Mr=1;this.Oi="";this.Ft=this.fs=!1;this.cs=this.Or=0;this.ah=this.ps=this.zs=!1;this.ls=null;this.At=0;this.vd=this.zt=null}ye.prototype.copy=function(){var a=new ye;return this.clone(a)}; +ye.prototype.clone=function(a){a.B=this.B;a.Lv.assign(this.viewPoint);a.Vu.assign(this.documentPoint);a.Ms=this.Ms;a.Lr=this.Lr;a.Mr=this.Mr;a.Oi=this.Oi;a.fs=this.fs;a.Ft=this.Ft;a.Or=this.Or;a.cs=this.cs;a.zs=this.zs;a.ps=this.ps;a.ah=this.ah;a.ls=this.ls;a.At=this.At;a.zt=this.zt;a.vd=this.vd;return a}; ye.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};ye.prototype.Wq=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);return b}; ye.prototype.GA=function(a,b){var c=this.diagram;if(null===c)return b;ze(c,this.event,a,b);b.assign(c.Bu(b));return b}; -na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= +na.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{configurable:!0,get:function(){return this.Lv},set:function(a){w(a,J,ye,"viewPoint");this.Lv.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.Vu},set:function(a){w(a,J,ye,"documentPoint");this.Vu.assign(a)}},modifiers:{configurable:!0,get:function(){return this.Ms},set:function(a){this.Ms= a}},button:{configurable:!0,get:function(){return this.Lr},set:function(a){this.Lr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{configurable:!0,get:function(){return this.Mr},set:function(a){this.Mr=a}},key:{configurable:!0,get:function(){return this.Oi},set:function(a){this.Oi=a}},down:{configurable:!0,get:function(){return this.fs},set:function(a){this.fs=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.Ft},set:function(a){this.Ft=a}},clickCount:{configurable:!0,get:function(){return this.Or},set:function(a){this.Or=a}},delta:{configurable:!0,get:function(){return this.cs},set:function(a){this.cs=a}},isMultiTouch:{configurable:!0,get:function(){return this.zs},set:function(a){this.zs=a}},handled:{configurable:!0,get:function(){return this.ps},set:function(a){this.ps=a}},bubbles:{configurable:!0, get:function(){return this.ah},set:function(a){this.ah=a}},event:{configurable:!0,get:function(){return this.ls},set:function(a){this.ls=a}},isTouchEvent:{configurable:!0,get:function(){var a=qa.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=qa.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{configurable:!0,get:function(){return this.At},set:function(a){this.At=a}},targetDiagram:{configurable:!0, get:function(){return this.zt},set:function(a){this.zt=a}},targetObject:{configurable:!0,get:function(){return this.vd},set:function(a){this.vd=a}},control:{configurable:!0,get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{configurable:!0,get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{configurable:!0, get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{configurable:!0,get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons= a?this.buttons|1:this.buttons&-2}},right:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{configurable:!0,get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons& -4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.C=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.C=this.C;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; +4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}});ye.prototype.getMultiTouchDocumentPoint=ye.prototype.GA;ye.prototype.getMultiTouchViewPoint=ye.prototype.Wq;ye.className="InputEvent";function Ae(){this.B=null;this.va="";this.Ws=this.xt=null}Ae.prototype.copy=function(){var a=new Ae;a.B=this.B;a.va=this.va;a.xt=this.xt;a.Ws=this.Ws;return a}; Ae.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; -function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.C=this.ic=null}; -Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.C=this.C;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; +na.Object.defineProperties(Ae.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},subject:{configurable:!0,get:function(){return this.xt},set:function(a){this.xt=a}},parameter:{configurable:!0,get:function(){return this.Ws},set:function(a){this.Ws=a}}});Ae.className="DiagramEvent"; +function Be(){this.Jn=Ce;this.uf=this.Ls="";this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}Be.prototype.clear=function(){this.vp=this.wp=this.Cp=this.Dp=this.Bp=this.B=this.ic=null}; +Be.prototype.copy=function(){var a=new Be;a.Jn=this.Jn;a.Ls=this.Ls;a.uf=this.uf;a.ic=this.ic;a.B=this.B;a.Bp=this.Bp;var b=this.Dp;a.Dp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.Cp;a.Cp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.wp;a.wp=Ga(b)&&"function"===typeof b.K?b.K():b;b=this.vp;a.vp=Ga(b)&&"function"===typeof b.K?b.K():b;return a};Be.prototype.pb=function(a){a.classType===Be?this.change=a:Da(this,a)}; Be.prototype.toString=function(){var a="";a=this.change===De?a+"* ":this.change===Ce?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===De?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qa(this.object)),null!==this.oldValue&&(a+=" old: "+Qa(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Qa(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};Be.prototype.J=function(a){return a?this.oldValue:this.newValue};Be.prototype.IA=function(a){return a?this.oldParam:this.newParam};Be.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; Be.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};Be.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};Be.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.C},set:function(a){this.C=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, +na.Object.defineProperties(Be.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.B},set:function(a){this.B=a}},change:{configurable:!0,get:function(){return this.Jn},set:function(a){F&&gb(a,Be,Be,"change");this.Jn=a}},modelChange:{configurable:!0,get:function(){return this.Ls},set:function(a){F&&A(a,"string",Be,"modelChange");this.Ls=a}},propertyName:{configurable:!0, enumerable:!0,get:function(){return this.uf},set:function(a){F&&"string"!==typeof a&&A(a,"function",Be,"propertyName");this.uf=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Jn===De&&("CommittedTransaction"===this.uf||"FinishedUndo"===this.uf||"FinishedRedo"===this.uf)}},object:{configurable:!0,get:function(){return this.Bp},set:function(a){this.Bp=a}},oldValue:{configurable:!0,get:function(){return this.Dp},set:function(a){this.Dp= a}},oldParam:{configurable:!0,get:function(){return this.Cp},set:function(a){this.Cp=a}},newValue:{configurable:!0,get:function(){return this.wp},set:function(a){this.wp=a}},newParam:{configurable:!0,get:function(){return this.vp},set:function(a){this.vp=a}}});Be.prototype.redo=Be.prototype.redo;Be.prototype.canRedo=Be.prototype.canRedo;Be.prototype.undo=Be.prototype.undo;Be.prototype.canUndo=Be.prototype.canUndo;Be.prototype.getParam=Be.prototype.IA; Be.prototype.getValue=Be.prototype.J;Be.prototype.clear=Be.prototype.clear;var De=new E(Be,"Transaction",-1),Ce=new E(Be,"Property",0),Le=new E(Be,"Insert",1),Me=new E(Be,"Remove",2);Be.className="ChangedEvent";Be.Transaction=De;Be.Property=Ce;Be.Insert=Le;Be.Remove=Me;function Ne(){this.w=(new H).freeze();this.va="";this.l=!1} @@ -294,7 +294,7 @@ na.Object.defineProperties(Ne.prototype,{changes:{configurable:!0,get:function() Ne.prototype.clear=Ne.prototype.clear;Ne.className="Transaction";function Oe(){this.tv=new I;this.sd=!1;this.L=(new H).freeze();this.ce=-1;this.w=999;this.Ce=!1;this.Zr=null;this.ij=0;this.l=!1;F&&(this.l=!0);this.Je=(new H).freeze();this.fm=new H;this.cv=!0;this.iv=this.xs=this.mv=this.lv=!1} Oe.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;da.transactionLevel&&Ea("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Gb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.M(d),null!==f&&f.clear(),b.jb(d),a.xs=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.M(0),null!==f&&f.clear(),b.jb(0),a.ce--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.ce++);b.freeze()}a.isInternalTransaction||a.Gb("CommittedTransaction",c,e)}else{a.Ce=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -306,12 +306,12 @@ Oe.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Oe.prototype,{models:{configurable:!0,get:function(){return this.tv.iterator}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){this.sd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||v (e*=a.scrollHorizontalLineChange/16,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", -Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ca;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} +na.Object.defineProperties(Qe.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",Qe,"name");this.va=a}},isEnabled:{configurable:!0,get:function(){return this.sd},set:function(a){A(a,"boolean",Qe,"isEnabled");this.sd=a}},isActive:{configurable:!0,get:function(){return this.Yc},set:function(a){A(a,"boolean", +Qe,"isActive");this.Yc=a}},transactionResult:{configurable:!0,get:function(){return this.xx},set:function(a){null!==a&&A(a,"string",Qe,"transactionResult");this.xx=a}}});Qe.prototype.stopTransaction=Qe.prototype.Vg;Qe.prototype.startTransaction=Qe.prototype.Ea;Qe.className="Tool";function Ta(){Qe.call(this);this.name="ToolManager";this.Ic=new H;this.Zc=new H;this.Ud=new H;this.W=this.Pa=850;this.w=(new Fb(2,2)).ia();this.kb=5E3;this.Qa=Ue;this.L=We;this.Yr=this.l=null;this.vk=-1} ma(Ta,Qe);Ta.prototype.initializeStandardTools=function(){};Ta.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Ve&&this.Yr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Ta.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Xe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Ye){b.bubbles=!0;return}if(this.gestureBehavior===Xe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;F&&c.checksTransactionLevel&&0!==c.transactionLevel&&Ea("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; for(var d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;L.free(f); f=a.vt;g=new Bb;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.J(l),null!==m&&(m.points=l.points,Df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Jd())));for(b=b.iterator;b.next();)l=b.value,l.Tc()&&l.canCopy()&&(k=c.J(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ya(),g.add(k,a.Jd(h))));J.free(h);a.copiedParts=g;kf(a,g.Wf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,Df(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -420,7 +420,7 @@ enumerable:!0,get:function(){return this.Pa},set:function(a){A(a,"boolean",Tf,"i get:function(){return this.Ar},set:function(a){null!==a&&A(a,"function",Tf,"portTargeted");this.Ar=a}}});Tf.className="LinkingBaseTool";function hg(){0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ca(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Hc(),this.Ea(this.name),this.Us.set(this.adornedObject.ja(this.handle.alignment.Aw())),this.Ep.set(this.adornedObject.part.location),this.Ux.set(this.adornedObject.desiredSize),this.Yu=this.computeCellSize(),this.$u= this.computeMinSize(),this.Zu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.od();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.$u,c=this.Zu,d=this.Yu,e=this.adornedObject.Zt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Ta();this.transactionResult=this.name;a.U("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -492,7 +492,7 @@ set:function(a){w(a,J,vg,"oppositePoint");this.Us.A(a)||this.Us.assign(a)}},orig function Pg(){0c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.ja(b)};Pg.prototype.doDeactivate=function(){var a=this.diagram;this.Vg();this.re=this.handle=null;this.bt=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Pg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Pg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; @@ -508,7 +508,7 @@ Rg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Rg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.il;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Rg.prototype.doStop=function(){this.il=null};Rg.className="ActionTool";function Sg(){Qe.call(this);0a.lastInput.clickCount?!1:!0};hh.prototype.doStart=function(){rh=this;null!==this.textBlock&&this.doActivate()}; hh.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.ac(a.lastInput.documentPoint));if(null!==b&&b instanceof ih&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.oa=oh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Kh=this.textBlock.copy();var d=new L(this.textBlock.ja(Ec),this.textBlock.ja(Oc));a.Ow(d);c.show(b,a,this);this.currentTextEditor=c}}}};hh.prototype.doCancel=function(){this.stopTool()}; hh.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};hh.prototype.doMouseDown=function(){this.isActive&&this.acceptText(sh)};hh.prototype.acceptText=function(a){switch(a){case sh:if(this.oa===uh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this);break;case xh:case mh:case nh:if(mh!==a||!0!==this.textBlock.isMultiline)if(this.oa===oh||this.oa===qh||this.oa===ph)this.oa=vh,wh(this)}}; -function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ca(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} +function wh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.Ea(a.name),a.oa=uh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.U("TextEdited",b,e),a.Vg(),a.stopTool(),null!==c&&c.doFocus()):(a.oa=qh,a.doError(e,f))}} hh.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};hh.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};hh.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.oa=kh,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};hh.prototype.doStop=function(){rh=null}; hh.prototype.isValidText=function(a,b,c){w(a,ih,hh,"isValidText:textblock");var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};hh.prototype.Zy=function(a){var b=this.Kh;b.text=a;b.measure(this.textBlock.Pi,Infinity);return b}; na.Object.defineProperties(hh.prototype,{textBlock:{configurable:!0,get:function(){return this.Qa},set:function(a){null!==a&&w(a,ih,hh,"textBlock");this.Qa=a}},currentTextEditor:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}},defaultTextEditor:{configurable:!0,get:function(){return this.l},set:function(a){!F||a instanceof ef||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.l=a}},starting:{configurable:!0, @@ -562,169 +562,169 @@ get:function(){return this.Pa},set:function(a){gb(a,hh,hh,"starting");this.Pa=a} "boolean",hh,"selectsTextOnActivate");this.W=a}},state:{configurable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(gb(a,hh,hh,"starting"),this.oa=a)}}});hh.prototype.measureTemporaryTextBlock=hh.prototype.Zy; var xh=new E(hh,"LostFocus",0),sh=new E(hh,"MouseDown",1),nh=new E(hh,"Tab",2),mh=new E(hh,"Enter",3),yh=new E(hh,"SingleClick",0),jh=new E(hh,"SingleClickSelected",1),th=new E(hh,"DoubleClick",2),kh=new E(hh,"StateNone",0),oh=new E(hh,"StateActive",1),ph=new E(hh,"StateEditing",2),vh=new E(hh,"StateValidating",3),qh=new E(hh,"StateInvalid",4),uh=new E(hh,"StateValidated",5),rh=null;hh.className="TextEditingTool";hh.LostFocus=xh;hh.MouseDown=sh;hh.Tab=nh;hh.Enter=mh;hh.SingleClick=yh; hh.SingleClickSelected=jh;hh.DoubleClick=th;hh.StateNone=kh;hh.StateActive=oh;hh.StateEditing=ph;hh.StateValidating=vh;hh.StateInvalid=qh;hh.StateValidated=uh;Sa("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.fb("TextEditing",a,this.mouseUpTools)}); -function zh(){Ah||(Bh(),Ah=!0);this.C=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.C=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} -function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();return a.yc=!0} -function Gh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.C,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Hh&&b.rc.clear(),a.gy=a.Nl===Ih&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Jh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), -qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Lh(c),a.yc=!1,a.sf=!1,b.start(),Mh(a),c.Ta(),Nh(b,0),Rf(c,!0),Oh(a),c.U("AnimationStarting",a))}))}}function ai(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; -function bi(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function zh(){Ah||(Bh(),Ah=!0);this.B=Re;this.Ml=this.sf=this.yc=this.Cs=this.pc=!1;this.gy=!0;this.Nl=Ch;this.Gn=!1;this.Ki=this.sd=!0;this.kh=600;this.Ex=this.ey=!1;this.cf=new I;this.Xd=new Dh;this.Xd.$c=this;this.Kj=new I;this.Gv=new I;this.Bt=new I;this.mm=new I}zh.prototype.me=function(a){this.B=a};zh.prototype.canStart=function(){return!0};function Eh(a,b){Fh(a,b)&&(a.sf=!0)} +function Fh(a,b){if(!a.sd||!a.canStart(b))return!1;a.cf.add(b);a.defaultAnimation.isAnimating&&a.Hc();Gh(a.B);return a.yc=!0} +function Hh(a){if(a.sd&&a.yc){var b=a.Xd,c=a.B,d=a.cf.contains("Model");d&&(a.Ml=!0,a.Nl===Ch?(b.isViewportUnconstrained=!0,b.rc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Nl===Ih&&b.rc.clear(),a.gy=a.Nl===Jh&&c.ft.A(c.ra)?!0:!1,c.U("InitialAnimationStarting",a));d&&!a.Ki||0===b.rc.count?(a.cf.clear(),a.yc=!1,a.sf=!1,b.rc.clear(),Kh(b,c),a.Ml=!1,c.P()):(a.cf.clear(),c.Re=!1,d=b.rc.get(c),c.autoScale!==Lh&&null!==d&&(delete d.start.scale,delete d.end.scale), +qa.requestAnimationFrame(function(){!1===a.yc||b.pc||(c.Xe("temporaryPixelRatio")&&lf(c),Mh(c),a.yc=!1,a.sf=!1,b.start(),Nh(a),c.Ta(),Oh(b,0),Rf(c,!0),ai(a),c.U("AnimationStarting",a))}))}}function bi(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Xd.add(b,"position",c,d,!1)}t=zh.prototype;t.pu=function(a){return this.Xd.pu(a)};t.tw=function(a){return this.Xd.tw(a)}; +function ci(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function Bh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new Bb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&za(a,">= 1",zh,"duration");this.kh=a}},isAnimating:{configurable:!0, enumerable:!0,get:function(){return this.pc}},isTicking:{configurable:!0,get:function(){return this.Cs}},isInitial:{configurable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",zh,"isInitial");this.Ki=a}},defaultAnimation:{configurable:!0,get:function(){return this.Xd}},activeAnimations:{configurable:!0,get:function(){return this.Kj}},initialAnimationStyle:{configurable:!0,get:function(){return this.Nl},set:function(a){F&& -gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ii=null,Ah=!1,Ch=new E(zh,"Default",1),Ih=new E(zh,"AnimateLocations",2),Hh=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ii.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Ih;zh.None=Hh; -function Dh(){this.Kv=this.by=this.$c=this.C=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ji;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=ki}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;ci(this,!0);Mh(this.$c);Rf(this.C);Oh(this.$c);this.C.redraw()}; -function Jh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} -function Nh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ii,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; -t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.C,c=this.$c;this.Vl=this.pc=c.Ml=!1;Mh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ii;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);Oh(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Jh(this,null),c.Lm(this),b.Jb())}}; +gb(a,zh,zh,"initialAnimationStyle");this.Nl=a}}});zh.prototype.stopAnimation=zh.prototype.Hc;var ji=null,Ah=!1,Ch=new E(zh,"Default",1),Jh=new E(zh,"AnimateLocations",2),Ih=new E(zh,"None",3);zh.className="AnimationManager";zh.defineAnimationEffect=function(a,b){Ah||(Bh(),Ah=!0);ji.add(a,b)};zh.Default=Ch;zh.AnimateLocations=Jh;zh.None=Ih; +function Dh(){this.Kv=this.by=this.$c=this.B=null;this.Vl=this.pc=this.l=!1;this.no=this.Kd=0;this.Wr=this.Xu=ki;this.Ul=this.Sp=!1;this.Av=1;this.zv=0;this.Bd=this.kh=NaN;this.Ix=0;this.oo=null;this.w=Mb;this.rc=new Bb;this.vv=new Bb;this.Dm=new I;this.wv=new I;this.Fx=li}Dh.prototype.suspend=function(){this.Vl=!0};Dh.prototype.advanceTo=function(a,b){b&&(this.Vl=!1);this.Sp&&a>=this.Bd&&(this.Ul=!0,a-=this.Bd);this.Ix=a;di(this,!0);Nh(this.$c);Rf(this.B);ai(this.$c);this.B.redraw()}; +function Kh(a,b){a.vv.clear();a.Ul=!1;a.zv=0;a.Bd=NaN;0a.no?a.Bd:d-a.Kd;b&&(e=a.Ix,ea.no&&(a.Sp&&!a.Ul?(a.Kd=+new Date,a.no=a.Kd+a.Bd,a.Ul=!0):a.Lm(!1))}}} +function Oh(a,b){for(var c=a.Bd,d=a.rc.iterator,e=a.Ul;d.next();){var f=d.key;if(!(f instanceof O&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=ji,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Wr,b,c,a)}}}t.stop=function(){this.pc&&this.Lm(!0)}; +t.Lm=function(a){null!==this.Kv&&this.Kv.Zp.remove(this.by);if(this.pc){var b=this.B,c=this.$c;this.Vl=this.pc=c.Ml=!1;Nh(c);for(var d=this.rc,e=this.Dm.iterator;e.next();)b.remove(e.value);for(e=this.wv.iterator;e.next();)e.value.u();e=this.Sp;d=d.iterator;for(var f=ji;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.ew,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Xv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Xv?k[n]:l[n],this.Wr,this.Bd,this.Bd,this)}h.Xv&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Gw&&g instanceof U&&g.Ub(!1)}b.ku.clear();vf(b,!1);b.Ta();b.P();Rf(b,!0);if(c.defaultAnimation===this){for(n=c.mm.iterator;n.next();)e=n.value,null!==e.wf&&(e.points=e.wf,e.wf=null);c.mm.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.Fx);ai(c);this.zv++;!a&&this.Av>this.zv?(this.Ul=!1,this.start()):(this.oo&&this.oo(this),Kh(this,null),c.Lm(this),b.Jb())}}; t.yk=function(a,b){var c=b.actualBounds,d=null;b instanceof If&&(d=b.placeholder);null!==d?(c=d.ja(Ec),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof If)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.yk(d,b)}; t.wk=function(a,b){if(a.isVisible()){var c=null;b instanceof If&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.rc;c.contains(a)&&(c.J(a).Gw=!0);if(a instanceof If)for(a=a.memberParts;a.next();)c=a.value,c instanceof V&&this.wk(c,b)}};t.JA=function(a){var b=this.vv.get(a);null===b&&(b={},this.vv.add(a,b));return b}; na.Object.defineProperties(Dh.prototype,{duration:{configurable:!0,get:function(){return this.kh},set:function(a){A(a,"number",Dh,"duration");1>a&&za(a,">= 1",Dh,"duration");this.kh=a}},reversible:{configurable:!0,get:function(){return this.Sp},set:function(a){this.Sp=a}},runCount:{configurable:!0,get:function(){return this.Av},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function li(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ji;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=li; -function ri(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}ri.className="AnimationState";function si(a,b,c){this.vd=null;this.uf=a;this.qq=c||ti;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=ui))}si.prototype.copy=function(){var a=new si(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; -function vi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} -na.Object.defineProperties(si.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,si,si,"startCondition");this.qq=a}}});var ti=new E(si,"Default",1),ui=new E(si,"Immediate",2),wi=new E(si,"Bundled",3);si.className="AnimationTrigger"; -si.Default=ti;si.Immediate=ui;si.Bundled=wi;function xi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ja.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function mi(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}Dh.className="Animation";Dh.EaseLinear=function(a,b,c,d){return c*a/d+b};Dh.EaseInOutQuad=ki;Dh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};Dh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Dh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};Dh.EaseOutExpo=mi; +function si(a,b,c){this.start=a;this.end=b;this.ew={};this.Xv=c;this.Gw=!1}si.className="AnimationState";function ti(a,b,c){this.vd=null;this.uf=a;this.qq=c||ui;this.nl=null;void 0!==b&&(this.nl=b,void 0===c&&(this.qq=vi))}ti.prototype.copy=function(){var a=new ti(this.uf);a.qq=this.qq;var b=this.nl;if(null!==b){var c={};void 0!==b.duration&&(c.Dy=b.duration);void 0!==b.finished&&(c.Dy=b.finished);void 0!==b.easing&&(c.Dy=b.easing);a.nl=c}return a}; +function wi(a,b){a=a.nl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} +na.Object.defineProperties(ti.prototype,{propertyName:{configurable:!0,get:function(){return this.uf},set:function(a){this.uf=a}},animationSettings:{configurable:!0,get:function(){return this.nl},set:function(a){this.nl=a}},startCondition:{configurable:!0,get:function(){return this.qq},set:function(a){F&&gb(a,ti,ti,"startCondition");this.qq=a}}});var ui=new E(ti,"Default",1),vi=new E(ti,"Immediate",2),xi=new E(ti,"Bundled",3);ti.className="AnimationTrigger"; +ti.Default=ui;ti.Immediate=vi;ti.Bundled=xi;function yi(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ka.iterator;h.next();){var k=h.value;k instanceof If?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Ve?g++:c++}h="";0c.kp||h.height*e>c.kp?b.sc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Ai(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Ai(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Ai(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ja;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Bi(this,a,b);return a}; -t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ja;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; -function Bi(a,b,c){b=Ci(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ja.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(Bi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(Bi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),Bi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.Ac(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.ab(Ce,a,this,b,c,d,e)};t.zj=function(a,b,c){var d=this.Ka;b.Qi=this;if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Bb(a,b);b.Zq(c);d=this.diagram;null!==d&&(c?d.P():d.zj(b));Ci(this,a,b);return a}; +t.Rc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Rc(a,b,c);var d=this.Ka;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.M(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.$q(c);d.jb(a);d=this.diagram;null!==d&&(c?d.P():d.Rc(b));b.Qi=null;return a}; +function Ci(a,b,c){b=Di(a,b,c);if(c instanceof If&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ka.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.M(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.jb(b);a.Bb(f,c);return f}for(g=NaN;0<=--f&&(g=a.M(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.jb(b);a.Bb(h,c);return h}for(k=NaN;++h< e&&(k=a.M(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(xi.prototype,{parts:{configurable:!0,get:function(){return this.Ja.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ja.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.C}},name:{configurable:!0,get:function(){return this.va},set:function(a){A(a,"string",xi,"name");var b=this.va;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= -c.layers;c.next();)c.value.name===a&&v("Layer.name is already present in this diagram: "+a);this.va=a;this.g("name",b,a);for(a=this.Ja.iterator;a.next();)a.value.layerName=this.va}}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",xi,"opacity"),(0>a||1a||1=a)return b;for(var c=this.Ra.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Xi(a){var b=a.Da.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, +function Yi(a){var b=a.Fa.Oa;b instanceof HTMLCanvasElement&&(a.Lj?(a.addEventListener(b,"pointerdown",a.Zk,!1),a.addEventListener(b,"pointermove",a.$k,!1),a.addEventListener(b,"pointerup",a.bl,!1),a.addEventListener(b,"pointerout",a.al,!1)):(a.addEventListener(b,"touchstart",a.bx,!1),a.addEventListener(b,"touchmove",a.ax,!1),a.addEventListener(b,"touchend",a.$w,!1),a.addEventListener(b,"mousemove",a.Tk,!1),a.addEventListener(b,"mousedown",a.Sk,!1),a.addEventListener(b,"mouseup",a.Vk,!1),a.addEventListener(b, "mouseout",a.Uk,!1)),a.addEventListener(b,"mouseenter",a.eA,!1),a.addEventListener(b,"mouseleave",a.fA,!1),a.addEventListener(b,"wheel",a.Wk,!1),a.addEventListener(b,"keydown",a.VA,!1),a.addEventListener(b,"keyup",a.WA,!1),a.addEventListener(b,"blur",a.Rz,!1),a.addEventListener(b,"focus",a.Sz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Da.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Fa/e.width*e.left,b.pageY-qa.scrollY-a.Ea/e.height*e.top); +Ye&&(a.toolManager.gestureBehavior===Xe?b.preventDefault():a.Be&&a.lastInput.handled||(b.preventDefault(),a.hm=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Ye)if(a.toolManager.gestureBehavior===Xe)b.preventDefault();else if(!a.Be||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.hm){var e=a.Fa.getBoundingClientRect();b=new J(b.pageX-qa.scrollX-a.Ca/e.width*e.left,b.pageY-qa.scrollY-a.Ba/e.height*e.top); c=a.hm*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(qa,"resize",a.mx,!1))}function lf(a){30p&&(this.position=q.h(-(this.kt.scrollWidth-this.Fa)+u-this.Fa/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.kt.scrollHeight-this.Ea)+a.scrollTop-this.Ea/c+d))),J.free(q),ij(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.kt.scrollWidth-this.Ca)+u-this.Ca/c+k,this.position.y))),a.zz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.kt.scrollHeight-this.Ba)+a.scrollTop-this.Ba/c+d))),J.free(q),jj(this),this.Hi=this.aq=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.bq.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.bq.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.dj;this.dj=ki;this.scale=mj(this,qj);a!==ki&&(lj(this,!1),nj(this,this.documentBounds,this.Fa/this.Ga,this.Ea/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; -t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Fa;var f=this.Ea;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function mj(a,b){var c=a.co;if(null===a.Fa)return c;a.Ya();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.Ca+(a.kf?a.wb:0),g=a.Ba+(a.ze?a.wb:0),h=f/e,k=g/d;return b===qj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===rj?(b=k>h?(g-a.wb)/d:(f-a.wb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.dj;this.dj=li;this.scale=mj(this,qj);a!==li&&(lj(this,!1),nj(this,this.documentBounds,this.Ca/this.Ga,this.Ba/this.Ga,this.Pj,!1));this.dj=a};t=R.prototype; +t.GB=function(a,b){void 0===b&&(b=qj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===qj||b===rj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ca;var f=this.Ba;e=b===rj?f/d>e/c?(f-(this.ze?this.wb:0))/d:(e-(this.kf?this.wb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Kz=function(a,b){this.Ya();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.EA=function(a){if(a instanceof O){this.po=a;var b=J.alloc();this.qo=this.vr(a.ja(Ec,b));J.free(b)}else this.po=null,this.qo=Qb}; -function nj(a,b,c,d,e,f){var g=J.allocAt(a.ra.x,a.ra.y),h=g.x,k=g.y;if(null!==a.po){var l=J.alloc();l=a.po.ja(Ec,l);h=l.x-a.qo.x/a.scale;k=l.y-a.qo.y/a.scale;e=Bc;J.free(l)}if(f||a.scrollMode===ki)e.eb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.cj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Da;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Fa/c.width*c.left,b.clientY-a.Ea/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||jj(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),ij(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; +R.prototype.WA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return Bj(b,c,a)}; +R.prototype.eA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return Bj(b,c,a)};R.prototype.fA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=vj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return Bj(b,c,a)}; +R.prototype.getMouse=function(a){var b=this.Fa;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.Ca/c.width*c.left;a=a.clientY-this.Ba/c.height*c.top;return null!==this.xb?Hb(new J(b,a),this.xb):new J(b,a)}; +function wj(a,b,c){var d=a.Fa,e=a.Ca,f=a.Ba,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.xb?(b=J.allocAt(g,h),a.xb.Pd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ze(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.nk[0])b=a.nk[c];else return;c=a.Fa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.Ca/c.width*c.left,b.clientY-a.Ba/c.height*c.top))}R.prototype.Ta=function(){this.Gi||(this.Gi=!0,this.Jb(!0))};function Cj(a){a.gc||Gh(a);a.Ya()}R.prototype.redraw=function(){this.Yb||this.gc||(this.P(),oj(this),jj(this),this.Ta(),this.od())};t=R.prototype;t.UA=function(){return this.Re}; t.$z=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Hc();b.isEnabled=!1;Rf(this);this.Ae=!1;this.ft=new J(NaN,NaN);b.isEnabled=c;this.gc=!0;var d=this;null!==a&&ta(function(){d.gc=!1;Eh(b,"Model");a(d)},1)};t.Jb=function(a){void 0===a&&(a=!1);if(!0!==this.Re&&!(this.Yb||!1===a&&this.gc)){this.Re=!0;var b=this;qa.requestAnimationFrame(function(){b.Re&&b.od()})}};t.od=function(){if(!this.Wj||this.Re)this.Wj&&(this.Wj=!1),Rf(this)}; -function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||$i(a)||(b&&jj(a),c&&lj(a,!1))} -function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ka||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} +function pj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Yb||!a.Hi||hj(a)||(b&&Gh(a),c&&lj(a,!1))} +function Rf(a,b){if(!a.gc&&(a.Re=!1,null!==a.Ia||a.Fm.o())){a.gc=!0;var c=a.animationManager,d=a.im;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.Cd.iterator;if(null===c||0===a.Cd.count)break;a.Cd=new I;a.lx(c,a.Cd);F&&22===b&&Ea("failure to validate parts")}a.nodes.each(function(a){a instanceof If&&0!==(a.T&65536)!==!1&&(a.T=a.T^65536)})}} t.lx=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Tc()||c instanceof If||(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof If&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Ve&&c.isVisible()&&(c.Dj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function Hj(a,b){for(var c=Ma(),d=Ma(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof If?(Ij(f)||Jj(f)||Kj(f))&&Hj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): -(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===ki&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Fa,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ea,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Fa,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1c&&(r=z.left,q=z.right),p.height>x&&(u=z.top,y=z.bottom)): +(r=z.left,q=z.right,u=z.top,y=z.bottom);z=p.width+r+q;var B=p.height+u+y;r=p.x-r;var D=n.x;q=p.right+q;var G=n.right+h;u=p.y-u;var M=n.y;p=p.bottom+y;n=n.bottom+k;var Y="1px",Q="1px";y=a.scale;l=z>l/y;m=B>m/y;a.scrollMode===li&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1G+1&&(l=Math.max((q-G)*y+a.Ca,l)),c+h+1n+1&&(l=Math.max((p-n)*y+a.Ba,l)),x+k+1G+1&&(h=Math.max((q-G)*y+a.Ca,h)),c+1n+1&&(k=Math.max((p-n)*y+h,k)),x+1G+1&&(k=a.position.x*y));if(a.Tl)switch(a.et){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(x+1n+1&&(b.scrollTop= -a.position.y*y));l=a.Fa;m=a.Ea;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; +a.position.y*y));l=a.Ca;m=a.Ba;b.style.width=l+(a.kf?a.wb:0)+"px";b.style.height=m+(a.ze?a.wb:0)+"px";return d!==l||e!==m||a.animationManager.yc?(a.onViewportBoundsChanged(f,a.viewportBounds,y,g),!1):!0}t=R.prototype; t.add=function(a){w(a,U,R,"add:part");var b=a.diagram;if(b!==this&&(null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Jk(a.layerName),null===b&&(b=this.Jk("")),null===b&&v('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.zj(99999999,a,a.diagram===this);0<=c&&this.ab(Le,"parts",b,null,a,null,c);b.isTemporary||this.Ta();a.D(1);c=a.layerChanged;null!==c&&c(a,null, b)}};t.zj=function(a){this.partManager.zj(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Ve||a instanceof If&&null!==a.placeholder)&&a.u();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Cd.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()}; t.Rc=function(a){a.Ak();this.partManager.Rc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Cd.remove(a);Zj(a)?(a.actualBounds.o()&&this.P(Tj(a,a.actualBounds)),this.Ta()):a.isVisible()&&a.actualBounds.o()&&this.P(Tj(a,a.actualBounds));this.Jb()};t.remove=function(a){w(a,U,R,"remove:part");bk(this,a,!0)}; @@ -735,28 +735,28 @@ c.value,d,e)}else if(c instanceof S)for(b.add(c,a.Jd(e,c)),c=c.labelNodes;c.next function Ff(a,b,c,d,e){if(null!==b&&(w(b,Bb,R,"moveParts:parts"),0!==b.count)){var f=J.alloc(),g=J.alloc();g.assign(c);isNaN(g.x)&&(g.x=0);isNaN(g.y)&&(g.y=0);(c=a.sq)||mf(a,b);for(var h=Ma(),k=Ma(),l=b.iterator,m=J.alloc();l.next();){var n=l.key,p=l.value;if(n.Tc()){var r=ek(a,n,b);if(null!==r)h.push(new fk(n,p,r));else if(!e||n.canMove())r=p.point,f.assign(r),a.computeMove(n,f.add(g),d,m),n.location=m,void 0===p.shifted&&(p.shifted=new J),p.shifted.assign(m.oe(r))}else l.key instanceof S&&k.push(l.qa)}J.free(m); e=h.length;for(l=0;ld&&this.Ta()}; t.Ez=function(a,b){hk(this,a,b);a.me(this);var c=this.Ra,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.ab(Me,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ta()}; -t.mB=function(a){w(a,xi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ja.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.mB=function(a){w(a,yi,R,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ra,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ka.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.ab(Me,"layers",this,a,null,c,null);this.P();this.Ta()}}};t.Jk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.my=function(a){A(a,"function",R,"addModelChangedListener:listener");null===this.He&&(this.He=new H);this.He.add(a);this.model.Sh(a)};t.oB=function(a){A(a,"function",R,"removeModelChangedListener:listener");null!==this.He&&(this.He.remove(a),0===this.He.count&&(this.He=null));this.model.dl(a)};t.Sh=function(a){A(a,"function",R,"addChangedListener:listener");null===this.$f&&(this.$f=new H);this.$f.add(a)}; t.dl=function(a){A(a,"function",R,"removeChangedListener:listener");null!==this.$f&&(this.$f.remove(a),0===this.$f.count&&(this.$f=null))};t.Mt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.pw(a);a.change!==De&&(this.isModified=!0);if(null!==this.$f)for(var b=this.$f,c=b.length,d=0;dn.Ja.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof xi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.Ca=function(a){return this.undoManager.Ca(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):lk(g,h,b?void 0:k));else if(g instanceof yi){var m=!0===a.oldParam;"number"===typeof h&&k instanceof U&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Rb(),g.Rc(m?h:-1,k,m)):g.zj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof yi&&(b?this.Ra.jb(h):(k.me(this),this.Ra.Bb(h,k))):v("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Me){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof W)"number"===typeof p&&r instanceof O?b?n.Bb(p,r):n.Rc(p): +"number"===typeof p&&r instanceof jk&&(r.isRow?kk(n,p,b?r:void 0):lk(n,p,b?r:void 0));else if(n instanceof yi){var q=!0===a.newParam;"number"===typeof p&&r instanceof U&&(b?0>n.Ka.indexOf(r)&&n.zj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Rb(),n.Rc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof yi&&(b?(r.me(this),this.Ra.Bb(p,r)):this.Ra.jb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==De&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.Ea=function(a){return this.undoManager.Ea(a)};R.prototype.cb=function(a){return this.undoManager.cb(a)};R.prototype.Uf=function(){return this.undoManager.Uf()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.xr=function(){this.partManager.xr()}; -function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);else if(null===a.Da)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Fa,g=a.Ea;e.width=a.Fa/b;e.height=a.Ea/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.C,"scale",b,a.Ga);a.P();oj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);ij(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= -Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Fa;this.Oc.yw.height=this.Ea;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; +function mk(a,b,c){var d=a.animationManager;if(a.Yb||a.gc)a.Ga=c,d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);else if(null===a.Fa)a.Ga=c;else{a.Yb=!0;var e=a.viewportBounds.copy(),f=a.Ca,g=a.Ba;e.width=a.Ca/b;e.height=a.Ba/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Uc()?l.Qf(Rc)?h=0:l.Qf(Sc)&&(h=f-1):h=l.eb()?l.x*(f-1):f/2);isNaN(k)&&(l.Uc()?l.Qf(Pc)?k=0:l.Qf(Tc)&&(k=g-1):k=l.eb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.ra.x+h/b-h/c,a.ra.y+k/b-k/c);a.position=f;J.free(f);a.Ga=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Yb=!1;lj(a,!1);d.sf&&d.Xd.add(d.B,"scale",b,a.Ga);a.P();oj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.A(b)){void 0===d&&(d=!1);d||oj(this);jj(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Lh||d||a.width===b.width&&a.height===b.height||e.D();e=this.currentTool;!0===this.kg&&e instanceof Ta&&(this.lastInput.documentPoint=this.Bu(this.lastInput.viewPoint),Ze(e,this));this.Yb||this.invalidateViewport(a,b);Ej(this);this.Oc.scale=c;this.Oc.position.x=a.x;this.Oc.position.y=a.y;this.Oc.bounds.assign(a);this.Oc.Tv.width= +Math.round(a.width*c);this.Oc.Tv.height=Math.round(a.height*c);this.Oc.yw.width=this.Ca;this.Oc.yw.height=this.Ba;this.Oc.vw=d;this.U("ViewportBoundsChanged",this.Oc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Sc(b)&&a.Za()})}}; function Ej(a,b){void 0===b&&(b=null);var c=a.Ob;if(null!==c&&c.visible){for(var d=Fb.alloc(),e=1,f=1,g=c.$.j,h=g.length,k=0;km||(nk(l.figure)?f=f*m/K.Jy(f,m):e=e*m/K.Jy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=L.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){L.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;L.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();K.Tq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);Fb.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.U("ChangingSelection",b);for(var c=b.ta(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jj(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||Gh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; -function Fi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.wA=function(){return this.Oh.iterator};t.YA=function(a){Gh(this);a&&uk(this,!0);this.gc?Fj(this,!1):(this.Tj=!0,Rf(this))};function uk(a,b){for(var c=a.Oh.iterator;c.next();)vk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.D())}function vk(a,b,c){if(null!==b){for(var d=b.em.iterator;d.next();)vk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.D())}} +function Fj(a,b){if(a.Zg&&!a.bs){var c=a.ba;a.ba=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.yc&&(b||Eh(f,"Layout"));a.Zg=!1;for(var g=a.Oh.iterator;g.next();)wk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Gh(a),e.isValidLayout=!0):a.Zg=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.cb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||Hh(f),a.ba=c}}}function wk(a,b,c,d){if(null!==b){for(var e=b.em.iterator;e.next();)wk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.bi=!b.location.o(),e.doLayout(b),b.D(32),Hj(a,b),e.isValidLayout=!0):a.Zg=!0)}}t.DA=function(){for(var a=new H,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.uj()&&a.add(c)}return a.iterator}; +function Gi(a){function b(a){var b=a.toLowerCase(),e=new H;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new Bb,d=new Bb;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.es=c;a.ds=d} function Qj(a,b){var c=a.ds.J(b);return null!==c?c:a.ds.J(b.toLowerCase())}function xk(a,b){var c=a.es.J(b);if(null!==c)return c;c=a.es.J(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.xk=function(a,b){A(a,"string",R,"addDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.add(b)};t.Zm=function(a,b){A(a,"string",R,"removeDiagramListener:name");A(b,"function",R,"addDiagramListener:listener");a=xk(this,a);null!==a&&a.remove(b)}; t.U=function(a,b,c){F&&A(a,"string",R,"raiseDiagramEvent:name");var d=xk(this,a),e=new Ae;e.diagram=this;a=Qj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.M(0)(e);else if(0!==b)for(d=d.ta(),c=0;cx?(g=x,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=x,f=z.width,z=z.height);null!==m?(f+=k,z+=T):m=new hc(0);null!==h&&(x=h.width,h=h.height, "SVG"!==c&&e&&!Wk&&F&&(f>x||z>h)&&(Ea("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(f)+"x"+Math.ceil(z)+" vs 2000x2000) Consider increasing the max size."),Wk=!0),isNaN(x)&&(x=2E3),isNaN(h)&&(h=2E3),isFinite(x)&&(f=Math.min(f,x)),isFinite(h)&&(z=Math.min(z,h)));p.width=Math.ceil(f);p.height=Math.ceil(z);if("SVG"===c){if(null===d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=r;d.Qq=q;Oj(a,d.context,m,new Fb(Math.ceil(f), Math.ceil(z)),g,B,l,n,u,b);return d.context}a.Dl=!1;Oj(a,y,m,new Fb(Math.ceil(f),Math.ceil(z)),g,B,l,n,u,b);a.Dl=!0;return p.context} -na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ka},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ka!==a){var b=this.Ka;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Da&&(b=this.Da.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, -"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Da.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Da=null,this.removeEventListener(qa,"resize",this.mx,!1), -this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ka=null;if(null!==a){if(b=a.C)b.div=null;Pi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, +na.Object.defineProperties(R.prototype,{div:{configurable:!0,get:function(){return this.Ia},set:function(a){null!==a&&w(a,HTMLDivElement,R,"div");if(this.Ia!==a){var b=this.Ia;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.Fa&&(b=this.Fa.Oa,this.Lj?(this.removeEventListener(b,"pointermove",this.$k,!1),this.removeEventListener(b,"pointerdown",this.Zk,!1),this.removeEventListener(b,"pointerup",this.bl,!1),this.removeEventListener(b,"pointerout",this.al,!1)):(this.removeEventListener(b, +"touchstart",this.bx,!1),this.removeEventListener(b,"touchmove",this.ax,!1),this.removeEventListener(b,"touchend",this.$w,!1)),this.Fa.zy()),this.lm&&(this.lm.disconnect(),this.lm=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Mb=this.Fa=null,this.removeEventListener(qa,"resize",this.mx,!1), +this.Lj||(this.removeEventListener(qa,"mousemove",this.Tk,!0),this.removeEventListener(qa,"mousedown",this.Sk,!0),this.removeEventListener(qa,"mouseup",this.Vk,!0),this.removeEventListener(qa,"mouseout",this.Uk,!0)),this.removeEventListener(qa,"wheel",this.Wk,!0),Re===this&&(Re=null)):this.Ae=!1;this.Ia=null;if(null!==a){if(b=a.B)b.div=null;Qi(this,a);this.redraw()}}}},oy:{configurable:!0,get:function(){return this.qp}},Bj:{configurable:!0,get:function(){return this.Ae}}, draggedLink:{configurable:!0,get:function(){return this.gs},set:function(a){this.gs!==a&&(this.gs=a,null!==a&&(this.Ss=a.fromPort,this.Ts=a.toPort))}},$y:{configurable:!0,get:function(){return this.Ss},set:function(a){this.Ss=a}},az:{configurable:!0,get:function(){return this.Ts},set:function(a){this.Ts=a}},animationManager:{configurable:!0,get:function(){return this.$c}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}}, skipsUndoManager:{configurable:!0,get:function(){return this.Hg},set:function(a){A(a,"boolean",R,"skipsUndoManager");this.Hg=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.bs},set:function(a){this.bs=a}},opacity:{configurable:!0,get:function(){return this.nb},set:function(a){var b=this.nb;b!==a&&(A(a,"number",R,"opacity"),(0>a||1a&&za(a,">= 0",R,"scrollHorizontalLineChange"),this.it=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(A(a,"number",R,"scrollVerticalLineChange"),0>a&&za(a,">= 0",R,"scrollVerticalLineChange"),this.mt=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.th},set:function(a){F&&w(a,ye,R,"lastInput");this.th=a}},previousInput:{configurable:!0, -enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Da,c=this.Ka;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== +enumerable:!0,get:function(){return this.ud},set:function(a){F&&w(a,ye,R,"previousInput");this.ud=a}},firstInput:{configurable:!0,get:function(){return this.hg},set:function(a){F&&w(a,ye,R,"firstInput");this.hg=a}},currentCursor:{configurable:!0,get:function(){return this.Vr},set:function(a){""===a&&(a=this.bo);if(this.Vr!==a){A(a,"string",R,"currentCursor");var b=this.Fa,c=this.Ia;if(null!==b){this.Vr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor=== d&&(b.style.cursor="-webkit-"+a,c.style.cursor="-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{configurable:!0,get:function(){return this.bo},set:function(a){""===a&&(a="auto");var b=this.bo;b!==a&&(A(a,"string",R,"defaultCursor"),this.bo=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.ag},set:function(a){var b=this.ag;b!== a&&(null!==a&&A(a,"function",R,"click"),this.ag=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&(null!==a&&A(a,"function",R,"doubleClick"),this.fg=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.bg},set:function(a){var b=this.bg;b!==a&&(null!==a&&A(a,"function",R,"contextClick"),this.bg=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0, get:function(){return this.xg},set:function(a){var b=this.xg;b!==a&&(null!==a&&A(a,"function",R,"mouseOver"),this.xg=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.vg},set:function(a){var b=this.vg;b!==a&&(null!==a&&A(a,"function",R,"mouseHover"),this.vg=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;b!==a&&(null!==a&&A(a,"function",R,"mouseHold"),this.ug=a,this.g("mouseHold", @@ -830,137 +830,137 @@ get:function(){return this.Xr},set:function(a){var b=this.Xr;null!==b&&(b.isActi b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.yp},set:function(a){var b=this.yp;b!==a&&(w(a,Ve,R,"nodeSelectionAdornmentTemplate"),this.yp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, enumerable:!0,get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(w(a,Ve,R,"groupSelectionAdornmentTemplate"),this.Do=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Yo},set:function(a){var b=this.Yo;b!==a&&(w(a,Ve,R,"linkSelectionAdornmentTemplate"),this.Yo=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.ev}},isModified:{configurable:!0, enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Jo&&this.ce!==a.historyIndex:this.Jo},set:function(a){if(this.Jo!==a){A(a,"boolean",R,"isModified");this.Jo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.ce=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){w(a,X,R,"model");this.currentTool.doCancel();null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Hc(!0);var c=Si(this,!0);this.Ae=!1;this.Wj=!0;this.ce=-2;this.Re=!1;var d=this.gc;this.gc=!0;Eh(this.animationManager,"Model");null!==b&&(null!==this.He&&this.He.each(function(a){b.dl(a)}),b.dl(this.Zc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)): -za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj; -b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(), -this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ii,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}},parts:{configurable:!0, -get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Ni,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a= -this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Gi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b=this.Dn;C(a,R,"scale");b!==a&&(this.Dn= -a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); +enumerable:!0,get:function(){return this.ra},set:function(a){var b=J.alloc().assign(this.ra);if(!b.A(a)){w(a,J,R,"position");var c=this.viewportBounds.copy();this.ra.assign(a);hi(this.animationManager,b,this.ra);this.Yb||null===this.Fa&&!this.Fm.o()||(this.Yb=!0,a=this.scale,nj(this,this.eo,this.Ca/a,this.Ba/a,this.Pj,!1),this.Yb=!1);if(!this.Yb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Ga,!1)}J.free(b)}},initialPosition:{configurable:!0,get:function(){return this.ss}, +set:function(a){this.ss.A(a)||(w(a,J,R,"initialPosition"),this.ss=a.K())}},initialScale:{configurable:!0,get:function(){return this.ts},set:function(a){this.ts!==a&&(A(a,"number",R,"initialScale"),this.ts=a)}},grid:{configurable:!0,get:function(){null===this.Ob&&Zi(this);return this.Ob},set:function(a){var b=this.Ob;if(b!==a){null===b&&(Zi(this),b=this.Ob);w(a,W,R,"grid");a.type!==W.Grid&&v("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b); +this.Ob=a;a.name="GRID";null!==c&&c.add(a);Ej(this);this.P();this.g("grid",b,a)}}},viewportBounds:{configurable:!0,get:function(){var a=this.hy,b=this.ra,c=this.Ga;a.h(b.x,b.y,Math.max(this.Ca,0)/c,Math.max(this.Ba,0)/c);return a}},viewSize:{configurable:!0,get:function(){return this.Fm},set:function(a){var b=this.viewSize;b.A(a)||(w(a,Fb,R,"viewSize"),this.Fm=a=a.K(),this.Ba=this.Ca=0,a.o()?(this.Ca=a.width,this.Ba=a.height):null!==this.Ia&&(this.Ca=this.Ia.clientWidth|| +1,this.Ba=this.Ia.clientHeight||1),this.Ta(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{configurable:!0,get:function(){return this.ns},set:function(a){var b=this.ns;b.A(a)||(w(a,L,R,"fixedBounds"),(F&&Infinity===a.width||-Infinity===a.width||Infinity===a.height||-Infinity===a.height)&&v("fixedBounds width/height must not be Infinity"),this.ns=a=a.K(),this.Ta(),this.g("fixedBounds",b,a))}},scrollMargin:{configurable:!0,get:function(){return this.cj},set:function(a){"number"=== +typeof a?a=new hc(a):w(a,hc,R,"scrollMargin");var b=this.cj;b.A(a)||(this.cj=a=a.K(),this.g("scrollMargin",b,a),this.lr())}},scrollMode:{configurable:!0,get:function(){return this.dj},set:function(a){var b=this.dj;b!==a&&(gb(a,R,R,"scrollMode"),this.dj=a,a===li&&lj(this,!1),this.g("scrollMode",b,a),this.P())}},scrollsPageOnFocus:{configurable:!0,get:function(){return this.nt},set:function(a){var b=this.nt;b!==a&&(A(a,"boolean",R,"scrollsPageOnFocus"),this.nt=a,this.g("scrollsPageOnFocus", +b,a))}},positionComputation:{configurable:!0,get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(null!==a&&A(a,"function",R,"positionComputation"),this.$s=a,lj(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{configurable:!0,get:function(){return this.gt},set:function(a){var b=this.gt;b!==a&&(null!==a&&A(a,"function",R,"scaleComputation"),this.gt=a,mk(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{configurable:!0, +enumerable:!0,get:function(){return this.eo}},isVirtualized:{configurable:!0,get:function(){return this.Es},set:function(a){var b=this.Es;b!==a&&(A(a,"boolean",R,"isVirtualized"),this.Es=a,this.g("isVirtualized",b,a))}},scale:{configurable:!0,get:function(){return this.Ga},set:function(a){var b=this.Ga;C(a,R,"scale");b!==a&&mk(this,b,a)}},defaultScale:{configurable:!0,get:function(){return this.co},set:function(a){F&&C(a,R,"defaultScale");!F||0this.scale&&(this.scale=a)):za(a,"> 0",R,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Is},set:function(a){C(a,R,"maxScale");var b=this.Is;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Kt},set:function(a){this.Kt.A(a)||(w(a,J,R,"zoomPoint"),this.Kt=a=a.K())}},contentAlignment:{configurable:!0, +enumerable:!0,get:function(){return this.Pj},set:function(a){var b=this.Pj;b.A(a)||(w(a,N,R,"contentAlignment"),this.Pj=a=a.K(),this.g("contentAlignment",b,a),lj(this,!1))}},initialContentAlignment:{configurable:!0,get:function(){return this.Go},set:function(a){var b=this.Go;b.A(a)||(w(a,N,R,"initialContentAlignment"),this.Go=a=a.K(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.ob},set:function(a){"number"===typeof a?a=new hc(a): +w(a,hc,R,"padding");var b=this.ob;b.A(a)||(this.ob=a=a.K(),this.Ta(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Qa},set:function(a){var b=this.Qa;b!==a&&(w(a,Ji,R,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.me(null),this.Qa=a,a.me(this))}},nodes:{configurable:!0,get:function(){return this.partManager.nodes.iterator}},links:{configurable:!0,get:function(){return this.partManager.links.iterator}}, +parts:{configurable:!0,get:function(){return this.partManager.parts.iterator}},layout:{configurable:!0,get:function(){return this.qc},set:function(a){var b=this.qc;b!==a&&(w(a,Oi,R,"layout"),this.qc=a,a.diagram=this,a.group=null,this.Zg=!0,this.g("layout",b,a),this.Jb())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ds},set:function(a){var b=this.Ds;if(b!==a&&(A(a,"boolean",R,"isTreePathToChildren"),this.Ds=a,this.g("isTreePathToChildren", +b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Xk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Et},set:function(a){var b=this.Et;b!==a&&(a!==Hi&&a!==Yk&&a!==Zk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Et=a,this.g("treeCollapsePolicy",b,a))}},Ye:{configurable:!0,get:function(){return this.gv},set:function(a){this.gv=a}},autoScrollInterval:{configurable:!0,get:function(){return this.Dn},set:function(a){var b= +this.Dn;C(a,R,"scale");b!==a&&(this.Dn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Fn},set:function(a){"number"===typeof a?a=new hc(a):w(a,hc,R,"autoScrollRegion");var b=this.Fn;b.A(a)||(this.Fn=a=a.K(),this.Ta(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{configurable:!0,get:function(){return $k.cc()},set:function(a){$k.add(a)}},version:{configurable:!0,get:function(){return al}}}); R.prototype.makeImageData=R.prototype.Xy;R.prototype.makeImage=R.prototype.$A;R.prototype.addRenderer=R.prototype.Iz;R.prototype.makeSVG=R.prototype.ww;R.prototype.makeSvg=R.prototype.mu;R.prototype.stopAutoScroll=R.prototype.Vf;R.prototype.doAutoScroll=R.prototype.Rt;R.prototype.isUnoccupied=R.prototype.Pk;R.prototype.raiseDiagramEvent=R.prototype.U;R.prototype.removeDiagramListener=R.prototype.Zm;R.prototype.addDiagramListener=R.prototype.xk;R.prototype.findTreeRoots=R.prototype.DA; R.prototype.layoutDiagram=R.prototype.YA;R.prototype.findTopLevelGroups=R.prototype.wA;R.prototype.findTopLevelNodesAndLinks=R.prototype.xA;R.prototype.ensureBounds=R.prototype.Ya;R.prototype.findLinksByExample=R.prototype.Ut;R.prototype.findNodesByExample=R.prototype.Vt;R.prototype.findLinkForData=R.prototype.Ec;R.prototype.findNodeForData=R.prototype.rj;R.prototype.findPartForData=R.prototype.Fc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Hb; R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Sd;R.prototype.transformViewToDoc=R.prototype.Bu;R.prototype.transformRectDocToView=R.prototype.CB;R.prototype.transformDocToView=R.prototype.vr;R.prototype.centerRect=R.prototype.Nt;R.prototype.scrollToRect=R.prototype.Ow;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.PA;R.prototype.highlight=R.prototype.OA;R.prototype.selectCollection=R.prototype.tB;R.prototype.select=R.prototype.select; -R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ca;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; +R.prototype.updateAllRelationshipsFromData=R.prototype.xr;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.Uf;R.prototype.commitTransaction=R.prototype.cb;R.prototype.startTransaction=R.prototype.Ea;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.ab;R.prototype.removeChangedListener=R.prototype.dl;R.prototype.addChangedListener=R.prototype.Sh; R.prototype.removeModelChangedListener=R.prototype.oB;R.prototype.addModelChangedListener=R.prototype.my;R.prototype.findLayer=R.prototype.Jk;R.prototype.removeLayer=R.prototype.mB;R.prototype.addLayerAfter=R.prototype.Ez;R.prototype.addLayerBefore=R.prototype.ky;R.prototype.addLayer=R.prototype.Hm;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.Fk;R.prototype.removeParts=R.prototype.tu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add; R.prototype.clearDelayedGeometries=R.prototype.Uv;R.prototype.setProperties=R.prototype.Tw;R.prototype.resetInputOptions=R.prototype.Kw;R.prototype.setInputOption=R.prototype.uB;R.prototype.getInputOption=R.prototype.Pm;R.prototype.resetRenderingHints=R.prototype.Lw;R.prototype.setRenderingHint=R.prototype.iz;R.prototype.getRenderingHint=R.prototype.Xe;R.prototype.maybeUpdate=R.prototype.od;R.prototype.requestUpdate=R.prototype.Jb;R.prototype.delayInitialization=R.prototype.$z; R.prototype.isUpdateRequested=R.prototype.UA;R.prototype.invalidateDocumentBounds=R.prototype.Ta;R.prototype.findObjectsNear=R.prototype.Qg;R.prototype.findPartsNear=R.prototype.tA;R.prototype.findObjectsIn=R.prototype.Lf;R.prototype.findPartsIn=R.prototype.Iy;R.prototype.findObjectsAt=R.prototype.sj;R.prototype.findPartsAt=R.prototype.sA;R.prototype.findObjectAt=R.prototype.ac;R.prototype.findPartAt=R.prototype.Nm;R.prototype.focusObject=R.prototype.EA;R.prototype.alignDocument=R.prototype.Kz; R.prototype.zoomToRect=R.prototype.GB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.xy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){gh=a?void 0!==qa.document:!1};R.isUsingDOM=function(){return gh}; -var Re=null,Hi=new Bb,Wi=null,Vi=null,gh=void 0!==qa.document,Qi=null,Ri="",Kh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),ki=new E(R,"DocumentScroll",1),mi=new E(R,"InfiniteScroll",2),Gi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, -"AnyParentsCollapsed",23),$k=new H,al="2.1.53",Uk="image",Wk=!1,bl=null,Di=!1; -function Ei(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; -bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=qj;R.UniformToFill=rj; -R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=ki;R.InfiniteScroll=mi;R.TreeParentCollapsed=Gi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Oi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} +var Re=null,Ii=new Bb,Xi=null,Wi=null,gh=void 0!==qa.document,Ri=null,Si="",Lh=new E(R,"None",0),qj=new E(R,"Uniform",1),rj=new E(R,"UniformToFill",2),Zf=new E(R,"CycleAll",10),cg=new E(R,"CycleNotDirected",11),eg=new E(R,"CycleNotDirectedFast",12),fg=new E(R,"CycleNotUndirected",13),$f=new E(R,"CycleDestinationTree",14),bg=new E(R,"CycleSourceTree",15),li=new E(R,"DocumentScroll",1),ni=new E(R,"InfiniteScroll",2),Hi=new E(R,"TreeParentCollapsed",21),Yk=new E(R,"AllParentsCollapsed",22),Zk=new E(R, +"AnyParentsCollapsed",23),$k=new H,al="2.1.54",Uk="image",Wk=!1,bl=null,Ei=!1; +function Fi(){if(gh){var a=qa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",Gb.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Va("7ca11abfd7330390")](Va(d[e-1]),10,15*e);b[c]=Va("39f046ebb36e4b");for(c=1;5>c;c++)b[Va("7ca11abfd7330390")](Va(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])Gb.prototype.Pd=Gb.prototype.py; +bl=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=qa.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);A(a,"function",R,"inherit");A(b,"function",R,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Lh;R.Uniform=qj;R.UniformToFill=rj; +R.CycleAll=Zf;R.CycleNotDirected=cg;R.CycleNotDirectedFast=eg;R.CycleNotUndirected=fg;R.CycleDestinationTree=$f;R.CycleSourceTree=bg;R.DocumentScroll=li;R.InfiniteScroll=ni;R.TreeParentCollapsed=Hi;R.AllParentsCollapsed=Yk;R.AnyParentsCollapsed=Zk;function Pi(){this.Az=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.gf=this.l=!0:this.gf=null} function Nj(a,b){b.Mb.setTransform(b.Zb,0,0,b.Zb,0,0);if(null===a.gf)a:{b="f";var c=qa[Va("76a715b2f73f148a")][Va("72ba13b5")];a.gf=!0;if(gh){var d=R[Va("76a115b6ed251eaf4692")];if(d)for(var e=$k.iterator;e.next();){d=e.value;d=Va(d).split(Va("39e9"));if(6>d.length)break;var f=Va(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Va(ra[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Va("76ad18b4f73e")];for(g=c[Va("73a612b6fb191d")](Va("35e7"))+2;gf&&Va(d[2])!==Va("7da71ca0ad381e90")&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>f&&(f=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.gf=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(qa.document[Va("78a712aa")]){if(qa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g),h=qa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8")),qa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.gf=!1;break}else if(Wa||Za||$a||ab)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.Dd++:a.Dd=1;c.clickCount=a.Dd;a.dk=b.timeStamp;a.To.Ug(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault(): Bj(a,c,b)}};a.$k=function(b){if(a.isEnabled){a.kg=!0;var c=a.nk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=Aj(a,b,b,null!==c[1]),c.targetDiagram=xj(b),a.doMouseMove(),Bj(a,c,b))}};a.bl=function(b){if(a.isEnabled){a.kg=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ys;if(c&&a.uk)delete d[b.pointerId],b.preventDefault();else if(d=a.nk,null!==d[0]&& -d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&wj(e.C,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== -b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Xi(a)}}Oi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} +d[0].pointerId===b.pointerId){d[0]=null;d=zj(a,b,!1,!0,!0,!1);var e=qa.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&wj(e.B,b,d);wj(a,b,d);d.clickCount=a.Dd;null===e?d.targetDiagram=xj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();Bj(a,d,b);c&&(a.Be=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.al=function(b){if(a.isEnabled){a.kg=!1;var c=a.Ys;c[b.pointerId]&&delete c[b.pointerId];c=a.nk;null!==c[0]&&c[0].pointerId=== +b.pointerId&&(c[0]=null);null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.hs=d.aa["d"+cl[1]+cl[2]+"wI"+Uk.slice(1,5)]["b"+dl.slice(1,b)](d.aa,bl,b,b);d.Ac(!0);Yi(a)}}Pi.className="DiagramHelper";function pf(a){this.l=void 0===a?new J:a;this.w=new J} na.Object.defineProperties(pf.prototype,{point:{configurable:!0,get:function(){return this.l},set:function(a){this.l=a}},shifted:{configurable:!0,get:function(){return this.w},set:function(a){this.w=a}}});var cl="DraggingInfo";pf.className="DraggingInfo";function fk(a,b,c){this.node=a;this.info=b;this.ow=c}fk.className="DraggingNodeInfoPair";function hf(){this.reset()} hf.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Fb(NaN,NaN)).freeze();this.gridSnapCellSpot=Ec;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};hf.className="DraggingOptions";function el(a){1 b.updateDelay?b.P():b.w||(b.w=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Ud=function(){null!==b.observed&&jl(b)};this.autoScale=qj;this.Yb=!1}ma(hl,R);hl.prototype.computePixelRatio=function(){return 1}; -hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Da,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Da=this.sm,this.Mb=this.Da.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Da.width,this.Da.height),kl(this)}finally{this.Da=a,this.Mb=b}}}R.prototype.redraw.call(this)}; -hl.prototype.sc=function(){null===this.Ka&&v("No div specified");null===this.Da&&v("No canvas specified");if(!(this.Da instanceof Sj)&&(yi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Da;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +hl.prototype.redraw=function(){if(this.w&&1<=this.updateDelay){this.w=!1;var a=this.Fa,b=this.Mb;if(null!==a&&null!==b){Lj(this);if(null===this.sm){var c=new Vk(null);c.width=a.width;c.height=a.height;this.sm=c}try{this.Fa=this.sm,this.Mb=this.Fa.context,this.Mb.Ac(!0),this.Mb.setTransform(1,0,0,1,0,0),this.Mb.clearRect(0,0,this.Fa.width,this.Fa.height),kl(this)}finally{this.Fa=a,this.Mb=b}}}R.prototype.redraw.call(this)}; +hl.prototype.sc=function(){null===this.Ia&&v("No div specified");null===this.Fa&&v("No canvas specified");if(!(this.Fa instanceof Sj)&&(zi(this.box),this.Jc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Bj){Lj(this);var b=this.Fa;a=this.Mb;a.Ac(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?kl(this):null!==this.sm&&(a.drawImage(this.sm.Oa,0,0),b=this.xb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Zb,this.Zb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ra.j;for(var c=b.length,d=0;da&&(a=0);this.kb!==a&&(this.kb=a)}}});hl.className="Overview";function il(){gf.call(this);this.l=null}ma(il,gf); il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))}; -ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +ll.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ri=null,Si="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Sm()&&(d=c.Ek,c.Ek=this.copiesParentKey),c.Ok()&&(e=c.Dk,c.Dk=this.copiesGroupKey),f=b.Fk(a,null,!0)}finally{c.Sm()&&(c.Ek=d),c.Ok()&&(c.Dk=e),c=new H,c.addAll(f),Ri=c,Si=b.model.dataFormat}}b.U("ClipboardChanged",c)}; +ll.prototype.pasteFromClipboard=function(){var a=new I,b=Ri;if(null===b)return a;var c=this.diagram;if(Si!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Sm()&&(e=d.Ek,d.Ek=this.copiesParentKey),d.Ok()&&(f=d.Dk,d.Dk=this.copiesGroupKey),g=c.Fk(b,c,!1)}finally{for(d.Sm()&&(d.Ek=e),d.Ok()&&(d.Dk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +ll.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.U("ChangingSelection",b.selection);b.Ea("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))}; +ll.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);C(a,ll,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"increaseZoom:factor");var b=this.diagram;b.autoScale===Lh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +ll.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);C(a,ll,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Lh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};ll.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; ll.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);C(a,ll,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Gh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +ll.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Hc();a.redraw();var c=a.position,d=a.scale;Eh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Ov&&!isNaN(this.ov)&&a.documentBounds.A(this.Nv)?(a.scale=this.ov,a.position=this.Nx,this.Ov=NaN,this.Nv=rc):(this.ov=d,this.Nx=c.copy(),a.zoomToFit(),this.Ov=a.scale,this.Nv=a.documentBounds.copy());Hh(b)};ll.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; ll.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w(a,U,ll,"part");var b=this.diagram;b.Ya();if(null===a){try{null!==this.Dg&&(this.Dg.next()?a=this.Dg.value:this.Dg=null)}catch(k){this.Dg=null}null===a&&(0l.width+n||n>Y+m||D>l.height+p||p>Q+D)}if(m){m=0!==(this.I&256);a.clipInsteadOfFill&&(m=!1);this instanceof ih&&(a.font=this.font);if(m){F&&F.iA&&Ea("clip"+this.toString());D=g.pe()?g.naturalBounds:g.actualBounds;null!==this.gb?(n=this.gb,Y=n.x,Q=n.y,l=n.width,n=n.height):(Y=Math.max(d.x,D.x),Q=Math.max(d.y,D.y),l=Math.min(d.right,D.right)-Y,n=Math.min(d.bottom,D.bottom)-Q);if(Y>d.width+ -d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Ai(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): -a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Ai(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- +d.x||d.x>D.width+D.x){1!==e&&(a.globalAlpha=f);return}a.save();a.beginPath();a.rect(Y,Q,l,n);a.clip()}if(this.Rf()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(D=h.shadowOffset,a.Ww(D.x*b.scale*b.Zb,D.y*b.scale*b.Zb,h.shadowBlur),Ml(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?Ml(a):k&&!1===this.shadowVisible&&Nl(a);h=this.naturalBounds;null!==this.kc&&(Bi(this,a,this.kc,!0,!0,h,d),this.kc instanceof Ol&&this.kc.type===Pl?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.We(this.kc)): +a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)&&null===this.shadowVisible&&Nl(a);null!==this.rb&&(l=this.naturalBounds,Y=D=0,Q=l.width,l=l.height,n=0,this instanceof Uf&&(l=this.ua.bounds,D=l.x,Y=l.y,Q=l.width,l=l.height,n=this.strokeWidth),Bi(this,a,this.rb,!0,!1,h,d),this.rb instanceof Ol&&this.rb.type===Pl?(a.beginPath(),a.rect(D-n/2,Y-n/2,Q+n,l+n),a.We(this.rb)):a.fillRect(D- n/2,Y-n/2,Q+n,l+n));F&&F.Jm&&F.hA&&F.hA(a,this);k&&(null!==this.rb||null!==this.kc||null!==g&&0!==(g.I&512)||null!==g&&(g.type===W.Auto||g.type===W.Spot)&&g.yb()!==this)?(Ql(this,!0),null===this.shadowVisible&&Nl(a)):Ql(this,!1);this.pj(a,b);k&&0!==(this.I&512)===!0&&Ml(a);this.Rf()&&k&&Nl(a);m?(a.restore(),this instanceof W?a.Ac(!0):a.Ac(!1)):c.gu()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha= -f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Ai(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Ai(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; -function Ai(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +f)}}}};t.Ay=function(){return!1};function Kl(a,b,c){var d=a.Cb,e=a.wc;null!==a.kc&&(Bi(a,b,a.kc,!0,!0,e,d),a.kc instanceof Ol&&a.kc.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.kc)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.rb&&(Bi(a,b,a.rb,!0,!1,e,d),a.rb instanceof Ol&&a.rb.type===Pl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.We(a.rb)):b.fillRect(d.x,d.y,d.width,d.height));a.pj(b,c)}t.pj=function(){}; +function Bi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Rl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Uf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Sl)&&c.ue&&(c.type===Tl||c.sl===h&&c.Nu===k))var m=c.ue;else{var n=0,p=0,r=0,q=0,u=0,y=0;y=u=0;e?(u=g.x,y=g.y):d||(u-=l/2,y-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=y;q+=y;if(c.type===Ul)m=b.createLinearGradient(n,p,r,q);else if(c.type===Pl)y=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,y=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,y);else if(c.type===Tl)try{m=b.createPattern(c.pattern,"repeat")}catch(z){m=null}else ya(c.type,"Brush type");if(c.type!==Tl&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ue=m,null!== m&&(c.sl=h,c.Nu=k),null===m&&c.type===Tl&&-1!==c.sl)){c.sl=-1;var x=a.diagram;null!==x&&-1===c.sl&&ta(function(){x.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Sg=function(a){if(a instanceof W)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Sf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Sf():!0}; t.Tg=function(){for(var a=this instanceof W?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; @@ -1001,11 +1001,11 @@ function Vl(a,b){a.I=b?a.I|2048:a.I&-2049}function Wl(a,b){a.I=b?a.I|4096:a.I&-4 function am(a){var b=a.part;if(b instanceof V&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||Jl(b,a)}}function bm(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof W?a instanceof V?a.yd():a.fl(a,function(a){am(a)}):am(a))}t.bind=function(a){a.vd=this;var b=this.tj();null!==b&&cm(b)&&v("Cannot add a Binding to a template that has already been copied: "+a);null===this.lb&&(this.lb=new H);this.lb.add(a)}; t.tj=function(){for(var a=this instanceof W?this:this.panel;null!==a;){if(null!==a.xi)return a;a=a.panel}return null};t.Tw=function(a){Pj(this,a)};t.gx=function(a){a.vd=this;null===this.Yg&&(this.Yg=new Bb);this.Yg.add(a.propertyName,a)}; function dm(a,b){for(var c=1;ce)&&v("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new ib;for(c in b)"row"!== c&&"column"!==c&&(e[c]=b[c]);Pj(a,e)}else Pj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function im(a,b){A(a,"string",O,"defineBuilder:name");A(b,"function",O,"defineBuilder:func");var c=a.toLowerCase();F&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);em.add(a,b)} function jm(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} @@ -1050,14 +1050,14 @@ b.mouseLeave=function(a,b){b.Tg()&&b instanceof W&&(a=b.ib("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.ib("ButtonBorder");if(c instanceof Uf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Tg()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.ib("ButtonBorder"),b instanceof Uf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Ui("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +im("TreeExpanderButton",function(){var a=dm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).hr()),{visible:!1},(new Vi("visible","isTreeLeaf",function(a){return!a})).hr());a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Ui("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +im("SubGraphExpanderButton",function(){var a=dm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},dm(Uf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ub},(new Vi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).hr()));a.click=function(a,c){c=c.part;c instanceof Ve&&(c=c.adornedPart);if(c instanceof If){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});im("ToolTip",function(){return dm(Ve,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},dm(Uf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new N(0,0,4,6),spot2:new N(1,1,-4,-4)}))}); -im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ui("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); -im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Ui("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); -a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ca("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); -im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Ui("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ca("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +im("ContextMenu",function(){return dm(Ve,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Vi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});im("ContextMenuButton",function(){var a=dm("Button");a.stretch=ql;var b=a.ib("ButtonBorder");b instanceof Uf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new N(0,0,2,3),b.spot2=new N(1,1,-2,-2));return a}); +im("PanelExpanderButton",function(a){var b=jm(a,"COLLAPSIBLE"),c=dm("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},dm(Uf,{name:"ButtonIcon",strokeWidth:2},(new Vi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).hr(b))); +a=c.ib("ButtonBorder");a instanceof Uf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.tj();null===e&&(e=c.part);null!==e&&(c=e.ib(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.cb("Collapse/Expand Panel")))}};return c}); +im("CheckBoxButton",function(a){var b=jm(a);a=dm("Button",{desiredSize:new Fb(14,14)},dm(Uf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Bd,geometryStretch:Og,visible:!1},""!==b?(new Vi("visible",b)).Yy():[]));a.click=function(a,d){if(d instanceof W){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.ib("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.cb("checkbox")}}};return a}); im("CheckBox",function(a){a=jm(a);a=dm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hc(0,1,0,0)});var b=dm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});O.None=zg=new E(O,"None",0);O.Default=pl=new E(O,"Default",0);O.Vertical=rl=new E(O,"Vertical",4);O.Horizontal=ql=new E(O,"Horizontal",5);O.Fill=Bd=new E(O,"Fill",3);O.Uniform=Og=new E(O,"Uniform",1); @@ -1095,12 +1095,12 @@ function Nl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function Ml(a) R.prototype.mu=function(a){var b=new Sj(this,qa.document);void 0===a&&(a=new ib);var c=this;return Sk(this,function(a,e){a=Tk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.mu;R.prototype.ww=function(a){return this.mu(a)};R.prototype.makeSVG=R.prototype.ww; O.prototype.Ay=function(a,b){if(!(a instanceof pm))return!1;if(!this.visible)return!0;var c=null,d=a.iu;if(this instanceof W&&(this.type===W.TableRow||this.type===W.TableColumn))return Kl(this,a,b),!0;var e=this.Cb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.I&4096)===!0&&Ll(this);var h=0!==(this.I&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof ih&&(a.font=this.font);if(h){k=g.pe()?g.naturalBounds:g.actualBounds;if(null!==this.gb){var l= this.gb;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;qm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Rf()&&!this.isVisible())return!0;a.Ue.Ua=[1,0,0,1,0,0];(this instanceof ih&&1a)&&za(a,"0 <= loc <= 1",Ol,"addColorStop:loc");A(b,"string",Ol,"addColorStop:color");F&&!xm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.te&&(this.te=new Bb);this.te.add(a,b);this.sa===Rl&&(this.type=Ul);this.ue=null;return this}; function xm(a){if("black"===a)return!0;if(""===a)return!1;F&&A(a,"string",Ol,"isValidColor");vm||(wm(),vm=!0);var b=ym;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c} -t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(b,c)} -t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)ni(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ni(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;ni(a);return Am(-b,c)} -function Dm(a,b,c){ni(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;ni(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} +t.ZA=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(a,b));return this};function Bm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(b,c)} +t.Zz=function(a,b){this.s&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?zm:b;if(this.type===Rl)oi(this.color),this.color=Am(-a,b);else if((this.type===Ul||this.type===Pl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)oi(c.value),this.addColorStop(c.key,Am(-a,b));return this};function Cm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?zm:c;oi(a);return Am(-b,c)} +function Dm(a,b,c){oi(a);a=Em.l;var d=Em.L,e=Em.w,f=Em.W;oi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Em.l-a)*c+a)+", "+Math.round((Em.L-d)*c+d)+", "+Math.round((Em.w-e)*c+e)+", "+Math.round((Em.W-f)*c+f)+")"} t.Vy=function(){if(this.type===Rl)return Fm(this.color);if((this.type===Ul||this.type===Pl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Pl)return Fm(a.first().value);if(null!==a.get(.5))return Fm(a.get(.5));if(2===a.count)return a=a.ta(),Fm(Dm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return Fm(Dm(a.get(c),a.get(d),1-f/e))}return!1}; -function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();ni(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} +function Fm(a){if(!a)return!1;if(a instanceof Ol)return a.Vy();oi(a);return 128>(299*Em.l+587*Em.L+114*Em.w)/1E3} function Am(a,b){switch(b){case zm:b=100*Gm(Em.l);var c=100*Gm(Em.L),d=100*Gm(Em.w);Hm.l=.4124564*b+.3575761*c+.1804375*d;Hm.L=.2126729*b+.7151522*c+.072175*d;Hm.w=.0193339*b+.119192*c+.9503041*d;Hm.W=Em.W;b=Im(Hm.l/Jm[0]);c=Im(Hm.L/Jm[1]);d=Im(Hm.w/Jm[2]);Km.l=116*c-16;Km.L=500*(b-c);Km.w=200*(c-d);Km.W=Hm.W;Km.l=Math.min(100,Math.max(0,Km.l+100*a));a=(Km.l+16)/116;b=a-Km.w/200;Hm.l=Jm[0]*Lm(Km.L/500+a);Hm.L=Jm[1]*(Km.l>Mm*Nm?Math.pow(a,3):Km.l/Mm);Hm.w=Jm[2]*Lm(b);Hm.W=Km.W;a=-.969266*Hm.l+1.8760108* -Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return oi(),pi.w=Math.min(100,Math.max(0,pi.w+100*a)),"hsla("+pi.l+", "+pi.L+"%, "+pi.w+"%, "+ -pi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ni(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} -function oi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}pi.l=Math.round(g);pi.L=Math.round(100*a);pi.w=Math.round(100*e);pi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +Hm.L+.041556*Hm.w;b=.0556434*Hm.l+-.2040259*Hm.L+1.0572252*Hm.w;Em.l=255*Om((3.2404542*Hm.l+-1.5371385*Hm.L+-.4985314*Hm.w)/100);Em.L=255*Om(a/100);Em.w=255*Om(b/100);Em.W=Hm.W;Em.l=Math.round(Em.l);255Em.l&&(Em.l=0);Em.L=Math.round(Em.L);255Em.L&&(Em.L=0);Em.w=Math.round(Em.w);255Em.w&&(Em.w=0);return"rgba("+Em.l+", "+Em.L+", "+Em.w+", "+Em.W+")";case Pm:return pi(),qi.w=Math.min(100,Math.max(0,qi.w+100*a)),"hsla("+qi.l+", "+qi.L+"%, "+qi.w+"%, "+ +qi.W+")";default:return v("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function oi(a){vm||(wm(),vm=!0);var b=ym;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,Em.l=a[0],Em.L=a[1],Em.w=a[2],Em.W=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&F&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Em.l=0,Em.L=0,Em.w=0,Em.W=1)}} +function pi(){var a=Em.l/255,b=Em.L/255,c=Em.w/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}qi.l=Math.round(g);qi.L=Math.round(100*a);qi.w=Math.round(100*e);qi.W=Em.W}function Gm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Om(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function Im(a){return a>Nm?Math.pow(a,1/3):(Mm*a+16)/116}function Lm(a){var b=a*a*a;return b>Nm?b:(116*a-16)/Mm}function km(a,b){"string"===typeof a?F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Ol||v("Value for "+b+" must be a color string or a Brush, not "+a)}function wm(){ym=gh?(new Vk(null)).context:null} na.Object.defineProperties(Ol.prototype,{type:{configurable:!0,get:function(){return this.sa},set:function(a){this.s&&va(this,a);gb(a,Ol,Ol,"type");this.sa=a;this.start.Sb()&&(a===Ul?this.start=Fc:a===Pl&&(this.start=Kc));this.end.Sb()&&(a===Ul?this.end=Nc:a===Pl&&(this.end=Kc));this.ue=null}},color:{configurable:!0,get:function(){return this.rl},set:function(a){this.s&&va(this,a);F&&!xm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color');this.rl=a;this.ue= null}},start:{configurable:!0,get:function(){return this.Kd},set:function(a){this.s&&va(this,a);w(a,N,Ol,"start");this.Kd=a.K();this.ue=null}},end:{configurable:!0,get:function(){return this.El},set:function(a){this.s&&va(this,a);w(a,N,Ol,"end");this.El=a.K();this.ue=null}},startRadius:{configurable:!0,get:function(){return this.wt},set:function(a){this.s&&va(this,a);C(a,Ol,"startRadius");0>a&&za(a,">= zero",Ol,"startRadius");this.wt=a;this.ue=null}},endRadius:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.s&&va(this,a);C(a,Ol,"endRadius");0>a&&za(a,">= zero",Ol,"endRadius");this.ks=a;this.ue=null}},colorStops:{configurable:!0,get:function(){return this.te},set:function(a){this.s&&va(this,a);F&&w(a,Bb,Ol,"colorStops");this.te=a;this.ue=null}},pattern:{configurable:!0,get:function(){return this.Xs},set:function(a){this.s&&va(this,a);this.Xs=a;this.ue=null}}});Ol.prototype.isDark=Ol.prototype.Vy; -Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,pi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); +Ol.prototype.darkenBy=Ol.prototype.Zz;Ol.prototype.lightenBy=Ol.prototype.ZA;Ol.prototype.addColorStop=Ol.prototype.addColorStop;var Nm=216/24389,Mm=24389/27,Jm=[95.047,100,108.883],ym=null,Em=new um,qi=new um,Hm=new um,Km=new um,vm=!1;Ol.className="Brush";var Rl;Ol.Solid=Rl=new E(Ol,"Solid",0);var Ul;Ol.Linear=Ul=new E(Ol,"Linear",1);var Pl;Ol.Radial=Pl=new E(Ol,"Radial",2);var Tl;Ol.Pattern=Tl=new E(Ol,"Pattern",4);var zm;Ol.Lab=zm=new E(Ol,"Lab",5);var Pm;Ol.HSL=Pm=new E(Ol,"HSL",6); Ol.randomColor=function(a,b){void 0===a&&(a=128);F&&(C(a,Ol,"randomColor:min"),(0>a||255b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+ a};Ol.isValidColor=xm;Ol.lighten=function(a){return Bm(a)};Ol.lightenBy=Bm;Ol.darken=function(a){return Cm(a)};Ol.darkenBy=Cm;Ol.mix=Dm;Ol.isDark=Fm;function hm(){this.va="Base"}hm.prototype.measure=function(){};hm.prototype.bB=function(a,b,c,d,e){a.measure(b,c,d,e)};hm.prototype.arrange=function(){};hm.prototype.Mz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};hm.prototype.kB=function(a){a.Nk()};hm.prototype.sc=function(){}; na.Object.defineProperties(hm.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){this.va=a}},classType:{configurable:!0,get:function(){return W}}});hm.prototype.remeasureObject=hm.prototype.kB;hm.prototype.arrangeElement=hm.prototype.Mz;hm.prototype.measureElement=hm.prototype.bB;hm.className="PanelLayout";function Qm(){this.va="Base"}ma(Qm,hm); @@ -1185,9 +1185,9 @@ cn.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.$.j,u=q.length,y=0;yB)){x=nk(x.figure);for(var D=0;DB&&z.push(G))}}}}q= -a.$.j;u=q.length;for(y=0;ye*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*x*c))){B=M.segmentIndex;if(!isFinite(B)||isNaN(B))B=0;0>B&&(B=x-Math.min(-B,x));B=Math.round(B%x);x=M.opacity;D=1;if(1!==x){if(0===x)continue;D=b.globalAlpha;b.globalAlpha=D*x}G=r[y];var Y=!1,Q=M.strokeDashArray;null!==Q&&(Y=!0,b.St(Q,M.strokeDashOffset));if("LineV"===M.figure&&null!==M.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)x.measure(Infinity,Infinity,0,0),z=x.measuredBounds,b.Xc(z),a.l.push(z);else{var B=x.segmentIndex,D=x.segmentFraction,G=x.alignmentFocus;G.Sb()&&(G=Kc);var M=x.segmentOrientation,Y=x.segmentOffset;if(isNaN(B)){var Q=k.ua;z=Ma();Q.mw(D,z);var ca=J.allocAt(z[0],z[1]);ca.add(k.i(0)); Q.type===Gd?ca.offset(-Q.startX,-Q.startY):(Q=Q.figures.first(),ca.offset(-Q.startX,-Q.startY));Q=z[2];if(M!==ng){var T=k.computeAngle(x,M,Q);x.dc=T}T=ca.x-m.x;var P=ca.y-m.y;J.free(ca);Oa(z)}else if(B<-f||B>=f)P=k.midPoint,Q=k.midAngle,M!==ng&&(T=k.computeAngle(x,M,Q),x.dc=T),T=P.x-m.x,P=P.y-m.y;else{T=0;0<=B?(P=n.M(B),z=Bxa+ @@ -1222,9 +1222,9 @@ W.prototype.copy=function(){var a=O.prototype.copy.call(this);if(null!==a){for(v t.Ap=function(a){O.prototype.Ap.call(this,a);for(var b=this.$.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Ai(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function un(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.gh:a.fh);var n=l.separatorStroke;null===n&&(n=c?a.Di:a.eh);if(0!==m&&null!==n){Bi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.Ci:a.Bi);null!==p&&(n=!0,b.St(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ob;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Qt()}}}} -function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Ai(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function tn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.Cc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.gh:a.fh);var r=l.separatorStroke;null===r&&(r=c?a.Di:a.eh);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ob,Bi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function nk(a){return"LineV"===a||"BarV"===a} t.Lk=function(a,b,c,d,e){var f=this.pe(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,K.Of(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=K.Of(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.$.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.sa===W.Spot;u&&(q=J.alloc(),p=this.yb(),(l=p.Lk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var y=0;yd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; @@ -1262,12 +1262,12 @@ g&&null!==g.lb)for(var h=g.lb.iterator;h.next();){var k=h.value;k.vd=g;k.uq=2;k. g=d.targetProperty;var k=g.indexOf(".");0=c.elements.count&&!(c instanceof U)){var d=!1;if(1===c.elements.count&&(d=null!==c.itemArray,!d))for(h=b.iterator;h.next();)if("itemArray"===h.value.targetProperty){d=!0;break}d||(Ea("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Fn=!0)}}))} t.Xz=function(a){void 0===a&&(a=!1);var b=this.copy();wn(b,function(a){a instanceof W&&(a.xi=null,a.tb=null);var b=a.lb;null!==b&&(a.lb=null,b.each(function(b){a.bind(b.copy())}));b=a.Yg;null!==b&&(a.Yg=null,b.each(function(b){a.gx(b.value.copy())}))});a&&yg(b);return b}; -t.Ia=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; +t.Ja=function(a){var b=this.xi;if(null!==b)for(void 0===a&&(a=""),b=b.iterator;b.next();){var c=b.value,d=c.sourceProperty;if(""===a||""===d||d===a)if(d=c.targetProperty,null!==c.converter||""!==d){d=this.data;var e=c.sourceName;if(null!==e)if(""===e)d=this;else if("/"===e)d=this;else if("."===e)d=this;else if(".."===e)d=this;else{if(d=this.ib(e),null===d){F&&Ea("Binding error: missing GraphObject named "+e+" in "+this.toString());continue}}else if(c.isToModel)if(d=this.diagram,null!==d)d=d.model.modelData; else continue;var f=this,g=c.Ij;if(-1!==g){if(f=this.Tt(g),null===f)continue}else null!==c.vd&&(f=c.vd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.uq;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.getColumnDefinition(c.Bm):2===e&&(f=f.getRowDefinition(c.Bm))}void 0!==f&&c.jx(f,d)}}}; function Gn(a,b){a=a.$.j;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.Rc(this.$.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Ui("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), +function Hn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=In(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.J(d));null===f&&(null!==e&&(f=e.J("")),null===f&&(Jn||(Jn=!0,Ea('No item template Panel found for category "'+d+'" on '+a),Ea(" Using default item template."),d=new W,e=new ih,e.bind(new Vi("text","",Qa)),d.add(e),Kn=d),f=Kn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.I&16777216)&&(e=a.tj(),null!==e&&Dn(e,!0)),"object"===typeof b&&(null===a.ee&&(a.ee=new Bb),a.ee.add(b,d)),e=c+zn(a),a.Bb(e,d), d.tb=b,Ln(a,e,c),d.tb=null,d.data=b)}}function Ln(a,b,c){for(a=a.$;ba)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),this.hj=a,this.u(),this.g("topIndex",b,a))}}},leftIndex:{configurable:!0,get:function(){return void 0===this.Ri?0:this.Ri},set:function(a){if(void 0!==this.Ri){var b=this.Ri;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+ a),this.Ri=a,this.u(),this.g("leftIndex",b,a))}}},data:{configurable:!0,get:function(){return this.tb},set:function(a){var b=this.tb;if(b!==a){var c=this instanceof U&&!(this instanceof Ve);c&&A(a,"object",W,"data");yg(this);this.tb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.ef.remove(b),null!==a&&c.ef.add(a,this)):this instanceof U&&(null!==b&&c.ff.remove(b),null!==a&&c.ff.add(a,this))):(c=this.panel,null!==c&&null!==c.ee&&(null!==b&&c.ee.remove(b), -null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ia()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; +null!==a&&c.ee.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ja()}}},itemIndex:{configurable:!0,get:function(){return this.Qo},set:function(a){var b=this.Qo;b!==a&&(this.Qo=a,this.g("itemIndex",b,a))}},itemArray:{configurable:!0,get:function(){return this.Ni},set:function(a){var b=this.Ni;if(b!==a||null!==a&&Gn(this,a)){F&&null!==a&&!Ha(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.diagram; b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Ni=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.ru()}}},itemTemplate:{configurable:!0,get:function(){return null===this.De?null:this.De.J("")},set:function(a){if(null===this.De){if(null===a)return;this.De=new Bb}var b=this.De.J("");b!==a&&(w(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+ a),this.De.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.ru())}},itemTemplateMap:{configurable:!0,get:function(){return this.De},set:function(a){var b=this.De;if(b!==a){w(a,Bb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;F&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}this.De=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| this.ru()}}},itemCategoryProperty:{configurable:!0,get:function(){return this.Wl},set:function(a){var b=this.Wl;b!==a&&("string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",W,"itemCategoryProperty"),this.Wl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.I&1048576)},set:function(a){var b=0!==(this.I&1048576);b!==a&&(A(a,"boolean",W,"isAtomic"),this.I^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0, @@ -1295,7 +1295,7 @@ this.I^=33554432,this.u(),this.g("isOpposite",b,a))}},isEnabled:{configurable:!0 A(a,"string",W,"alignmentFocusName"),this.Xg=a,this.u(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return gm.J("Position")}},Horizontal:{configurable:!0,get:function(){return gm.J("Horizontal")}},Vertical:{configurable:!0,get:function(){return gm.J("Vertical")}},Spot:{configurable:!0,get:function(){return gm.J("Spot")}},Auto:{configurable:!0,get:function(){return gm.J("Auto")}},Table:{configurable:!0,get:function(){return gm.J("Table")}},Viewbox:{configurable:!0, enumerable:!0,get:function(){return gm.J("Viewbox")}},TableRow:{configurable:!0,get:function(){return gm.J("TableRow")}},TableColumn:{configurable:!0,get:function(){return gm.J("TableColumn")}},Link:{configurable:!0,get:function(){return gm.J("Link")}},Grid:{configurable:!0,get:function(){return gm.J("Grid")}},Graduated:{configurable:!0,get:function(){return gm.J("Graduated")}}});W.prototype.findItemPanelForData=W.prototype.Gy; -W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ia;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; +W.prototype.rebuildItemElements=W.prototype.ru;W.prototype.updateTargetBindings=W.prototype.Ja;W.prototype.copyTemplate=W.prototype.Xz;W.prototype.graduatedValueForPoint=W.prototype.LA;W.prototype.graduatedPointForValue=W.prototype.KA;W.prototype.findColumnForLocalX=W.prototype.mA;W.prototype.findRowForLocalY=W.prototype.uA;W.prototype.removeColumnDefinition=W.prototype.lB;W.prototype.removeRowDefinition=W.prototype.qB;W.prototype.removeAt=W.prototype.jb;W.prototype.remove=W.prototype.remove; W.prototype.insertAt=W.prototype.Bb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.ib;W.prototype.findInVisualTree=W.prototype.Mm;W.prototype.walkVisualTreeFrom=W.prototype.fl;W.prototype.findMainElement=W.prototype.yb;var Fn=!1,Jn=!1,Kn=null,gm=new Bb;W.className="Panel";W.definePanelLayout=Nn;Nn("Position",new Qm);Nn("Vertical",new Tm);Nn("Auto",new Vm);Nn("Link",new fn); function jk(){eb(this);this.Ag=null;this.As=!0;this.Xa=0;this.gd=NaN;this.zh=0;this.xh=Infinity;this.Db=fd;this.ra=this.hc=this.na=0;this.lb=null;this.lq=On;this.Pe=pl;this.hq=this.Eg=null;this.iq=NaN;this.rb=this.sk=null;this.Vn=!1} jk.prototype.copy=function(){var a=new jk;a.As=this.As;a.Xa=this.Xa;a.gd=this.gd;a.zh=this.zh;a.xh=this.xh;a.Db=this.Db;a.na=this.na;a.hc=this.hc;a.ra=this.ra;a.Pe=this.Pe;a.lq=this.lq;null===this.Eg?a.Eg=null:a.Eg=this.Eg.K();a.hq=this.hq;a.iq=this.iq;a.sk=null;null!==this.sk&&(a.separatorDashArray=Ja(this.separatorDashArray));a.rb=this.rb;a.Vn=this.Vn;a.lb=this.lb;return a};t=jk.prototype; @@ -1320,7 +1320,7 @@ Uf.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a); t.pb=function(a){a===zg||a===Og||a===sl||a===pl?this.geometryStretch=a:O.prototype.pb.call(this,a)};t.toString=function(){return"Shape("+("None"!==this.figure?this.figure:"None"!==this.toArrow?this.toArrow:this.fromArrow)+")#"+ob(this)}; function Pn(a,b,c,d){var e=c.length;if(!(4>e)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,y=Ma(),x=2;xn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;x=0;q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Oa(y);return}e>q?(z=e-q,e=q):z=0;var B=Math.sqrt(e*e/(1+p*p));0>n&&(B=-B);h+=B;k+=p*B;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===z&&d.pj(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==z){x++;if(x===y.length){Oa(y);return}q=y[x];n=q[0];r=q[1];p=q[2];q=q[3];e=z}}Oa(y)}} -t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Ai(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Ai(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, +t.pj=function(a,b){var c=this.Nc,d=this.Fl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&Bi(this,a,d,!0,!1,f,e);var g=this.part,h=this.Hh;null===c||0!==h||null===g||!this.isPanelMain&&g.yb()!==this||(h=g.type===W.Link&&g instanceof Ve&&"Selection"===g.category&&g.adornedObject instanceof Uf&&g.adornedPart.yb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(Bi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.ym,a.lineCap=this.xm, a.miterLimit=this.tk);e=!1;g&&b.Xe("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.St(h,this.Gh));var k=this.ua;if(null!==k){if(k.type===Gd)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.Hj();else if(k.type===Kd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.We(d);if(null!==c){g&& e&&Nl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.Hj();g&&e&&Ml(a)}}else if(k.type===Ld)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+K.Wg*k,h-p,l+k,h-K.Wg*p,l+k,h),a.bezierCurveTo(l+k,h+K.Wg*p,l+K.Wg*k,h+p,l,h+p),a.bezierCurveTo(l-K.Wg*k,h+p,l-k,h+K.Wg*p,l-k,h),a.bezierCurveTo(l-k,h-K.Wg*p,l-K.Wg*k,h-p,l,h-p),a.closePath(),null!==d&&a.We(d),null!==c&& (g&&e?(Nl(a),a.Hj(),Ml(a)):a.Hj());else if(k.type===Ad)for(h=k.figures,k=h.length,p=0;pp*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& +t.pj=function(a,b){if(null!==this.Nc&&0!==this.$b.length&&null!==this.xe){var c=this.naturalBounds,d=this.actualBounds,e=c.width,f=c.height,g=mo(this),h=a.textAlign=this.fj,k=b.Tl;"start"===h?h=k?"right":"left":"end"===h&&(h=k?"left":"right");k=this.Mi;var l=this.Li;Bi(this,a,this.Nc,!0,!1,c,d);(k||l)&&Bi(this,a,this.Nc,!1,!1,c,d);d=0;c=!1;var m=J.allocAt(0,0);this.Md.Aa(m);var n=J.allocAt(0,g);this.Md.Aa(n);var p=m.Ve(n);J.free(m);J.free(n);m=b.scale;8>p*m*m&&(c=!0);b.Mb!==a&&(c=!1);!1===b.Xe("textGreeking")&& (c=!1);b=this.zf;p=this.Af;switch(this.flip){case ul:a.translate(e,0);a.scale(-1,1);break;case tl:a.translate(0,f);a.scale(1,-1);break;case vl:a.translate(e,f),a.scale(-1,-1)}m=this.ed;n=(b+g+p)*m;f>n&&(d=this.lj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.we)p=this.Ab,p>e&&(p=e),this.oj(this.we,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Wb&&null!==this.qb)for(n=0;ne&&(r=e);d+=b;this.oj(this.qb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case ul:a.scale(-1,1);a.translate(-e, 0);break;case tl:a.scale(1,-1);a.translate(0,-f);break;case vl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.oj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==no?no(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==oo?oo(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1408,9 +1408,9 @@ metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wb?this.Wb:[t var no=null,oo=null,yo=new E(ih,"None",0),vo=new E(ih,"WrapFit",1),jo=new E(ih,"WrapDesiredSize",2),Ao=new E(ih,"WrapBreakAll",3),io=new E(ih,"OverflowClip",0),so=new E(ih,"OverflowEllipsis",1),ko=new E(ih,"FormatTrim",0),Co=new E(ih,"FormatNone",0),Bo=/[ \u200b\u00ad]/,Do=new ib,Eo=0,Fo=new ib,Go=0,uo="...",po="",ho=null,go=!1;ih.className="TextBlock";ih.getEllipsis=function(){return uo};ih.setEllipsis=function(a){uo=a;Fo=new ib;Go=0};ih.getBaseline=function(){return no}; ih.setBaseline=function(a){no=a};ih.getUnderline=function(){return oo};ih.setUnderline=function(a){oo=a};ih.isValidFont=lo;ih.None=yo;ih.WrapFit=vo;ih.WrapDesiredSize=jo;ih.WrapBreakAll=Ao;ih.OverflowClip=io;ih.OverflowEllipsis=so;function Ho(){this.Wb=[];this.qb=[]}Ho.prototype.reset=function(){this.Wb=[];this.qb=[]};Ho.prototype.vy=function(a){this.Wb=Ja(a.Wb);this.qb=Ja(a.qb)};Ho.className="TextBlockMetrics"; function rk(){O.call(this);this.lh=null;this.nq="";this.Eh=vc;this.Ll=Bd;this.Ih=this.rd=null;this.Kl=Kc;this.Zd=zg;this.Am=null;this.Ho=!1;this.Gl=!0;this.am=!1;this.tm=null}ma(rk,O);rk.prototype.cloneProtected=function(a){O.prototype.cloneProtected.call(this,a);a.element=this.lh;a.nq=this.nq;a.Eh=this.Eh.K();a.Ll=this.Ll;a.Zd=this.Zd;a.rd=this.rd;a.Ih=this.Ih;a.Kl=this.Kl.K();a.Gl=this.Gl;a.tm=this.tm}; -rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ti(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} +rk.prototype.pb=function(a){a===zg||a===Og||a===sl?this.imageStretch=a:O.prototype.pb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ob(this)};function Ui(a){void 0===a&&(a="");A(a,"string",rk,"clearCache:url");""!==a?Io[a]&&(delete Io[a],Jo--):(Io=new ib,Jo=0)} function Ko(a,b){b.wz||(b.qv=function(c){b.ys=!0;b.Eo=!1;var d=b.ih.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.Bg.J(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case Bd:m=d.width;n=d.height;break;case Og:case sl:p===Og?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===sl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Mf()*b.scale;var q=m*p*n*p,u=h*g/q,y=c.__goCache;p=null;var x=Lo;if(c.ys&&void 0!==y&&4x*x)for(null===y.nj&&(Mo(y,4,k,l,c),Mo(y,16,k,l,c)),k=y.nj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +t.BA=function(a){void 0===a&&(a=Infinity);A(a,"number",V,"findTreeParts:level");var b=new I;ml(b,this,!1,a,!0);return b};V.prototype.collapseTree=function(a){void 0===a&&(a=1);C(a,V,"collapseTree:level");1>a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);tp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function tp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Gi);b.Ye=!1}}; +V.prototype.expandTree=function(a){void 0===a&&(a=2);C(a,V,"expandTree:level");2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ye){b.Ye=!0;var c=new I;c.add(this);vp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Hi);b.Ye=!1}}; function vp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Sq():a.Od();k.next();){var l=k.value;l.isTreeLink&&(h||l.Ad||l.Za(),l=l.Xq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ub(!0),l.Zh(),g&&e.yk(l,f)),2l&&(n=-n),u= -(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.B(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.B(c,0)?h=0l&&(n=-n),u= +(0>k?-1:1)*n+r,y=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var x=r,z=q;K.C(k,0)?z=0k?-1:1)*n+r,z=m*(x-r)+q);this.Bk();this.ke(f);this.Hf(u,y);this.Hf(x,z);this.ke(p);this.Wc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Wc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,K.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ke(d),this.Hf(f,h),this.ke(e);else{this.ke(d);this.ke(e);h=L.alloc();b.xj(h);k=h.ca(e);p.xj(h);l=h.ca(d);if(k||l)g=b.ja(Np(g),new J),this.Wc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.ja(Np(c),new J),this.Wc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));L.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Bk();var B=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),r= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(r-=m?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),l&&(y+=Math.abs(B)*(m?1:2)),0===r?q=y:90===r?u=y:180===r?q=-y:270===r?u=-y:(q=y*Math.cos(r*Math.PI/180),u=y*Math.sin(r*Math.PI/180)),g.Sb()&&l&&(y=b.ja(Kc,J.alloc()),x=J.allocAt(y.x+1E3*q,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,x,!0,n),J.free(y),J.free(x));y=this.getLinkPoint(d,e,c,!1,m,a,b);var D=z=x=0;if(m||!k||l){var G=this.computeEndSegmentLength(d,e, c,!1);D=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.A(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(D+=m?0:30,0>B&&(D+=180));0>D?D+=360:360<=D&&(D-=360);l&&(G+=Math.abs(B)*(m?1:2));0===D?x=G:90===D?z=G:180===D?x=-G:270===D?z=-G:(x=G*Math.cos(D*Math.PI/180),z=G*Math.sin(D*Math.PI/180));c.Sb()&&l&&(c=e.ja(Kc,J.alloc()),g=J.allocAt(c.x+1E3*x,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),J.free(c),J.free(g))}c=n;if(m||!h||l)c=new J(n.x+q,n.y+u);g=y;if(m||!k||l)g=new J(y.x+x,y.y+z);!p&&!m&&h&&3k?-Math.PI/2:Math.PI/2;else m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m);g=b.x;var n=b.y;h=d.x-g;var p=d.y-n;k=Math.sqrt(h*h+p*p);K.da(h,0)?p=0>p?-Math.PI/2:Math.PI/2:(p=Math.atan(p/Math.abs(h)),0>h&&(p=Math.PI-p)); l=k/l;m=p-m;this.Wc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.O(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Wc(c,d)}}return!0;case Dp:f=this.i(a);n=this.i(c);if(!f.Wa(b)||!n.Wa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Wc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Pc(Vp,Vp);k.Pc(Vp,Vp);h.af(a);k.af(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.ca(a)|| h.ca(c))?l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yk.bottom&&a.x>k.left&&a.xh.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new J(a.x,Math.min((a.y+c.y)/2,a.y)),m=new J(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.B(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, -g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.B(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= +Wp(u,a,b,r,d,h,!0);k=Xp(u,r.x,r.y);!u.abort&&k>=Yp&&(Nk(u),h.Pc(u.Mq*u.Wy,u.Lq*u.Wy),Wp(u,a,b,r,d,h,!1),k=Xp(u,r.x,r.y));if(!u.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=r.y):(h.x=r.x,h.y=a.y),this.O(2,h.x,h.y),this.m(3,h.x,h.y);else if(g=this.i(3),0===b||180===b)K.C(h.x,g.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.O(2,h,a.y),this.O(3,h,g.y)):K.C(h.y,g.y)?(Math.abs(a.y-h.y)<=u.Lq/2&&(this.O(2,h.x,a.y),this.O(3, +g.x,a.y)),this.m(2,h.x,a.y)):this.O(2,a.x,h.y);else if(90===b||270===b)K.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.O(2,a.x,h),this.O(3,g.x,h)):K.C(h.x,g.x)?(Math.abs(a.x-h.x)<=u.Mq/2&&(this.O(2,a.x,h.y),this.O(3,a.x,g.y)),this.m(2,a.x,h.y)):this.O(2,h.x,a.y);null!==c&&(a=this.i(1),g=this.i(2),a.x!==g.x&&a.y!==g.y?0===b||180===b?this.m(2,a.x,g.y):this.m(2,g.x,a.y):0===b||180===b?this.m(2,e.x,c.y):this.m(2,c.x,e.y));null!==y&&(0===d||180===d?this.Hf(f.x,y.y):this.Hf(y.x,f.y));b= !0}else b=!1}}}else b=!1;b||(this.ke(l),this.ke(m))}};S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Uc()||this.computeSpot(!1,this.toPort).Uc()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; function gk(a){if(null===a.diagram||!a.isAvoiding||!yk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=zk(a.diagram,!0,a.containingGroup,null);for(var d=1;d$p&&Xp(b,m,n)!==l-1&&(Xp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Xp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Xp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Xp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>$p&&Xp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>$p)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ @@ -1662,18 +1662,18 @@ Math.min(h.x,f.x),f.y=Math.min(h.y,f.y);else for(d=3;d=b&&(d=b-1),k= (e=aq(this,e,!1,f)),Td(h,b,c,b,c,e.x,e.y);else if(this.isOrthogonal){f=new J(d,k);e=this.i(1).copy();g=new J(d,k);b=new J(d,k);c=this.i(0);for(var l,m=this.smoothness/3,n=1;ny?q>r?(g.x=x-B,g.y=r-B,b.x=x+u,b.y= r+u):(g.x=x-B,g.y=r+B,b.x=x+u,b.y=r-u):q>r?(g.x=x+B,g.y=r-B,b.x=x-u,b.y=r+u):(g.x=x+B,g.y=r+B,b.x=x-u,b.y=r-u));K.da(y,x)&&K.da(r,q)&&(r>p?(z>x?(g.x=x-B,g.y=r-B,b.x=x+u):(g.x=x+B,g.y=r-B,b.x=x-u),b.y=r+u):(z>x?(g.x=x-B,g.y=r+B,b.x=x+u):(g.x=x+B,g.y=r+B,b.x=x-u),b.y=r-u));if(K.da(y,x)&&K.da(x,z)||K.da(p,r)&&K.da(r,q))y=.5*(y+z),p=.5*(p+q),g.x=y,g.y=p,b.x=y,b.y=p;1===n?(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y)):2===n&&K.da(c.x,this.i(0).x)&&K.da(c.y,this.i(0).y)&&(e.x=.5*(c.x+l.x),e.y=.5*(c.y+l.y));Td(h,e.x- d,e.y-k,g.x-d,g.y-k,l.x-d,l.y-k);f.set(g);e.set(b);c=l}}f=c.x;c=c.y;e=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(e=aq(this,e.copy(),!1,Mb));f=.5*(f+e.x);c=.5*(c+e.y);Td(h,b.x-d,b.y-k,f-d,c-k,e.x-d,e.y-k)}else for(c=3;c=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=aq(this,g.copy(),!1,Mb)),Td(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f=J.alloc();f.assign(this.i(0));e=J.alloc();e.assign(f);g=this.computeCorner();n=1;for(l= -0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ -z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.B(f.x,p.x)&&K.B(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.B(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, +0;n=b-1){if(!f.A(m))0!==this.computeShortLength(!1)&&(m=aq(this,m.copy(),!1,Mb)),dq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?q=p.x-r:q=p.x+r;u.y>p.y?G=p.y+ +z:G=p.y-z;dq(this,h,n,y,f,new J(q,B),x);Ud(h,p.x+n,p.y+y,D+n,G+y);f.h(D,G)}else K.C(f.x,p.x)&&K.C(p.y,u.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(u.x-p.x)/2),K.C(z,0)?(dq(this,h,n,y,f,p,x),f.assign(p)):(q=p.x,B=p.y,D=q,G=B,p.y>f.y?B=p.y-r:B=p.y+r,u.x>p.x?D=p.x+z:D=p.x-z,dq(this,h,n,y,f,new J(q,B),x),Ud(h,p.x+n,p.y+y,D+n,G+y),f.h(D,G))):(dq(this,h,n,y,f,p,x),f.assign(p));e.assign(m);n=l}J.free(f)}Xd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=aq(this, e,!0,f)),0!==this.computeShortLength(!1)&&(h=aq(this,h,!1,f)),a.type=Gd,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.on=!0;return a};function cq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return K.da(a,0)?b:K.da(b,0)?a:Math.sqrt(a*a+b*b)} function aq(a,b,c,d){var e=a.pointsCount;if(2>e)return b;if(c){var f=a.i(1);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!0);a>e&&(a=e);e=a*(f-b.y)/d;b.x+=a*(c-b.x)/d;b.y+=e}else{f=a.i(e-2);c=f.x-d.x;f=f.y-d.y;d=cq(b.x,b.y,c,f);if(0===d)return b;e=2===e?.5*d:d;a=a.computeShortLength(!1);a>e&&(a=e);e=a*(b.y-f)/d;b.x-=a*(b.x-c)/d;b.y-=e}return b} function bq(a,b,c,d){for(var e=a.pointsCount,f=b;K.da(b.x,f.x)&&K.da(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.da(b.x,f.x)&&!K.da(b.y,f.y))return c-1;for(var g=f;K.da(b.x,f.x)&&K.da(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.da(b.y,f.y)&&K.da(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.i(c++)}return c-2}S.prototype.computeJumpLength=function(){return 10}; -function dq(a,b,c,d,e,f,g){if(!g&&Fp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=eq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.B(e.x,f.x))if(e.yn-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===mg?Pd(b,n,r,!1):Td(b,p,m,n,m,n,r)}else if(K.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===mg?Pd(b,r,m,!1):Td(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function eq(a,b,c,d){var e=a.diagram;if(null===e||b.A(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ja.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.B(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.B(n,r)&& -K.B(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.B(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} -S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ja.j;for(var g=e.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,y)n&&!K.C(g,y)){h.x=q;h.y=n;m=!0;break a}}else if(!K.C(n,r)&& +K.C(g,y)&&Math.min(n,r)g&&Math.min(q,u)m&&!K.C(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function Fp(a){a=a.curve;return a===lg||a===mg}function Jp(a,b){if(b||Fp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.hh.contains(a)||0===a.km.width&&0===a.km.height||b.hh.add(a,a.km.copy())} +S.prototype.ar=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ka.j;for(var g=e.length,h=0;hb.Gc?1:a.angleb.angle?1:0}; Qp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,Bc,b.fromPort===this.port),d=a.Yq;if(0>d)return c;var e=a.Km;if(1>=e||!b.isOrthogonal)return c;b=a.Cw;var f=a.dr;if(2===a.Gc||8===a.Gc)d=e-1-d;return((a=2===a.Gc||4===a.Gc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ni.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ni.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} -function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Ni.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ni.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ni.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ni.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ni.prototype.workerLayout=function(){return!1}; -function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ni.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; +yl.prototype.copy=function(){var a=new yl;a.oh=this.oh.K();a.Nh=this.Nh.K();a.mh=this.mh;a.Lh=this.Lh;a.nh=this.nh;a.Mh=this.Mh;a.ro=this.ro;a.xq=this.xq;a.so=this.so;a.yq=this.yq;return a};yl.className="LinkSettings";function Oi(){0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Oi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(uq(h),this.bi(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof If&&(h.bi=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Oi.prototype.bi=function(a){return!a.location.o()||a instanceof If&&a.bi?!0:!1};function tq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.isLinkLabel||(k instanceof If?null===k.layout?tq(a,b,k.memberParts,!1,e,f,g,h):(uq(k),b.add(k)):(uq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Tc()||k instanceof V||(uq(k),b.add(k)))}} +function uq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ya()}Oi.prototype.yj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new L),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Oi.prototype.qy=function(a){var b=new I;a instanceof R?(tq(this,b,a.nodes,!0,null,!0,!0,!0),tq(this,b,a.links,!0,null,!0,!0,!0),tq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof If?tq(this,b,a.memberParts,!1,null,!0,!0,!0):tq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Oi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.ja(Ec),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Oi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Oi.prototype.workerLayout=function(){return!1}; +function vq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.rk&&(c.running=wq(a.rk));null!==a.Kg&&(c.waiting=wq(a.Kg));a.workerStateChanged(c,a)}}function wq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Oi.prototype.Qz=function(){var a=xq(this.constructor);a&&(null!==a.bf&&a.bf.terminate(),a.bf=null,a.Tm.iteratorValues.each(function(a){a.Jt=!1;a.rk=null;a.Kg=null;a.yt=!1;vq(a)}),a.Tm.clear())}; function yq(a,b){var c=xq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function xq(a){var b=null;if("function"===typeof a){if(b=zq.get(a),!b){var c=Pa(a);b=zq.get(c);b||(b=new Aq,b.Yv=a,b.name=c,b.l=a.name,b.Ry=Bq,zq.set(c,b),zq.set(a,b),zq.set(a.name,b))}}else"string"===typeof a&&(b=zq.get(a));return b} -Ni.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= +Oi.prototype.kx=function(){if("undefined"===typeof Worker||!Cq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.Jt&&(this.yt=!0,this.Kg=this.rk=null,vq(this)),!1;var a=xq(this.constructor);if(null===a)return!1;null===a.bf&&(a.bf=new Worker(Cq),a.bf.onerror=function(a){a.preventDefault();Ea("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.bf.l=function(a){Ea("Worker serialization error: "+a)},a.bf.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)Ea("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Tm.get(c.id)){a.Tm.remove(c.id);b.Jt=!1;b.rk=null;if(b.yt)b.yt=!1,b.Kg=null;else{var d=Dq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}vq(b,c.time);c=b.Kg;if(null!==c)b.Kg=null;else for(d=a.Tm.iteratorValues;d.next();){var e=d.value;c=e.Kg;if(null!==c){e.Kg=null;break}}null!==c&&Eq(b,c)}},a.bf.postMessage({_GoJS:"_GoJS", url:a.Ry}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.bf.postMessage({_GoJS:"_GoJS",url:b})}),a.bf.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.rk?this.Kg=this.network:Eq(this,this.network);vq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function Eq(a,b){a.Jt=!0;var c=xq(a.constructor),d=Fq(a,b,!0);d._GoJS="_GoJS";c.bf.postMessage(d);c.Tm.set(ob(a),a);a.rk=b} function Fq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?ob(a):a.id,layout:Pa(a.constructor),p:d,DB:e,jA:f};a.onNetworkSerialization(2,c,b,d);return d} function Dq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.DB,g=new Bb;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Hb(a.key));null!==b?b=e.zk(b):(b=e.createVertex(),e.Ng(b));c&&null!==a.key&&(b.data={Oi:a.key});g.set(a.id,b)});var h=b.jA,k=new Bb;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.Gm(f);f.link=b;c&&null!==a.key&&(f.data={Oi:a.key});k.set(a.id, -f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ni.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ni.prototype,{diagram:{configurable:!0,get:function(){return this.C},set:function(a){null!==a&&w(a,R,Ni,"diagram");this.C=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Ni,"group"),this.w=a,null!==a&&(this.C=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Ni,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, -enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Ni,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Ni,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Ni,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, -set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Ni,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Ni,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Ni,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, -set:function(a){this.In!==a&&(null!==a&&A(a,"function",Ni,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Ni,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", -Ni,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Ni,"workerStateChanged"),this.Dq=a)}}});Ni.prototype.useWorker=Ni.prototype.kx;Ni.declareWorkerLayout=yq;Ni.prototype.cancelWorker=Ni.prototype.Qz;Ni.prototype.collectParts=Ni.prototype.qy;Ni.prototype.getLayoutBounds=Ni.prototype.yj;Ni.prototype.invalidateLayout=Ni.prototype.D; -var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ni.className="Layout";Ni.GoJSScriptURL=Bq;Ni.declareWorkerLayout=yq; +f)});f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Pq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Oi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Oi.prototype,{diagram:{configurable:!0,get:function(){return this.B},set:function(a){null!==a&&w(a,R,Oi,"diagram");this.B=a}},group:{configurable:!0,get:function(){return this.w},set:function(a){this.w!==a&&(null!==a&&w(a,If,Oi,"group"),this.w=a,null!==a&&(this.B=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.Ko},set:function(a){this.Ko!==a&&(A(a,"boolean",Oi,"isOngoing"),this.Ko=a)}},isInitial:{configurable:!0, +enumerable:!0,get:function(){return this.Ki},set:function(a){A(a,"boolean",Oi,"isInitial");this.Ki=a;a||(this.Oo=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Po},set:function(a){this.Po!==a&&(A(a,"boolean",Oi,"isViewportSized"),(this.Po=a)&&this.D())}},isRouting:{configurable:!0,get:function(){return this.Mo},set:function(a){this.Mo!==a&&(A(a,"boolean",Oi,"isRouting"),this.Mo=a)}},isRealtime:{configurable:!0,get:function(){return this.Lo}, +set:function(a){this.Lo!==a&&(null!==a&&A(a,"boolean",Oi,"isRealtime"),this.Lo=a)}},isValidLayout:{configurable:!0,get:function(){return this.Oo},set:function(a){this.Oo!==a&&(A(a,"boolean",Oi,"isValidLayout"),this.Oo=a,a||(a=this.diagram,null!==a&&(a.Zg=!0)))}},network:{configurable:!0,get:function(){return this.l},set:function(a){this.l!==a&&(null!==a&&w(a,sq,Oi,"network"),this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.In}, +set:function(a){this.In!==a&&(null!==a&&A(a,"function",Oi,"boundsComputation"),this.In=a,this.D())}},arrangementOrigin:{configurable:!0,get:function(){return this.An},set:function(a){w(a,J,Oi,"arrangementOrigin");this.An.A(a)||(this.An.assign(a),this.D())}},id:{configurable:!0,get:function(){return this.L},set:function(a){this.L=a}},mayUseWorkerFunction:{configurable:!0,get:function(){return this.gp},set:function(a){this.gp!==a&&(null!==a&&A(a,"function", +Oi,"mayUseWorkerFunction"),this.gp=a)}},workerStateChanged:{configurable:!0,get:function(){return this.Dq},set:function(a){this.Dq!==a&&(null!==a&&A(a,"function",Oi,"workerStateChanged"),this.Dq=a)}}});Oi.prototype.useWorker=Oi.prototype.kx;Oi.declareWorkerLayout=yq;Oi.prototype.cancelWorker=Oi.prototype.Qz;Oi.prototype.collectParts=Oi.prototype.qy;Oi.prototype.getLayoutBounds=Oi.prototype.yj;Oi.prototype.invalidateLayout=Oi.prototype.D; +var zq=new Bb,Bq="object"===typeof qa.document&&qa.document.currentScript?qa.document.currentScript.src:"",Cq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Oi.className="Layout";Oi.GoJSScriptURL=Bq;Oi.declareWorkerLayout=yq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=xq(a.layout));var d=null;c&&c.Yv&&(d=new c.Yv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=Dq(d,a,!0); d.workerLayout=function(){var a=Fq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new H)}});function Aq(){this.Yv=null;this.Ry=this.l=this.name="";this.scripts=[];this.bf=null;this.Tm=new Bb}function sq(a){eb(this);F&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.qc=a;this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb} sq.prototype.clear=function(){if(this.Ff)for(var a=this.Ff.iterator;a.next();)a.value.clear();if(this.ve)for(a=this.ve.iterator;a.next();)a.value.clear();this.Ff=new I;this.ve=new I;this.ou=new Bb;this.ju=new Bb}; @@ -1795,10 +1795,10 @@ Hq.prototype.serializeEdgeProperties=function(a){a.id=ob(this);a.key=this.link?t Hq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+ob(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ca("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +break;case Qq:e.sort(this.comparer);break;case Sq:e.sort(this.comparer),e.reverse()}var f=this.wrappingColumn;isNaN(f)&&(f=0);var g=this.wrappingWidth;isNaN(g)&&null!==a?(b=a.padding,g=Math.max(a.viewportBounds.width-b.left-b.right,0)):g=Math.max(this.wrappingWidth,0);0>=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ea("Layout");d=[];switch(this.alignment){case Wq:var h=b,k=c,l=L.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= m=0;nf-1|| 0g)d.push(new L(0,u,g+h,x)),y=0,q=r,u+=x,x=0;x=Math.max(x,M);switch(p){case Vq:D=-D.width;break;default:D=0}B.moveTo(q+D,u);switch(p){case Vq:q-=G;break;default:q+=G}y++}d.push(new L(0,u,g+h,x));L.free(l);break;case Oq:k=g;m=f;n=b;p=c;g=L.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=B=0;G=Math.max(this.cellSize.height,1);D=f=0;M=!0;y=J.alloc();for(Y=0;Yn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ii.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ia(a);for(b=this.nodes.iterator;b.next();)b.value.Ia(a);for(b=this.links.iterator;b.next();)b.value.Ia(a)}; -Ii.prototype.xr=function(){for(var a=this.C.model,b=new I,c=a.nodeDataArray,d=0;dn)){var u=n+zn(q);q.Rc(u,!0);Ln(q,u,n)}}b.isModified=!0}}finally{b.ba=!0}}}}};Ji.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ja(a);for(b=this.nodes.iterator;b.next();)b.value.Ja(a);for(b=this.links.iterator;b.next();)b.value.Ja(a)}; +Ji.prototype.xr=function(){for(var a=this.B.model,b=new I,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1911,10 +1911,10 @@ t.dl=function(a){A(a,"function",X,"removeChangedListener:listener");this.pv.remo function Mr(a,b,c,d,e,f,g,h,k){void 0===h&&(h=null);void 0===k&&(k=null);var l=new Be;l.model=a;l.change=c;l.modelChange=b;l.propertyName=d;l.object=e;l.oldValue=f;l.oldParam=h;l.newValue=g;l.newParam=k;a.Mt(l)} X.prototype.changeState=function(a,b){if(null!==a&&a.model===this)if(a.change===Ce){var c=a.object,d=a.propertyName,e=a.J(b);d===this.nodeKeyProperty&&this.$a(c)&&(b=a.J(!b),void 0!==b&&this.bb.remove(b),void 0!==e&&this.bb.add(e,c));ik(c,d,e)}else a.change===Le?(c=a.newParam,"nodeDataArray"===a.modelChange?(a=a.newValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)):(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)))):""===a.modelChange? ((d=a.object)&&!Ha(d)&&a.propertyName&&(d=Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.newValue,b?La(d,c):Ka(d,c,a))):v("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Me?(c=a.oldParam,"nodeDataArray"===a.modelChange?(a=a.oldValue,Ga(a)&&"number"===typeof c&&(d=this.pa(a),b?(this.xc[c]!==a&&Ka(this.xc,c,a),void 0!==d&&this.bb.add(d,a)):(this.xc[c]===a&&La(this.xc,c),void 0!==d&&this.bb.remove(d)))):""===a.modelChange?((d=a.object)&&!Ha(d)&&a.propertyName&&(d= -Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ca=function(a){return this.undoManager.Ca(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; -X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ca(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ia=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} +Mn(a.object,a.propertyName)),Ha(d)&&"number"===typeof c&&(a=a.oldValue,b?Ka(d,c,a):La(d,c))):v("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==De&&v("unknown ChangedEvent: "+a.toString())};X.prototype.Ea=function(a){return this.undoManager.Ea(a)};X.prototype.cb=function(a){return this.undoManager.cb(a)};X.prototype.Uf=function(){return this.undoManager.Uf()}; +X.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ea(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.cb(b):this.undoManager.Uf(),this.skipsUndoManager=c}};t=X.prototype;t.Ja=function(a,b){void 0===b&&(b="");Mr(this,"SourceChanged",De,b,a,null,null)};function Nr(a,b,c){"string"!==typeof a&&"function"!==typeof a&&ya(a,"string or function",b,c)} t.pa=function(a){if(null!==a){var b=this.Yi;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for node data "+a+" is not a number or a string: "+b)}}}; -t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; +t.jn=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",X,"setKeyForNodeData:key");if(null!==a){var c=this.Yi;if(""!==c)if(this.$a(a)){var d=Mn(a,c);d!==b&&null===this.Qb(b)&&(ik(a,c,b),void 0!==d&&this.bb.remove(d),this.bb.add(b,a),Mr(this,"nodeKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c),this.pr(d,b))}else ik(a,c,b)}};function lr(a){return"number"===typeof a||"string"===typeof a}t.$a=function(a){var b=this.pa(a);return void 0===b?!1:this.bb.J(b)===a}; t.Qb=function(a){null===a&&v("Model.findNodeDataForKey:key must not be null");return void 0!==a&&lr(a)?this.bb.J(a):null}; t.lu=function(a){if(null!==a){var b=this.Yi;if(""!==b){var c=this.pa(a);if(void 0===c||this.bb.contains(c)){var d=this.bm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.bb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.bb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.bb.count-1;this.bb.contains(c);)c--;ik(a,b,c)}else F&&v("Model.getKeyForNodeData returned something other than a string or a number: "+c)}}}}; t.Gf=function(a){null!==a&&(rb(a),this.$a(a)||dr(this,a,!0))};function dr(a,b,c){var d=a.pa(b);if(void 0===d||a.bb.J(d)!==b)a.lu(b),d=a.pa(b),void 0===d?v("Model.makeNodeDataKeyUnique failed on "+b+". Data not added to Model."):(a.bb.add(d,b),d=null,c&&(d=a.xc.length,Ka(a.xc,d,b)),Mr(a,"nodeDataArray",Le,"nodeDataArray",a,null,b,null,d),a.dn(b),a.cn(b))}t.Hz=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Mr(this,"",Le,"",a,null,c,null,b)}; t.Hw=function(a,b){void 0===b&&(b=-1);F&&(Ia(a,X,"removeArrayItem:arr"),C(b,X,"removeArrayItem:idx"));a===this.xc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];La(a,b);Mr(this,"",Me,"",a,c,null,b,null)};t.Vq=function(a){if(null===a)return"";var b=this.jk;if(""===b)return"";b=Mn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Li(){return new X} +t.hn=function(a,b){A(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.jk;if(""!==c)if(this.$a(a)){var d=Mn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Mr(this,"nodeCategory",Ce,c,a,d,b))}else ik(a,c,b)}};t.kn=function(a,b){this.hn(b,this.Vq(a))};t.Sm=function(){return!1};t.Ok=function(){return!1};t.Cj=function(){return!1};t.hu=function(){return!1};t.Aj=function(){return!1};function Mi(){return new X} function Fr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return Fr(a,b.constructor);return typeof b}function Kr(a){return Qr[a]?Qr[a]:void 0!==qa.go&&qa.go[a]?qa.go[a]:null}function Mn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){F&&Ea("property get error: "+d.toString())}return c} function ik(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){F&&Ea("property set error: "+d.toString())}} na.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.va},set:function(a){var b=this.va;b!==a&&(A(a,"string",X,"name"),this.va=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.Yn},set:function(a){var b=this.Yn;b!==a&&(A(a,"string",X,"dataFormat"),this.Yn=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(A(a,"boolean", -X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ia(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, +X,"isReadOnly"),this.lg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(A(a,"object",X,"modelData"),this.l=a,this.g("modelData",b,a),this.Ja(a))}},undoManager:{configurable:!0,get:function(){return this.w},set:function(a){var b=this.w;b!==a&&(w(a,Oe,X,"undoManager"),null!==b&&b.ez(this),this.w=a,null!==a&&a.ly(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.Hg}, set:function(a){A(a,"boolean",X,"skipsUndoManager");this.Hg=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(Nr(a,X,"nodeKeyProperty"),""===a&&v("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Me){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.bc(a),b?(this.mg.add(a),this.fd[c]!==a&&this.fd.splice(c,0,a),void 0!==d&&this.mb.add(d,a)):(this.mg.remove(a),this.fd[c]=== a&&this.fd.splice(c,1),void 0!==d&&this.mb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Nf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}X.prototype.changeState.call(this,a,b)}};t=Sr.prototype;t.Um=function(a){if(void 0!==a){var b=this.Mj;if(null!==b){var c=this.Qb(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Gf(c))}return a}}; t.My=function(a){return jr(this,a,!0)};t.Pw=function(a,b){rr(this,a,b,!0)};t.Py=function(a){return jr(this,a,!1)};t.Uw=function(a,b){rr(this,a,b,!1)};function jr(a,b,c){if(null!==b&&(a=c?a.nf:a.pf,""!==a&&(a=Mn(b,a),void 0!==a))){if(lr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function rr(a,b,c,d){null===c&&(c=void 0);void 0===c||lr(c)||ya(c,"number or string",Sr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.nf:a.pf;if(""!==e)if(c=a.Um(c),a.Dc(b)){var f=Mn(b,e);f!==c&&(pr(a,f,b),ik(b,e,c),null===a.Qb(c)&&qr(a,c,b),Mr(a,d?"linkFromKey":"linkToKey",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}}t.Ny=function(a){return ir(this,a,!0)};t.Qw=function(a,b){sr(this,a,b,!0)};t.Qy=function(a){return ir(this,a,!1)}; -t.Vw=function(a,b){sr(this,a,b,!1)};function ir(a,b,c){if(null===b)return"";a=c?a.fk:a.gk;if(""===a)return"";b=Mn(b,a);return void 0===b?"":b}function sr(a,b,c,d){A(c,"string",Sr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.fk:a.gk;if(""!==e)if(a.Dc(b)){var f=Mn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Mr(a,d?"linkFromPortId":"linkToPortId",Ce,e,b,f,c),"string"===typeof e&&a.Ia(b,e))}else ik(b,e,c)}} -t.Nf=function(a){if(null===a)return Vr;var b=this.ge;if(""===b)return Vr;a=Mn(a,b);return void 0===a?Vr:a};t.wu=function(a,b){Ia(b,Sr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.ge;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);void 0===d&&(d=Vr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Dc(a)&&(pr(this,b,a),Mr(this,"linkLabelKeys",Me,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ia(a,c))}else ik(a,c,b)}}; +t.bc=function(a){if(null!==a){var b=this.Si;if(""!==b&&(b=Mn(a,b),void 0!==b)){if(lr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.vu=function(a,b){void 0!==b&&null!==b&&lr(b)||ya(b,"number or string",Sr,"setKeyForLinkData:key");if(null!==a){var c=this.Si;if(""!==c)if(this.Dc(a)){var d=Mn(a,c);d!==b&&null===this.Pg(b)&&(ik(a,c,b),void 0!==d&&this.mb.remove(d),this.mb.add(b,a),Mr(this,"linkKey",Ce,c,a,d,b),"string"===typeof c&&this.Ja(a,c))}else ik(a,c,b)}}; t.Pg=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&lr(a)?this.mb.J(a):null}; t.er=function(a){if(null!==a){var b=this.Si;if(""!==b){var c=this.bc(a);if(void 0===c||this.mb.contains(c)){var d=this.cm;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.mb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.mb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.mb.count-1;this.mb.contains(c);)c--;ik(a,b,c)}else F&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; t.Dc=function(a){return null===a?!1:this.mg.contains(a)};t.mj=function(a){null!==a&&(rb(a),this.Dc(a)||nr(this,a,!0))};function nr(a,b,c){if(""!==a.linkKeyProperty){var d=a.bc(b);if(void 0!==d&&a.mb.J(d)===b)return;a.er(b);d=a.bc(b);if(void 0===d){v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.mb.add(d,b)}a.mg.add(b);d=null;c&&(d=a.fd.length,a.fd.splice(d,0,b));Mr(a,"linkDataArray",Le,"linkDataArray",a,null,b,null,d);Wr(a,b)} @@ -1993,17 +1993,17 @@ t.nB=function(a){if(Array.isArray(a))for(var b=a.length,c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new H;b.addAll(a.iterator);a=new H;var c=new H;var d=this.sort(b);var e,f,g=this.Ur;var h=this.arrangement;var k=this.nodeDiameterFormula; var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle;isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===ms&&k===ns?h=Zr:h===ms&&k!==ns&&(h=this.arrangement);if((this.direction===hs||this.direction===is)&&this.sorting!==bs){for(k=0;!(k>=d.length);k+=2){a.add(d.M(k));if(k+1>=d.length)break;c.add(d.M(k+1))}this.direction===hs?(this.arrangement===ms&&a.reverse(),d=new H,d.addAll(a), d.addAll(c)):(this.arrangement===ms&&c.reverse(),d=new H,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;rp&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ms){isNaN(b)&&(b=6);if(h!==Zr&&h!==ms){f=-Infinity;for(g=0;gthis.Om||Math.abs(a)=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right:B<=n.bounds.x)M= -(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q-1).x,x=b.i(q- -1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]);G=Math.max(10, -this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D=u.centerY,p?180===this.N||0===this.N? -(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++,B,D),b.m(q++,B,D+G)):270===this.N? -(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y),D),b.m(q++,y,z),b.m(q++,B,z)))}null!== -d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,B,n+G),b.m(q++,B,n),b.m(q++,B,n-z)):(b.m(q++,B,D+G),b.m(q++,B,D),b.m(q++,B,D-z)):270===this.N?D<=n.bounds.y?(n=n.bounds.y,b.m(q++,B,n-z),b.m(q++,B,n),b.m(q++,B,n+G)):(b.m(q++,B,D-z),b.m(q++,B,D),b.m(q++,B,D+G)):0===this.N&&(B>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+G,D),b.m(q++,n,D),b.m(q++,n-z,D)):(b.m(q++,B+G,D),b.m(q++,B,D),b.m(q++,B-z,D)));else{b.m(q++,y,x);var M=0;if(180===this.N||0===this.N){if(180===this.N?B>=n.bounds.right: +B<=n.bounds.x)M=(0===this.N?-z:G)/2;b.m(q++,y+M,D)}else{if(270===this.N?D>=n.bounds.bottom:D<=n.bounds.y)M=(90===this.N?-z:G)/2;b.m(q++,B,x+M)}b.m(q++,B,D)}}else z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(r&&b.m(q++,B-z,D),b.m(q++,B,D),r&&b.m(q++,B+G,D)):90===this.N?(r&&b.m(q++,B,D+G),b.m(q++,B,D),r&&b.m(q++,B,D-z)):270===this.N?(r&&b.m(q++,B,D-z),b.m(q++,B,D),r&&b.m(q++,B,D+G)):(r&&b.m(q++,B+G,D),b.m(q++,B,D),r&&b.m(q++,B-z,D))}n=u}if(null===h||l!==Bc||p)if(y=b.i(q- +1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,p)n=this.Fd[m.layer],180===this.N||0===this.N?(p=x,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.N?B>=m.bounds.x:B<=m.bounds.right)&&(n=m.centerX+(180===this.N?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.N?D>=m.bounds.y:D<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(q-2,n,x),b.O(q-1,n+G,x)):90===this.N&&D<=m.bounds.bottom?(n=m.bounds.y,b.O(q-2,y,n),b.O(q-1,y,n-z)):270===this.N&&D>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(q-2,y,n),b.O(q-1,y,n+G)):0===this.N&&B<=m.bounds.right&&(n=m.bounds.x,b.O(q-2,n,x),b.O(q-1,n-z,x));else{z=Math.max(10,this.fe[m.layer]); +G=Math.max(10,this.Fd[m.layer]);p=0;if(180===this.N||0===this.N){if(180===this.N?B<=m.bounds.x:B>=m.bounds.right)p=(0===this.N?G:-z)/2;b.m(q++,B+p,x)}else{if(270===this.N?D<=m.bounds.y:D>=m.bounds.bottom)p=(90===this.N?G:-z)/2;b.m(q++,y,D+p)}b.m(q++,B,D)}}else{for(;null!==m&&m!==n;){z=u=null;for(m=m.destinationEdges.iterator;m.next()&&(y=m.value,y.link!==c.link||(u=y.toVertex,z=y.fromVertex,null!==z.node&&(z=null),null!==u.node)););if(null===u)break;u!==n&&(y=b.i(q-1).x,x=b.i(q-1).y,B=u.centerX,D= +u.centerY,p?180===this.N||0===this.N?(null!==z?z.centerY:x)!==D&&(z=this.Na[u.layer]+this.ad.x,q===b.firstPickIndex+1&&(z=0===this.N?Math.max(z,y):Math.min(z,y)),b.m(q++,z,x),b.m(q++,z,D)):(null!==z?z.centerX:y)!==B&&(z=this.Na[u.layer]+this.ad.y,q===b.firstPickIndex+1&&(z=90===this.N?Math.max(z,x):Math.min(z,x)),b.m(q++,y,z),b.m(q++,B,z)):(z=Math.max(10,this.fe[u.layer]),G=Math.max(10,this.Fd[u.layer]),180===this.N?(b.m(q++,B+G,D),r&&b.m(q++,B,D),b.m(q++,B-z,D)):90===this.N?(b.m(q++,B,D-z),r&&b.m(q++, +B,D),b.m(q++,B,D+G)):270===this.N?(b.m(q++,B,D+G),r&&b.m(q++,B,D),b.m(q++,B,D-z)):(b.m(q++,B-z,D),r&&b.m(q++,B,D),b.m(q++,B+G,D))));m=u}p&&(y=b.i(q-1).x,x=b.i(q-1).y,B=b.i(q).x,D=b.i(q).y,180===this.N||0===this.N?x!==D&&(z=0===this.N?Math.min(Math.max((B+y)/2,this.Na[n.layer]+this.ad.x),B):Math.max(Math.min((B+y)/2,this.Na[n.layer]+this.ad.x),B),b.m(q++,z,x),b.m(q++,z,D)):y!==B&&(z=90===this.N?Math.min(Math.max((D+x)/2,this.Na[n.layer]+this.ad.y),D):Math.max(Math.min((D+x)/2,this.Na[n.layer]+this.ad.y), +D),b.m(q++,y,z),b.m(q++,B,z)))}null!==d&&r&&(null!==g&&(l===Bc&&(l=b.i(0),d=b.i(2),l.A(d)||b.O(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,Bc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.O(0,l.x,l.y)),null!==h&&(k===Bc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.A(l)||b.O(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,Bc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.O(b.pointsCount-1,e.x,e.y)));b.Jf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +Us.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new H,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xf.x&&(m=l.x>f.x?0:g.yf.x&&(m=l.x>f.x?0:g.yb.layer?1:a.mdb.md?1:a.Bcb.Bc?1:0:0};t.fz=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.firstb.first||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0}; -t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.B=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; +t.uu=function(a,b){return a instanceof Ot&&b instanceof Ot&&a!==b?a.ccb.cc||a.lb.l||a.mdb.md?1:a.Bcb.Bc?1:0:0};t.C=function(a,b){F&&(C(a,Us,"isApprox:a"),C(b,Us,"isApprox:b"));a-=b;return-1a}; t.Gj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&v("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.Ie.length){var d=[];for(var e=0;ee?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(Qe?Ku(a,g,ka,x,z):Lu(a,g,ka,x,z);ka=z.x;x=z.width;z=z.height;break;case uu:for(D=0;Dn&&(QXa&&(Qu(a,-Xa,0,xa,Aa-1),Ru(D,-Xa,0),Ru(G,-Xa,0),Xa=0)}Ua.V.h(Xa,ca);x=Math.max(x,M);z=Math.max(z,B+(0===T?0:q)+tb.height);Q=M}else{0n&&(caXa&&(Qu(a,0,-Xa,xa,Aa-1),Ru(D,0,-Xa),Ru(G,0,-Xa),Xa=0);Ua.V.h(Q,Xa);z=Math.max(z,Y);x=Math.max(x,B+(0===T?0:q)+tb.width);ca=Y}P++}0l&&(l=0),135u&&(u=0),k===vu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>x&&(x=Wu(k,d-x,0),g=x.x,h=x.y,x=d,l=0):x=Uu(a,x,l),0>l&&(g-=l,l=0),135z&&(z=Wu(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=Vu(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(l+d,0),T[1].h(T[0].x,y),T[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),T[0].h(0,u+y),T[1].h(d,T[0].y),T[2].xd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yd?Ku(b,e,P,B,D):Lu(b,e,P,B,D);P=D.x;B=D.width;D=D.height;break;case uu:for(a=0;ap&&(Mp&&(Yn&&(n=0),135x&&(x=0));b.la.h(n,x);b.Ba.h(B,D)}} -function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Ba.width,e=a.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), +1].V.y+e[g-1].la.y+2*e[g-1].focus.y-l)/2-b.focus.y-q/2);break;case Gu:c?(n-=q,B+=q):(x-=q,D+=q);break;case Hu:c?(n+=B-b.width+q,B+=q):(x+=D-b.height+q,D+=q);break;case tu:case ju:c?1n&&(n=0),135x&&(x=0));b.la.h(n,x);b.Da.h(B,D)}} +function Ku(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return a=b[0],d=a.Da.width,e=a.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===Fu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height), 0>b.V.x&&(c=$u(a,b.V.x,!1,c,g))):(b.V.h(d+h,c+g/2-b.focus.y-b.la.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.la.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.V.y&&(c=$u(a,b.V.y,!0,c,g))));return new L(c,0,d,e)} -function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Ba.width,e=b.Ba.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function Lu(a,b,c,d,e){F&&w(a,Yt,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new L(c,0,d,e);if(1===f)return b=b[0],d=b.Da.width,e=b.Da.height,new L(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===Fu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.V.x&&(c=$u(a,h.V.x,!1,c,g))):(h.V.h(-d-l.width-q,c+g/2-h.focus.y-h.la.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.la.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.V.y&&(c=$u(a,h.V.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case Gu:return a.width>b?a.width:b;case Hu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case tu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case uu:return a.width-a.focus.x+a.nodeSpacing/2+b;case vu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Vu(a,b,c){F&&w(a,Yt,Z,"calculateSubheight:v");switch(a.alignment){case Tu:case Su:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Gu:return a.height>b?a.height:b;case Hu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case tu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case uu:return a.height-a.focus.y+a.nodeSpacing/2+b;case vu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Wu(a,b,c){F&&w(a,E,Z,"alignOffset:align");switch(a){case Su:b/=2;c/=2;break;case Tu:b/=2;c/=2;break;case Gu:c=b=0;break;case Hu:break;default:v("Unhandled alignment value "+a.toString())}return new J(b,c)}function Nu(a,b,c,d,e,f){F&&w(a,Yt,Z,"shiftRelPosAlign:v");F&&w(b,E,Z,"shiftRelPosAlign:align");b=Wu(b,c,d);Qu(a,b.x,b.y,e,f)}function Qu(a,b,c,d,e){F&&w(a,Yt,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].V;f.x+=b;f.y+=c}} function Ou(a,b,c,d){F&&(w(b,Yt,Z,"recordMidPoints:v"),A(c,"number",Z,"recordMidPoints:x"),A(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.qd){case Tt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case $t:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.qd.toString())}}function Ru(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c= +function Pu(a,b,c,d,e,f,g,h){F&&w(b,Yt,Z,"mergeFringes:parent");F&&w(c,Yt,Z,"mergeFringes:child");var k=Fu(b),l=90===k||270===k,m=b.nodeSpacing;b=d;var n=e;d=f;var p=g,r=c.cr,q=c.qr;g=c.Da;var u=l?Math.max(p,g.height):Math.max(d,g.width);if(null===r||k!==Fu(c))r=Mu(a,2),q=Mu(a,2),l?(r[0].h(0,0),r[1].h(0,g.height),q[0].h(g.width,0),q[1].h(q[0].x,r[1].y)):(r[0].h(0,0),r[1].h(g.width,0),q[0].h(0,g.height),q[1].h(r[1].x,q[0].y));if(l){p=9999999;if(!(null===n||2>n.length||null===r||2>r.length))for(e=c= 0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Mu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Mu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Mu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, k.y);f=Mu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Mu(a,e);for(c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-Ju(c))))):c.alignment===Gu?(e=d.top+b.y,0===b.y&&m.y * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go-module.js b/release/go-module.js index a30dc9d89..0852111bb 100644 --- a/release/go-module.js +++ b/release/go-module.js @@ -1,8 +1,8 @@ /* - * GoJS v2.1.53 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.1.54 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.53/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.54/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gb?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.OA=function(a,b,c,d){L.Qh(a,b,c,d,this.x,this.y,this);return this};t.PA=function(a,b){L.Qh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.cB=function(a,b,c,d){L.Gq(this.x,this.y,a,b,c,d,this);return this};t.dB=function(a,b){L.Gq(this.x,this.y,a.x,a.y,b.width,b.height,this);return this}; t.tj=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.Uk=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};t.transform=function(a){a.ta(this);return this};function wb(a,b){b.Jd(a);return a}function xb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function yb(a,b,c,d){a=c-a;b=d-b;return a*a+b*b} -function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.s=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.s; +function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.o=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.o; J.prototype.setSpot=J.prototype.Uk;J.prototype.setRectSpot=J.prototype.tj;J.prototype.snapToGridPoint=J.prototype.dB;J.prototype.snapToGrid=J.prototype.cB;J.prototype.projectOntoLineSegmentPoint=J.prototype.PA;J.prototype.projectOntoLineSegment=J.prototype.OA;J.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return L.Cm(a,b,c,d,e,f,g,h)};J.prototype.direction=J.prototype.direction;J.prototype.directionPoint=J.prototype.Pa;J.prototype.normalize=J.prototype.normalize; J.prototype.distanceSquared=J.prototype.qd;J.prototype.distanceSquaredPoint=J.prototype.Ie;J.prototype.scale=J.prototype.scale;J.prototype.rotate=J.prototype.rotate;J.prototype.offset=J.prototype.offset;J.prototype.subtract=J.prototype.ge;J.prototype.add=J.prototype.add;J.prototype.equalsApprox=J.prototype.Qa;J.prototype.equalTo=J.prototype.fj;J.prototype.equals=J.prototype.w;J.prototype.set=J.prototype.set;J.prototype.setTo=J.prototype.Ig;var Bb=null,Cb=null,Fb=null,Gb=null,Hb=null,Ab=[]; J.className="Point";J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb;J.Origin=Bb=(new J(0,0)).ca();J.InfiniteTopLeft=Cb=(new J(-Infinity,-Infinity)).ca();J.InfiniteBottomRight=Fb=(new J(Infinity,Infinity)).ca();J.SixPoint=Gb=(new J(6,6)).ca();J.NoPoint=Hb=(new J(NaN,NaN)).ca();J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb; function M(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):B("Invalid arguments to Size constructor: "+a+", "+b);this.v=!1}var Ib,Jb,Kb,Lb,Mb,Nb,Ob;M.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.h=function(a,b){this.width=a;this.height=b;return this};M.prototype.Ig=function(a,b){this.width=a;this.height=b;return this}; M.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function Pb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new M(c,e)}return new M}function Qb(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.w=function(a){return a instanceof M?this.width===a.width&&this.height===a.height:!1};t.fj=function(a,b){return this.width===a&&this.height===b}; -t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.s=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.s;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; +t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.o;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; M.ZeroSize=Ib=(new M(0,0)).ca();M.OneSize=Jb=(new M(1,1)).ca();M.SixSize=Kb=(new M(6,6)).ca();M.EightSize=Lb=(new M(8,8)).ca();M.TenSize=Mb=(new M(10,10)).ca();M.InfiniteSize=Nb=(new M(Infinity,Infinity)).ca();M.NoSize=Ob=(new M(NaN,NaN)).ca();M.parse=Pb;M.stringify=Qb; function N(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof M?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):B("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c, this.height=d):B("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}t=N.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Sb(a,b,c){a.width=b;a.height=c}t.Ig=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; @@ -110,10 +110,10 @@ t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Jc=function(a,b){retur t.bw=function(a,b,c,d){return $b(this,a,b,c,d)};function $b(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Mc=function(a){return this.cw(a.x,a.y,a.width,a.height)}; t.cw=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function ac(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Oe=function(a){return bc(this,a.x,a.y,0,0)};t.Rc=function(a){return bc(this,a.x,a.y,a.width,a.height)}; t.Rw=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return bc(this,a,b,c,d)};function bc(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.Uk=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function cc(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.s=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; +function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.o=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; na.Object.defineProperties(N.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new J(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new M(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new J(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.s;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.o;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; N.prototype.intersectsRect=N.prototype.Mc;N.prototype.intersect=N.prototype.bw;N.prototype.intersectRect=N.prototype.Dy;N.prototype.grow=N.prototype.sA;N.prototype.subtractMargin=N.prototype.Jw;N.prototype.addMargin=N.prototype.uq;N.prototype.inflate=N.prototype.Jc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Ge;N.prototype.containsPoint=N.prototype.$;N.prototype.equalsApprox=N.prototype.Qa;N.prototype.equalTo=N.prototype.fj; N.prototype.equals=N.prototype.w;N.prototype.setSize=N.prototype.bB;N.prototype.setPoint=N.prototype.Qc;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.Ig;var ic=null,jc=null,hc=[];N.className="Rect";N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc;N.ZeroRect=ic=(new N(0,0,0,0)).ca();N.NoRect=jc=(new N(NaN,NaN,NaN,NaN)).ca();N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc; function kc(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):B("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}kc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; @@ -121,7 +121,7 @@ kc.prototype.Ig=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.lef t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function lc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new kc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new kc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new kc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new kc(c,e):new kc(c,e,f,g)}return new kc} function mc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.w=function(a){return a instanceof kc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.fj=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.s=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.s;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; +t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.o;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; kc.prototype.setTo=kc.prototype.Ig;var qc=null,rc=null,pc=[];kc.className="Margin";kc.parse=lc;kc.stringify=mc;kc.ZeroMargin=qc=(new kc(0,0,0,0)).ca();kc.TwoMargin=rc=(new kc(2,2,2,2)).ca();kc.parse=lc;kc.stringify=mc;function O(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.v=!1} var sc,tc,uc,vc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Zc,$c,ad,bd,cd,dd,ed,fd,gd;O.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};O.prototype.Ig=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};O.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; O.prototype.copy=function(){var a=new O;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=O.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} @@ -233,25 +233,25 @@ va(this,a);this.oc=a;this.ra=!0}},point1X:{get:function(){return this.Ce},set:fu va(this,a);this.qh=a;this.ra=!0}},centerX:{get:function(){return this.Ce},set:function(a){this.v&&va(this,a);this.Ce=a;this.ra=!0}},centerY:{get:function(){return this.Qi},set:function(a){this.v&&va(this,a);this.Qi=a;this.ra=!0}},radiusX:{get:function(){return this.Ri},set:function(a){0>a&&wa(a,">= zero",ke,"radiusX");this.v&&va(this,a);this.Ri=a;this.ra=!0}},radiusY:{get:function(){return this.qh}, set:function(a){0>a&&wa(a,">= zero",ke,"radiusY");this.v&&va(this,a);this.qh=a;this.ra=!0}},startAngle:{get:function(){return this.hc},set:function(a){this.hc!==a&&(this.v&&va(this,a),a%=360,0>a&&(a+=360),this.hc=a,this.ra=!0)}},sweepAngle:{get:function(){return this.oc},set:function(a){this.v&&va(this,a);360a&&(a=-360);this.oc=a;this.ra=!0}},isClockwiseArc:{get:function(){return this.el},set:function(a){this.v&& va(this,a);this.el=a;this.ra=!0}},isLargeArc:{get:function(){return this.Ll},set:function(a){this.v&&va(this,a);this.Ll=a;this.ra=!0}},xAxisRotation:{get:function(){return this.Ce},set:function(a){a%=360;0>a&&(a+=360);this.v&&va(this,a);this.Ce=a;this.ra=!0}}});ke.prototype.equalsApprox=ke.prototype.Qa; -var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.C=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.C=this.C;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; +var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.B=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.B=this.B;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Jq=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);return b}; me.prototype.mA=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);b.assign(c.ou(b));return b}; -na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, +na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, set:function(a){this.xr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.yr},set:function(a){this.yr=a}},key:{get:function(){return this.Di},set:function(a){this.Di=a}},down:{get:function(){return this.Rr},set:function(a){this.Rr=a}},up:{get:function(){return this.st},set:function(a){this.st= a}},clickCount:{get:function(){return this.Ar},set:function(a){this.Ar=a}},delta:{get:function(){return this.Or},set:function(a){this.Or=a}},isMultiTouch:{get:function(){return this.ms},set:function(a){this.ms=a}},handled:{get:function(){return this.bs},set:function(a){this.bs=a}},bubbles:{get:function(){return this.Pg},set:function(a){this.Pg=a}},event:{ get:function(){return this.Wr},set:function(a){this.Wr=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.nt},set:function(a){this.nt=a}},targetDiagram:{get:function(){return this.mt},set:function(a){this.mt=a}},targetObject:{ get:function(){return this.pd},set:function(a){this.pd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a= this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); -me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.C=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.C=this.C;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; -function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}; -we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.C=this.C;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; +me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.B=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.B=this.B;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; +na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; +function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}; +we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.B=this.B;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; we.prototype.toString=function(){var a="";a=this.change===ye?a+"* ":this.change===xe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ye?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ka(this.object)),null!==this.oldValue&&(a+=" old: "+Ka(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ka(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};we.prototype.G=function(a){return a?this.oldValue:this.newValue};we.prototype.oA=function(a){return a?this.oldParam:this.newParam};we.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; we.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};we.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};we.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.C},set:function(a){this.C=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, +na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.B},set:function(a){this.B=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, set:function(a){this.gf=a}},isTransactionFinished:{get:function(){return this.wn===ye&&("CommittedTransaction"===this.gf||"FinishedUndo"===this.gf||"FinishedRedo"===this.gf)}},object:{get:function(){return this.np},set:function(a){this.np=a}},oldValue:{get:function(){return this.pp},set:function(a){this.pp=a}},oldParam:{get:function(){return this.op},set:function(a){this.op=a}}, newValue:{get:function(){return this.ip},set:function(a){this.ip=a}},newParam:{get:function(){return this.hp},set:function(a){this.hp=a}}});we.prototype.redo=we.prototype.redo;we.prototype.canRedo=we.prototype.canRedo;we.prototype.undo=we.prototype.undo;we.prototype.canUndo=we.prototype.canUndo;we.prototype.getParam=we.prototype.oA;we.prototype.getValue=we.prototype.G;we.prototype.clear=we.prototype.clear; var ye=new D(we,"Transaction",-1),xe=new D(we,"Property",0),ze=new D(we,"Insert",1),Ae=new D(we,"Remove",2);we.className="ChangedEvent";we.Transaction=ye;we.Property=xe;we.Insert=ze;we.Remove=Ae;function Be(){this.u=(new E).freeze();this.oa="";this.l=!1}Be.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Bb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.J(d),null!==f&&f.clear(),b.cb(d),a.ks=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.J(0),null!==f&&f.clear(),b.cb(0),a.Xd--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Xd++);b.freeze()}a.isInternalTransaction||a.Bb("CommittedTransaction",c,e)}else{a.se=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -274,30 +274,30 @@ Ce.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Ce.prototype,{models:{get:function(){return this.gv.iterator}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.J(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, -set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.va;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; +na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, +set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.xa;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; Pa.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Je&&this.Kr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Pa.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Qe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Re){b.bubbles=!0;return}if(this.gestureBehavior===Qe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;N.free(f); f=a.it;g=new H;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.G(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Cd())));for(b=b.iterator;b.next();)l=b.value,l.Nc()&&l.canCopy()&&(k=c.G(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ta(),g.add(k,a.Cd(h))));J.free(h);a.copiedParts=g;Ye(a,g.Kf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -383,8 +383,8 @@ a}},originalToPort:{get:function(){return this.Wh},set:function(a){this.Wh=a}},i get:function(){return this.lr},set:function(a){this.lr=a}}});Jf.className="LinkingBaseTool";function Vf(){Jf.call(this);this.name="Linking";this.T={};this.I=null;this.K=Wf;this.en=null}ma(Vf,Jf);Vf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Ut()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Vf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.Vb(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof W))return null;var c=this.direction;if(c===Wf||c===Xf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Wf||c===Yf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; -Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.va(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.s()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, -this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.s()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= +Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.xa(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.o()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, +this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.o()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= this.temporaryFromNode),null!==this.temporaryToNode&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.Ua(),a.add(this.temporaryLink)),this.isActive=!0)};Vf.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink);a.remove(this.temporaryFromNode);a.remove(this.temporaryToNode);a.isMouseCaptured=!1;a.currentCursor="";this.Jg()}; Vf.prototype.doStop=function(){Jf.prototype.doStop.call(this);this.startObject=null}; Vf.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.transactionResult=null,c=null,d=null,e=null,f=null;try{var g=this.targetPort=this.findTargetPort(this.isForwards);if(null!==g){var h=g.part;h instanceof W&&(this.isForwards?(null!==this.originalFromNode&&(b=this.originalFromNode,c=this.originalFromPort),d=h,e=g):(b=h,c=g,null!==this.originalToNode&&(d=this.originalToNode,e=this.originalToPort)))}else this.isForwards?null!==this.originalFromNode&&this.isUnconnectedLinkValid&& @@ -394,27 +394,27 @@ Vf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)r na.Object.defineProperties(Vf.prototype,{archetypeLinkData:{get:function(){return this.T},set:function(a){this.T=a}},archetypeLabelNodeData:{get:function(){return this.I},set:function(a){this.I=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.en},set:function(a){this.en=a}}}); var Wf=new D(Vf,"Either",0),Xf=new D(Vf,"ForwardsOnly",0),Yf=new D(Vf,"BackwardsOnly",0);Vf.className="LinkingTool";Vf.Either=Wf;Vf.ForwardsOnly=Xf;Vf.BackwardsOnly=Yf; function bf(){Jf.call(this);this.name="Relinking";var a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.T=a;a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.en=a;this.I=null;this.Hx=new N}ma(bf,Jf); -bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&& -(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.o()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&& +(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.s()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; bf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Ut()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; -bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.va(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.xa(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.Hx.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof X)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.va(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.xa(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= this.computeMinSize(),this.Mu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Na();this.transactionResult=this.name;a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -451,11 +451,11 @@ na.Object.defineProperties(vg.prototype,{handleArchetype:{get:function(){return a);this.ie=a}},minSize:{get:function(){return this.fg},set:function(a){if(!this.fg.w(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.fg.h(b,a)}}},maxSize:{get:function(){return this.eg},set:function(a){if(!this.eg.w(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.eg.h(b,a)}}},cellSize:{get:function(){return this.Qg},set:function(a){this.Qg.w(a)||this.Qg.assign(a)}}, isGridSnapEnabled:{get:function(){return this.I},set:function(a){this.I=a}},dragsMembers:{get:function(){return this.T},set:function(a){this.T=a}},oppositePoint:{get:function(){return this.Hs},set:function(a){this.Hs.w(a)||this.Hs.assign(a)}},originalDesiredSize:{get:function(){return this.Gx}},originalLocation:{get:function(){return this.qp}}}); vg.className="ResizingTool";Na("resizingTool",function(){return this.findTool("Resizing")},function(a){this.Ya("Resizing",a,this.mouseDownTools)});function Cg(){Ee.call(this);this.name="Rotating";this.La=45;this.Ka=2;this.qp=new J;this.ie=null;var a=new Kf;a.figure="Ellipse";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.strokeWidth=1;a.cursor="pointer";this.u=a;this.l=null;this.Fx=0;this.Ps=new J(NaN,NaN);this.I=0;this.T=50}ma(Cg,Ee); -Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.s()&&a.isVisible()&&b.actualBounds.s()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; +Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.o()&&a.isVisible()&&b.actualBounds.o()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; Cg.prototype.makeAdornment=function(a){var b=a.part.rotateAdornmentTemplate;if(null===b){b=new Je;b.type=X.Position;b.locationSpot=zc;var c=this.handleArchetype;null!==c&&b.add(c.copy())}else if(yg(b),b=b.copy(),null===b)return null;b.adornedObject=a;return b};Cg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.va(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; +Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.xa(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; Cg.prototype.computeRotationPoint=function(a){var b=a.part,c=b.locationObject;return b.rotationSpot.kb()?a.da(b.rotationSpot):a===b||a===c?c.da(b.locationSpot):a.da(zc)}; -Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.s()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ +Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.o()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.da(b)};Cg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.Ps=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Cg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Cg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; Cg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Na();this.transactionResult=this.name;a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Cg.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Ta();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Gg(d))c=this.qp.copy(),b.location=c.ge(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; @@ -469,7 +469,7 @@ Eg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Eg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.Xk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Eg.prototype.doStop=function(){this.Xk=null};Eg.className="ActionTool";function Fg(){Ee.call(this);this.name="ClickCreating";this.Aj=null;this.u=!0;this.l=!1;this.xx=new J(0,0)}ma(Fg,Ee); Fg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.xx=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.xx))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.zm(a.lastInput.documentPoint,!0)?!1:!0}; Fg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.va(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= +Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.xa(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= this.name;b.R("PartCreated",d)}finally{this.Jg(),b.R("ChangedSelection",b.selection)}return d};na.Object.defineProperties(Fg.prototype,{archetypeNodeData:{get:function(){return this.Aj},set:function(a){this.Aj=a}},isDoubleClick:{get:function(){return this.u},set:function(a){this.u=a}},isGridSnapEnabled:{get:function(){return this.l},set:function(a){this.l=a}}});Fg.className="ClickCreatingTool"; function Hg(){Ee.call(this);this.name="DragSelecting";this.pl=175;this.u=!1;var a=new V;a.layerName="Tool";a.selectable=!1;var b=new Kf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.l=a}ma(Hg,Ee); Hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampa.lastInput.clickCount?!1:!0};Vg.prototype.doStart=function(){eh=this;null!==this.textBlock&&this.doActivate()}; Vg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.Vb(a.lastInput.documentPoint));if(null!==b&&b instanceof Wg&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.ia=bh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.zh=this.textBlock.copy();var d=new N(this.textBlock.da(tc),this.textBlock.da(Dc));a.Aw(d);c.show(b,a,this);this.currentTextEditor=c}}}};Vg.prototype.doCancel=function(){this.stopTool()}; Vg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Vg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(fh)};Vg.prototype.acceptText=function(a){switch(a){case fh:if(this.ia===hh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this);break;case kh:case $g:case ah:if($g!==a||!0!==this.textBlock.isMultiline)if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this)}}; -function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.va(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} +function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.xa(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} Vg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Vg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Vg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ia=Yg,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};Vg.prototype.doStop=function(){eh=null}; Vg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Vg.prototype.Jy=function(a){var b=this.zh;b.text=a;b.measure(this.textBlock.Ei,Infinity);return b}; na.Object.defineProperties(Vg.prototype,{textBlock:{get:function(){return this.La},set:function(a){this.La=a}},currentTextEditor:{get:function(){return this.u},set:function(a){this.u=a}},defaultTextEditor:{get:function(){return this.l},set:function(a){this.l=a}},starting:{get:function(){return this.Ka},set:function(a){this.Ka=a}},textValidation:{get:function(){return this.Wi}, set:function(a){this.Wi=a}},minimumEditorScale:{get:function(){return this.I},set:function(a){this.I=a}},selectsTextOnActivate:{get:function(){return this.T},set:function(a){this.T=a}},state:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}}});Vg.prototype.measureTemporaryTextBlock=Vg.prototype.Jy; var kh=new D(Vg,"LostFocus",0),fh=new D(Vg,"MouseDown",1),ah=new D(Vg,"Tab",2),$g=new D(Vg,"Enter",3),lh=new D(Vg,"SingleClick",0),Xg=new D(Vg,"SingleClickSelected",1),gh=new D(Vg,"DoubleClick",2),Yg=new D(Vg,"StateNone",0),bh=new D(Vg,"StateActive",1),ch=new D(Vg,"StateEditing",2),ih=new D(Vg,"StateValidating",3),dh=new D(Vg,"StateInvalid",4),hh=new D(Vg,"StateValidated",5),eh=null;Vg.className="TextEditingTool";Vg.LostFocus=kh;Vg.MouseDown=fh;Vg.Tab=ah;Vg.Enter=$g;Vg.SingleClick=lh; Vg.SingleClickSelected=Xg;Vg.DoubleClick=gh;Vg.StateNone=Yg;Vg.StateActive=bh;Vg.StateEditing=ch;Vg.StateValidating=ih;Vg.StateInvalid=dh;Vg.StateValidated=hh;Na("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.Ya("TextEditing",a,this.mouseUpTools)}); -function mh(){nh||(oh(),nh=!0);this.C=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.C=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} -function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();return a.sc=!0} -function th(a){if(a.md&&a.sc){var b=a.Rd,c=a.C,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===uh&&b.lc.clear(),a.Qx=a.Al===vh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),wh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==xh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Kh(c),a.sc=!1,a.ef=!1,b.start(),Lh(a),c.Na(),Mh(b,0),Hf(c,!0),Nh(a),c.R("AnimationStarting",a))}))}}function Oh(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; -function Ph(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function mh(){nh||(oh(),nh=!0);this.B=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.B=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} +function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();th(a.B);return a.sc=!0} +function uh(a){if(a.md&&a.sc){var b=a.Rd,c=a.B,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===vh&&b.lc.clear(),a.Qx=a.Al===wh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),xh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Lh(c),a.sc=!1,a.ef=!1,b.start(),Mh(a),c.Na(),Nh(b,0),Hf(c,!0),Oh(a),c.R("AnimationStarting",a))}))}}function Ph(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; +function Qh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function oh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new H;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",mh,"duration");this.Yg=a}},isAnimating:{get:function(){return this.jc}}, isTicking:{get:function(){return this.ps}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a}},defaultAnimation:{get:function(){return this.Rd}},activeAnimations:{get:function(){return this.yj}},initialAnimationStyle:{get:function(){return this.Al},set:function(a){this.Al=a}}});mh.prototype.stopAnimation=mh.prototype.Bc; -var Wh=null,nh=!1,ph=new D(mh,"Default",1),vh=new D(mh,"AnimateLocations",2),uh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Wh.add(a,b)};mh.Default=ph;mh.AnimateLocations=vh;mh.None=uh; -function qh(){this.xv=this.Ox=this.Uc=this.C=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Xh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Yh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Qh(this,!0);Lh(this.Uc);Hf(this.C);Nh(this.Uc);this.C.redraw()}; -function wh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} -function Mh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Wh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; -t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.C,c=this.Uc;this.Il=this.jc=c.zl=!1;Lh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.o();e=this.Fp;d=d.iterator;for(var f=Wh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Nh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),wh(this,null),c.xm(this),b.Db())}}; +var Xh=null,nh=!1,ph=new D(mh,"Default",1),wh=new D(mh,"AnimateLocations",2),vh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Xh.add(a,b)};mh.Default=ph;mh.AnimateLocations=wh;mh.None=vh; +function qh(){this.xv=this.Ox=this.Uc=this.B=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Yh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Zh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Rh(this,!0);Mh(this.Uc);Hf(this.B);Oh(this.Uc);this.B.redraw()}; +function xh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} +function Nh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Xh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; +t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.B,c=this.Uc;this.Il=this.jc=c.zl=!1;Mh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.s();e=this.Fp;d=d.iterator;for(var f=Xh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Oh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),xh(this,null),c.xm(this),b.Db())}}; t.lk=function(a,b){var c=b.actualBounds,d=null;b instanceof U&&(d=b.placeholder);null!==d?(c=d.da(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof U)for(a=a.memberParts;a.next();)d=a.value,d instanceof W&&this.lk(d,b)}; t.jk=function(a,b){if(a.isVisible()){var c=null;b instanceof U&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.lc;c.contains(a)&&(c.G(a).sw=!0);if(a instanceof U)for(a=a.memberParts;a.next();)c=a.value,c instanceof W&&this.jk(c,b)}};t.pA=function(a){var b=this.iv.get(a);null===b&&(b={},this.iv.add(a,b));return b}; na.Object.defineProperties(qh.prototype,{duration:{get:function(){return this.Yg},set:function(a){1>a&&wa(a,">= 1",qh,"duration");this.Yg=a}},reversible:{get:function(){return this.Fp},set:function(a){this.Fp=a}},runCount:{get:function(){return this.nv},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Zh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Xh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=Zh; -function ei(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}ei.className="AnimationState";function fi(a,b,c){this.pd=null;this.gf=a;this.cq=c||gi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=hi))}fi.prototype.copy=function(){var a=new fi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; -function ii(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(fi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); -var gi=new D(fi,"Default",1),hi=new D(fi,"Immediate",2),ji=new D(fi,"Bundled",3);fi.className="AnimationTrigger";fi.Default=gi;fi.Immediate=hi;fi.Bundled=ji;function ki(){Xa(this);this.C=null;this.Ea=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=ki.prototype;t.clear=function(){this.Ea.clear();this.rp.length=0};t.ee=function(a){this.C=a}; -t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ea.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function $h(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Yh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=$h; +function fi(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}fi.className="AnimationState";function gi(a,b,c){this.pd=null;this.gf=a;this.cq=c||hi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=ii))}gi.prototype.copy=function(){var a=new gi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; +function ji(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(gi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); +var hi=new D(gi,"Default",1),ii=new D(gi,"Immediate",2),ki=new D(gi,"Bundled",3);gi.className="AnimationTrigger";gi.Default=hi;gi.Immediate=ii;gi.Bundled=ki;function li(){Xa(this);this.B=null;this.Fa=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=li.prototype;t.clear=function(){this.Fa.clear();this.rp.length=0};t.ee=function(a){this.B=a}; +t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Fa.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0c.Xo||h.height*e>c.Xo?b.mc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ni(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ni(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ni(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Ea;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));oi(this,a,b);return a}; -t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Ea;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; -function oi(a,b,c){b=pi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ea.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(oi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(oi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),oi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Fa;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));pi(this,a,b);return a}; +t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Fa;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; +function pi(a,b,c){b=qi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Fa.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< e&&(k=a.J(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(ki.prototype,{parts:{get:function(){return this.Ea.iterator}},partsBackwards:{get:function(){return this.Ea.iteratorBackwards}},diagram:{get:function(){return this.C}},name:{get:function(){return this.oa},set:function(a){var b=this.oa;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&B("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&B("Layer.name is already present in this diagram: "+a);this.oa=a;this.g("name",b,a);for(a=this.Ea.iterator;a.next();)a.value.layerName=this.oa}}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ma.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Qi(a){var b=a.wa.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, +function Ri(a){var b=a.ya.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, "mouseout",a.Jk,!1)),a.addEventListener(b,"mouseenter",a.Oz,!1),a.addEventListener(b,"mouseleave",a.Pz,!1),a.addEventListener(b,"wheel",a.Lk,!1),a.addEventListener(b,"keydown",a.BA,!1),a.addEventListener(b,"keyup",a.CA,!1),a.addEventListener(b,"blur",a.Az,!1),a.addEventListener(b,"focus",a.Bz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.wa.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.ya/e.width*e.left,b.pageY-x.scrollY-a.xa/e.height*e.top); +Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.ya.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.va/e.width*e.left,b.pageY-x.scrollY-a.ua/e.height*e.top); c=a.Vl*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(x,"resize",a.Ww,!1))}function Ze(a){30p&&(this.position=q.h(-(this.Ys.scrollWidth-this.ya)+u-this.ya/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.Ys.scrollHeight-this.xa)+a.scrollTop-this.xa/c+d))),J.free(q),Vi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.Ys.scrollWidth-this.va)+u-this.va/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.Ys.scrollHeight-this.ua)+a.scrollTop-this.ua/c+d))),J.free(q),Wi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Yh;this.scale=Zi(this,cj);a!==Yh&&(Yi(this,!1),$i(this,this.documentBounds,this.ya/this.Aa,this.xa/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; -t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.ya;var f=this.xa;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function Zi(a,b){var c=a.Qn;if(null===a.ya)return c;a.Ta();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.va+(a.Ye?a.rb:0),g=a.ua+(a.pe?a.rb:0),h=f/e,k=g/d;return b===cj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Zh;this.scale=Zi(this,cj);a!==Zh&&(Yi(this,!1),$i(this,this.documentBounds,this.va/this.Aa,this.ua/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; +t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.va;var f=this.ua;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.uz=function(a,b){this.Ta();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.kA=function(a){if(a instanceof Y){this.ao=a;var b=J.alloc();this.bo=this.gr(a.da(tc,b));J.free(b)}else this.ao=null,this.bo=Hb}; -function $i(a,b,c,d,e,f){var g=J.allocAt(a.la.x,a.la.y),h=g.x,k=g.y;if(null!==a.ao){var l=J.alloc();l=a.ao.da(tc,l);h=l.x-a.bo.x/a.scale;k=l.y-a.bo.y/a.scale;e=sc;J.free(l)}if(f||a.scrollMode===Yh)e.kb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.wa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.ya/c.width*c.left,b.clientY-a.xa/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||Wi(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Vi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; +R.prototype.CA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return nj(c,a)}; +R.prototype.Oz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return nj(c,a)};R.prototype.Pz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return nj(c,a)}; +R.prototype.getMouse=function(a){var b=this.ya;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.va/c.width*c.left;a=a.clientY-this.ua/c.height*c.top;return null!==this.sb?wb(new J(b,a),this.sb):new J(b,a)}; +function ij(a,b,c){var d=a.ya,e=a.va,f=a.ua,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.sb?(b=J.allocAt(g,h),a.sb.Jd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ue(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.ya;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.va/c.width*c.left,b.clientY-a.ua/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||th(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Wi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; t.Jz=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Hf(this);this.qe=!1;this.Ts=new J(NaN,NaN);b.isEnabled=c;this.ac=!0;var d=this;null!==a&&ta(function(){d.ac=!1;rh(b,"Model");a(d)},1)};t.Db=function(a){void 0===a&&(a=!1);if(!0!==this.Ee&&!(this.Sb||!1===a&&this.ac)){this.Ee=!0;var b=this;x.requestAnimationFrame(function(){b.Ee&&b.hd()})}};t.hd=function(){if(!this.Kj||this.Ee)this.Kj&&(this.Kj=!1),Hf(this)}; -function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ti(a)||(b&&Wi(a),c&&Yi(a,!1))} -function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Fa||a.sm.s())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} +function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ui(a)||(b&&th(a),c&&Yi(a,!1))} +function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Da||a.sm.o())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} t.Vw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Nc()||c instanceof U||(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Je&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function tj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): -(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Yh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.ya,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.xa,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.ya,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1c&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): +(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Zh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.va,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.ua,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.va,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1C+1&&(k=a.position.x*w));if(a.Gl)switch(a.Ss){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(v+1n+1&&(b.scrollTop= -a.position.y*w));l=a.ya;m=a.xa;b.style.width=l+(a.Ye?a.rb:0)+"px";b.style.height=m+(a.pe?a.rb:0)+"px";return d!==l||e!==m||a.animationManager.sc?(a.onViewportBoundsChanged(f,a.viewportBounds,w,g),!1):!0}t=R.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&B("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.xk(a.layerName),null===b&&(b=this.xk("")),null===b&&B('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oj(99999999,a,a.diagram===this);0<=c&&this.Va(ze,"parts",b,null,a,null,c);b.isTemporary||this.Na();a.B(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oj=function(a){this.partManager.oj(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof Je||a instanceof U&&null!==a.placeholder)&&a.o();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.wd.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()}; -t.Lc=function(a){a.nk();this.partManager.Lc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.wd.remove(a);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()};t.remove=function(a){Nj(this,a,!0)}; -function Nj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.B(2),c&&b.uk(),c=d.Lc(-1,b,!1),0<=c&&a.Va(Ae,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.gu=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Na()}; t.nz=function(a,b){Tj(this,a,b);a.ee(this);var c=this.Ma,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.cc&&this.Va(Ae,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Na()}; -t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ea.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Fa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Wx=function(a){null===this.we&&(this.we=new E);this.we.add(a);this.model.Hh(a)};t.VA=function(a){null!==this.we&&(this.we.remove(a),0===this.we.count&&(this.we=null));this.model.Tk(a)};t.Hh=function(a){null===this.Of&&(this.Of=new E);this.Of.add(a)};t.Tk=function(a){null!==this.Of&&(this.Of.remove(a),0===this.Of.count&&(this.Of=null))}; t.zt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.aw(a);a.change!==ye&&(this.isModified=!0);if(null!==this.Of)for(var b=this.Of,c=b.length,d=0;dn.Ea.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof ki&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.va=function(a){return this.undoManager.va(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.va(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Xj(g,h,b?void 0:k));else if(g instanceof li){var m=!0===a.oldParam;"number"===typeof h&&k instanceof V&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Lb(),g.Lc(m?h:-1,k,m)):g.oj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof li&&(b?this.Ma.cb(h):(k.ee(this),this.Ma.wb(h,k))):B("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Ae){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof X)"number"===typeof p&&r instanceof Y?b?n.wb(p,r):n.Lc(p): +"number"===typeof p&&r instanceof Vj&&(r.isRow?Wj(n,p,b?r:void 0):Xj(n,p,b?r:void 0));else if(n instanceof li){var q=!0===a.newParam;"number"===typeof p&&r instanceof V&&(b?0>n.Fa.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof li&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.xa=function(a){return this.undoManager.xa(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.xa(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.ir=function(){this.partManager.ir()}; -function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);else if(null===a.wa)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.ya,g=a.xa;e.width=a.ya/b;e.height=a.xa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);a.M();aj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Vi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==xh||d||a.width===b.width&&a.height===b.height||e.B();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= -Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.ya;this.Ic.kw.height=this.xa;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; -function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.s()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, +function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);else if(null===a.ya)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.va,g=a.ua;e.width=a.va/b;e.height=a.ua/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);a.M();aj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= +Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.va;this.Ic.kw.height=this.ua;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; +function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);M.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.R("ChangingSelection",b);for(var c=b.ma(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Wi(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||th(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.s(),e.doLayout(b),b.B(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; -function si(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.cA=function(){return this.Dh.iterator};t.EA=function(a){th(this);a&&gk(this,!0);this.ac?rj(this,!1):(this.Hj=!0,Hf(this))};function gk(a,b){for(var c=a.Dh.iterator;c.next();)hk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.C())}function hk(a,b,c){if(null!==b){for(var d=b.Sl.iterator;d.next();)hk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.C())}} +function rj(a,b){if(a.Ng&&!a.Nr){var c=a.Z;a.Z=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.xa("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),th(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||uh(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.o(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; +function ti(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.Qr=c;a.Pr=d} function Cj(a,b){var c=a.Pr.G(b);return null!==c?c:a.Pr.G(b.toLowerCase())}function tk(a,b){var c=a.Qr.G(b);if(null!==c)return c;c=a.Qr.G(b.toLowerCase());if(null!==c)return c;B("Unknown DiagramEvent name: "+b)}t.kk=function(a,b){a=tk(this,a);null!==a&&a.add(b)};t.Lm=function(a,b){a=tk(this,a);null!==a&&a.remove(b)}; t.R=function(a,b,c){var d=tk(this,a),e=new ve;e.diagram=this;a=Cj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.J(0)(e);else if(0!==b)for(d=d.ma(),c=0;cw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& +function Fk(a,b,c,d){a.animationManager.Bc();a.hd();if(null===a.ya)return null;"object"!==typeof b&&B("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new M(Infinity,Infinity):new M(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new kc(l):l instanceof kc||B("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Gb.uc(!0);n=new Hk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.va+Math.ceil(l.left+l.right);n.height=a.ua+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);a.rl=!0;return n.context}var w=a.Qn,v=a.documentBounds.copy();v.Jw(a.ib);if(q)for(var y=a.Ma.j,z=y.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& (e=Math.min(e,w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);a.rl=!0;return n.context} -na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Fa},set:function(a){if(this.Fa!==a){var b=this.Fa;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.wa&&(b=this.wa.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, -!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.wa.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.wa=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, -"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Fa=null;if(null!==a){if(b=a.C)b.div=null;Ci(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ +na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Da},set:function(a){if(this.Da!==a){var b=this.Da;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.ya&&(b=this.ya.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, +!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.ya.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.ya=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, +"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Da=null;if(null!==a){if(b=a.B)b.div=null;Di(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ get:function(){return this.Sr},set:function(a){this.Sr!==a&&(this.Sr=a,null!==a&&(this.Fs=a.fromPort,this.Gs=a.toPort))}},Ky:{get:function(){return this.Fs},set:function(a){this.Fs=a}},Ly:{get:function(){return this.Gs},set:function(a){this.Gs=a}},animationManager:{get:function(){return this.Uc}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{ get:function(){return this.vg},set:function(a){this.vg=a;this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Nr},set:function(a){this.Nr=a}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a&&wa(a,">= 0",R,"scrollHorizontalLineChange"),this.Ws=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(0>a&&wa(a,">= 0",R,"scrollVerticalLineChange"),this.$s=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.hh},set:function(a){this.hh= -a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.wa,c=this.Fa;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= +a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.ya,c=this.Da;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= "-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Pn},set:function(a){""===a&&(a="auto");var b=this.Pn;b!==a&&(this.Pn=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.Pf},set:function(a){var b=this.Pf;b!==a&&(this.Pf=a,this.g("click",b,a))}},doubleClick:{ get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return this.Qf},set:function(a){var b=this.Qf;b!==a&&(this.Qf=a,this.g("contextClick",b,a))}},mouseOver:{get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(this.lg=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return this.jg},set:function(a){var b= this.jg;b!==a&&(this.jg=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return this.ig},set:function(a){var b=this.ig;b!==a&&(this.ig=a,this.g("mouseHold",b,a))}},mouseDragOver:{get:function(){return this.As},set:function(a){var b=this.As;b!==a&&(this.As=a,this.g("mouseDragOver",b,a))}},mouseDrop:{get:function(){return this.gg},set:function(a){var b=this.gg;b!==a&&(this.gg=a,this.g("mouseDrop",b,a))}}, @@ -773,137 +773,137 @@ get:function(){return this.wg},set:function(a){var b=this.wg;b!==a&&(this.wg=a,t get:function(){return this.qv}},maxSelectionCount:{get:function(){return this.ws},set:function(a){var b=this.ws;if(b!==a)if(0<=a&&!isNaN(a)){if(this.ws=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{ get:function(){return this.kp},set:function(a){var b=this.kp;b!==a&&(this.kp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.qo},set:function(a){var b=this.qo;b!==a&&(this.qo=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Lo},set:function(a){var b=this.Lo;b!==a&&(this.Lo=a,this.g("linkSelectionAdornmentTemplate", b,a))}},highlighteds:{get:function(){return this.Su}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.wo&&this.Xd!==a.historyIndex:this.wo},set:function(a){if(this.wo!==a){this.wo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Xd=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.cc},set:function(a){var b=this.cc;if(b!==a){this.currentTool.doCancel(); -null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&B("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Fi(this,!0);this.qe=!1;this.Kj=!0;this.Xd=-2;this.Ee=!1;var d=this.ac;this.ac=!0;rh(this.animationManager,"Model");null!==b&&(null!==this.we&&this.we.each(function(a){b.Tk(a)}),b.Tk(this.Tc));this.cc=a;this.partManager=bk(this.cc.type);for(var e=0;ethis.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{ -get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to;b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib}, -set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}}, -parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs},set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}}, -treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ti&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{ -get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz; -R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek;R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA; -R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc;R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou; -R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings; -R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.va;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk; -R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww; -R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty;R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg; -R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz;R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus; -R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; -var Fe=null,ui=new H,Pi=null,Ii=null,Ug=void 0!==x.document,Di=null,Ei="",xh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Yh=new D(R,"DocumentScroll",1),$h=new D(R,"InfiniteScroll",2),ti=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, -"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.53",Gk="image",Nk=null,qi=!1; -function ri(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; -Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=xh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; -R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Yh;R.InfiniteScroll=$h;R.TreeParentCollapsed=ti;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Bi(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} +Vh(this.animationManager,b,this.la);this.Sb||null===this.ya&&!this.sm.o()||(this.Sb=!0,a=this.scale,$i(this,this.Rn,this.va/a,this.ua/a,this.Dj,!1),this.Sb=!1);if(!this.Sb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Aa,!1)}J.free(b)}},initialPosition:{get:function(){return this.es},set:function(a){this.es.w(a)||(this.es=a.H())}},initialScale:{get:function(){return this.fs},set:function(a){this.fs!==a&&(this.fs=a)}},grid:{ +get:function(){null===this.Ib&&Si(this);return this.Ib},set:function(a){var b=this.Ib;if(b!==a){null===b&&(Si(this),b=this.Ib);a.type!==X.Grid&&B("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.Ib=a;a.name="GRID";null!==c&&c.add(a);qj(this);this.M();this.g("grid",b,a)}}},viewportBounds:{get:function(){var a=this.Rx,b=this.la,c=this.Aa;a.h(b.x,b.y,Math.max(this.va,0)/c,Math.max(this.ua,0)/c);return a}},viewSize:{ +get:function(){return this.sm},set:function(a){var b=this.viewSize;b.w(a)||(this.sm=a=a.H(),this.ua=this.va=0,a.o()?(this.va=a.width,this.ua=a.height):null!==this.Da&&(this.va=this.Da.clientWidth||1,this.ua=this.Da.clientHeight||1),this.Na(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{get:function(){return this.Zr},set:function(a){var b=this.Zr;b.w(a)||(-Infinity!==a.width&&Infinity!==a.height&&-Infinity!==a.height||B("fixedBounds width/height must not be Infinity"), +this.Zr=a=a.H(),this.Na(),this.g("fixedBounds",b,a))}},scrollMargin:{get:function(){return this.Si},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.Si;b.w(a)||(this.Si=a=a.H(),this.g("scrollMargin",b,a),this.Yq())}},scrollMode:{get:function(){return this.Ti},set:function(a){var b=this.Ti;b!==a&&(this.Ti=a,a===Zh&&Yi(this,!1),this.g("scrollMode",b,a),this.M())}},scrollsPageOnFocus:{get:function(){return this.at}, +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{get:function(){return this.Ns},set:function(a){var b=this.Ns;b!==a&&(this.Ns=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{get:function(){return this.Us},set:function(a){var b=this.Us;b!==a&&(this.Us=a,Yj(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{ +get:function(){return this.Rn}},isVirtualized:{get:function(){return this.rs},set:function(a){var b=this.rs;b!==a&&(this.rs=a,this.g("isVirtualized",b,a))}},scale:{get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&Yj(this,b,a)}},defaultScale:{get:function(){return this.Qn},set:function(a){this.Qn=a}},autoScale:{get:function(){return this.Og},set:function(a){var b= +this.Og;b!==a&&(this.Og=a,this.g("autoScale",b,a),a!==Kh&&Yi(this,!1))}},initialAutoScale:{get:function(){return this.Yf},set:function(a){var b=this.Yf;b!==a&&(this.Yf=a,this.g("initialAutoScale",b,a))}},initialViewportSpot:{get:function(){return this.gs},set:function(a){var b=this.gs;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.gs=a,this.g("initialViewportSpot",b,a))}},initialDocumentSpot:{ +get:function(){return this.ds},set:function(a){var b=this.ds;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.ds=a,this.g("initialDocumentSpot",b,a))}},minScale:{get:function(){return this.xs},set:function(a){var b=this.xs;b!==a&&(0this.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to; +b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{ +get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs}, +set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}},treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ui&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{ +get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}}); +na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz;R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek; +R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA;R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc; +R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou;R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw; +R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.xa; +R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk;R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um; +R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww;R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty; +R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg;R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz; +R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; +var Fe=null,vi=new H,Qi=null,Pi=null,Ug=void 0!==x.document,Ei=null,Fi="",Kh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Zh=new D(R,"DocumentScroll",1),ai=new D(R,"InfiniteScroll",2),ui=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, +"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.54",Gk="image",Nk=null,ri=!1; +function si(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; +Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; +R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Zh;R.InfiniteScroll=ai;R.TreeParentCollapsed=ui;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Ci(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} function zj(a,b){b.Gb.setTransform(b.Tb,0,0,b.Tb,0,0);if(null===a.Ve)a:{b="f";var c=x[Qa("76a715b2f73f148a")][Qa("72ba13b5")];a.Ve=!0;if(Ug){var d=R[Qa("76a115b6ed251eaf4692")];if(d)for(var e=Lk.iterator;e.next();){d=e.value;d=Qa(d).split(Qa("39e9"));if(6>d.length)break;var f=Qa(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Qa(ra[Qa("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Qa("76ad18b4f73e")];for(g=c[Qa("73a612b6fb191d")](Qa("35e7"))+2;gf&&Qa(d[2])!==Qa("7da71ca0ad381e90")&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=c[Qa("73a612b6fb191d")](Qa("7baa19a6f76c1988428554")));a.Ve=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Qa("79a417a0f0181a8946")]=d;if(x.document[Qa("78a712aa")]){if(x.document[Qa("78a712aa")][Qa("7bb806b6ed32388c4a875b")](g),h=x.getComputedStyle(g).getPropertyValue(Qa("78a704b7e62456904c9b12701b6532a8")),x.document[Qa("78a712aa")][Qa("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.Ve=!1;break}else if(Ra||Sa||Ta||Ua)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.xd++:a.xd=1;c.clickCount=a.xd;a.Sj=b.timeStamp;a.Go.Ig(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():nj(c,b)}};a.Pk= function(b){if(a.isEnabled){a.Zf=!0;var c=a.bk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=mj(a,b,b,null!==c[1]),c.targetDiagram=jj(b),a.doMouseMove(),nj(c,b))}};a.Rk=function(b){if(a.isEnabled){a.Zf=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ls;if(c&&a.hk)delete d[b.pointerId],b.preventDefault();else if(d=a.bk,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]= -null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&ij(e.C,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); -null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Qi(a)}}Bi.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} +null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&ij(e.B,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); +null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Ri(a)}}Ci.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} na.Object.defineProperties(cf.prototype,{point:{get:function(){return this.l},set:function(a){this.l=a}},shifted:{get:function(){return this.u},set:function(a){this.u=a}}});var Ok="DraggingInfo";cf.className="DraggingInfo";function Rj(a,b,c){this.node=a;this.info=b;this.$v=c}Rj.className="DraggingNodeInfoPair";function We(){this.reset()} We.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new M(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};We.className="DraggingOptions";function Qk(a){1 b.updateDelay?b.M():b.u||(b.u=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Od=function(){null!==b.observed&&Vk(b)};this.autoScale=cj;this.Sb=!1}ma(Tk,R);Tk.prototype.computePixelRatio=function(){return 1}; -Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.wa,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.wa=this.fm,this.Gb=this.wa.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.wa.width,this.wa.height),Wk(this)}finally{this.wa=a,this.Gb=b}}}R.prototype.redraw.call(this)}; -Tk.prototype.mc=function(){null===this.Fa&&B("No div specified");null===this.wa&&B("No canvas specified");if(!(this.wa instanceof Ej)&&(li(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.wa;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.ya,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.ya=this.fm,this.Gb=this.ya.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.ya.width,this.ya.height),Wk(this)}finally{this.ya=a,this.Gb=b}}}R.prototype.redraw.call(this)}; +Tk.prototype.mc=function(){null===this.Da&&B("No div specified");null===this.ya&&B("No canvas specified");if(!(this.ya instanceof Ej)&&(mi(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.ya;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Tb,this.Tb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ma.j;for(var c=b.length,d=0;da&&(a=0);this.eb!==a&&(this.eb=a)}}});Tk.className="Overview";function Uk(){Ve.call(this);this.l=null}ma(Uk,Ve); Uk.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===xh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Xk.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ei=null,Fi="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Em()&&(d=c.sk,c.sk=this.copiesParentKey),c.Ck()&&(e=c.rk,c.rk=this.copiesGroupKey),f=b.tk(a,null,!0)}finally{c.Em()&&(c.sk=d),c.Ck()&&(c.rk=e),c=new E,c.addAll(f),Ei=c,Fi=b.model.dataFormat}}b.R("ClipboardChanged",c)}; +Xk.prototype.pasteFromClipboard=function(){var a=new G,b=Ei;if(null===b)return a;var c=this.diagram;if(Fi!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Em()&&(e=d.sk,d.sk=this.copiesParentKey),d.Ck()&&(f=d.rk,d.rk=this.copiesGroupKey),g=c.tk(b,c,!1)}finally{for(d.Em()&&(d.sk=e),d.Ck()&&(d.rk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +Xk.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.R("ChangingSelection",b.selection);b.xa("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Xk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;rh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Bv&&!isNaN(this.bv)&&a.documentBounds.w(this.Av)?(a.scale=this.bv,a.position=this.yx,this.Bv=NaN,this.Av=ic):(this.bv=d,this.yx=c.copy(),a.zoomToFit(),this.Bv=a.scale,this.Av=a.documentBounds.copy());th(b)};Xk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Xk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Ta();if(null===a){try{null!==this.rg&&(this.rg.next()?a=this.rg.value:this.rg=null)}catch(k){this.rg=null}null===a&&(0c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case bl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case cl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.s()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; -function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.s()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} +this.us>a.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.o()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; +function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.o()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} t.Im=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||tl(c,!0),this.M(),Vb(a,b)||(c.Oh(),this.mp(c)))};t.mp=function(a){null!==this.portId&&(tl(a,!0),a instanceof W&&ul(a,this))}; t.mc=function(a,b){if(this.visible){var c=this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn),d=this.xb;if(c||0!==d.width&&0!==d.height&&!isNaN(d.x)&&!isNaN(d.y)){var e=this.opacity;if(0!==e){var f=1;1!==e&&(f=a.globalAlpha,a.globalAlpha=f*e);if(!this.ly(a,b))if(c)vl(this,a,b);else{this instanceof S&&this.Gk(!1);c=this.transform;var g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=this.part,k=!1,l=0;if(h&&b.Ke("drawShadows")&&(k=h.isShadowed)){var m=h.shadowOffset;l=Math.max(m.y, m.x)*b.scale*b.Tb}if(!(m=b.yi||!this.Ff())){var n=this.naturalBounds;m=this.Zh;var p=m.m11,r=m.m21,q=m.dx,u=m.m12,w=m.m22,v=m.dy,y,z=y=0;m=y*p+z*r+q;var A=y*u+z*w+v;y=n.width+l;z=0;var C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);var F=Math.min(A,y);var Q=Math.max(m+0,C)-z;var K=Math.max(A+0,y)-F;m=z;A=F;y=n.width+l;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y);Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;y=0;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y); Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;l=b.viewportBounds;n=l.x;p=l.y;m=!(m>l.width+n||n>Q+m||A>l.height+p||p>K+A)}if(m){m=0!==(this.F&256);a.clipInsteadOfFill&&(m=!1);this instanceof Wg&&(a.font=this.font);if(m){A=g.he()?g.naturalBounds:g.actualBounds;null!==this.Za?(n=this.Za,Q=n.x,K=n.y,l=n.width,n=n.height):(Q=Math.max(d.x,A.x),K=Math.max(d.y,A.y),l=Math.min(d.right,A.right)-Q,n=Math.min(d.bottom,A.bottom)-K);if(Q>d.width+d.x||d.x>A.width+A.x){1!==e&&(a.globalAlpha=f);return}a.save(); -a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(ni(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, -c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),ni(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== +a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(oi(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, +c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),oi(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== this.ec||null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)?(Bl(this,!0),null===this.shadowVisible&&yl(a)):Bl(this,!1);this.ej(a,b);k&&0!==(this.F&512)===!0&&xl(a);this.Ff()&&k&&yl(a);m?(a.restore(),this instanceof X?a.uc(!0):a.uc(!1)):c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha=f)}}}};t.ly=function(){return!1}; -function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(ni(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(ni(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; -function ni(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(oi(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(oi(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; +function oi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===Fl)m=b.createLinearGradient(n,p,r,q);else if(c.type===Al)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===El)try{m=b.createPattern(c.pattern,"repeat")}catch(y){m=null}if(c.type!==El&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ke=m,null!==m&&(c.gl=h,c.Au=k),null=== m&&c.type===El&&-1!==c.gl)){c.gl=-1;var v=a.diagram;null!==v&&-1===c.gl&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Gg=function(a){if(a instanceof X)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Gf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Gf():!0};t.Hg=function(){for(var a=this instanceof X?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.s()||!a.qc.s()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} +function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.o()||!a.qc.o()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} function ol(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.Yb){var g=zc;a.Ff()&&a.locationSpot.kb()&&(g=a.locationSpot);var h=J.alloc();if(a instanceof V&&a.locationObject!==a)for(c=a.locationObject,d=c.naturalBounds,h.Uk(d.x,d.y,d.width,d.height,g),c.cg.ta(h),h.offset(-c.measuredBounds.x,-c.measuredBounds.y),g=c.panel;null!==g&&g!==a;)g.cg.ta(h),h.offset(-g.measuredBounds.x,-g.measuredBounds.y),g=g.panel;else h.Uk(c,d,e,f,g);b.rotate(a.Yb,h.x,h.y);J.free(h)}} -t.o=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.o()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.o():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; +t.s=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.s()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.s():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; function ql(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===X.Table)return Jl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===X.Auto&&d.tb()===a)return Kl(a,td,b);if(c===al){if(null!==d){if(d.type===X.Spot&&d.tb()===a)return Kl(a,td,b);c=d.defaultStretch;return c===al?Kl(a,zg,b):Kl(a,c,b)}return Kl(a,zg,b)}return Kl(a,c,b)} function Jl(a,b,c,d){var e=a.stretch;if(e!==al)return Kl(a,e,d);var f=e=null;switch(b.stretch){case cl:f=!0;break;case td:f=!0}switch(c.stretch){case bl:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===bl||b===td);null===f&&(f=b===cl||b===td);return!0===e&&!0===f?Kl(a,td,d):!0===e?Kl(a,bl,d):!0===f?Kl(a,cl,d):Kl(a,zg,d)} -function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.s())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} +function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.o())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} function Gl(a,b){a.F=b?a.F|2048:a.F&-2049}function Hl(a,b){a.F=b?a.F|4096:a.F&-4097}function uj(a){return 0!==(a.F&8192)}function pj(a,b){a.F=b?a.F|8192:a.F&-8193}function vj(a){return 0!==(a.F&16384)}function rl(a,b){a.F=b?a.F|16384:a.F&-16385}t.sj=function(a){this.og=a};t.lu=function(){};t.Ew=function(a){this.la.assign(a);Il(this);return!0};t.er=function(a,b){if(this.la.x!==a||this.la.y!==b)this.la.h(a,b),this.Fl()}; function Ml(a){var b=a.part;if(b instanceof W&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ul(b,a)}}function Nl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof X?a instanceof W?a.sd():a.an(a,function(a){Ml(a)}):Ml(a))}t.bind=function(a){a.pd=this;var b=this.ij();null!==b&&Ol(b)&&B("Cannot add a Binding to a template that has already been copied: "+a);null===this.fb&&(this.fb=new E);this.fb.add(a)}; t.ij=function(){for(var a=this instanceof X?this:this.panel;null!==a;){if(null!==a.li)return a;a=a.panel}return null};t.Fw=function(a){Bj(this,a)};t.Qw=function(a){a.pd=this;null===this.Mg&&(this.Mg=new H);this.Mg.add(a.propertyName,a)}; function Pl(a,b){for(var c=1;ce)&&B("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow= !0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&B("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new $a;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Bj(a,e)}else Bj(a,b);else B('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ul(a,b){Ql.add(a,b)} function Vl(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} na.Object.defineProperties(Y.prototype,{shadowVisible:{get:function(){return this.em},set:function(a){var b=this.em;b!==a&&(this.em=a,this.M(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.N?this.N.Wn:null},set:function(a){hl(this);var b=this.N.Wn;b!==a&&(this.N.Wn=a,this.g("enabledChanged",b,a))}},segmentOrientation:{get:function(){return this.cm},set:function(a){var b=this.cm; -b!==a&&(this.cm=a,this.o(),this.g("segmentOrientation",b,a),a===ag&&(this.angle=0))}},segmentIndex:{get:function(){return this.Qp},set:function(a){a=Math.round(a);var b=this.Qp;b!==a&&(this.Qp=a,this.o(),this.g("segmentIndex",b,a))}},segmentFraction:{get:function(){return this.am},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.o(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.o(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= -d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& -(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= -0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.o(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.o(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ -get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.o(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& -B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.o(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, -this.o(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.o(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.o(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= -this.aq;b!==a&&(this.aq=a,this.o(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.o(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= +get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&(0>=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.s(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.s(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= +d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& +(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= +0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.s(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.s(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ +get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.s(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& +B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.s(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, +this.s(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.s(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.s(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= +this.aq;b!==a&&(this.aq=a,this.s(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.s(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= !0,Yl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.O?this.O.Ch:sc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),Ml(this))}},toEndSegmentLength:{get:function(){return null!==this.O?this.O.Ah:10},set:function(a){this.Kc();var b=this.O.Ah;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.O.Ah=a,this.g("toEndSegmentLength",b,a),Ml(this))}},toShortLength:{ get:function(){return null!==this.O?this.O.Bh:0},set:function(a){this.Kc();var b=this.O.Bh;b!==a&&(this.O.Bh=a,this.g("toShortLength",b,a),Ml(this))}},toLinkable:{get:function(){return null!==this.O?this.O.kq:null},set:function(a){this.Kc();var b=this.O.kq;b!==a&&(this.O.kq=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.O?this.O.lq:Infinity},set:function(a){this.Kc();var b=this.O.lq;b!==a&&(0>a&& wa(a,">= 0",Y,"toMaxLinks"),this.O.lq=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.O?this.O.bh:sc},set:function(a){this.Kc();var b=this.O.bh;b.w(a)||(a=a.H(),this.O.bh=a,this.g("fromSpot",b,a),Ml(this))}},fromEndSegmentLength:{get:function(){return null!==this.O?this.O.$g:10},set:function(a){this.Kc();var b=this.O.$g;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength", @@ -981,14 +981,14 @@ b.mouseLeave=function(a,b){b.Hg()&&b instanceof X&&(a=b.bb("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed&&0===b.button){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.bb("ButtonBorder"),b instanceof Kf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Hi("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; +Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Ii("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});Ul("ToolTip",function(){return Pl(Je,X.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Pl(Kf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new O(0,0,4,6),spot2:new O(1,1,-4,-4)}))}); -Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Hi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Hi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); -a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.va("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); -Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Hi("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.va("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ii("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Ii("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); +a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.xa("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); +Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Ii("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.xa("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.Xa("checkbox")}}};return a}); Ul("CheckBox",function(a){a=Vl(a);a=Pl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new kc(0,1,0,0)});var b=Pl(X,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=zg=new D(Y,"None",0);Y.Default=al=new D(Y,"Default",0);Y.Vertical=cl=new D(Y,"Vertical",4);Y.Horizontal=bl=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=Bg=new D(Y,"Uniform",1); @@ -1026,12 +1026,12 @@ function yl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function xl(a) R.prototype.$t=function(a){var b=new Ej(this,x.document);void 0===a&&(a=new $a);var c=this;return Ek(this,function(a,e){a=Fk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.$t;R.prototype.iw=function(a){return this.$t(a)};R.prototype.makeSVG=R.prototype.iw; Y.prototype.ly=function(a,b){if(!(a instanceof am))return!1;if(!this.visible)return!0;var c=null,d=a.Wt;if(this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn))return vl(this,a,b),!0;var e=this.xb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=0!==(this.F&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof Wg&&(a.font=this.font);if(h){k=g.he()?g.naturalBounds:g.actualBounds;if(null!==this.Za){var l= this.Za;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;bm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Ff()&&!this.isVisible())return!0;a.He.Oa=[1,0,0,1,0,0];(this instanceof Wg&&1a)&&wa(a,"0 <= loc <= 1",zl,"addColorStop:loc");null===this.je&&(this.je=new H);this.je.add(a,b);this.qa===Cl&&(this.type=Fl);this.ke=null;return this}; -t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(b,c)} -t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(-b,c)} -function mm(a,b,c){ai(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;ai(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} +t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(b,c)} +t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(-b,c)} +function mm(a,b,c){bi(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;bi(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} t.Fy=function(){if(this.type===Cl)return om(this.color);if((this.type===Fl||this.type===Al)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Al)return om(a.first().value);if(null!==a.get(.5))return om(a.get(.5));if(2===a.count)return a=a.ma(),om(mm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return om(mm(a.get(c),a.get(d),1-f/e))}return!1}; -function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();ai(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} +function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();bi(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} function jm(a,b){switch(b){case im:b=100*pm(nm.l);var c=100*pm(nm.I),d=100*pm(nm.u);qm.l=.4124564*b+.3575761*c+.1804375*d;qm.I=.2126729*b+.7151522*c+.072175*d;qm.u=.0193339*b+.119192*c+.9503041*d;qm.T=nm.T;b=rm(qm.l/sm[0]);c=rm(qm.I/sm[1]);d=rm(qm.u/sm[2]);tm.l=116*c-16;tm.I=500*(b-c);tm.u=200*(c-d);tm.T=qm.T;tm.l=Math.min(100,Math.max(0,tm.l+100*a));a=(tm.l+16)/116;b=a-tm.u/200;qm.l=sm[0]*um(tm.I/500+a);qm.I=sm[1]*(tm.l>vm*wm?Math.pow(a,3):tm.l/vm);qm.u=sm[2]*um(b);qm.T=tm.T;a=-.969266*qm.l+1.8760108* -qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return bi(),ci.u=Math.min(100,Math.max(0,ci.u+100*a)),"hsla("+ci.l+", "+ci.I+"%, "+ci.u+"%, "+ -ci.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ai(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} -function bi(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ci.l=Math.round(g);ci.I=Math.round(100*a);ci.u=Math.round(100*e);ci.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return ci(),di.u=Math.min(100,Math.max(0,di.u+100*a)),"hsla("+di.l+", "+di.I+"%, "+di.u+"%, "+ +di.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function bi(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} +function ci(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}di.l=Math.round(g);di.I=Math.round(100*a);di.u=Math.round(100*e);di.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function rm(a){return a>wm?Math.pow(a,1/3):(vm*a+16)/116}function um(a){var b=a*a*a;return b>wm?b:(116*a-16)/vm}function Wl(a,b){"string"!==typeof a&&(a instanceof zl||B("Value for "+b+" must be a color string or a Brush, not "+a))}function hm(){zm=Ug?(new Hk(null)).context:null} na.Object.defineProperties(zl.prototype,{type:{get:function(){return this.qa},set:function(a){this.v&&va(this,a);this.qa=a;this.start.nc()&&(a===Fl?this.start=uc:a===Al&&(this.start=zc));this.end.nc()&&(a===Fl?this.end=Cc:a===Al&&(this.end=zc));this.ke=null}},color:{get:function(){return this.fl},set:function(a){this.v&&va(this,a);this.fl=a;this.ke=null}},start:{get:function(){return this.Dd},set:function(a){this.v&& va(this,a);this.Dd=a.H();this.ke=null}},end:{get:function(){return this.sl},set:function(a){this.v&&va(this,a);this.sl=a.H();this.ke=null}},startRadius:{get:function(){return this.jt},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"startRadius");this.jt=a;this.ke=null}},endRadius:{get:function(){return this.Vr},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"endRadius");this.Vr=a;this.ke= null}},colorStops:{get:function(){return this.je},set:function(a){this.v&&va(this,a);this.je=a;this.ke=null}},pattern:{get:function(){return this.Ks},set:function(a){this.v&&va(this,a);this.Ks=a;this.ke=null}}});zl.prototype.isDark=zl.prototype.Fy;zl.prototype.darkenBy=zl.prototype.Iz;zl.prototype.lightenBy=zl.prototype.FA;zl.prototype.addColorStop=zl.prototype.addColorStop; -var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,ci=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); +var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,di=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); zl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; zl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;gm||(hm(),gm=!0);var b=zm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};zl.lighten=function(a){return km(a)};zl.lightenBy=km;zl.darken=function(a){return lm(a)};zl.darkenBy=lm;zl.mix=mm;zl.isDark=om;function Tl(){this.oa="Base"}Tl.prototype.measure=function(){}; Tl.prototype.IA=function(a,b,c,d,e){a.measure(b,c,d,e)};Tl.prototype.arrange=function(){};Tl.prototype.wz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Tl.prototype.RA=function(a){a.Bk()};Tl.prototype.mc=function(){};na.Object.defineProperties(Tl.prototype,{name:{get:function(){return this.oa},set:function(a){this.oa=a}},classType:{get:function(){return X}}});Tl.prototype.remeasureObject=Tl.prototype.RA;Tl.prototype.arrangeElement=Tl.prototype.wz; @@ -1114,9 +1114,9 @@ Nm.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.W.j,u=q.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(C))}}}}q= -a.W.j;u=q.length;for(w=0;we*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)v.measure(Infinity,Infinity,0,0),y=v.measuredBounds,b.Rc(y),a.l.push(y);else{var z=v.segmentIndex,A=v.segmentFraction,C=v.alignmentFocus;C.nc()&&(C=zc);var F=v.segmentOrientation,Q=v.segmentOffset;if(isNaN(z)){var K=k.na;y=Ea();K.Yv(A,y);var T=J.allocAt(y[0],y[1]);T.add(k.i(0));K.type=== ud?T.offset(-K.startX,-K.startY):(K=K.figures.first(),T.offset(-K.startX,-K.startY));K=y[2];if(F!==ag){var P=k.computeAngle(v,F,K);v.Yb=P}P=T.x-m.x;var I=T.y-m.y;J.free(T);Ia(y)}else if(z<-f||z>=f)I=k.midPoint,K=k.midAngle,F!==ag&&(P=k.computeAngle(v,F,K),v.Yb=P),P=I.x-m.x,I=I.y-m.y;else{P=0;0<=z?(I=n.J(z),y=zja+10?0<=z?K.Pa(I): @@ -1151,17 +1151,17 @@ X.prototype.copy=function(){var a=Y.prototype.copy.call(this);if(null!==a){for(v t.mp=function(a){Y.prototype.mp.call(this,a);for(var b=this.W.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){ni(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function dn(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){oi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ib;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Dt()}}}} -function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,ni(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,oi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function Zj(a){return"LineV"===a||"BarV"===a} t.zk=function(a,b,c,d,e){var f=this.he(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,L.Cf(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=L.Cf(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.W.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.qa===X.Spot;u&&(q=J.alloc(),p=this.tb(),(l=p.zk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var w=0;wd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; -t.o=function(a){if(!uj(this)){Y.prototype.o.call(this,a);a=null;if(this.qa===X.Auto||this.qa===X.Link)a=this.tb();for(var b=this.W.j,c=b.length,d=0;dc||f>d)this.o(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.o(!0);this.measure(c+h,d+g,0,0);break;case bl:this.o(!0);this.measure(c+h,f+g,0,0);break;case cl:this.o(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; +t.Ih=function(a,b,c,d){var e=this.W.j;this.actualBounds.h(a,b,c,d);if(0!==e.length){if(!this.desiredSize.o()){a=ql(this,!0);var f=this.measuredBounds;b=f.width;f=f.height;var g=this.jh,h=g.left+g.right;g=g.top+g.bottom;b===c&&f===d&&(a=zg);switch(a){case zg:if(b>c||f>d)this.s(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.s(!0);this.measure(c+h,d+g,0,0);break;case bl:this.s(!0);this.measure(c+h,f+g,0,0);break;case cl:this.s(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; t.Kh=function(a){var b=this.naturalBounds,c=Bm(this);if(cc(0,0,b.width,b.height,a.x,a.y)){b=this.W.j;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(wb(e.set(a),f.transform),f.$(e))return J.free(e),!0}J.free(e);return null===this.mb&&null===this.ec?!1:!0}return!1};t.Gt=function(a){if(this.dl===a)return this;for(var b=this.W.j,c=b.length,d=0;d=e.count&&a>=e.count)return; -e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.o();b.o(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, +e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.s();b.s(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, "elements",this,null,b,null,a),this.Hg()||mn(this,b,!1)))};function nn(a,b){a.F=b?a.F|16777216:a.F&-16777217}t.remove=function(a){for(var b=this.W.j,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",X,"getRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!0;c.index=a;b[a]=c;this.Va(ze,"rowdefs",this,null,c,null,a)}return b[a]}; -X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.o()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.s()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} X.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",X,"getColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!1;c.index=a;b[a]=c;this.Va(ze,"coldefs",this,null,c,null,a)}return b[a]};t=X.prototype; -t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.o()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.s()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} t.aA=function(a){if(0>a||this.type!==X.Table)return-1;for(var b=0,c=this.qb,d=c.length,e=this.Xi;ea||this.type!==X.Table)return-1;for(var b=0,c=this.nb,d=c.length,e=this.Gi;ea;)this.Lc(this.W.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Hi("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), +function qn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Ii("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), d.ob=b,un(a,e,c),d.ob=null,d.data=b)}}function un(a,b,c){for(a=a.W;ba&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.o(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.o(),this.g("defaultAlignment", -b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.o(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.o(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== -this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.o(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ +na.Object.defineProperties(X.prototype,{type:{get:function(){return this.qa},set:function(a){var b=this.qa;b!==a&&(this.qa=a,this.qa===X.Grid?this.isAtomic=!0:this.qa===X.Table&&an(this),this.s(),this.g("type",b,a))}},elements:{get:function(){return this.W.iterator}},naturalBounds:{get:function(){return this.rc}},padding:{get:function(){return this.ib},set:function(a){"number"=== +typeof a?(0>a&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.s(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.s(),this.g("defaultAlignment", +b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.s(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.s(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== +this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.s(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ get:function(){return void 0===this.ri?null:this.ri},set:function(a){if(void 0!==this.ri){var b=this.ri;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.o(), -this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.o(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; -null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Da()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ +a,this.s(),this.g("rowSizing",b,a))}}},columnSizing:{get:function(){return void 0===this.Cj?bn:this.Cj},set:function(a){if(void 0!==this.Cj){var b=this.Cj;b!==a&&(this.Cj=a,this.s(),this.g("columnSizing",b,a))}}},topIndex:{get:function(){return void 0===this.Xi?0:this.Xi},set:function(a){if(void 0!==this.Xi){var b=this.Xi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.s(), +this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.s(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; +null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ea()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ get:function(){return this.Ci},set:function(a){var b=this.Ci;if(b!==a||null!==a&&pn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Ci=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.eu()}}},itemTemplate:{get:function(){return null===this.te?null:this.te.G("")},set:function(a){if(null===this.te){if(null===a)return;this.te=new H}var b=this.te.G(""); b!==a&&((a instanceof V||a.isPanelMain)&&B("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.te.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.eu())}},itemTemplateMap:{get:function(){return this.te},set:function(a){var b=this.te;if(b!==a){for(var c=a.iterator;c.next(););this.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.eu()}}},itemCategoryProperty:{ get:function(){return this.Jl},set:function(a){var b=this.Jl;b!==a&&(this.Jl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.F&1048576)},set:function(a){var b=0!==(this.F&1048576);b!==a&&(this.F^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.F&2097152)},set:function(a){var b=0!==(this.F&2097152);b!==a&&(!a||this.type===X.Spot||this instanceof U||xa("Warning: Panel.isClipping set on non-Spot Panel: "+ -this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.o(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.o(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", -b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.o(),this.g("alignmentFocusName",b,a))}}}); +this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.s(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.s(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", +b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.s(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(X,{Position:{get:function(){return Sl.G("Position")}},Horizontal:{get:function(){return Sl.G("Horizontal")}},Vertical:{get:function(){return Sl.G("Vertical")}},Spot:{get:function(){return Sl.G("Spot")}},Auto:{get:function(){return Sl.G("Auto")}},Table:{get:function(){return Sl.G("Table")}},Viewbox:{ get:function(){return Sl.G("Viewbox")}},TableRow:{get:function(){return Sl.G("TableRow")}},TableColumn:{get:function(){return Sl.G("TableColumn")}},Link:{get:function(){return Sl.G("Link")}},Grid:{get:function(){return Sl.G("Grid")}},Graduated:{get:function(){return Sl.G("Graduated")}}});X.prototype.findItemPanelForData=X.prototype.qy; -X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Da;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; +X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Ea;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; X.prototype.insertAt=X.prototype.wb;X.prototype.elt=X.prototype.J;X.prototype.add=X.prototype.add;X.prototype.findObject=X.prototype.bb;X.prototype.findInVisualTree=X.prototype.ym;X.prototype.walkVisualTreeFrom=X.prototype.an;X.prototype.findMainElement=X.prototype.tb;var sn=!1,tn=null,Sl=new H;X.className="Panel";X.definePanelLayout=wn;wn("Position",new Am);wn("Vertical",new Dm);wn("Auto",new Fm);wn("Link",new Qm); function Vj(){Xa(this);this.og=null;this.ns=!0;this.Ra=0;this.ad=NaN;this.nh=0;this.lh=Infinity;this.yb=Vc;this.la=this.bc=this.ha=0;this.fb=null;this.Yp=xn;this.De=al;this.Up=this.sg=null;this.Vp=NaN;this.mb=this.fk=null;this.In=!1} Vj.prototype.copy=function(){var a=new Vj;a.ns=this.ns;a.Ra=this.Ra;a.ad=this.ad;a.nh=this.nh;a.lh=this.lh;a.yb=this.yb;a.ha=this.ha;a.bc=this.bc;a.la=this.la;a.De=this.De;a.Yp=this.Yp;null===this.sg?a.sg=null:a.sg=this.sg.H();a.Up=this.Up;a.Vp=this.Vp;a.fk=null;null!==this.fk&&(a.separatorDashArray=Ba(this.separatorDashArray));a.mb=this.mb;a.In=this.In;a.fb=this.fb;return a};t=Vj.prototype; @@ -1230,13 +1230,13 @@ c.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top:b.left)}; t.wc=function(){var a=0,b=this.og,c=0,d=this.isRow;if(null!==b&&b.type===X.Table)for(var e=d?b.qb.length:b.nb.length,f=0;fa&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(), -this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("minimum",b,a))}},maximum:{ -get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.o(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= -a,null!==this.panel&&this.panel.o(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.o(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), -a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(), +this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("minimum",b,a))}},maximum:{ +get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.s(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= +a,null!==this.panel&&this.panel.s(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.s(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), +a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var y=0;.1<=u;){0===y&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ia(w);return}e>q?(y=e-q,e=q):y=0;var z=Math.sqrt(e*e/(1+p*p));0>n&&(z=-z);h+=z;k+=p*z;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===y&&d.ej(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==y){v++;if(v===w.length){Ia(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=y}}Ia(w)}} -t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&ni(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(ni(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, +t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&oi(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(oi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, a.miterLimit=this.gk);e=!1;g&&b.Ke("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.Ft(h,this.vh));var k=this.na;if(null!==k){if(k.type===ud)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.vj();else if(k.type===yd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.Je(d);if(null!==c){g&& e&&yl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.vj();g&&e&&xl(a)}}else if(k.type===zd)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+L.Kg*k,h-p,l+k,h-L.Kg*p,l+k,h),a.bezierCurveTo(l+k,h+L.Kg*p,l+L.Kg*k,h+p,l,h+p),a.bezierCurveTo(l-L.Kg*k,h+p,l-k,h+L.Kg*p,l-k,h),a.bezierCurveTo(l-k,h-L.Kg*p,l-L.Kg*k,h-p,l,h-p),a.closePath(),null!==d&&a.Je(d),null!==c&& (g&&e?(yl(a),a.vj(),xl(a)):a.vj());else if(k.type===sd)for(h=k.figures,k=h.length,p=0;pe)return!1;break;case $d:var p=Ea();L.Fe(g,m,n.point1X,n.p break}n=null;for(var q=Ea(),u=0;u= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= +na.Object.defineProperties(Kf.prototype,{geometry:{get:function(){return null!==this.na?this.na:this.Ed},set:function(a){var b=this.na,c=this.Ed;if(b!==a){null!==a?this.Ed=this.na=a.freeze():this.Ed=this.na=null;var d=this.part;null!==d&&(d.kh=NaN);this.s();this.g("geometry",b||c,a);kl(this)&&(a=this.part,null!==a&&ll(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +Dd(a);var b=a.normalize();this.geometry=a;this.position=a=J.allocAt(-b.x,-b.y);J.free(a)}},isGeometryPositioned:{get:function(){return this.vo},set:function(a){var b=this.vo;b!==a&&(this.vo=a,this.s(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.tl},set:function(a){var b=this.tl;b!==a&&(null!==a&&Wl(a,"Shape.fill"),a instanceof zl&&a.freeze(),this.tl=a,this.M(),this.g("fill",b,a))}},stroke:{ +get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"Shape.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.wh},set:function(a){var b=this.wh;if(b!==a)if(0<=a){this.wh=a;this.s();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= this.km;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Kf,"strokeCap"):(this.km=a,this.M(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return this.lm},set:function(a){var b=this.lm;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"',Kf,"strokeJoin"):(this.lm=a,this.M(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return this.gk}, set:function(a){var b=this.gk;if(b!==a&&1<=a){this.gk=a;this.M();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.uh},set:function(a){var b=this.uh;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& +a.mg=b.mg,a.zg=b.zg,a.oe=null,a.mf=b.mf,a.nf=b.nf,a.ve=b.ve,a.Ei=b.Ei,a.Yd=b.Yd,a.Wd=b.Wd,a.Ud=b.Ud,a.Lj=b.Lj,a.Vd=b.Vd)}t=Wg.prototype;t.jb=function(a){a.classType===Wg?this.wrap=a:Y.prototype.jb.call(this,a)};t.toString=function(){return 22p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& (c=!1);b=this.mf;p=this.nf;switch(this.flip){case fl:a.translate(e,0);a.scale(-1,1);break;case el:a.translate(0,f);a.scale(1,-1);break;case gl:a.translate(e,f),a.scale(-1,-1)}m=this.Zc;n=(b+g+p)*m;f>n&&(d=this.aj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.me)p=this.vb,p>e&&(p=e),this.dj(this.me,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Qb&&null!==this.lb)for(n=0;ne&&(r=e);d+=b;this.dj(this.lb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case fl:a.scale(-1,1);a.translate(-e, 0);break;case el:a.scale(1,-1);a.translate(0,-f);break;case gl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.dj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Vn?Vn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Wn?Wn(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1313,35 +1313,35 @@ f+=bo;var m=Yn(f);a.vb=m;eo(a,f,m);null!==d&&d.h(m,h)}}else{k=0;0===g.length&&(k b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Yn(b),f=Math.max(f,m)),eo(a,b,n),k++,a.Zc+k>a.ve))break}a.Be=Math.min(a.ve,k);a.vb=Math.max(a.vb,f);null!==d&&d.h(a.vb,h*a.Be)}}function ho(a,b){if(a.zg===io)return b.substr(0,1);for(var c=b.length,d=0,e=jo;d=b.length?b:b.substr(0,d)}function Yn(a){return null===Qn?8*a.length:Qn.measureText(a).width} function Un(a){if(null!==a.oe)return a.oe;var b=a.ne;if(null===Qn){var c=16;return a.oe=c}void 0!==lo[b]&&5E3>mo?c=lo[b]:(c=1.3*Qn.measureText("M").width,lo[b]=c,mo++);return a.oe=c}function ao(a){if(null===Qn)return 6;if(void 0!==no[a]&&5E3>oo)var b=no[a];else b=Qn.measureText(bo).width,no[a]=b,oo++;return b} function Zn(a,b){var c=a.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.mf+a.nf;d=Math.max(0,Un(a)+d);if(0===c.length)return a.vb=0,a.Zc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Zc=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.zg!==go){a.Be=0;var k=M.alloc();fo(a,f,b,k);e+=k.height;M.free(k);a.Zc+=a.Be}else fo(a,f,b,null),e+=d,a.Zc++;a.Zc===a.ve&&(h=!0)}f=g+1}return a.us=e} -na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.o(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.o(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== -a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.s()){var a= -M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.o(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, -a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.o(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.o(),this.g("overflow",b,a))}},stroke:{ +na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.s(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.s(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== +a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.o()){var a= +M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.s(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, +a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.s(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.s(),this.g("overflow",b,a))}},stroke:{ get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"TextBlock.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Zc}},editable:{get:function(){return this.Vn},set:function(a){var b=this.Vn;b!==a&&(this.Vn=a,this.g("editable",b,a))}},textEditor:{get:function(){return this.jq},set:function(a){var b=this.jq;b!==a&& -(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.o();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, -set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.o(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); +(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.s();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, +set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.s(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); var Vn=null,Wn=null,go=new D(Wg,"None",0),co=new D(Wg,"WrapFit",1),Sn=new D(Wg,"WrapDesiredSize",2),io=new D(Wg,"WrapBreakAll",3),Rn=new D(Wg,"OverflowClip",0),$n=new D(Wg,"OverflowEllipsis",1),Tn=new D(Wg,"FormatTrim",0),ko=new D(Wg,"FormatNone",0),jo=/[ \u200b\u00ad]/,lo=new $a,mo=0,no=new $a,oo=0,bo="...",Xn="",Qn=null,Pn=!1;Wg.className="TextBlock";Wg.getEllipsis=function(){return bo};Wg.setEllipsis=function(a){bo=a;no=new $a;oo=0};Wg.getBaseline=function(){return Vn}; Wg.setBaseline=function(a){Vn=a};Wg.getUnderline=function(){return Wn};Wg.setUnderline=function(a){Wn=a};Wg.isValidFont=function(a){Pn||(Qn=Ug?(new Hk(null)).context:null,Pn=!0);if(null===Qn)return!0;var b=Qn.font;if(a===b||"10px sans-serif"===a)return!0;Qn.font="10px sans-serif";Qn.font=a;var c=Qn.font;if("10px sans-serif"!==c)return Qn.font=b,!0;Qn.font="19px serif";var d=Qn.font;Qn.font=a;c=Qn.font;Qn.font=b;return c!==d};Wg.None=go;Wg.WrapFit=co;Wg.WrapDesiredSize=Sn;Wg.WrapBreakAll=io; Wg.OverflowClip=Rn;Wg.OverflowEllipsis=$n;function po(){this.Qb=[];this.lb=[]}po.prototype.reset=function(){this.Qb=[];this.lb=[]};po.prototype.gy=function(a){this.Qb=Ba(a.Qb);this.lb=Ba(a.lb)};po.className="TextBlockMetrics";function dk(){Y.call(this);this.Zg=null;this.$p="";this.th=jc;this.yl=td;this.xh=this.ld=null;this.xl=zc;this.Td=zg;this.nm=null;this.uo=!1;this.Yr=!0;this.Ol=!1;this.gm=null}ma(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Gi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} -function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ +dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Hi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} +function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Af()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.ls&&void 0!==w&&4v*v)for(null===w.cj&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.cj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.right=c.maxSelectionCount)){this.D^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.ea();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.Lb();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.Db(),c.skipsUndoManager=d)}}}},isHighlighted:{get:function(){return 0!== (this.D&524288)},set:function(a){var b=0!==(this.D&524288);if(b!==a){this.D^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.ea(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.M();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{get:function(){return 0!==(this.D&8192)},set:function(a){var b=0!==(this.D&8192);b!==a&&(this.D^=8192,this.g("isShadowed",b,a),this.M())}},isAnimated:{get:function(){return 0!== @@ -1413,12 +1413,12 @@ get:function(){return this.Rp},set:function(a){var b=this.Rp;b!==a&&(this.Rp=a,t b!==a&&(this.Sp=a,this.g("selectionChanged",b,a))}},resizeAdornmentTemplate:{get:function(){return this.Cp},set:function(a){var b=this.Cp;b!==a&&(this.Cp=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{get:function(){return this.Ep},set:function(a){var b=this.Ep;b!==a&&(this.Ep=a,this.g("resizeObjectName",b,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.bb(a), null!==a)?a:this}},resizeCellSize:{get:function(){return this.Dp},set:function(a){var b=this.Dp;b.w(a)||(this.Dp=a=a.H(),this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{get:function(){return this.Gp},set:function(a){var b=this.Gp;b!==a&&(this.Gp=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{get:function(){return this.Hp},set:function(a){var b=this.Hp;b!==a&&(this.Hp=a,this.g("rotateObjectName", b,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.bb(a),null!==a)?a:this}},rotationSpot:{get:function(){return this.Ip},set:function(a){var b=this.Ip;b.w(a)||(this.Ip=a=a.H(),this.g("rotationSpot",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;b!==a&&(this.Ub=a,this.g("text",b,a))}},containingGroup:{get:function(){return this.mi}, -set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.B(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.B(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& -e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&oi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, +set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.C(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.C(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& +e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&pi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, containingGroupChanged:{get:function(){return this.An},set:function(a){var b=this.An;b!==a&&(this.An=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{get:function(){return null!==this.containingGroup||this instanceof W&&null!==this.labeledLink?!1:!0}},layoutConditions:{get:function(){return this.Io},set:function(a){var b=this.Io;b!==a&&(this.Io=a,this.g("layoutConditions",b,a))}},dragComputation:{ get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.g("dragComputation",b,a))}},shadowOffset:{get:function(){return this.Xp},set:function(a){var b=this.Xp;b.w(a)||(this.Xp=a=a.H(),this.M(),this.g("shadowOffset",b,a))}},shadowColor:{get:function(){return this.Wp},set:function(a){var b=this.Wp;b!==a&&(this.Wp=a,this.M(),this.g("shadowColor",b,a))}},shadowBlur:{get:function(){return this.ug}, -set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.B;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; -V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Da;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; +set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.C;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; +V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Ea;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; function Je(a){V.call(this,a);this.D&=-257;this.ih="Adornment";this.ie=null;this.Ex=0;this.Sx=!1;this.l=a instanceof Qm?[]:Ro;this.Sa=null}ma(Je,V);Je.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Je.prototype.updateRelationshipsFromData=function(){}; Je.prototype.Gk=function(a){var b=this.adornedObject.part;if(b instanceof S&&this.adornedObject instanceof Kf){var c=b.path;b.Gk(a);a=c.geometry;b=this.W.j;c=b.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}}; +W.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}}; function dp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Fq():a.Hd();k.next();){var l=k.value;l.isTreeLink&&(h||l.ud||l.Ua(),l=l.Kq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ob(!0),l.Oh(),g&&e.lk(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.o())}}});xg.className="Placeholder"; +a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.s())}}});xg.className="Placeholder"; function S(){V.call(this,X.Link);this.Ga=8;this.We=null;this.Xe="";this.rf=this.fo=null;this.sf="";this.mq=null;this.Yk=ag;this.Hn=0;this.Jn=ag;this.Kn=NaN;this.ck=ip;this.Zp=.5;this.nd=null;this.Ab=(new E).freeze();this.jf=this.ph=null;this.Yl=new N;this.na=new rd;this.I=this.u=this.Mf=this.Vf=null;this.l=[];this.vv=new J;this.$r=this.Nx=this.Mx=null;this.Ru=NaN;this.O=null}ma(S,V); S.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.Ga=this.Ga&-113;a.Xe=this.Xe;a.fo=this.fo;a.sf=this.sf;a.mq=this.mq;a.Yk=this.Yk;a.Hn=this.Hn;a.Jn=this.Jn;a.Kn=this.Kn;a.ck=this.ck;a.Zp=this.Zp;null!==this.O&&(a.O=this.O.copy())};t=S.prototype;t.yf=function(a){V.prototype.yf.call(this,a);this.Xe=a.Xe;this.sf=a.sf;a.ph=null;a.Ua();a.Mf=this.Mf;var b=a.fromPort;null!==b&&Vo(b);a=a.toPort;null!==a&&Vo(a)}; t.jb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===dg||a===$f||a===Zf?this.curve=a:a===jp||a===kp||a===lp?this.adjusting=a:a!==ip&&a!==ag&&B("Unknown Link enum value for a Link property: "+a):V.prototype.jb.call(this,a)};t.Kc=function(){null===this.O&&(this.O=new jl)};t.rj=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(vj(a)||wj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),vj(a)||wj(a))?!1:!0};t.Ew=function(){return!1}; t.lu=function(){};t.Nc=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case ag:a=0;break;case Zm:a=b;break;case Sm:a=b+90;break;case Um:a=b-90;break;case mp:a=b+180;break;case $m:a=L.Tq(b);90a&&(a-=180);break;case Tm:a=L.Tq(b+90);90a&&(a-=180);break;case Vm:a=L.Tq(b-90);90a&&(a-=180);break;case Wm:a=L.Tq(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Tq(a)}; function Qo(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.oy(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.mi;if(c!==b){null!==c&&Lo(c,a);a.mi=b;null!==b&&Ko(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.Z,g.Z=!0);e(a,c,b);null!==g&&(g.Z=f)}!a.ud||a.Mx!==c&&a.Nx!==c||a.Ua()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.o()} +t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.s()} t.Mq=function(a){V.prototype.Mq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Xo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Xo(c,this,d)}op(this)}};t.Nq=function(a){V.prototype.Nq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Yo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Yo(c,this,d)}pp(this)}}; t.uk=function(){this.ud=!0;if(null!==this.nd){var a=this.diagram;if(null!==a)for(var b=this.nd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};S.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; S.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?V.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),V.prototype.move.call(this,a,!1),J.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; @@ -1507,13 +1507,13 @@ f=this.i(c+2);c=this.i(c+3);L.yz(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assig S.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Pa(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===dg))return this.na.vy(.5);if(this.computeCurve()===dg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.xz(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Pa(d)};t=S.prototype;t.i=function(a){return this.Ab.j[a]};t.Qc=function(a,b){this.Ab.Pc(a,b)};t.L=function(a,b,c){this.Ab.Pc(a,new J(b,c))};t.wA=function(a,b){this.Ab.wb(a,b)}; t.m=function(a,b,c){this.Ab.wb(a,new J(b,c))};t.ce=function(a){this.Ab.add(a)};t.vf=function(a,b){this.Ab.add(new J(a,b))};t.uw=function(a){this.Ab.cb(a)};t.pk=function(){this.Ab.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.o():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.s():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& (a.defaultToPoint=a.i(a.pointsCount-1)));null!==g&&g.animationManager.sc&&(b=g.animationManager,a.jf=e,b.$l.add(a));a.g("points",f,e)}}t.Th=function(){null===this.ph&&(this.ph=this.Ab,this.Ab=this.Ab.copy())}; t.xf=function(){if(null!==this.ph){for(var a=this.ph,b=this.Ab,c=Infinity,d=Infinity,e=a.j,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,y=q;L.A(k,0)?y=0k?-1:1)*n+r,y=m*(v-r)+q);this.pk();this.ce(f);this.vf(u,w);this.vf(v,y);this.ce(p);this.Qc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Qc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.A(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ce(d),this.vf(f,h),this.ce(e);else{this.ce(d);this.ce(e);h=N.alloc();b.mj(h);k=h.$(e);p.mj(h);l=h.$(d);if(k||l)g=b.da(vp(g),new J),this.Qc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.da(vp(c),new J),this.Qc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));N.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.pk();var z=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r=this.getLinkDirection(a, @@ -1541,7 +1541,7 @@ S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this l=k/l;m=p-m;this.Qc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.L(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Qc(c,d)}}return!0;case lp:f=this.i(a);n=this.i(c);if(!f.Qa(b)||!n.Qa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Qc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.s()&&k.s()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.$(a)||h.$(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left, @@ -1560,7 +1560,7 @@ S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurvine function Sj(a){if(null===a.diagram||!a.isAvoiding||!uk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=vk(a.diagram,!0,a.containingGroup,null);for(var d=1;dIp&&Fp(b,m,n)!==l-1&&(Fp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Fp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Fp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Fp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Ip&&Fp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Ip)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ k)*k+k/2;l>Ip&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Fp(b,g,m)===l-1?Hp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Fp(b,g,m)===l-1&&Hp(a,b,g,m,f,!1,f)));a.vf(c,d)}S.prototype.Sz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=xb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=ud,this.$m=!0,a;var c=!1,d=this.diagram;null!==d&&np(this)&&d.Vg.contains(this)&&(0!==this.Yl.width||0!==this.Yl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ab.j;var g=this.computeCurve();if(g===dg&&3<=b&&!L.aa(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(g.x=v-z,g.y=r-z,b.x=v+u,b.y= @@ -1574,19 +1574,19 @@ function Kp(a,b,c,d){for(var e=a.pointsCount,f=b;L.aa(b.x,f.x)&&L.aa(b.y,f.y);){ function Mp(a,b,c,d,e,f,g){if(!g&&np(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Np(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===$f?Gd(b,n,r,!1):Hd(b,p,m,n,m,n,r)}else if(L.A(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===$f?Gd(b,r,m,!1):Hd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Np(a,b,c,d){var e=a.diagram;if(null===e||b.w(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ea.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!L.A(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!L.A(n,r)&& L.A(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.A(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function np(a){a=a.curve;return a===Zf||a===$f}function rp(a,b){if(b||np(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Vg.contains(a)||0===a.Yl.width&&0===a.Yl.height||b.Vg.add(a,a.Yl.copy())} -S.prototype.Oq=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ea.j;for(var g=e.length,h=0;ha&&wa(a,">= 0",S,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength",b,a),this.Ua())}}, fromShortLength:{get:function(){return null!==this.O?this.O.ah:NaN},set:function(a){this.Kc();var b=this.O.ah;b!==a&&(this.O.ah=a,this.dc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.O?this.O.Ch:Vc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),(b.Oc()||a.Oc())&&null!==this.toNode&&Vo(this.toPort),this.Ua())}},toEndSegmentLength:{get:function(){return null!== @@ -1624,7 +1624,7 @@ na.Object.defineProperties(wk.prototype,{bounds:{get:function(){return new N(thi function yp(){Xa(this);this.port=this.node=null;this.de=[];this.Sq=!1}yp.prototype.toString=function(){for(var a=this.de,b=this.node.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}yp.prototype.Dm=function(){this.de.length=0}; -function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.s()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.o()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Kd(d),n=l.computeSpot(m,a.port);if(n.Oc()){var p=m?l.toPort:l.fromPort;if(null!==p&&(m=p.part,null!==m)){var r=m.findVisibleNode();null!==r&&r!==m&&(m=r,p=m.port);m=l.computeOtherPoint(m,p);p=h.Pa(p.da(zc));p+=(h.Pa(m)-p)/360;p-=k;0>p?p+=360:360<=p&&(p-=360);n=Zp(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.de[f];void 0===r?(r=new $p(l,p,n),a.de[f]= r):(r.link=l,r.angle=p,r.Ac=n);r.ow.set(m);f++}}}}J.free(h);a.de.sort(yp.prototype.l);k=a.de.length;d=-1;for(f=h=0;fMath.abs(u)?(y=Math.abs(u)/p,p=Math.abs(u)):y=1;break;case 2:r>Math.abs(z)?(y=Math.abs(z)/r,r=Math.abs(z)):y=1;break;case 1:n>Math.abs(u)?(y=Math.abs(u)/n,n=Math.abs(u)):y=1;break;default:case 4:m> @@ -1632,31 +1632,31 @@ Math.abs(z)?(y=Math.abs(z)/m,m=Math.abs(z)):y=1}v=0}var F=A.Qq;if(d===fp){A=A.li c[a],null!==e&&e.link===b)return e;return null}yp.prototype.l=function(a,b){return a===b?0:null===a?-1:null===b?1:a.Acb.Ac?1:a.angleb.angle?1:0}; yp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.Lq;if(0>d)return c;var e=a.wm;if(1>=e||!b.isOrthogonal)return c;b=a.ow;var f=a.Qq;if(2===a.Ac||8===a.Ac)d=e-1-d;return((a=2===a.Ac||4===a.Ac)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ai.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ai.prototype.Rh=function(a){return!a.location.s()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} -function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Ai.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ai.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ai.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ai.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ai.prototype.workerLayout=function(){return!1}; -function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ai.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; +jl.prototype.copy=function(){var a=new jl;a.bh=this.bh.H();a.Ch=this.Ch.H();a.$g=this.$g;a.Ah=this.Ah;a.ah=this.ah;a.Bh=this.Bh;a.co=this.co;a.kq=this.kq;a.eo=this.eo;a.lq=this.lq;return a};jl.className="LinkSettings";function Bi(){Xa(this);this.u=this.B=null;this.zi=this.xo=!0;this.Co=!1;this.nn=(new J(0,0)).freeze();this.zo=!0;this.vn=this.yo=null;this.Bo=!1;this.l=null;this.I=0;this.To=this.qq=null;this.wt=!1;this.yg=this.ek=null;this.lt=!1} +Bi.prototype.cloneProtected=function(a){a.xo=this.xo;a.zi=this.zi;a.Co=this.Co;a.nn.assign(this.nn);a.zo=this.zo;a.yo=this.yo;a.vn=this.vn;a.Bo=!0;a.To=this.To;a.qq=this.qq};Bi.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};Bi.prototype.serializeLayoutProperties=function(a){a.arrangementOrigin={x:this.arrangementOrigin.x,y:this.arrangementOrigin.y};a.isRouting=this.isRouting}; +Bi.prototype.deserializeLayoutProperties=function(a){null!==a&&(this.arrangementOrigin=new J(a.arrangementOrigin.x,a.arrangementOrigin.y),this.isRouting=a.isRouting)};Bi.prototype.jb=function(){};Bi.prototype.toString=function(){var a=Ja(this.constructor);a+="(";null!==this.group&&(a+=" in "+this.group);null!==this.diagram&&(a+=" for "+this.diagram);return a+")"}; +Bi.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(null!==a&&!a.undoManager.isUndoingRedoing){var b=a.animationManager;!b.isTicking&&(b.defaultAnimation.isAnimating&&b.Bc(),this.isOngoing&&a.pj||this.isInitial&&!a.pj)&&(this.isValidLayout=!1,a.Db())}}};Bi.prototype.createNetwork=function(){return new aq(this)};Bi.prototype.makeNetwork=function(a){var b=this.createNetwork();a instanceof R?(b.Ag(a.nodes,!0),b.Ag(a.links,!0)):a instanceof U?b.Ag(a.memberParts):b.Ag(a.iterator);return b}; +Bi.prototype.updateParts=function(){this.isValidLayout=!0;if(!this.workerLayout()){var a=this.diagram;if(null===a&&null!==this.network)for(var b=this.network.vertexes.iterator;b.next();){var c=b.value.node;if(null!==c&&(a=c.diagram,null!==a))break}try{null!==a&&a.xa("Layout"),this.commitLayout()}finally{null!==a&&a.Xa("Layout")}}};Bi.prototype.commitLayout=function(){if(null!==this.network){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}}; +Bi.prototype.doLayout=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,this.Rh,!0,!1,!0),bq(this,b,a.parts,!0,this.Rh,!0,!1,!0)):a instanceof U?bq(this,b,a.memberParts,!1,this.Rh,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Bi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Bi.prototype.Rh=function(a){return!a.location.o()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} +function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Bi.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Bi.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Bi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Bi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Bi.prototype.workerLayout=function(){return!1}; +function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Bi.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; function gq(a,b){var c=fq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function fq(a){var b=null;if("function"===typeof a){if(b=hq.get(a),!b){var c=Ja(a);b=hq.get(c);b||(b=new iq,b.Lv=a,b.name=c,b.l=a.name,b.Cy=jq,hq.set(c,b),hq.set(a,b),hq.set(a.name,b))}}else"string"===typeof a&&(b=hq.get(a));return b} -Ai.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= +Bi.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)xa("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Fm.get(c.id)){a.Fm.remove(c.id);b.wt=!1;b.ek=null;if(b.lt)b.lt=!1,b.yg=null;else{var d=lq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}dq(b,c.time);c=b.yg;if(null!==c)b.yg=null;else for(d=a.Fm.iteratorValues;d.next();){var e=d.value;c=e.yg;if(null!==c){e.yg=null;break}}null!==c&&mq(b,c)}},a.Pe.postMessage({_GoJS:"_GoJS", url:a.Cy}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Pe.postMessage({_GoJS:"_GoJS",url:b})}),a.Pe.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.ek?this.yg=this.network:mq(this,this.network);dq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function mq(a,b){a.wt=!0;var c=fq(a.constructor),d=nq(a,b,!0);d._GoJS="_GoJS";c.Pe.postMessage(d);c.Fm.set(kb(a),a);a.ek=b} function nq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?kb(a):a.id,layout:Ja(a.constructor),p:d,jB:e,Qz:f};a.onNetworkSerialization(2,c,b,d);return d} function lq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.jB,g=new H;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Cb(a.key));null!==b?b=e.mk(b):(b=e.createVertex(),e.Bg(b));c&&null!==a.key&&(b.data={Di:a.key});g.set(a.id,b)});var h=b.Qz,k=new H;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.tm(f);f.link=b;c&&null!==a.key&&(f.data={Di:a.key});k.set(a.id,f)}); -f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ai.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ai.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.C=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, -isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.B()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== -a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.B())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.B())}},id:{get:function(){return this.I},set:function(a){this.I= -a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Ai.prototype.useWorker=Ai.prototype.Uw;Ai.declareWorkerLayout=gq;Ai.prototype.cancelWorker=Ai.prototype.zz;Ai.prototype.collectParts=Ai.prototype.$x;Ai.prototype.getLayoutBounds=Ai.prototype.nj;Ai.prototype.invalidateLayout=Ai.prototype.B; -var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ai.className="Layout";Ai.GoJSScriptURL=jq;Ai.declareWorkerLayout=gq; +f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Bi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Bi.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.B=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, +isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.C()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== +a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.C())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.C())}},id:{get:function(){return this.I},set:function(a){this.I= +a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Bi.prototype.useWorker=Bi.prototype.Uw;Bi.declareWorkerLayout=gq;Bi.prototype.cancelWorker=Bi.prototype.zz;Bi.prototype.collectParts=Bi.prototype.$x;Bi.prototype.getLayoutBounds=Bi.prototype.nj;Bi.prototype.invalidateLayout=Bi.prototype.C; +var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Bi.className="Layout";Bi.GoJSScriptURL=jq;Bi.declareWorkerLayout=gq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=fq(a.layout));var d=null;c&&c.Lv&&(d=new c.Lv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=lq(d,a,!0); d.workerLayout=function(){var a=nq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function iq(){this.Lv=null;this.Cy=this.l=this.name="";this.scripts=[];this.Pe=null;this.Fm=new H}function aq(a){Xa(this);this.kc=a;this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H} aq.prototype.clear=function(){if(this.tf)for(var a=this.tf.iterator;a.next();)a.value.clear();if(this.le)for(a=this.le.iterator;a.next();)a.value.clear();this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H}; @@ -1677,10 +1677,10 @@ function oq(a){Xa(this);this.Tc=a;this.l=(new N(0,0,10,10)).freeze();this.u=(new oq.prototype.serializeVertexProperties=function(a){a.id=kb(this);a.key=this.node?this.node.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.x=this.bounds.x;a.y=this.bounds.y;a.kB=this.bounds.width;a.tA=this.bounds.height;a.fx=this.focus.x;a.fy=this.focus.y;var b=[];this.td.each(function(a){b.push(kb(a))});a.Uy=b;var c=[];this.Gd.each(function(a){c.push(kb(a))});a.jy=c}; oq.prototype.Cq=function(a,b,c){if(null!==a){this.x=a.x;this.y=a.y;this.width=a.kB;this.height=a.tA;this.focusX=a.fx;this.focusY=a.fy;var d=this;a.Uy&&a.Uy.forEach(function(a){(a=c.get(a))&&d.td.add(a)});a.jy&&a.jy.forEach(function(a){(a=c.get(a))&&d.Gd.add(a)})}};oq.prototype.clear=function(){this.Mi=this.ob=null;this.td=new E;this.Gd=new E}; oq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutVertex#"+kb(this);if(0b?1:0):1:null!==b?-1:0} na.Object.defineProperties(oq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.td._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Gd._dataArray}},data:{get:function(){return this.ob},set:function(a){this.ob=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.u.h(d/2,b/2);this.l.h(a,c,d,b)}}},node:{get:function(){return this.Mi}, -set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.s())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| +set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.o())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| this.u.assign(a)}},centerX:{get:function(){return this.l.x+this.u.x},set:function(a){var b=this.l;b.x+this.u.x!==a&&(b.ea(),b.x=a-this.u.x,b.freeze())}},centerY:{get:function(){return this.l.y+this.u.y},set:function(a){var b=this.l;b.y+this.u.y!==a&&(b.ea(),b.y=a-this.u.y,b.freeze())}},focusX:{get:function(){return this.u.x},set:function(a){var b=this.u;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},focusY:{ get:function(){return this.u.y},set:function(a){var b=this.u;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},x:{get:function(){return this.l.x},set:function(a){var b=this.l;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},y:{get:function(){return this.l.y},set:function(a){var b=this.l;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},width:{get:function(){return this.l.width},set:function(a){var b=this.l;b.width!==a&&(b.ea(),b.width= a,b.freeze())}},height:{get:function(){return this.l.height},set:function(a){var b=this.l;b.height!==a&&(b.ea(),b.height=a,b.freeze())}},network:{get:function(){return this.Tc},set:function(a){this.Tc=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= @@ -1691,55 +1691,55 @@ e}}else if(""!==b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}retur pq.prototype.serializeEdgeProperties=function(a){a.id=kb(this);a.key=this.link?this.link.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.from=this.fromVertex?kb(this.fromVertex):null;a.fB=this.toVertex?kb(this.toVertex):null};pq.prototype.deserializeEdgeProperties=function(a,b){if(null!==a){var c=b.get(a.from);c&&(this.fromVertex=c);if(a=b.get(a.fB))this.toVertex=a}}; pq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+kb(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.va("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;n=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.xa("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new N(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Dq:A=-A.width;break;default:A= 0}z.moveTo(q+A,u);switch(p){case Dq:q-=C;break;default:q+=C}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case wq:k=g;m=f;n=b;p=c;g=N.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=z=0;C=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=J.alloc();for(Q=0;Qm-1||0k){d.push(new N(0,F?y-f:y,k+n,A+f+p));for(K=0;Kl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -na.Object.defineProperties(Sk.prototype,{wrappingWidth:{get:function(){return this.sq},set:function(a){this.sq!==a&&(0n)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};vi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Da(a);for(b=this.nodes.iterator;b.next();)b.value.Da(a);for(b=this.links.iterator;b.next();)b.value.Da(a)}; -vi.prototype.ir=function(){for(var a=this.C.model,b=new G,c=a.nodeDataArray,d=0;dn)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};wi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ea(a);for(b=this.nodes.iterator;b.next();)b.value.Ea(a);for(b=this.links.iterator;b.next();)b.value.Ea(a)}; +wi.prototype.ir=function(){for(var a=this.B.model,b=new G,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1805,9 +1805,9 @@ rr(a.y),rr(a.offsetX),rr(a.offsetY));else if("Brush"===b){if(c=new zl,c.type=Ya( t.zt=function(a){this.skipsUndoManager||this.undoManager.aw(a);for(var b=this.cv,c=b.length,d=0;db&&(b=a.length);Ca(a,b,c);ur(this,"",ze,"",a,null,c,null,b)};t.tw=function(a,b){void 0===b&&(b=-1);a===this.Fc&&B("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",Ae,"",a,c,null,b,null)}; t.Iq=function(a){if(null===a)return"";var b=this.Yj;if(""===b)return"";b=vn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;B("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};t.Um=function(a,b){if(null!==a){var c=this.Yj;if(""!==c)if(this.ab(a)){var d=vn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),ur(this,"nodeCategory",xe,c,a,d,b))}else Uj(a,c,b)}};t.Wm=function(a,b){this.Um(b,this.Iq(a))};t.Em=function(){return!1};t.Ck=function(){return!1};t.qj=function(){return!1}; -t.Ut=function(){return!1};t.Dk=function(){return!1};function yi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} +t.Ut=function(){return!1};t.Dk=function(){return!1};function zi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function vn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Uj(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}} na.Object.defineProperties(Z.prototype,{name:{get:function(){return this.oa},set:function(a){var b=this.oa;b!==a&&(this.oa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Da(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; +get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Ea(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; b!==a&&(""===a&&B("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Ae){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Wb(a),b?(this.ag.add(a),this.$c[c]!==a&&this.$c.splice(c,0,a),void 0!==d&&this.gb.add(d,a)):(this.ag.remove(a),this.$c[c]=== a&&this.$c.splice(c,1),void 0!==d&&this.gb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Bf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=zr.prototype;t.Gm=function(a){if(void 0!==a){var b=this.Aj;if(null!==b){var c=this.Kb(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.uf(c))}return a}}; t.xy=function(a){return Sq(this,a,!0)};t.Bw=function(a,b){$q(this,a,b,!0)};t.Ay=function(a){return Sq(this,a,!1)};t.Gw=function(a,b){$q(this,a,b,!1)};function Sq(a,b,c){if(null!==b&&(a=c?a.af:a.bf,""!==a&&(a=vn(b,a),void 0!==a))){if(Uq(a))return a;B((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function $q(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.af:a.bf;if(""!==e)if(c=a.Gm(c),a.xc(b)){var f=vn(b,e);f!==c&&(Yq(a,f,b),Uj(b,e,c),null===a.Kb(c)&&Zq(a,c,b),ur(a,d?"linkFromKey":"linkToKey",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.yy=function(a){return Rq(this,a,!0)};t.Cw=function(a,b){ar(this,a,b,!0)};t.By=function(a){return Rq(this,a,!1)};t.Hw=function(a,b){ar(this,a,b,!1)}; -function Rq(a,b,c){if(null===b)return"";a=c?a.Uj:a.Vj;if(""===a)return"";b=vn(b,a);return void 0===b?"":b}function ar(a,b,c,d){if(null!==b){var e=d?a.Uj:a.Vj;if(""!==e)if(a.xc(b)){var f=vn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.Bf=function(a){if(null===a)return Cr;var b=this.ae;if(""===b)return Cr;a=vn(a,b);return void 0===a?Cr:a}; -t.ju=function(a,b){if(null!==a){var c=this.ae;if(""!==c)if(this.xc(a)){var d=vn(a,c);void 0===d&&(d=Cr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.xc(a)&&(Yq(this,b,a),ur(this,"linkLabelKeys",Ae,c,a,b,null,e,null)))}else void 0!==d&&B(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Wb=function(a){if(null!==a){var b=this.Hi;if(""!==b&&(b=vn(a,b),void 0!==b)){if(Uq(b))return b;B("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Da(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; +t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Ea(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; t.Rq=function(a){if(null!==a){var b=this.Hi;if(""!==b){var c=this.Wb(a);if(void 0===c||this.gb.contains(c)){var d=this.Ql;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.gb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.gb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.gb.count-1;this.gb.contains(c);)c--;Uj(a,b,c)}}}}};t.xc=function(a){return null===a?!1:this.ag.contains(a)};t.bj=function(a){null!==a&&(mb(a),this.xc(a)||Wq(this,a,!0))}; function Wq(a,b,c){if(""!==a.linkKeyProperty){var d=a.Wb(b);if(void 0!==d&&a.gb.G(d)===b)return;a.Rq(b);d=a.Wb(b);if(void 0===d){B("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.gb.add(d,b)}a.ag.add(b);d=null;c&&(d=a.$c.length,a.$c.splice(d,0,b));ur(a,"linkDataArray",ze,"linkDataArray",a,null,b,null,d);Dr(a,b)}t.pz=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.$c.splice(d,1)}ur(a,"linkDataArray",Ae,"linkDataArray",a,b,null,d,null);c=Sq(a,b,!0);Yq(a,c,b);c=Sq(a,b,!1);Yq(a,c,b);d=a.Bf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.Gr;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Ur&&k===Vr?h=Gr:h===Ur&&k!==Vr&&(h=this.arrangement);if((this.direction===Pr||this.direction===Qr)&&this.sorting!==Jr){for(k=0;!(k>=d.length);k+=2){a.add(d.J(k));if(k+1>=d.length)break;c.add(d.J(k+1))}this.direction===Pr?(this.arrangement===Ur&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Ur&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Ir?1:-1)/k,u=d.J(r).diameter;isNaN(u)&&(u=Xr(d.J(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Ur){isNaN(b)&&(b=6);if(h!==Gr&&h!==Ur){f=-Infinity;for(g=0;gb[c[q]].indexOf(c[q===c.length-1?0:q+1])&&r.push(q===c.length-1?0:q+1);if(0===r.length)for(q=0;qc.indexOf(F)||Cc.indexOf(F)||C=u?C+1:C)),v+=C=u&&C++,z>=u&&z++,C>z&&(A=z,z=C,C=A),z-C<(c.length+2)/2===(Cr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.mm=a:this.mm=360,this.B())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.B())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.B())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& -a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.B())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.B())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.B())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.B())}},actualXRadius:{get:function(){return this.$b}}, +na.Object.defineProperties(Fr.prototype,{radius:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(0=a?this.mm=a:this.mm=360,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.C())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& +a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.C())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.C())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.C())}},actualXRadius:{get:function(){return this.$b}}, actualYRadius:{get:function(){return this.be}},actualSpacing:{get:function(){return this.Ij}},actualCenter:{get:function(){return this.mx}}}); var Gr=new D(Fr,"ConstantSpacing",0),Tr=new D(Fr,"ConstantDistance",1),Sr=new D(Fr,"ConstantAngle",2),Ur=new D(Fr,"Packed",3),Ir=new D(Fr,"Clockwise",4),Rr=new D(Fr,"Counterclockwise",5),Pr=new D(Fr,"BidirectionalLeft",6),Qr=new D(Fr,"BidirectionalRight",7),Nr=new D(Fr,"Forwards",8),Or=new D(Fr,"Reverse",9),Lr=new D(Fr,"Ascending",10),Mr=new D(Fr,"Descending",11),Jr=new D(Fr,"Optimized",12),Kr=new D(Fr,"Pythagorean",13),Vr=new D(Fr,"Circular",14);Fr.className="CircularLayout";Fr.ConstantSpacing=Gr; Fr.ConstantDistance=Tr;Fr.ConstantAngle=Sr;Fr.Packed=Ur;Fr.Clockwise=Ir;Fr.Counterclockwise=Rr;Fr.BidirectionalLeft=Pr;Fr.BidirectionalRight=Qr;Fr.Forwards=Nr;Fr.Reverse=Or;Fr.Ascending=Lr;Fr.Descending=Mr;Fr.Optimized=Jr;Fr.Pythagorean=Kr;Fr.Circular=Vr;function Hr(){this.Am=-Infinity;this.cn=this.Wk=null} @@ -1942,11 +1942,11 @@ Hr.prototype.compare=function(a,b){if(0this.Am||Math.abs(a)u&&0u&&0=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right:z<=n.bounds.x)F= -(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q-1).x,v=b.i(q- -1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]);C=Math.max(10, -this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A=u.centerY,p?180===this.K||0===this.K? -(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++,z,A),b.m(q++,z,A+C)):270===this.K? -(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y),A),b.m(q++,w,y),b.m(q++,z,y)))}null!== -d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.s()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.s()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +c.fromVertex,n=c.toVertex;if(c.valid){if(b.curve===dg&&4===b.pointsCount)if(m.column===n.column)c=b.getLinkPoint(e,g,l,!0,!1,f,h),g=b.getLinkPoint(f,h,k,!1,!1,e,g),c.o()||c.set(e.actualBounds.center),g.o()||g.set(f.actualBounds.center),b.pk(),b.vf(c.x,c.y),b.vf((2*c.x+g.x)/3,(2*c.y+g.y)/3),b.vf((c.x+2*g.x)/3,(c.y+2*g.y)/3),b.vf(g.x,g.y);else{var p=!1,r=!1;null!==g&&l===sc&&(p=!0);null!==h&&k===sc&&(r=!0);if(p||r){var q=b.i(0).x;c=b.i(0).y;m=b.i(3).x;d=b.i(3).y;p&&(90===this.K||270===this.K?(p=q,n= +(c+d)/2):(p=(q+m)/2,n=c),b.L(1,p,n),l=b.getLinkPoint(e,g,l,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y));r&&(90===this.K||270===this.K?(l=m,c=(c+d)/2):(l=(q+m)/2,c=d),b.L(2,l,c),e=b.getLinkPoint(f,h,k,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(3,e.x,e.y))}}b.xf()}else if(m.layer===n.layer)b.xf();else{p=r=!1;q=b.firstPickIndex+1;if(b.isOrthogonal){p=!0;var u=b.pointsCount;4=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right: +z<=n.bounds.x)F=(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q- +1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]); +C=Math.max(10,this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););if(null===u)break;u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A= +u.centerY,p?180===this.K||0===this.K?(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++, +z,A),b.m(q++,z,A+C)):270===this.K?(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y), +A),b.m(q++,w,y),b.m(q++,z,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; As.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xb.Xb||a.lb.l||a.fdb.fd?1:a.vcb.vc?1:0:0};t.A=function(a,b){a-=b;return-1a}; t.uj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&B("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.xe.length){var d=[];for(var e=0;ea&&(this.ng=a,this.B())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.B())}}, -linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.B())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); +na.Object.defineProperties(As.prototype,{layerSpacing:{get:function(){return this.ue},set:function(a){this.ue!==a&&0<=a&&(this.ue=a,this.C())}},columnSpacing:{get:function(){return this.Zb},set:function(a){this.Zb!==a&&0a&&(this.ng=a,this.C())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.C())}}, +linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.C())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); var Bs=new D(As,"CycleDepthFirst",0),Us=new D(As,"CycleGreedy",1),Gs=new D(As,"CycleFromLayers",2),Cs=new D(As,"LayerOptimalLinkLength",0),Zs=new D(As,"LayerLongestPathSink",1),at=new D(As,"LayerLongestPathSource",2),Ds=new D(As,"InitDepthFirstOut",0),gt=new D(As,"InitDepthFirstIn",1),et=new D(As,"InitNaive",2),kt=new D(As,"AggressiveNone",0),Es=new D(As,"AggressiveLess",1),lt=new D(As,"AggressiveMore",2),mt=8;As.className="LayeredDigraphLayout";As.CycleDepthFirst=Bs;As.CycleGreedy=Us; As.CycleFromLayers=Gs;As.LayerOptimalLinkLength=Cs;As.LayerLongestPathSink=Zs;As.LayerLongestPathSource=at;As.InitDepthFirstOut=Ds;As.InitDepthFirstIn=gt;As.InitNaive=et;As.AggressiveNone=kt;As.AggressiveLess=Es;As.AggressiveMore=lt;As.PackNone=0;As.PackExpand=1;As.PackStraighten=2;As.PackMedian=4;As.PackAll=15;function ut(){this.index=this.vc=this.fd=this.Xb=this.first=this.layer=0;this.link=null;this.l=0}ut.className="SegInfo";function Fs(a){aq.call(this,a)}ma(Fs,aq);Fs.prototype.createVertex=function(){return new vt(this)}; Fs.prototype.createEdge=function(){return new wt(this)};Fs.className="LayeredDigraphNetwork";function vt(a){oq.call(this,a);this.Ra=this.Rg=this.Fi=-1;this.I=NaN;this.T=null;this.valid=!1;this.finish=this.Cg=NaN;this.wf=0;this.Mk=this.Nk=null}ma(vt,oq); @@ -2089,9 +2089,9 @@ wt.prototype.serializeEdgeProperties=function(a,b){pq.prototype.serializeEdgePro wt.prototype.deserializeEdgeProperties=function(a,b,c,d){pq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; na.Object.defineProperties(wt.prototype,{fromVertex:{get:function(){return this.Yc},set:function(a){this.Yc!==a&&(this.Yc=a)}},toVertex:{get:function(){return this.ed},set:function(a){this.ed!==a&&(this.ed=a)}},valid:{get:function(){return this.eb},set:function(a){this.eb!==a&&(this.eb=a)}},rev:{get:function(){return this.La},set:function(a){this.La!==a&&(this.La=a)}},forest:{ get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a)}},portFromPos:{get:function(){return this.I},set:function(a){this.I!==a&&(this.I=a)}},portToPos:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},portFromColOffset:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToColOffset:{get:function(){return this.T}, -set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Ai.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Ai); -xt.prototype.cloneProtected=function(a){Ai.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; -xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Ai.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; +set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Bi.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Bi); +xt.prototype.cloneProtected=function(a){Bi.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; +xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Bi.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; xt.prototype.makeNetwork=function(a){function b(a){if(a instanceof W)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof S){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof R?(c.Ag(a.nodes,!0,b),c.Ag(a.links,!0,b)):a instanceof U?c.Ag(a.memberParts,!1,b):c.Ag(a.iterator,!1,b);return c}; xt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Ft&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof R&&(b=a);this.path===yt&&null!==b?this.kd=b.isTreePathToChildren?zt:Gt:this.kd=this.path===yt?zt:this.path;if(0e?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(Ke?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(KGa&&(xu(a,-Ga,0,ja,qa-1),yu(A,-Ga,0),yu(C,-Ga,0),Ga=0)}Ma.S.h(Ga,T);v=Math.max(v,F);y=Math.max(y,z+(0===P?0:q)+eb.height);K=F}else{0n&&(TGa&&(xu(a,0,-Ga,ja,qa-1),yu(A,0,-Ga),yu(C,0,-Ga),Ga=0);Ma.S.h(K,Ga);y=Math.max(y,Q);v=Math.max(v,z+(0===P?0:q)+eb.width);T=Q}I++}0l&&(l=0),135l&&(l=0),135u&&(u=0),k===bu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Du(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Bu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Du(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Cu(a,y,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, -A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qe[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, +A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qn&&(n=0),135v&&(v=0));b.fa.h(n,v);b.ua.h(z,A)}} -function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.ua.width,e=a.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& +q,A+=q);break;case nu:c?(n+=z-b.width+q,z+=q):(v+=A-b.height+q,A+=q);break;case $t:case Qt:c?1n&&(n=0),135v&&(v=0));b.fa.h(n,v);b.wa.h(z,A)}} +function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.wa.width,e=a.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& (c=Gu(a,b.S.x,!1,c,g))):(b.S.h(d+h,c+g/2-b.focus.y-b.fa.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.fa.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.S.y&&(c=Gu(a,b.S.y,!0,c,g))));return new N(c,0,d,e)} -function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.ua.width,e=b.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.wa.width,e=b.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.S.x&&(c=Gu(a,h.S.x,!1,c,g))):(h.S.h(-d-l.width-q,c+g/2-h.focus.y-h.fa.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.fa.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.S.y&&(c=Gu(a,h.S.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case qu:return a.width>b?a.width:b;case nu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case $t:case Qt:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case au:return a.width-a.focus.x+a.nodeSpacing/2+b;case bu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Cu(a,b,c){switch(a.alignment){case Au:case zu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case qu:return a.height>b?a.height:b;case nu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case $t:case Qt:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case au:return a.height-a.focus.y+a.nodeSpacing/2+b;case bu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Du(a,b,c){switch(a){case zu:b/=2;c/=2;break;case Au:b/=2;c/=2;break;case qu:c=b=0;break;case nu:break;default:B("Unhandled alignment value "+a.toString())}return new J(b,c)}function uu(a,b,c,d,e,f){b=Du(b,c,d);xu(a,b.x,b.y,e,f)}function xu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].S;f.x+=b;f.y+=c}} function vu(a,b,c,d){var e=b.parent;switch(a.kd){case zt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case Gt:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:B("Unhandled path value "+a.kd.toString())}}function yu(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c=0;cn.length||null===r||2>r.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=tu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=tu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d= for(;lf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}function ou(a){var b=mu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.U.nodeIndentPastParent=a,this.B())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.B())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== -a&&(this.U.layerSpacing=a,this.B())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.B())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.B())}},breadthLimit:{get:function(){return this.U.breadthLimit}, -set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.B())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.B())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.B())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== -a&&(this.U.commentSpacing=a,this.B())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.B())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.B())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= -a,this.B())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.B())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.B())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& -a!==Xt&&!Yt||(this.V.sorting=a,this.B())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.B())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.B())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== -a&&(this.V.alignment=a,this.B())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.B())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.B())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, -set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.B())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.B())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.B())}},alternateCompaction:{ -get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.B())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.B())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.B())}},alternateRowIndent:{ -get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.B())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.B())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.B())}},alternateSetsPortSpot:{ -get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.B())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.B())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.B())}},alternateChildPortSpot:{ -get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.B())}}}); +na.Object.defineProperties(xt.prototype,{roots:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a,this.C())}},path:{get:function(){return this.vp},set:function(a){this.vp!==a&&(this.vp=a,this.C())}},treeStyle:{get:function(){return this.oq},set:function(a){this.Eb===a||a!==At&&a!==Tt&&a!==Ut&&a!==St||(this.oq=a,this.C())}},layerStyle:{get:function(){return this.ts}, +set:function(a){this.Eb===a||a!==Bt&&a!==Ot&&a!==Nt||(this.ts=a,this.C())}},comments:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ct&&a!==Iu&&a!==Ft||(this.Eb=a,this.C())}},arrangementSpacing:{get:function(){return this.Pd},set:function(a){this.Pd.w(a)||(this.Pd.assign(a),this.C())}},rootDefaults:{ +get:function(){return this.U},set:function(a){this.U!==a&&(this.U=a,this.C())}},alternateDefaults:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a,this.C())}},sorting:{get:function(){return this.U.sorting},set:function(a){this.U.sorting===a||a!==Vt&&a!==Wt&&a!==Xt&&!Yt||(this.U.sorting=a,this.C())}},comparer:{get:function(){return this.U.comparer},set:function(a){this.U.comparer!== +a&&(this.U.comparer=a,this.C())}},angle:{get:function(){return this.U.angle},set:function(a){this.U.angle!==a&&(0===a||90===a||180===a||270===a?(this.U.angle=a,this.C()):B("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.U.alignment},set:function(a){this.U.alignment!==a&&(this.U.alignment=a,this.C())}},nodeIndent:{get:function(){return this.U.nodeIndent},set:function(a){this.U.nodeIndent!== +a&&0<=a&&(this.U.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.U.nodeIndentPastParent},set:function(a){this.U.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.U.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== +a&&(this.U.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.C())}},breadthLimit:{get:function(){return this.U.breadthLimit}, +set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== +a&&(this.U.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= +a,this.C())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& +a!==Xt&&!Yt||(this.V.sorting=a,this.C())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.C())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.C())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== +a&&(this.V.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, +set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ +get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.C())}},alternateSetsPortSpot:{ +get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ +get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.C())}}}); var yt=new D(xt,"PathDefault",-1),zt=new D(xt,"PathDestination",0),Gt=new D(xt,"PathSource",1),Vt=new D(xt,"SortingForwards",10),Wt=new D(xt,"SortingReverse",11),Xt=new D(xt,"SortingAscending",12),Yt=new D(xt,"SortingDescending",13),zu=new D(xt,"AlignmentCenterSubtrees",20),Au=new D(xt,"AlignmentCenterChildren",21),qu=new D(xt,"AlignmentStart",22),nu=new D(xt,"AlignmentEnd",23),$t=new D(xt,"AlignmentBus",24),Qt=new D(xt,"AlignmentBusBranching",25),au=new D(xt,"AlignmentTopLeftBus",26),bu=new D(xt, "AlignmentBottomRightBus",27),ju=new D(xt,"CompactionNone",30),lu=new D(xt,"CompactionBlock",31),At=new D(xt,"StyleLayered",40),Ut=new D(xt,"StyleLastParents",41),Tt=new D(xt,"StyleAlternating",42),St=new D(xt,"StyleRootOnly",43),Ct=new D(xt,"ArrangementVertical",50),Iu=new D(xt,"ArrangementHorizontal",51),Ft=new D(xt,"ArrangementFixedRoots",52),Bt=new D(xt,"LayerIndividual",60),Ot=new D(xt,"LayerSiblings",61),Nt=new D(xt,"LayerUniform",62);xt.className="TreeLayout";xt.PathDefault=yt; xt.PathDestination=zt;xt.PathSource=Gt;xt.SortingForwards=Vt;xt.SortingReverse=Wt;xt.SortingAscending=Xt;xt.SortingDescending=Yt;xt.AlignmentCenterSubtrees=zu;xt.AlignmentCenterChildren=Au;xt.AlignmentStart=qu;xt.AlignmentEnd=nu;xt.AlignmentBus=$t;xt.AlignmentBusBranching=Qt;xt.AlignmentTopLeftBus=au;xt.AlignmentBottomRightBus=bu;xt.CompactionNone=ju;xt.CompactionBlock=lu;xt.StyleLayered=At;xt.StyleLastParents=Ut;xt.StyleAlternating=Tt;xt.StyleRootOnly=St;xt.ArrangementVertical=Ct; xt.ArrangementHorizontal=Iu;xt.ArrangementFixedRoots=Ft;xt.LayerIndividual=Bt;xt.LayerSiblings=Ot;xt.LayerUniform=Nt;function Dt(a){aq.call(this,a)}ma(Dt,aq);Dt.prototype.createVertex=function(){return new Et(this)};Dt.prototype.createEdge=function(){return new Ku(this)};Dt.className="TreeNetwork"; -function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.ua=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); +function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.wa=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); Et.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.bd=a.sorting,this.Wc=a.comparer,this.Yb=a.angle,this.yb=a.alignment,this.Cs=a.nodeIndent,this.Ds=a.nodeIndentPastParent,this.Es=a.nodeSpacing,this.ue=a.layerSpacing,this.ss=a.layerSpacingParentOverlap,this.Er=a.compaction,this.wr=a.breadthLimit,this.Rs=a.rowSpacing,this.Qs=a.rowIndent,this.Dr=a.commentSpacing,this.Cr=a.commentMargin,this.dt=a.setsPortSpot,this.Ms=a.portSpot,this.ct=a.setsChildPortSpot,this.zr=a.childPortSpot)}; na.Object.defineProperties(Et.prototype,{initialized:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},parent:{get:function(){return this.Cc},set:function(a){this.Cc!==a&&(this.Cc=a)}},children:{get:function(){return this.I},set:function(a){if(this.I!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-pu(c))))):c.alignment===qu?(e=d.top+b.y,0===b.y&&m.y * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go.js b/release/go.js index e12a621f6..c4543daa6 100644 --- a/release/go.js +++ b/release/go.js @@ -1,8 +1,8 @@ /* - * GoJS v2.1.53 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.1.54 JavaScript Library for HTML Diagrams, https://gojs.net * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com. * Copyright (C) 1998-2021 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.53/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.1.54/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function aa(a){var b=0;return function(){return bc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gb?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.OA=function(a,b,c,d){L.Qh(a,b,c,d,this.x,this.y,this);return this};t.PA=function(a,b){L.Qh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.cB=function(a,b,c,d){L.Gq(this.x,this.y,a,b,c,d,this);return this};t.dB=function(a,b){L.Gq(this.x,this.y,a.x,a.y,b.width,b.height,this);return this}; t.tj=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.Uk=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};t.transform=function(a){a.ta(this);return this};function wb(a,b){b.Jd(a);return a}function xb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function yb(a,b,c,d){a=c-a;b=d-b;return a*a+b*b} -function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.s=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.s; +function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.o=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.o; J.prototype.setSpot=J.prototype.Uk;J.prototype.setRectSpot=J.prototype.tj;J.prototype.snapToGridPoint=J.prototype.dB;J.prototype.snapToGrid=J.prototype.cB;J.prototype.projectOntoLineSegmentPoint=J.prototype.PA;J.prototype.projectOntoLineSegment=J.prototype.OA;J.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return L.Cm(a,b,c,d,e,f,g,h)};J.prototype.direction=J.prototype.direction;J.prototype.directionPoint=J.prototype.Pa;J.prototype.normalize=J.prototype.normalize; J.prototype.distanceSquared=J.prototype.qd;J.prototype.distanceSquaredPoint=J.prototype.Ie;J.prototype.scale=J.prototype.scale;J.prototype.rotate=J.prototype.rotate;J.prototype.offset=J.prototype.offset;J.prototype.subtract=J.prototype.ge;J.prototype.add=J.prototype.add;J.prototype.equalsApprox=J.prototype.Qa;J.prototype.equalTo=J.prototype.fj;J.prototype.equals=J.prototype.w;J.prototype.set=J.prototype.set;J.prototype.setTo=J.prototype.Ig;var Bb=null,Cb=null,Fb=null,Gb=null,Hb=null,Ab=[]; J.className="Point";J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb;J.Origin=Bb=(new J(0,0)).ca();J.InfiniteTopLeft=Cb=(new J(-Infinity,-Infinity)).ca();J.InfiniteBottomRight=Fb=(new J(Infinity,Infinity)).ca();J.SixPoint=Gb=(new J(6,6)).ca();J.NoPoint=Hb=(new J(NaN,NaN)).ca();J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb; function M(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):B("Invalid arguments to Size constructor: "+a+", "+b);this.v=!1}var Ib,Jb,Kb,Lb,Mb,Nb,Ob;M.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.h=function(a,b){this.width=a;this.height=b;return this};M.prototype.Ig=function(a,b){this.width=a;this.height=b;return this}; M.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function Pb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new M(c,e)}return new M}function Qb(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.w=function(a){return a instanceof M?this.width===a.width&&this.height===a.height:!1};t.fj=function(a,b){return this.width===a&&this.height===b}; -t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.s=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.s;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; +t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.o;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; M.ZeroSize=Ib=(new M(0,0)).ca();M.OneSize=Jb=(new M(1,1)).ca();M.SixSize=Kb=(new M(6,6)).ca();M.EightSize=Lb=(new M(8,8)).ca();M.TenSize=Mb=(new M(10,10)).ca();M.InfiniteSize=Nb=(new M(Infinity,Infinity)).ca();M.NoSize=Ob=(new M(NaN,NaN)).ca();M.parse=Pb;M.stringify=Qb; function N(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof M?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):B("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c, this.height=d):B("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}t=N.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Sb(a,b,c){a.width=b;a.height=c}t.Ig=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; @@ -110,10 +110,10 @@ t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Jc=function(a,b){retur t.bw=function(a,b,c,d){return $b(this,a,b,c,d)};function $b(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Mc=function(a){return this.cw(a.x,a.y,a.width,a.height)}; t.cw=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function ac(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Oe=function(a){return bc(this,a.x,a.y,0,0)};t.Rc=function(a){return bc(this,a.x,a.y,a.width,a.height)}; t.Rw=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return bc(this,a,b,c,d)};function bc(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.Uk=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function cc(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.s=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; +function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.o=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; na.Object.defineProperties(N.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new J(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new M(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new J(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.s;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.o;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; N.prototype.intersectsRect=N.prototype.Mc;N.prototype.intersect=N.prototype.bw;N.prototype.intersectRect=N.prototype.Dy;N.prototype.grow=N.prototype.sA;N.prototype.subtractMargin=N.prototype.Jw;N.prototype.addMargin=N.prototype.uq;N.prototype.inflate=N.prototype.Jc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Ge;N.prototype.containsPoint=N.prototype.$;N.prototype.equalsApprox=N.prototype.Qa;N.prototype.equalTo=N.prototype.fj; N.prototype.equals=N.prototype.w;N.prototype.setSize=N.prototype.bB;N.prototype.setPoint=N.prototype.Qc;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.Ig;var ic=null,jc=null,hc=[];N.className="Rect";N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc;N.ZeroRect=ic=(new N(0,0,0,0)).ca();N.NoRect=jc=(new N(NaN,NaN,NaN,NaN)).ca();N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc; function kc(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):B("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}kc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; @@ -121,7 +121,7 @@ kc.prototype.Ig=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.lef t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function lc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new kc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new kc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new kc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new kc(c,e):new kc(c,e,f,g)}return new kc} function mc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.w=function(a){return a instanceof kc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.fj=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.s=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.s;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; +t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.o;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; kc.prototype.setTo=kc.prototype.Ig;var qc=null,rc=null,pc=[];kc.className="Margin";kc.parse=lc;kc.stringify=mc;kc.ZeroMargin=qc=(new kc(0,0,0,0)).ca();kc.TwoMargin=rc=(new kc(2,2,2,2)).ca();kc.parse=lc;kc.stringify=mc;function O(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.v=!1} var sc,tc,uc,vc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Zc,$c,ad,bd,cd,dd,ed,fd,gd;O.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};O.prototype.Ig=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};O.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; O.prototype.copy=function(){var a=new O;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=O.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} @@ -233,25 +233,25 @@ va(this,a);this.oc=a;this.ra=!0}},point1X:{get:function(){return this.Ce},set:fu va(this,a);this.qh=a;this.ra=!0}},centerX:{get:function(){return this.Ce},set:function(a){this.v&&va(this,a);this.Ce=a;this.ra=!0}},centerY:{get:function(){return this.Qi},set:function(a){this.v&&va(this,a);this.Qi=a;this.ra=!0}},radiusX:{get:function(){return this.Ri},set:function(a){0>a&&wa(a,">= zero",ke,"radiusX");this.v&&va(this,a);this.Ri=a;this.ra=!0}},radiusY:{get:function(){return this.qh}, set:function(a){0>a&&wa(a,">= zero",ke,"radiusY");this.v&&va(this,a);this.qh=a;this.ra=!0}},startAngle:{get:function(){return this.hc},set:function(a){this.hc!==a&&(this.v&&va(this,a),a%=360,0>a&&(a+=360),this.hc=a,this.ra=!0)}},sweepAngle:{get:function(){return this.oc},set:function(a){this.v&&va(this,a);360a&&(a=-360);this.oc=a;this.ra=!0}},isClockwiseArc:{get:function(){return this.el},set:function(a){this.v&& va(this,a);this.el=a;this.ra=!0}},isLargeArc:{get:function(){return this.Ll},set:function(a){this.v&&va(this,a);this.Ll=a;this.ra=!0}},xAxisRotation:{get:function(){return this.Ce},set:function(a){a%=360;0>a&&(a+=360);this.v&&va(this,a);this.Ce=a;this.ra=!0}}});ke.prototype.equalsApprox=ke.prototype.Qa; -var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.C=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.C=this.C;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; +var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.B=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.B=this.B;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Jq=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);return b}; me.prototype.mA=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);b.assign(c.ou(b));return b}; -na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, +na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, set:function(a){this.xr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.yr},set:function(a){this.yr=a}},key:{get:function(){return this.Di},set:function(a){this.Di=a}},down:{get:function(){return this.Rr},set:function(a){this.Rr=a}},up:{get:function(){return this.st},set:function(a){this.st= a}},clickCount:{get:function(){return this.Ar},set:function(a){this.Ar=a}},delta:{get:function(){return this.Or},set:function(a){this.Or=a}},isMultiTouch:{get:function(){return this.ms},set:function(a){this.ms=a}},handled:{get:function(){return this.bs},set:function(a){this.bs=a}},bubbles:{get:function(){return this.Pg},set:function(a){this.Pg=a}},event:{ get:function(){return this.Wr},set:function(a){this.Wr=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.nt},set:function(a){this.nt=a}},targetDiagram:{get:function(){return this.mt},set:function(a){this.mt=a}},targetObject:{ get:function(){return this.pd},set:function(a){this.pd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a= this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); -me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.C=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.C=this.C;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; -function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}; -we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.C=this.C;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; +me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.B=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.B=this.B;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; +na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; +function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}; +we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.B=this.B;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; we.prototype.toString=function(){var a="";a=this.change===ye?a+"* ":this.change===xe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ye?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ka(this.object)),null!==this.oldValue&&(a+=" old: "+Ka(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ka(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};we.prototype.G=function(a){return a?this.oldValue:this.newValue};we.prototype.oA=function(a){return a?this.oldParam:this.newParam};we.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; we.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};we.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};we.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.C},set:function(a){this.C=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, +na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.B},set:function(a){this.B=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, set:function(a){this.gf=a}},isTransactionFinished:{get:function(){return this.wn===ye&&("CommittedTransaction"===this.gf||"FinishedUndo"===this.gf||"FinishedRedo"===this.gf)}},object:{get:function(){return this.np},set:function(a){this.np=a}},oldValue:{get:function(){return this.pp},set:function(a){this.pp=a}},oldParam:{get:function(){return this.op},set:function(a){this.op=a}}, newValue:{get:function(){return this.ip},set:function(a){this.ip=a}},newParam:{get:function(){return this.hp},set:function(a){this.hp=a}}});we.prototype.redo=we.prototype.redo;we.prototype.canRedo=we.prototype.canRedo;we.prototype.undo=we.prototype.undo;we.prototype.canUndo=we.prototype.canUndo;we.prototype.getParam=we.prototype.oA;we.prototype.getValue=we.prototype.G;we.prototype.clear=we.prototype.clear; var ye=new D(we,"Transaction",-1),xe=new D(we,"Property",0),ze=new D(we,"Insert",1),Ae=new D(we,"Remove",2);we.className="ChangedEvent";we.Transaction=ye;we.Property=xe;we.Insert=ze;we.Remove=Ae;function Be(){this.u=(new E).freeze();this.oa="";this.l=!1}Be.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Bb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.J(d),null!==f&&f.clear(),b.cb(d),a.ks=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.J(0),null!==f&&f.clear(),b.cb(0),a.Xd--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Xd++);b.freeze()}a.isInternalTransaction||a.Bb("CommittedTransaction",c,e)}else{a.se=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -274,30 +274,30 @@ Ce.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Ce.prototype,{models:{get:function(){return this.gv.iterator}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.J(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, -set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.va;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; +na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, +set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.xa;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; Pa.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Je&&this.Kr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Pa.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Qe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Re){b.bubbles=!0;return}if(this.gestureBehavior===Qe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;N.free(f); f=a.it;g=new H;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.G(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Cd())));for(b=b.iterator;b.next();)l=b.value,l.Nc()&&l.canCopy()&&(k=c.G(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ta(),g.add(k,a.Cd(h))));J.free(h);a.copiedParts=g;Ye(a,g.Kf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -383,8 +383,8 @@ a}},originalToPort:{get:function(){return this.Wh},set:function(a){this.Wh=a}},i get:function(){return this.lr},set:function(a){this.lr=a}}});Jf.className="LinkingBaseTool";function Vf(){Jf.call(this);this.name="Linking";this.T={};this.I=null;this.K=Wf;this.en=null}ma(Vf,Jf);Vf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Ut()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Vf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.Vb(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof W))return null;var c=this.direction;if(c===Wf||c===Xf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Wf||c===Yf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; -Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.va(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.s()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, -this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.s()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= +Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.xa(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.o()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, +this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.o()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= this.temporaryFromNode),null!==this.temporaryToNode&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.Ua(),a.add(this.temporaryLink)),this.isActive=!0)};Vf.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink);a.remove(this.temporaryFromNode);a.remove(this.temporaryToNode);a.isMouseCaptured=!1;a.currentCursor="";this.Jg()}; Vf.prototype.doStop=function(){Jf.prototype.doStop.call(this);this.startObject=null}; Vf.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.transactionResult=null,c=null,d=null,e=null,f=null;try{var g=this.targetPort=this.findTargetPort(this.isForwards);if(null!==g){var h=g.part;h instanceof W&&(this.isForwards?(null!==this.originalFromNode&&(b=this.originalFromNode,c=this.originalFromPort),d=h,e=g):(b=h,c=g,null!==this.originalToNode&&(d=this.originalToNode,e=this.originalToPort)))}else this.isForwards?null!==this.originalFromNode&&this.isUnconnectedLinkValid&& @@ -394,27 +394,27 @@ Vf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)r na.Object.defineProperties(Vf.prototype,{archetypeLinkData:{get:function(){return this.T},set:function(a){this.T=a}},archetypeLabelNodeData:{get:function(){return this.I},set:function(a){this.I=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.en},set:function(a){this.en=a}}}); var Wf=new D(Vf,"Either",0),Xf=new D(Vf,"ForwardsOnly",0),Yf=new D(Vf,"BackwardsOnly",0);Vf.className="LinkingTool";Vf.Either=Wf;Vf.ForwardsOnly=Xf;Vf.BackwardsOnly=Yf; function bf(){Jf.call(this);this.name="Relinking";var a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.T=a;a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.en=a;this.I=null;this.Hx=new N}ma(bf,Jf); -bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&& -(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.o()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&& +(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.s()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; bf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Ut()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; -bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.va(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.xa(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.Hx.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof X)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.va(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.xa(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= this.computeMinSize(),this.Mu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Na();this.transactionResult=this.name;a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -451,11 +451,11 @@ na.Object.defineProperties(vg.prototype,{handleArchetype:{get:function(){return a);this.ie=a}},minSize:{get:function(){return this.fg},set:function(a){if(!this.fg.w(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.fg.h(b,a)}}},maxSize:{get:function(){return this.eg},set:function(a){if(!this.eg.w(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.eg.h(b,a)}}},cellSize:{get:function(){return this.Qg},set:function(a){this.Qg.w(a)||this.Qg.assign(a)}}, isGridSnapEnabled:{get:function(){return this.I},set:function(a){this.I=a}},dragsMembers:{get:function(){return this.T},set:function(a){this.T=a}},oppositePoint:{get:function(){return this.Hs},set:function(a){this.Hs.w(a)||this.Hs.assign(a)}},originalDesiredSize:{get:function(){return this.Gx}},originalLocation:{get:function(){return this.qp}}}); vg.className="ResizingTool";Na("resizingTool",function(){return this.findTool("Resizing")},function(a){this.Ya("Resizing",a,this.mouseDownTools)});function Cg(){Ee.call(this);this.name="Rotating";this.La=45;this.Ka=2;this.qp=new J;this.ie=null;var a=new Kf;a.figure="Ellipse";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.strokeWidth=1;a.cursor="pointer";this.u=a;this.l=null;this.Fx=0;this.Ps=new J(NaN,NaN);this.I=0;this.T=50}ma(Cg,Ee); -Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.s()&&a.isVisible()&&b.actualBounds.s()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; +Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.o()&&a.isVisible()&&b.actualBounds.o()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; Cg.prototype.makeAdornment=function(a){var b=a.part.rotateAdornmentTemplate;if(null===b){b=new Je;b.type=X.Position;b.locationSpot=zc;var c=this.handleArchetype;null!==c&&b.add(c.copy())}else if(yg(b),b=b.copy(),null===b)return null;b.adornedObject=a;return b};Cg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.va(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; +Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.xa(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; Cg.prototype.computeRotationPoint=function(a){var b=a.part,c=b.locationObject;return b.rotationSpot.kb()?a.da(b.rotationSpot):a===b||a===c?c.da(b.locationSpot):a.da(zc)}; -Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.s()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ +Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.o()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.da(b)};Cg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.Ps=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Cg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Cg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; Cg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Na();this.transactionResult=this.name;a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Cg.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Ta();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Gg(d))c=this.qp.copy(),b.location=c.ge(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; @@ -469,7 +469,7 @@ Eg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Eg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.Xk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Eg.prototype.doStop=function(){this.Xk=null};Eg.className="ActionTool";function Fg(){Ee.call(this);this.name="ClickCreating";this.Aj=null;this.u=!0;this.l=!1;this.xx=new J(0,0)}ma(Fg,Ee); Fg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.xx=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.xx))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.zm(a.lastInput.documentPoint,!0)?!1:!0}; Fg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.va(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= +Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.xa(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= this.name;b.R("PartCreated",d)}finally{this.Jg(),b.R("ChangedSelection",b.selection)}return d};na.Object.defineProperties(Fg.prototype,{archetypeNodeData:{get:function(){return this.Aj},set:function(a){this.Aj=a}},isDoubleClick:{get:function(){return this.u},set:function(a){this.u=a}},isGridSnapEnabled:{get:function(){return this.l},set:function(a){this.l=a}}});Fg.className="ClickCreatingTool"; function Hg(){Ee.call(this);this.name="DragSelecting";this.pl=175;this.u=!1;var a=new V;a.layerName="Tool";a.selectable=!1;var b=new Kf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.l=a}ma(Hg,Ee); Hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampa.lastInput.clickCount?!1:!0};Vg.prototype.doStart=function(){eh=this;null!==this.textBlock&&this.doActivate()}; Vg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.Vb(a.lastInput.documentPoint));if(null!==b&&b instanceof Wg&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.ia=bh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.zh=this.textBlock.copy();var d=new N(this.textBlock.da(tc),this.textBlock.da(Dc));a.Aw(d);c.show(b,a,this);this.currentTextEditor=c}}}};Vg.prototype.doCancel=function(){this.stopTool()}; Vg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Vg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(fh)};Vg.prototype.acceptText=function(a){switch(a){case fh:if(this.ia===hh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this);break;case kh:case $g:case ah:if($g!==a||!0!==this.textBlock.isMultiline)if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this)}}; -function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.va(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} +function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.xa(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} Vg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Vg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Vg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ia=Yg,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};Vg.prototype.doStop=function(){eh=null}; Vg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Vg.prototype.Jy=function(a){var b=this.zh;b.text=a;b.measure(this.textBlock.Ei,Infinity);return b}; na.Object.defineProperties(Vg.prototype,{textBlock:{get:function(){return this.La},set:function(a){this.La=a}},currentTextEditor:{get:function(){return this.u},set:function(a){this.u=a}},defaultTextEditor:{get:function(){return this.l},set:function(a){this.l=a}},starting:{get:function(){return this.Ka},set:function(a){this.Ka=a}},textValidation:{get:function(){return this.Wi}, set:function(a){this.Wi=a}},minimumEditorScale:{get:function(){return this.I},set:function(a){this.I=a}},selectsTextOnActivate:{get:function(){return this.T},set:function(a){this.T=a}},state:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}}});Vg.prototype.measureTemporaryTextBlock=Vg.prototype.Jy; var kh=new D(Vg,"LostFocus",0),fh=new D(Vg,"MouseDown",1),ah=new D(Vg,"Tab",2),$g=new D(Vg,"Enter",3),lh=new D(Vg,"SingleClick",0),Xg=new D(Vg,"SingleClickSelected",1),gh=new D(Vg,"DoubleClick",2),Yg=new D(Vg,"StateNone",0),bh=new D(Vg,"StateActive",1),ch=new D(Vg,"StateEditing",2),ih=new D(Vg,"StateValidating",3),dh=new D(Vg,"StateInvalid",4),hh=new D(Vg,"StateValidated",5),eh=null;Vg.className="TextEditingTool";Vg.LostFocus=kh;Vg.MouseDown=fh;Vg.Tab=ah;Vg.Enter=$g;Vg.SingleClick=lh; Vg.SingleClickSelected=Xg;Vg.DoubleClick=gh;Vg.StateNone=Yg;Vg.StateActive=bh;Vg.StateEditing=ch;Vg.StateValidating=ih;Vg.StateInvalid=dh;Vg.StateValidated=hh;Na("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.Ya("TextEditing",a,this.mouseUpTools)}); -function mh(){nh||(oh(),nh=!0);this.C=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.C=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} -function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();return a.sc=!0} -function th(a){if(a.md&&a.sc){var b=a.Rd,c=a.C,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===uh&&b.lc.clear(),a.Qx=a.Al===vh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),wh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==xh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Kh(c),a.sc=!1,a.ef=!1,b.start(),Lh(a),c.Na(),Mh(b,0),Hf(c,!0),Nh(a),c.R("AnimationStarting",a))}))}}function Oh(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; -function Ph(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function mh(){nh||(oh(),nh=!0);this.B=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.B=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} +function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();th(a.B);return a.sc=!0} +function uh(a){if(a.md&&a.sc){var b=a.Rd,c=a.B,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===vh&&b.lc.clear(),a.Qx=a.Al===wh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),xh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Lh(c),a.sc=!1,a.ef=!1,b.start(),Mh(a),c.Na(),Nh(b,0),Hf(c,!0),Oh(a),c.R("AnimationStarting",a))}))}}function Ph(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; +function Qh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function oh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new H;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",mh,"duration");this.Yg=a}},isAnimating:{get:function(){return this.jc}}, isTicking:{get:function(){return this.ps}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a}},defaultAnimation:{get:function(){return this.Rd}},activeAnimations:{get:function(){return this.yj}},initialAnimationStyle:{get:function(){return this.Al},set:function(a){this.Al=a}}});mh.prototype.stopAnimation=mh.prototype.Bc; -var Wh=null,nh=!1,ph=new D(mh,"Default",1),vh=new D(mh,"AnimateLocations",2),uh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Wh.add(a,b)};mh.Default=ph;mh.AnimateLocations=vh;mh.None=uh; -function qh(){this.xv=this.Ox=this.Uc=this.C=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Xh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Yh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Qh(this,!0);Lh(this.Uc);Hf(this.C);Nh(this.Uc);this.C.redraw()}; -function wh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} -function Mh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Wh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; -t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.C,c=this.Uc;this.Il=this.jc=c.zl=!1;Lh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.o();e=this.Fp;d=d.iterator;for(var f=Wh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Nh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),wh(this,null),c.xm(this),b.Db())}}; +var Xh=null,nh=!1,ph=new D(mh,"Default",1),wh=new D(mh,"AnimateLocations",2),vh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Xh.add(a,b)};mh.Default=ph;mh.AnimateLocations=wh;mh.None=vh; +function qh(){this.xv=this.Ox=this.Uc=this.B=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Yh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Zh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Rh(this,!0);Mh(this.Uc);Hf(this.B);Oh(this.Uc);this.B.redraw()}; +function xh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} +function Nh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Xh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; +t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.B,c=this.Uc;this.Il=this.jc=c.zl=!1;Mh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.s();e=this.Fp;d=d.iterator;for(var f=Xh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Oh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),xh(this,null),c.xm(this),b.Db())}}; t.lk=function(a,b){var c=b.actualBounds,d=null;b instanceof U&&(d=b.placeholder);null!==d?(c=d.da(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof U)for(a=a.memberParts;a.next();)d=a.value,d instanceof W&&this.lk(d,b)}; t.jk=function(a,b){if(a.isVisible()){var c=null;b instanceof U&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.lc;c.contains(a)&&(c.G(a).sw=!0);if(a instanceof U)for(a=a.memberParts;a.next();)c=a.value,c instanceof W&&this.jk(c,b)}};t.pA=function(a){var b=this.iv.get(a);null===b&&(b={},this.iv.add(a,b));return b}; na.Object.defineProperties(qh.prototype,{duration:{get:function(){return this.Yg},set:function(a){1>a&&wa(a,">= 1",qh,"duration");this.Yg=a}},reversible:{get:function(){return this.Fp},set:function(a){this.Fp=a}},runCount:{get:function(){return this.nv},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Zh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Xh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=Zh; -function ei(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}ei.className="AnimationState";function fi(a,b,c){this.pd=null;this.gf=a;this.cq=c||gi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=hi))}fi.prototype.copy=function(){var a=new fi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; -function ii(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(fi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); -var gi=new D(fi,"Default",1),hi=new D(fi,"Immediate",2),ji=new D(fi,"Bundled",3);fi.className="AnimationTrigger";fi.Default=gi;fi.Immediate=hi;fi.Bundled=ji;function ki(){Xa(this);this.C=null;this.Ea=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=ki.prototype;t.clear=function(){this.Ea.clear();this.rp.length=0};t.ee=function(a){this.C=a}; -t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ea.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function $h(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Yh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=$h; +function fi(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}fi.className="AnimationState";function gi(a,b,c){this.pd=null;this.gf=a;this.cq=c||hi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=ii))}gi.prototype.copy=function(){var a=new gi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; +function ji(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(gi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); +var hi=new D(gi,"Default",1),ii=new D(gi,"Immediate",2),ki=new D(gi,"Bundled",3);gi.className="AnimationTrigger";gi.Default=hi;gi.Immediate=ii;gi.Bundled=ki;function li(){Xa(this);this.B=null;this.Fa=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=li.prototype;t.clear=function(){this.Fa.clear();this.rp.length=0};t.ee=function(a){this.B=a}; +t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Fa.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0c.Xo||h.height*e>c.Xo?b.mc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ni(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ni(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ni(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Ea;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));oi(this,a,b);return a}; -t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Ea;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; -function oi(a,b,c){b=pi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ea.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(oi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(oi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),oi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Fa;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));pi(this,a,b);return a}; +t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Fa;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; +function pi(a,b,c){b=qi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Fa.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< e&&(k=a.J(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(ki.prototype,{parts:{get:function(){return this.Ea.iterator}},partsBackwards:{get:function(){return this.Ea.iteratorBackwards}},diagram:{get:function(){return this.C}},name:{get:function(){return this.oa},set:function(a){var b=this.oa;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&B("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&B("Layer.name is already present in this diagram: "+a);this.oa=a;this.g("name",b,a);for(a=this.Ea.iterator;a.next();)a.value.layerName=this.oa}}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ma.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Qi(a){var b=a.wa.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, +function Ri(a){var b=a.ya.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, "mouseout",a.Jk,!1)),a.addEventListener(b,"mouseenter",a.Oz,!1),a.addEventListener(b,"mouseleave",a.Pz,!1),a.addEventListener(b,"wheel",a.Lk,!1),a.addEventListener(b,"keydown",a.BA,!1),a.addEventListener(b,"keyup",a.CA,!1),a.addEventListener(b,"blur",a.Az,!1),a.addEventListener(b,"focus",a.Bz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.wa.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.ya/e.width*e.left,b.pageY-x.scrollY-a.xa/e.height*e.top); +Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.ya.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.va/e.width*e.left,b.pageY-x.scrollY-a.ua/e.height*e.top); c=a.Vl*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(x,"resize",a.Ww,!1))}function Ze(a){30p&&(this.position=q.h(-(this.Ys.scrollWidth-this.ya)+u-this.ya/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.Ys.scrollHeight-this.xa)+a.scrollTop-this.xa/c+d))),J.free(q),Vi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.Ys.scrollWidth-this.va)+u-this.va/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.Ys.scrollHeight-this.ua)+a.scrollTop-this.ua/c+d))),J.free(q),Wi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Yh;this.scale=Zi(this,cj);a!==Yh&&(Yi(this,!1),$i(this,this.documentBounds,this.ya/this.Aa,this.xa/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; -t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.ya;var f=this.xa;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function Zi(a,b){var c=a.Qn;if(null===a.ya)return c;a.Ta();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.va+(a.Ye?a.rb:0),g=a.ua+(a.pe?a.rb:0),h=f/e,k=g/d;return b===cj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Zh;this.scale=Zi(this,cj);a!==Zh&&(Yi(this,!1),$i(this,this.documentBounds,this.va/this.Aa,this.ua/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; +t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.va;var f=this.ua;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.uz=function(a,b){this.Ta();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.kA=function(a){if(a instanceof Y){this.ao=a;var b=J.alloc();this.bo=this.gr(a.da(tc,b));J.free(b)}else this.ao=null,this.bo=Hb}; -function $i(a,b,c,d,e,f){var g=J.allocAt(a.la.x,a.la.y),h=g.x,k=g.y;if(null!==a.ao){var l=J.alloc();l=a.ao.da(tc,l);h=l.x-a.bo.x/a.scale;k=l.y-a.bo.y/a.scale;e=sc;J.free(l)}if(f||a.scrollMode===Yh)e.kb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.wa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.ya/c.width*c.left,b.clientY-a.xa/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||Wi(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Vi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; +R.prototype.CA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return nj(c,a)}; +R.prototype.Oz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return nj(c,a)};R.prototype.Pz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return nj(c,a)}; +R.prototype.getMouse=function(a){var b=this.ya;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.va/c.width*c.left;a=a.clientY-this.ua/c.height*c.top;return null!==this.sb?wb(new J(b,a),this.sb):new J(b,a)}; +function ij(a,b,c){var d=a.ya,e=a.va,f=a.ua,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.sb?(b=J.allocAt(g,h),a.sb.Jd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ue(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.ya;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.va/c.width*c.left,b.clientY-a.ua/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||th(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Wi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; t.Jz=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Hf(this);this.qe=!1;this.Ts=new J(NaN,NaN);b.isEnabled=c;this.ac=!0;var d=this;null!==a&&ta(function(){d.ac=!1;rh(b,"Model");a(d)},1)};t.Db=function(a){void 0===a&&(a=!1);if(!0!==this.Ee&&!(this.Sb||!1===a&&this.ac)){this.Ee=!0;var b=this;x.requestAnimationFrame(function(){b.Ee&&b.hd()})}};t.hd=function(){if(!this.Kj||this.Ee)this.Kj&&(this.Kj=!1),Hf(this)}; -function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ti(a)||(b&&Wi(a),c&&Yi(a,!1))} -function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Fa||a.sm.s())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} +function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ui(a)||(b&&th(a),c&&Yi(a,!1))} +function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Da||a.sm.o())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} t.Vw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Nc()||c instanceof U||(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Je&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function tj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): -(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Yh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.ya,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.xa,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.ya,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1c&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): +(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Zh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.va,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.ua,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.va,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1C+1&&(k=a.position.x*w));if(a.Gl)switch(a.Ss){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(v+1n+1&&(b.scrollTop= -a.position.y*w));l=a.ya;m=a.xa;b.style.width=l+(a.Ye?a.rb:0)+"px";b.style.height=m+(a.pe?a.rb:0)+"px";return d!==l||e!==m||a.animationManager.sc?(a.onViewportBoundsChanged(f,a.viewportBounds,w,g),!1):!0}t=R.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&B("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.xk(a.layerName),null===b&&(b=this.xk("")),null===b&&B('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oj(99999999,a,a.diagram===this);0<=c&&this.Va(ze,"parts",b,null,a,null,c);b.isTemporary||this.Na();a.B(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oj=function(a){this.partManager.oj(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof Je||a instanceof U&&null!==a.placeholder)&&a.o();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.wd.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()}; -t.Lc=function(a){a.nk();this.partManager.Lc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.wd.remove(a);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()};t.remove=function(a){Nj(this,a,!0)}; -function Nj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.B(2),c&&b.uk(),c=d.Lc(-1,b,!1),0<=c&&a.Va(Ae,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.gu=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Na()}; t.nz=function(a,b){Tj(this,a,b);a.ee(this);var c=this.Ma,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.cc&&this.Va(Ae,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Na()}; -t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ea.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Fa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Wx=function(a){null===this.we&&(this.we=new E);this.we.add(a);this.model.Hh(a)};t.VA=function(a){null!==this.we&&(this.we.remove(a),0===this.we.count&&(this.we=null));this.model.Tk(a)};t.Hh=function(a){null===this.Of&&(this.Of=new E);this.Of.add(a)};t.Tk=function(a){null!==this.Of&&(this.Of.remove(a),0===this.Of.count&&(this.Of=null))}; t.zt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.aw(a);a.change!==ye&&(this.isModified=!0);if(null!==this.Of)for(var b=this.Of,c=b.length,d=0;dn.Ea.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof ki&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.va=function(a){return this.undoManager.va(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.va(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Xj(g,h,b?void 0:k));else if(g instanceof li){var m=!0===a.oldParam;"number"===typeof h&&k instanceof V&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Lb(),g.Lc(m?h:-1,k,m)):g.oj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof li&&(b?this.Ma.cb(h):(k.ee(this),this.Ma.wb(h,k))):B("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Ae){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof X)"number"===typeof p&&r instanceof Y?b?n.wb(p,r):n.Lc(p): +"number"===typeof p&&r instanceof Vj&&(r.isRow?Wj(n,p,b?r:void 0):Xj(n,p,b?r:void 0));else if(n instanceof li){var q=!0===a.newParam;"number"===typeof p&&r instanceof V&&(b?0>n.Fa.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof li&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.xa=function(a){return this.undoManager.xa(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.xa(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.ir=function(){this.partManager.ir()}; -function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);else if(null===a.wa)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.ya,g=a.xa;e.width=a.ya/b;e.height=a.xa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);a.M();aj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Vi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==xh||d||a.width===b.width&&a.height===b.height||e.B();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= -Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.ya;this.Ic.kw.height=this.xa;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; -function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.s()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, +function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);else if(null===a.ya)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.va,g=a.ua;e.width=a.va/b;e.height=a.ua/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);a.M();aj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= +Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.va;this.Ic.kw.height=this.ua;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; +function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);M.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.R("ChangingSelection",b);for(var c=b.ma(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Wi(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||th(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.s(),e.doLayout(b),b.B(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; -function si(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.cA=function(){return this.Dh.iterator};t.EA=function(a){th(this);a&&gk(this,!0);this.ac?rj(this,!1):(this.Hj=!0,Hf(this))};function gk(a,b){for(var c=a.Dh.iterator;c.next();)hk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.C())}function hk(a,b,c){if(null!==b){for(var d=b.Sl.iterator;d.next();)hk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.C())}} +function rj(a,b){if(a.Ng&&!a.Nr){var c=a.Z;a.Z=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.xa("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),th(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||uh(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.o(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; +function ti(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.Qr=c;a.Pr=d} function Cj(a,b){var c=a.Pr.G(b);return null!==c?c:a.Pr.G(b.toLowerCase())}function tk(a,b){var c=a.Qr.G(b);if(null!==c)return c;c=a.Qr.G(b.toLowerCase());if(null!==c)return c;B("Unknown DiagramEvent name: "+b)}t.kk=function(a,b){a=tk(this,a);null!==a&&a.add(b)};t.Lm=function(a,b){a=tk(this,a);null!==a&&a.remove(b)}; t.R=function(a,b,c){var d=tk(this,a),e=new ve;e.diagram=this;a=Cj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.J(0)(e);else if(0!==b)for(d=d.ma(),c=0;cw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& +function Fk(a,b,c,d){a.animationManager.Bc();a.hd();if(null===a.ya)return null;"object"!==typeof b&&B("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new M(Infinity,Infinity):new M(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new kc(l):l instanceof kc||B("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Gb.uc(!0);n=new Hk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.va+Math.ceil(l.left+l.right);n.height=a.ua+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);a.rl=!0;return n.context}var w=a.Qn,v=a.documentBounds.copy();v.Jw(a.ib);if(q)for(var y=a.Ma.j,z=y.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& (e=Math.min(e,w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);a.rl=!0;return n.context} -na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Fa},set:function(a){if(this.Fa!==a){var b=this.Fa;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.wa&&(b=this.wa.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, -!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.wa.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.wa=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, -"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Fa=null;if(null!==a){if(b=a.C)b.div=null;Ci(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ +na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Da},set:function(a){if(this.Da!==a){var b=this.Da;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.ya&&(b=this.ya.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, +!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.ya.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.ya=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, +"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Da=null;if(null!==a){if(b=a.B)b.div=null;Di(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ get:function(){return this.Sr},set:function(a){this.Sr!==a&&(this.Sr=a,null!==a&&(this.Fs=a.fromPort,this.Gs=a.toPort))}},Ky:{get:function(){return this.Fs},set:function(a){this.Fs=a}},Ly:{get:function(){return this.Gs},set:function(a){this.Gs=a}},animationManager:{get:function(){return this.Uc}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{ get:function(){return this.vg},set:function(a){this.vg=a;this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Nr},set:function(a){this.Nr=a}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a&&wa(a,">= 0",R,"scrollHorizontalLineChange"),this.Ws=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(0>a&&wa(a,">= 0",R,"scrollVerticalLineChange"),this.$s=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.hh},set:function(a){this.hh= -a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.wa,c=this.Fa;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= +a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.ya,c=this.Da;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= "-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Pn},set:function(a){""===a&&(a="auto");var b=this.Pn;b!==a&&(this.Pn=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.Pf},set:function(a){var b=this.Pf;b!==a&&(this.Pf=a,this.g("click",b,a))}},doubleClick:{ get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return this.Qf},set:function(a){var b=this.Qf;b!==a&&(this.Qf=a,this.g("contextClick",b,a))}},mouseOver:{get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(this.lg=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return this.jg},set:function(a){var b= this.jg;b!==a&&(this.jg=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return this.ig},set:function(a){var b=this.ig;b!==a&&(this.ig=a,this.g("mouseHold",b,a))}},mouseDragOver:{get:function(){return this.As},set:function(a){var b=this.As;b!==a&&(this.As=a,this.g("mouseDragOver",b,a))}},mouseDrop:{get:function(){return this.gg},set:function(a){var b=this.gg;b!==a&&(this.gg=a,this.g("mouseDrop",b,a))}}, @@ -773,137 +773,137 @@ get:function(){return this.wg},set:function(a){var b=this.wg;b!==a&&(this.wg=a,t get:function(){return this.qv}},maxSelectionCount:{get:function(){return this.ws},set:function(a){var b=this.ws;if(b!==a)if(0<=a&&!isNaN(a)){if(this.ws=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{ get:function(){return this.kp},set:function(a){var b=this.kp;b!==a&&(this.kp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.qo},set:function(a){var b=this.qo;b!==a&&(this.qo=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Lo},set:function(a){var b=this.Lo;b!==a&&(this.Lo=a,this.g("linkSelectionAdornmentTemplate", b,a))}},highlighteds:{get:function(){return this.Su}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.wo&&this.Xd!==a.historyIndex:this.wo},set:function(a){if(this.wo!==a){this.wo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Xd=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.cc},set:function(a){var b=this.cc;if(b!==a){this.currentTool.doCancel(); -null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&B("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Fi(this,!0);this.qe=!1;this.Kj=!0;this.Xd=-2;this.Ee=!1;var d=this.ac;this.ac=!0;rh(this.animationManager,"Model");null!==b&&(null!==this.we&&this.we.each(function(a){b.Tk(a)}),b.Tk(this.Tc));this.cc=a;this.partManager=bk(this.cc.type);for(var e=0;ethis.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{ -get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to;b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib}, -set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}}, -parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs},set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}}, -treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ti&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{ -get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz; -R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek;R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA; -R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc;R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou; -R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings; -R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.va;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk; -R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww; -R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty;R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg; -R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz;R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus; -R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; -var Fe=null,ui=new H,Pi=null,Ii=null,Ug=void 0!==x.document,Di=null,Ei="",xh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Yh=new D(R,"DocumentScroll",1),$h=new D(R,"InfiniteScroll",2),ti=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, -"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.53",Gk="image",Nk=null,qi=!1; -function ri(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; -Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=xh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; -R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Yh;R.InfiniteScroll=$h;R.TreeParentCollapsed=ti;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Bi(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} +Vh(this.animationManager,b,this.la);this.Sb||null===this.ya&&!this.sm.o()||(this.Sb=!0,a=this.scale,$i(this,this.Rn,this.va/a,this.ua/a,this.Dj,!1),this.Sb=!1);if(!this.Sb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Aa,!1)}J.free(b)}},initialPosition:{get:function(){return this.es},set:function(a){this.es.w(a)||(this.es=a.H())}},initialScale:{get:function(){return this.fs},set:function(a){this.fs!==a&&(this.fs=a)}},grid:{ +get:function(){null===this.Ib&&Si(this);return this.Ib},set:function(a){var b=this.Ib;if(b!==a){null===b&&(Si(this),b=this.Ib);a.type!==X.Grid&&B("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.Ib=a;a.name="GRID";null!==c&&c.add(a);qj(this);this.M();this.g("grid",b,a)}}},viewportBounds:{get:function(){var a=this.Rx,b=this.la,c=this.Aa;a.h(b.x,b.y,Math.max(this.va,0)/c,Math.max(this.ua,0)/c);return a}},viewSize:{ +get:function(){return this.sm},set:function(a){var b=this.viewSize;b.w(a)||(this.sm=a=a.H(),this.ua=this.va=0,a.o()?(this.va=a.width,this.ua=a.height):null!==this.Da&&(this.va=this.Da.clientWidth||1,this.ua=this.Da.clientHeight||1),this.Na(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{get:function(){return this.Zr},set:function(a){var b=this.Zr;b.w(a)||(-Infinity!==a.width&&Infinity!==a.height&&-Infinity!==a.height||B("fixedBounds width/height must not be Infinity"), +this.Zr=a=a.H(),this.Na(),this.g("fixedBounds",b,a))}},scrollMargin:{get:function(){return this.Si},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.Si;b.w(a)||(this.Si=a=a.H(),this.g("scrollMargin",b,a),this.Yq())}},scrollMode:{get:function(){return this.Ti},set:function(a){var b=this.Ti;b!==a&&(this.Ti=a,a===Zh&&Yi(this,!1),this.g("scrollMode",b,a),this.M())}},scrollsPageOnFocus:{get:function(){return this.at}, +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{get:function(){return this.Ns},set:function(a){var b=this.Ns;b!==a&&(this.Ns=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{get:function(){return this.Us},set:function(a){var b=this.Us;b!==a&&(this.Us=a,Yj(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{ +get:function(){return this.Rn}},isVirtualized:{get:function(){return this.rs},set:function(a){var b=this.rs;b!==a&&(this.rs=a,this.g("isVirtualized",b,a))}},scale:{get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&Yj(this,b,a)}},defaultScale:{get:function(){return this.Qn},set:function(a){this.Qn=a}},autoScale:{get:function(){return this.Og},set:function(a){var b= +this.Og;b!==a&&(this.Og=a,this.g("autoScale",b,a),a!==Kh&&Yi(this,!1))}},initialAutoScale:{get:function(){return this.Yf},set:function(a){var b=this.Yf;b!==a&&(this.Yf=a,this.g("initialAutoScale",b,a))}},initialViewportSpot:{get:function(){return this.gs},set:function(a){var b=this.gs;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.gs=a,this.g("initialViewportSpot",b,a))}},initialDocumentSpot:{ +get:function(){return this.ds},set:function(a){var b=this.ds;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.ds=a,this.g("initialDocumentSpot",b,a))}},minScale:{get:function(){return this.xs},set:function(a){var b=this.xs;b!==a&&(0this.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to; +b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{ +get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs}, +set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}},treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ui&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{ +get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}}); +na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz;R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek; +R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA;R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc; +R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou;R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw; +R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.xa; +R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk;R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um; +R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww;R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty; +R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg;R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz; +R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; +var Fe=null,vi=new H,Qi=null,Pi=null,Ug=void 0!==x.document,Ei=null,Fi="",Kh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Zh=new D(R,"DocumentScroll",1),ai=new D(R,"InfiniteScroll",2),ui=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, +"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.54",Gk="image",Nk=null,ri=!1; +function si(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; +Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; +R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Zh;R.InfiniteScroll=ai;R.TreeParentCollapsed=ui;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Ci(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} function zj(a,b){b.Gb.setTransform(b.Tb,0,0,b.Tb,0,0);if(null===a.Ve)a:{b="f";var c=x[Qa("76a715b2f73f148a")][Qa("72ba13b5")];a.Ve=!0;if(Ug){var d=R[Qa("76a115b6ed251eaf4692")];if(d)for(var e=Lk.iterator;e.next();){d=e.value;d=Qa(d).split(Qa("39e9"));if(6>d.length)break;var f=Qa(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Qa(ra[Qa("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Qa("76ad18b4f73e")];for(g=c[Qa("73a612b6fb191d")](Qa("35e7"))+2;gf&&Qa(d[2])!==Qa("7da71ca0ad381e90")&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=c[Qa("73a612b6fb191d")](Qa("7baa19a6f76c1988428554")));a.Ve=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Qa("79a417a0f0181a8946")]=d;if(x.document[Qa("78a712aa")]){if(x.document[Qa("78a712aa")][Qa("7bb806b6ed32388c4a875b")](g),h=x.getComputedStyle(g).getPropertyValue(Qa("78a704b7e62456904c9b12701b6532a8")),x.document[Qa("78a712aa")][Qa("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.Ve=!1;break}else if(Ra||Sa||Ta||Ua)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.xd++:a.xd=1;c.clickCount=a.xd;a.Sj=b.timeStamp;a.Go.Ig(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():nj(c,b)}};a.Pk= function(b){if(a.isEnabled){a.Zf=!0;var c=a.bk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=mj(a,b,b,null!==c[1]),c.targetDiagram=jj(b),a.doMouseMove(),nj(c,b))}};a.Rk=function(b){if(a.isEnabled){a.Zf=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ls;if(c&&a.hk)delete d[b.pointerId],b.preventDefault();else if(d=a.bk,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]= -null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&ij(e.C,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); -null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Qi(a)}}Bi.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} +null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&ij(e.B,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); +null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Ri(a)}}Ci.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} na.Object.defineProperties(cf.prototype,{point:{get:function(){return this.l},set:function(a){this.l=a}},shifted:{get:function(){return this.u},set:function(a){this.u=a}}});var Ok="DraggingInfo";cf.className="DraggingInfo";function Rj(a,b,c){this.node=a;this.info=b;this.$v=c}Rj.className="DraggingNodeInfoPair";function We(){this.reset()} We.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new M(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};We.className="DraggingOptions";function Qk(a){1 b.updateDelay?b.M():b.u||(b.u=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Od=function(){null!==b.observed&&Vk(b)};this.autoScale=cj;this.Sb=!1}ma(Tk,R);Tk.prototype.computePixelRatio=function(){return 1}; -Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.wa,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.wa=this.fm,this.Gb=this.wa.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.wa.width,this.wa.height),Wk(this)}finally{this.wa=a,this.Gb=b}}}R.prototype.redraw.call(this)}; -Tk.prototype.mc=function(){null===this.Fa&&B("No div specified");null===this.wa&&B("No canvas specified");if(!(this.wa instanceof Ej)&&(li(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.wa;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.ya,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.ya=this.fm,this.Gb=this.ya.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.ya.width,this.ya.height),Wk(this)}finally{this.ya=a,this.Gb=b}}}R.prototype.redraw.call(this)}; +Tk.prototype.mc=function(){null===this.Da&&B("No div specified");null===this.ya&&B("No canvas specified");if(!(this.ya instanceof Ej)&&(mi(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.ya;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Tb,this.Tb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ma.j;for(var c=b.length,d=0;da&&(a=0);this.eb!==a&&(this.eb=a)}}});Tk.className="Overview";function Uk(){Ve.call(this);this.l=null}ma(Uk,Ve); Uk.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===xh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Xk.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ei=null,Fi="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Em()&&(d=c.sk,c.sk=this.copiesParentKey),c.Ck()&&(e=c.rk,c.rk=this.copiesGroupKey),f=b.tk(a,null,!0)}finally{c.Em()&&(c.sk=d),c.Ck()&&(c.rk=e),c=new E,c.addAll(f),Ei=c,Fi=b.model.dataFormat}}b.R("ClipboardChanged",c)}; +Xk.prototype.pasteFromClipboard=function(){var a=new G,b=Ei;if(null===b)return a;var c=this.diagram;if(Fi!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Em()&&(e=d.sk,d.sk=this.copiesParentKey),d.Ck()&&(f=d.rk,d.rk=this.copiesGroupKey),g=c.tk(b,c,!1)}finally{for(d.Em()&&(d.sk=e),d.Ck()&&(d.rk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +Xk.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.R("ChangingSelection",b.selection);b.xa("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Xk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;rh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Bv&&!isNaN(this.bv)&&a.documentBounds.w(this.Av)?(a.scale=this.bv,a.position=this.yx,this.Bv=NaN,this.Av=ic):(this.bv=d,this.yx=c.copy(),a.zoomToFit(),this.Bv=a.scale,this.Av=a.documentBounds.copy());th(b)};Xk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Xk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Ta();if(null===a){try{null!==this.rg&&(this.rg.next()?a=this.rg.value:this.rg=null)}catch(k){this.rg=null}null===a&&(0c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case bl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case cl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.s()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; -function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.s()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} +this.us>a.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.o()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; +function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.o()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} t.Im=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||tl(c,!0),this.M(),Vb(a,b)||(c.Oh(),this.mp(c)))};t.mp=function(a){null!==this.portId&&(tl(a,!0),a instanceof W&&ul(a,this))}; t.mc=function(a,b){if(this.visible){var c=this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn),d=this.xb;if(c||0!==d.width&&0!==d.height&&!isNaN(d.x)&&!isNaN(d.y)){var e=this.opacity;if(0!==e){var f=1;1!==e&&(f=a.globalAlpha,a.globalAlpha=f*e);if(!this.ly(a,b))if(c)vl(this,a,b);else{this instanceof S&&this.Gk(!1);c=this.transform;var g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=this.part,k=!1,l=0;if(h&&b.Ke("drawShadows")&&(k=h.isShadowed)){var m=h.shadowOffset;l=Math.max(m.y, m.x)*b.scale*b.Tb}if(!(m=b.yi||!this.Ff())){var n=this.naturalBounds;m=this.Zh;var p=m.m11,r=m.m21,q=m.dx,u=m.m12,w=m.m22,v=m.dy,y,z=y=0;m=y*p+z*r+q;var A=y*u+z*w+v;y=n.width+l;z=0;var C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);var F=Math.min(A,y);var Q=Math.max(m+0,C)-z;var K=Math.max(A+0,y)-F;m=z;A=F;y=n.width+l;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y);Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;y=0;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y); Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;l=b.viewportBounds;n=l.x;p=l.y;m=!(m>l.width+n||n>Q+m||A>l.height+p||p>K+A)}if(m){m=0!==(this.F&256);a.clipInsteadOfFill&&(m=!1);this instanceof Wg&&(a.font=this.font);if(m){A=g.he()?g.naturalBounds:g.actualBounds;null!==this.Za?(n=this.Za,Q=n.x,K=n.y,l=n.width,n=n.height):(Q=Math.max(d.x,A.x),K=Math.max(d.y,A.y),l=Math.min(d.right,A.right)-Q,n=Math.min(d.bottom,A.bottom)-K);if(Q>d.width+d.x||d.x>A.width+A.x){1!==e&&(a.globalAlpha=f);return}a.save(); -a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(ni(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, -c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),ni(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== +a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(oi(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, +c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),oi(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== this.ec||null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)?(Bl(this,!0),null===this.shadowVisible&&yl(a)):Bl(this,!1);this.ej(a,b);k&&0!==(this.F&512)===!0&&xl(a);this.Ff()&&k&&yl(a);m?(a.restore(),this instanceof X?a.uc(!0):a.uc(!1)):c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha=f)}}}};t.ly=function(){return!1}; -function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(ni(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(ni(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; -function ni(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(oi(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(oi(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; +function oi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===Fl)m=b.createLinearGradient(n,p,r,q);else if(c.type===Al)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===El)try{m=b.createPattern(c.pattern,"repeat")}catch(y){m=null}if(c.type!==El&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ke=m,null!==m&&(c.gl=h,c.Au=k),null=== m&&c.type===El&&-1!==c.gl)){c.gl=-1;var v=a.diagram;null!==v&&-1===c.gl&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Gg=function(a){if(a instanceof X)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Gf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Gf():!0};t.Hg=function(){for(var a=this instanceof X?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.s()||!a.qc.s()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} +function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.o()||!a.qc.o()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} function ol(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.Yb){var g=zc;a.Ff()&&a.locationSpot.kb()&&(g=a.locationSpot);var h=J.alloc();if(a instanceof V&&a.locationObject!==a)for(c=a.locationObject,d=c.naturalBounds,h.Uk(d.x,d.y,d.width,d.height,g),c.cg.ta(h),h.offset(-c.measuredBounds.x,-c.measuredBounds.y),g=c.panel;null!==g&&g!==a;)g.cg.ta(h),h.offset(-g.measuredBounds.x,-g.measuredBounds.y),g=g.panel;else h.Uk(c,d,e,f,g);b.rotate(a.Yb,h.x,h.y);J.free(h)}} -t.o=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.o()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.o():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; +t.s=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.s()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.s():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; function ql(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===X.Table)return Jl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===X.Auto&&d.tb()===a)return Kl(a,td,b);if(c===al){if(null!==d){if(d.type===X.Spot&&d.tb()===a)return Kl(a,td,b);c=d.defaultStretch;return c===al?Kl(a,zg,b):Kl(a,c,b)}return Kl(a,zg,b)}return Kl(a,c,b)} function Jl(a,b,c,d){var e=a.stretch;if(e!==al)return Kl(a,e,d);var f=e=null;switch(b.stretch){case cl:f=!0;break;case td:f=!0}switch(c.stretch){case bl:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===bl||b===td);null===f&&(f=b===cl||b===td);return!0===e&&!0===f?Kl(a,td,d):!0===e?Kl(a,bl,d):!0===f?Kl(a,cl,d):Kl(a,zg,d)} -function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.s())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} +function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.o())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} function Gl(a,b){a.F=b?a.F|2048:a.F&-2049}function Hl(a,b){a.F=b?a.F|4096:a.F&-4097}function uj(a){return 0!==(a.F&8192)}function pj(a,b){a.F=b?a.F|8192:a.F&-8193}function vj(a){return 0!==(a.F&16384)}function rl(a,b){a.F=b?a.F|16384:a.F&-16385}t.sj=function(a){this.og=a};t.lu=function(){};t.Ew=function(a){this.la.assign(a);Il(this);return!0};t.er=function(a,b){if(this.la.x!==a||this.la.y!==b)this.la.h(a,b),this.Fl()}; function Ml(a){var b=a.part;if(b instanceof W&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ul(b,a)}}function Nl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof X?a instanceof W?a.sd():a.an(a,function(a){Ml(a)}):Ml(a))}t.bind=function(a){a.pd=this;var b=this.ij();null!==b&&Ol(b)&&B("Cannot add a Binding to a template that has already been copied: "+a);null===this.fb&&(this.fb=new E);this.fb.add(a)}; t.ij=function(){for(var a=this instanceof X?this:this.panel;null!==a;){if(null!==a.li)return a;a=a.panel}return null};t.Fw=function(a){Bj(this,a)};t.Qw=function(a){a.pd=this;null===this.Mg&&(this.Mg=new H);this.Mg.add(a.propertyName,a)}; function Pl(a,b){for(var c=1;ce)&&B("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow= !0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&B("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new $a;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Bj(a,e)}else Bj(a,b);else B('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ul(a,b){Ql.add(a,b)} function Vl(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} na.Object.defineProperties(Y.prototype,{shadowVisible:{get:function(){return this.em},set:function(a){var b=this.em;b!==a&&(this.em=a,this.M(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.N?this.N.Wn:null},set:function(a){hl(this);var b=this.N.Wn;b!==a&&(this.N.Wn=a,this.g("enabledChanged",b,a))}},segmentOrientation:{get:function(){return this.cm},set:function(a){var b=this.cm; -b!==a&&(this.cm=a,this.o(),this.g("segmentOrientation",b,a),a===ag&&(this.angle=0))}},segmentIndex:{get:function(){return this.Qp},set:function(a){a=Math.round(a);var b=this.Qp;b!==a&&(this.Qp=a,this.o(),this.g("segmentIndex",b,a))}},segmentFraction:{get:function(){return this.am},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.o(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.o(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= -d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& -(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= -0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.o(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.o(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ -get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.o(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& -B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.o(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, -this.o(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.o(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.o(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= -this.aq;b!==a&&(this.aq=a,this.o(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.o(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= +get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&(0>=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.s(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.s(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= +d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& +(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= +0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.s(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.s(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ +get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.s(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& +B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.s(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, +this.s(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.s(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.s(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= +this.aq;b!==a&&(this.aq=a,this.s(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.s(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= !0,Yl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.O?this.O.Ch:sc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),Ml(this))}},toEndSegmentLength:{get:function(){return null!==this.O?this.O.Ah:10},set:function(a){this.Kc();var b=this.O.Ah;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.O.Ah=a,this.g("toEndSegmentLength",b,a),Ml(this))}},toShortLength:{ get:function(){return null!==this.O?this.O.Bh:0},set:function(a){this.Kc();var b=this.O.Bh;b!==a&&(this.O.Bh=a,this.g("toShortLength",b,a),Ml(this))}},toLinkable:{get:function(){return null!==this.O?this.O.kq:null},set:function(a){this.Kc();var b=this.O.kq;b!==a&&(this.O.kq=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.O?this.O.lq:Infinity},set:function(a){this.Kc();var b=this.O.lq;b!==a&&(0>a&& wa(a,">= 0",Y,"toMaxLinks"),this.O.lq=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.O?this.O.bh:sc},set:function(a){this.Kc();var b=this.O.bh;b.w(a)||(a=a.H(),this.O.bh=a,this.g("fromSpot",b,a),Ml(this))}},fromEndSegmentLength:{get:function(){return null!==this.O?this.O.$g:10},set:function(a){this.Kc();var b=this.O.$g;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength", @@ -981,14 +981,14 @@ b.mouseLeave=function(a,b){b.Hg()&&b instanceof X&&(a=b.bb("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed&&0===b.button){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.bb("ButtonBorder"),b instanceof Kf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Hi("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; +Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Ii("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});Ul("ToolTip",function(){return Pl(Je,X.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Pl(Kf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new O(0,0,4,6),spot2:new O(1,1,-4,-4)}))}); -Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Hi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Hi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); -a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.va("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); -Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Hi("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.va("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ii("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Ii("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); +a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.xa("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); +Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Ii("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.xa("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.Xa("checkbox")}}};return a}); Ul("CheckBox",function(a){a=Vl(a);a=Pl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new kc(0,1,0,0)});var b=Pl(X,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=zg=new D(Y,"None",0);Y.Default=al=new D(Y,"Default",0);Y.Vertical=cl=new D(Y,"Vertical",4);Y.Horizontal=bl=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=Bg=new D(Y,"Uniform",1); @@ -1026,12 +1026,12 @@ function yl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function xl(a) R.prototype.$t=function(a){var b=new Ej(this,x.document);void 0===a&&(a=new $a);var c=this;return Ek(this,function(a,e){a=Fk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.$t;R.prototype.iw=function(a){return this.$t(a)};R.prototype.makeSVG=R.prototype.iw; Y.prototype.ly=function(a,b){if(!(a instanceof am))return!1;if(!this.visible)return!0;var c=null,d=a.Wt;if(this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn))return vl(this,a,b),!0;var e=this.xb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=0!==(this.F&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof Wg&&(a.font=this.font);if(h){k=g.he()?g.naturalBounds:g.actualBounds;if(null!==this.Za){var l= this.Za;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;bm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Ff()&&!this.isVisible())return!0;a.He.Oa=[1,0,0,1,0,0];(this instanceof Wg&&1a)&&wa(a,"0 <= loc <= 1",zl,"addColorStop:loc");null===this.je&&(this.je=new H);this.je.add(a,b);this.qa===Cl&&(this.type=Fl);this.ke=null;return this}; -t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(b,c)} -t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(-b,c)} -function mm(a,b,c){ai(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;ai(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} +t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(b,c)} +t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(-b,c)} +function mm(a,b,c){bi(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;bi(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} t.Fy=function(){if(this.type===Cl)return om(this.color);if((this.type===Fl||this.type===Al)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Al)return om(a.first().value);if(null!==a.get(.5))return om(a.get(.5));if(2===a.count)return a=a.ma(),om(mm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return om(mm(a.get(c),a.get(d),1-f/e))}return!1}; -function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();ai(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} +function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();bi(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} function jm(a,b){switch(b){case im:b=100*pm(nm.l);var c=100*pm(nm.I),d=100*pm(nm.u);qm.l=.4124564*b+.3575761*c+.1804375*d;qm.I=.2126729*b+.7151522*c+.072175*d;qm.u=.0193339*b+.119192*c+.9503041*d;qm.T=nm.T;b=rm(qm.l/sm[0]);c=rm(qm.I/sm[1]);d=rm(qm.u/sm[2]);tm.l=116*c-16;tm.I=500*(b-c);tm.u=200*(c-d);tm.T=qm.T;tm.l=Math.min(100,Math.max(0,tm.l+100*a));a=(tm.l+16)/116;b=a-tm.u/200;qm.l=sm[0]*um(tm.I/500+a);qm.I=sm[1]*(tm.l>vm*wm?Math.pow(a,3):tm.l/vm);qm.u=sm[2]*um(b);qm.T=tm.T;a=-.969266*qm.l+1.8760108* -qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return bi(),ci.u=Math.min(100,Math.max(0,ci.u+100*a)),"hsla("+ci.l+", "+ci.I+"%, "+ci.u+"%, "+ -ci.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ai(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} -function bi(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ci.l=Math.round(g);ci.I=Math.round(100*a);ci.u=Math.round(100*e);ci.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return ci(),di.u=Math.min(100,Math.max(0,di.u+100*a)),"hsla("+di.l+", "+di.I+"%, "+di.u+"%, "+ +di.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function bi(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} +function ci(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}di.l=Math.round(g);di.I=Math.round(100*a);di.u=Math.round(100*e);di.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function rm(a){return a>wm?Math.pow(a,1/3):(vm*a+16)/116}function um(a){var b=a*a*a;return b>wm?b:(116*a-16)/vm}function Wl(a,b){"string"!==typeof a&&(a instanceof zl||B("Value for "+b+" must be a color string or a Brush, not "+a))}function hm(){zm=Ug?(new Hk(null)).context:null} na.Object.defineProperties(zl.prototype,{type:{get:function(){return this.qa},set:function(a){this.v&&va(this,a);this.qa=a;this.start.nc()&&(a===Fl?this.start=uc:a===Al&&(this.start=zc));this.end.nc()&&(a===Fl?this.end=Cc:a===Al&&(this.end=zc));this.ke=null}},color:{get:function(){return this.fl},set:function(a){this.v&&va(this,a);this.fl=a;this.ke=null}},start:{get:function(){return this.Dd},set:function(a){this.v&& va(this,a);this.Dd=a.H();this.ke=null}},end:{get:function(){return this.sl},set:function(a){this.v&&va(this,a);this.sl=a.H();this.ke=null}},startRadius:{get:function(){return this.jt},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"startRadius");this.jt=a;this.ke=null}},endRadius:{get:function(){return this.Vr},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"endRadius");this.Vr=a;this.ke= null}},colorStops:{get:function(){return this.je},set:function(a){this.v&&va(this,a);this.je=a;this.ke=null}},pattern:{get:function(){return this.Ks},set:function(a){this.v&&va(this,a);this.Ks=a;this.ke=null}}});zl.prototype.isDark=zl.prototype.Fy;zl.prototype.darkenBy=zl.prototype.Iz;zl.prototype.lightenBy=zl.prototype.FA;zl.prototype.addColorStop=zl.prototype.addColorStop; -var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,ci=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); +var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,di=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); zl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; zl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;gm||(hm(),gm=!0);var b=zm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};zl.lighten=function(a){return km(a)};zl.lightenBy=km;zl.darken=function(a){return lm(a)};zl.darkenBy=lm;zl.mix=mm;zl.isDark=om;function Tl(){this.oa="Base"}Tl.prototype.measure=function(){}; Tl.prototype.IA=function(a,b,c,d,e){a.measure(b,c,d,e)};Tl.prototype.arrange=function(){};Tl.prototype.wz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Tl.prototype.RA=function(a){a.Bk()};Tl.prototype.mc=function(){};na.Object.defineProperties(Tl.prototype,{name:{get:function(){return this.oa},set:function(a){this.oa=a}},classType:{get:function(){return X}}});Tl.prototype.remeasureObject=Tl.prototype.RA;Tl.prototype.arrangeElement=Tl.prototype.wz; @@ -1114,9 +1114,9 @@ Nm.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.W.j,u=q.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(C))}}}}q= -a.W.j;u=q.length;for(w=0;we*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)v.measure(Infinity,Infinity,0,0),y=v.measuredBounds,b.Rc(y),a.l.push(y);else{var z=v.segmentIndex,A=v.segmentFraction,C=v.alignmentFocus;C.nc()&&(C=zc);var F=v.segmentOrientation,Q=v.segmentOffset;if(isNaN(z)){var K=k.na;y=Ea();K.Yv(A,y);var T=J.allocAt(y[0],y[1]);T.add(k.i(0));K.type=== ud?T.offset(-K.startX,-K.startY):(K=K.figures.first(),T.offset(-K.startX,-K.startY));K=y[2];if(F!==ag){var P=k.computeAngle(v,F,K);v.Yb=P}P=T.x-m.x;var I=T.y-m.y;J.free(T);Ia(y)}else if(z<-f||z>=f)I=k.midPoint,K=k.midAngle,F!==ag&&(P=k.computeAngle(v,F,K),v.Yb=P),P=I.x-m.x,I=I.y-m.y;else{P=0;0<=z?(I=n.J(z),y=zja+10?0<=z?K.Pa(I): @@ -1151,17 +1151,17 @@ X.prototype.copy=function(){var a=Y.prototype.copy.call(this);if(null!==a){for(v t.mp=function(a){Y.prototype.mp.call(this,a);for(var b=this.W.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){ni(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function dn(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){oi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ib;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Dt()}}}} -function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,ni(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,oi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function Zj(a){return"LineV"===a||"BarV"===a} t.zk=function(a,b,c,d,e){var f=this.he(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,L.Cf(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=L.Cf(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.W.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.qa===X.Spot;u&&(q=J.alloc(),p=this.tb(),(l=p.zk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var w=0;wd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; -t.o=function(a){if(!uj(this)){Y.prototype.o.call(this,a);a=null;if(this.qa===X.Auto||this.qa===X.Link)a=this.tb();for(var b=this.W.j,c=b.length,d=0;dc||f>d)this.o(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.o(!0);this.measure(c+h,d+g,0,0);break;case bl:this.o(!0);this.measure(c+h,f+g,0,0);break;case cl:this.o(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; +t.Ih=function(a,b,c,d){var e=this.W.j;this.actualBounds.h(a,b,c,d);if(0!==e.length){if(!this.desiredSize.o()){a=ql(this,!0);var f=this.measuredBounds;b=f.width;f=f.height;var g=this.jh,h=g.left+g.right;g=g.top+g.bottom;b===c&&f===d&&(a=zg);switch(a){case zg:if(b>c||f>d)this.s(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.s(!0);this.measure(c+h,d+g,0,0);break;case bl:this.s(!0);this.measure(c+h,f+g,0,0);break;case cl:this.s(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; t.Kh=function(a){var b=this.naturalBounds,c=Bm(this);if(cc(0,0,b.width,b.height,a.x,a.y)){b=this.W.j;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(wb(e.set(a),f.transform),f.$(e))return J.free(e),!0}J.free(e);return null===this.mb&&null===this.ec?!1:!0}return!1};t.Gt=function(a){if(this.dl===a)return this;for(var b=this.W.j,c=b.length,d=0;d=e.count&&a>=e.count)return; -e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.o();b.o(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, +e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.s();b.s(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, "elements",this,null,b,null,a),this.Hg()||mn(this,b,!1)))};function nn(a,b){a.F=b?a.F|16777216:a.F&-16777217}t.remove=function(a){for(var b=this.W.j,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",X,"getRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!0;c.index=a;b[a]=c;this.Va(ze,"rowdefs",this,null,c,null,a)}return b[a]}; -X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.o()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.s()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} X.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",X,"getColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!1;c.index=a;b[a]=c;this.Va(ze,"coldefs",this,null,c,null,a)}return b[a]};t=X.prototype; -t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.o()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.s()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} t.aA=function(a){if(0>a||this.type!==X.Table)return-1;for(var b=0,c=this.qb,d=c.length,e=this.Xi;ea||this.type!==X.Table)return-1;for(var b=0,c=this.nb,d=c.length,e=this.Gi;ea;)this.Lc(this.W.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Hi("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), +function qn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Ii("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), d.ob=b,un(a,e,c),d.ob=null,d.data=b)}}function un(a,b,c){for(a=a.W;ba&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.o(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.o(),this.g("defaultAlignment", -b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.o(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.o(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== -this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.o(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ +na.Object.defineProperties(X.prototype,{type:{get:function(){return this.qa},set:function(a){var b=this.qa;b!==a&&(this.qa=a,this.qa===X.Grid?this.isAtomic=!0:this.qa===X.Table&&an(this),this.s(),this.g("type",b,a))}},elements:{get:function(){return this.W.iterator}},naturalBounds:{get:function(){return this.rc}},padding:{get:function(){return this.ib},set:function(a){"number"=== +typeof a?(0>a&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.s(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.s(),this.g("defaultAlignment", +b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.s(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.s(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== +this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.s(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ get:function(){return void 0===this.ri?null:this.ri},set:function(a){if(void 0!==this.ri){var b=this.ri;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.o(), -this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.o(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; -null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Da()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ +a,this.s(),this.g("rowSizing",b,a))}}},columnSizing:{get:function(){return void 0===this.Cj?bn:this.Cj},set:function(a){if(void 0!==this.Cj){var b=this.Cj;b!==a&&(this.Cj=a,this.s(),this.g("columnSizing",b,a))}}},topIndex:{get:function(){return void 0===this.Xi?0:this.Xi},set:function(a){if(void 0!==this.Xi){var b=this.Xi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.s(), +this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.s(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; +null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ea()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ get:function(){return this.Ci},set:function(a){var b=this.Ci;if(b!==a||null!==a&&pn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Ci=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.eu()}}},itemTemplate:{get:function(){return null===this.te?null:this.te.G("")},set:function(a){if(null===this.te){if(null===a)return;this.te=new H}var b=this.te.G(""); b!==a&&((a instanceof V||a.isPanelMain)&&B("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.te.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.eu())}},itemTemplateMap:{get:function(){return this.te},set:function(a){var b=this.te;if(b!==a){for(var c=a.iterator;c.next(););this.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.eu()}}},itemCategoryProperty:{ get:function(){return this.Jl},set:function(a){var b=this.Jl;b!==a&&(this.Jl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.F&1048576)},set:function(a){var b=0!==(this.F&1048576);b!==a&&(this.F^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.F&2097152)},set:function(a){var b=0!==(this.F&2097152);b!==a&&(!a||this.type===X.Spot||this instanceof U||xa("Warning: Panel.isClipping set on non-Spot Panel: "+ -this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.o(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.o(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", -b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.o(),this.g("alignmentFocusName",b,a))}}}); +this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.s(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.s(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", +b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.s(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(X,{Position:{get:function(){return Sl.G("Position")}},Horizontal:{get:function(){return Sl.G("Horizontal")}},Vertical:{get:function(){return Sl.G("Vertical")}},Spot:{get:function(){return Sl.G("Spot")}},Auto:{get:function(){return Sl.G("Auto")}},Table:{get:function(){return Sl.G("Table")}},Viewbox:{ get:function(){return Sl.G("Viewbox")}},TableRow:{get:function(){return Sl.G("TableRow")}},TableColumn:{get:function(){return Sl.G("TableColumn")}},Link:{get:function(){return Sl.G("Link")}},Grid:{get:function(){return Sl.G("Grid")}},Graduated:{get:function(){return Sl.G("Graduated")}}});X.prototype.findItemPanelForData=X.prototype.qy; -X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Da;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; +X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Ea;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; X.prototype.insertAt=X.prototype.wb;X.prototype.elt=X.prototype.J;X.prototype.add=X.prototype.add;X.prototype.findObject=X.prototype.bb;X.prototype.findInVisualTree=X.prototype.ym;X.prototype.walkVisualTreeFrom=X.prototype.an;X.prototype.findMainElement=X.prototype.tb;var sn=!1,tn=null,Sl=new H;X.className="Panel";X.definePanelLayout=wn;wn("Position",new Am);wn("Vertical",new Dm);wn("Auto",new Fm);wn("Link",new Qm); function Vj(){Xa(this);this.og=null;this.ns=!0;this.Ra=0;this.ad=NaN;this.nh=0;this.lh=Infinity;this.yb=Vc;this.la=this.bc=this.ha=0;this.fb=null;this.Yp=xn;this.De=al;this.Up=this.sg=null;this.Vp=NaN;this.mb=this.fk=null;this.In=!1} Vj.prototype.copy=function(){var a=new Vj;a.ns=this.ns;a.Ra=this.Ra;a.ad=this.ad;a.nh=this.nh;a.lh=this.lh;a.yb=this.yb;a.ha=this.ha;a.bc=this.bc;a.la=this.la;a.De=this.De;a.Yp=this.Yp;null===this.sg?a.sg=null:a.sg=this.sg.H();a.Up=this.Up;a.Vp=this.Vp;a.fk=null;null!==this.fk&&(a.separatorDashArray=Ba(this.separatorDashArray));a.mb=this.mb;a.In=this.In;a.fb=this.fb;return a};t=Vj.prototype; @@ -1230,13 +1230,13 @@ c.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top:b.left)}; t.wc=function(){var a=0,b=this.og,c=0,d=this.isRow;if(null!==b&&b.type===X.Table)for(var e=d?b.qb.length:b.nb.length,f=0;fa&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(), -this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("minimum",b,a))}},maximum:{ -get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.o(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= -a,null!==this.panel&&this.panel.o(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.o(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), -a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(), +this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("minimum",b,a))}},maximum:{ +get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.s(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= +a,null!==this.panel&&this.panel.s(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.s(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), +a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var y=0;.1<=u;){0===y&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ia(w);return}e>q?(y=e-q,e=q):y=0;var z=Math.sqrt(e*e/(1+p*p));0>n&&(z=-z);h+=z;k+=p*z;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===y&&d.ej(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==y){v++;if(v===w.length){Ia(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=y}}Ia(w)}} -t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&ni(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(ni(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, +t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&oi(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(oi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, a.miterLimit=this.gk);e=!1;g&&b.Ke("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.Ft(h,this.vh));var k=this.na;if(null!==k){if(k.type===ud)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.vj();else if(k.type===yd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.Je(d);if(null!==c){g&& e&&yl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.vj();g&&e&&xl(a)}}else if(k.type===zd)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+L.Kg*k,h-p,l+k,h-L.Kg*p,l+k,h),a.bezierCurveTo(l+k,h+L.Kg*p,l+L.Kg*k,h+p,l,h+p),a.bezierCurveTo(l-L.Kg*k,h+p,l-k,h+L.Kg*p,l-k,h),a.bezierCurveTo(l-k,h-L.Kg*p,l-L.Kg*k,h-p,l,h-p),a.closePath(),null!==d&&a.Je(d),null!==c&& (g&&e?(yl(a),a.vj(),xl(a)):a.vj());else if(k.type===sd)for(h=k.figures,k=h.length,p=0;pe)return!1;break;case $d:var p=Ea();L.Fe(g,m,n.point1X,n.p break}n=null;for(var q=Ea(),u=0;u= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= +na.Object.defineProperties(Kf.prototype,{geometry:{get:function(){return null!==this.na?this.na:this.Ed},set:function(a){var b=this.na,c=this.Ed;if(b!==a){null!==a?this.Ed=this.na=a.freeze():this.Ed=this.na=null;var d=this.part;null!==d&&(d.kh=NaN);this.s();this.g("geometry",b||c,a);kl(this)&&(a=this.part,null!==a&&ll(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +Dd(a);var b=a.normalize();this.geometry=a;this.position=a=J.allocAt(-b.x,-b.y);J.free(a)}},isGeometryPositioned:{get:function(){return this.vo},set:function(a){var b=this.vo;b!==a&&(this.vo=a,this.s(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.tl},set:function(a){var b=this.tl;b!==a&&(null!==a&&Wl(a,"Shape.fill"),a instanceof zl&&a.freeze(),this.tl=a,this.M(),this.g("fill",b,a))}},stroke:{ +get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"Shape.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.wh},set:function(a){var b=this.wh;if(b!==a)if(0<=a){this.wh=a;this.s();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= this.km;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Kf,"strokeCap"):(this.km=a,this.M(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return this.lm},set:function(a){var b=this.lm;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"',Kf,"strokeJoin"):(this.lm=a,this.M(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return this.gk}, set:function(a){var b=this.gk;if(b!==a&&1<=a){this.gk=a;this.M();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.uh},set:function(a){var b=this.uh;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& +a.mg=b.mg,a.zg=b.zg,a.oe=null,a.mf=b.mf,a.nf=b.nf,a.ve=b.ve,a.Ei=b.Ei,a.Yd=b.Yd,a.Wd=b.Wd,a.Ud=b.Ud,a.Lj=b.Lj,a.Vd=b.Vd)}t=Wg.prototype;t.jb=function(a){a.classType===Wg?this.wrap=a:Y.prototype.jb.call(this,a)};t.toString=function(){return 22p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& (c=!1);b=this.mf;p=this.nf;switch(this.flip){case fl:a.translate(e,0);a.scale(-1,1);break;case el:a.translate(0,f);a.scale(1,-1);break;case gl:a.translate(e,f),a.scale(-1,-1)}m=this.Zc;n=(b+g+p)*m;f>n&&(d=this.aj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.me)p=this.vb,p>e&&(p=e),this.dj(this.me,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Qb&&null!==this.lb)for(n=0;ne&&(r=e);d+=b;this.dj(this.lb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case fl:a.scale(-1,1);a.translate(-e, 0);break;case el:a.scale(1,-1);a.translate(0,-f);break;case gl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.dj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Vn?Vn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Wn?Wn(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1313,35 +1313,35 @@ f+=bo;var m=Yn(f);a.vb=m;eo(a,f,m);null!==d&&d.h(m,h)}}else{k=0;0===g.length&&(k b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Yn(b),f=Math.max(f,m)),eo(a,b,n),k++,a.Zc+k>a.ve))break}a.Be=Math.min(a.ve,k);a.vb=Math.max(a.vb,f);null!==d&&d.h(a.vb,h*a.Be)}}function ho(a,b){if(a.zg===io)return b.substr(0,1);for(var c=b.length,d=0,e=jo;d=b.length?b:b.substr(0,d)}function Yn(a){return null===Qn?8*a.length:Qn.measureText(a).width} function Un(a){if(null!==a.oe)return a.oe;var b=a.ne;if(null===Qn){var c=16;return a.oe=c}void 0!==lo[b]&&5E3>mo?c=lo[b]:(c=1.3*Qn.measureText("M").width,lo[b]=c,mo++);return a.oe=c}function ao(a){if(null===Qn)return 6;if(void 0!==no[a]&&5E3>oo)var b=no[a];else b=Qn.measureText(bo).width,no[a]=b,oo++;return b} function Zn(a,b){var c=a.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.mf+a.nf;d=Math.max(0,Un(a)+d);if(0===c.length)return a.vb=0,a.Zc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Zc=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.zg!==go){a.Be=0;var k=M.alloc();fo(a,f,b,k);e+=k.height;M.free(k);a.Zc+=a.Be}else fo(a,f,b,null),e+=d,a.Zc++;a.Zc===a.ve&&(h=!0)}f=g+1}return a.us=e} -na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.o(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.o(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== -a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.s()){var a= -M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.o(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, -a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.o(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.o(),this.g("overflow",b,a))}},stroke:{ +na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.s(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.s(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== +a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.o()){var a= +M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.s(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, +a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.s(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.s(),this.g("overflow",b,a))}},stroke:{ get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"TextBlock.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Zc}},editable:{get:function(){return this.Vn},set:function(a){var b=this.Vn;b!==a&&(this.Vn=a,this.g("editable",b,a))}},textEditor:{get:function(){return this.jq},set:function(a){var b=this.jq;b!==a&& -(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.o();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, -set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.o(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); +(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.s();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, +set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.s(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); var Vn=null,Wn=null,go=new D(Wg,"None",0),co=new D(Wg,"WrapFit",1),Sn=new D(Wg,"WrapDesiredSize",2),io=new D(Wg,"WrapBreakAll",3),Rn=new D(Wg,"OverflowClip",0),$n=new D(Wg,"OverflowEllipsis",1),Tn=new D(Wg,"FormatTrim",0),ko=new D(Wg,"FormatNone",0),jo=/[ \u200b\u00ad]/,lo=new $a,mo=0,no=new $a,oo=0,bo="...",Xn="",Qn=null,Pn=!1;Wg.className="TextBlock";Wg.getEllipsis=function(){return bo};Wg.setEllipsis=function(a){bo=a;no=new $a;oo=0};Wg.getBaseline=function(){return Vn}; Wg.setBaseline=function(a){Vn=a};Wg.getUnderline=function(){return Wn};Wg.setUnderline=function(a){Wn=a};Wg.isValidFont=function(a){Pn||(Qn=Ug?(new Hk(null)).context:null,Pn=!0);if(null===Qn)return!0;var b=Qn.font;if(a===b||"10px sans-serif"===a)return!0;Qn.font="10px sans-serif";Qn.font=a;var c=Qn.font;if("10px sans-serif"!==c)return Qn.font=b,!0;Qn.font="19px serif";var d=Qn.font;Qn.font=a;c=Qn.font;Qn.font=b;return c!==d};Wg.None=go;Wg.WrapFit=co;Wg.WrapDesiredSize=Sn;Wg.WrapBreakAll=io; Wg.OverflowClip=Rn;Wg.OverflowEllipsis=$n;function po(){this.Qb=[];this.lb=[]}po.prototype.reset=function(){this.Qb=[];this.lb=[]};po.prototype.gy=function(a){this.Qb=Ba(a.Qb);this.lb=Ba(a.lb)};po.className="TextBlockMetrics";function dk(){Y.call(this);this.Zg=null;this.$p="";this.th=jc;this.yl=td;this.xh=this.ld=null;this.xl=zc;this.Td=zg;this.nm=null;this.uo=!1;this.Yr=!0;this.Ol=!1;this.gm=null}ma(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Gi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} -function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ +dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Hi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} +function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Af()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.ls&&void 0!==w&&4v*v)for(null===w.cj&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.cj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.right=c.maxSelectionCount)){this.D^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.ea();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.Lb();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.Db(),c.skipsUndoManager=d)}}}},isHighlighted:{get:function(){return 0!== (this.D&524288)},set:function(a){var b=0!==(this.D&524288);if(b!==a){this.D^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.ea(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.M();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{get:function(){return 0!==(this.D&8192)},set:function(a){var b=0!==(this.D&8192);b!==a&&(this.D^=8192,this.g("isShadowed",b,a),this.M())}},isAnimated:{get:function(){return 0!== @@ -1413,12 +1413,12 @@ get:function(){return this.Rp},set:function(a){var b=this.Rp;b!==a&&(this.Rp=a,t b!==a&&(this.Sp=a,this.g("selectionChanged",b,a))}},resizeAdornmentTemplate:{get:function(){return this.Cp},set:function(a){var b=this.Cp;b!==a&&(this.Cp=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{get:function(){return this.Ep},set:function(a){var b=this.Ep;b!==a&&(this.Ep=a,this.g("resizeObjectName",b,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.bb(a), null!==a)?a:this}},resizeCellSize:{get:function(){return this.Dp},set:function(a){var b=this.Dp;b.w(a)||(this.Dp=a=a.H(),this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{get:function(){return this.Gp},set:function(a){var b=this.Gp;b!==a&&(this.Gp=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{get:function(){return this.Hp},set:function(a){var b=this.Hp;b!==a&&(this.Hp=a,this.g("rotateObjectName", b,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.bb(a),null!==a)?a:this}},rotationSpot:{get:function(){return this.Ip},set:function(a){var b=this.Ip;b.w(a)||(this.Ip=a=a.H(),this.g("rotationSpot",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;b!==a&&(this.Ub=a,this.g("text",b,a))}},containingGroup:{get:function(){return this.mi}, -set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.B(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.B(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& -e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&oi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, +set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.C(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.C(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& +e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&pi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, containingGroupChanged:{get:function(){return this.An},set:function(a){var b=this.An;b!==a&&(this.An=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{get:function(){return null!==this.containingGroup||this instanceof W&&null!==this.labeledLink?!1:!0}},layoutConditions:{get:function(){return this.Io},set:function(a){var b=this.Io;b!==a&&(this.Io=a,this.g("layoutConditions",b,a))}},dragComputation:{ get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.g("dragComputation",b,a))}},shadowOffset:{get:function(){return this.Xp},set:function(a){var b=this.Xp;b.w(a)||(this.Xp=a=a.H(),this.M(),this.g("shadowOffset",b,a))}},shadowColor:{get:function(){return this.Wp},set:function(a){var b=this.Wp;b!==a&&(this.Wp=a,this.M(),this.g("shadowColor",b,a))}},shadowBlur:{get:function(){return this.ug}, -set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.B;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; -V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Da;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; +set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.C;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; +V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Ea;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; function Je(a){V.call(this,a);this.D&=-257;this.ih="Adornment";this.ie=null;this.Ex=0;this.Sx=!1;this.l=a instanceof Qm?[]:Ro;this.Sa=null}ma(Je,V);Je.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Je.prototype.updateRelationshipsFromData=function(){}; Je.prototype.Gk=function(a){var b=this.adornedObject.part;if(b instanceof S&&this.adornedObject instanceof Kf){var c=b.path;b.Gk(a);a=c.geometry;b=this.W.j;c=b.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}}; +W.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}}; function dp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Fq():a.Hd();k.next();){var l=k.value;l.isTreeLink&&(h||l.ud||l.Ua(),l=l.Kq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ob(!0),l.Oh(),g&&e.lk(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.o())}}});xg.className="Placeholder"; +a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.s())}}});xg.className="Placeholder"; function S(){V.call(this,X.Link);this.Ga=8;this.We=null;this.Xe="";this.rf=this.fo=null;this.sf="";this.mq=null;this.Yk=ag;this.Hn=0;this.Jn=ag;this.Kn=NaN;this.ck=ip;this.Zp=.5;this.nd=null;this.Ab=(new E).freeze();this.jf=this.ph=null;this.Yl=new N;this.na=new rd;this.I=this.u=this.Mf=this.Vf=null;this.l=[];this.vv=new J;this.$r=this.Nx=this.Mx=null;this.Ru=NaN;this.O=null}ma(S,V); S.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.Ga=this.Ga&-113;a.Xe=this.Xe;a.fo=this.fo;a.sf=this.sf;a.mq=this.mq;a.Yk=this.Yk;a.Hn=this.Hn;a.Jn=this.Jn;a.Kn=this.Kn;a.ck=this.ck;a.Zp=this.Zp;null!==this.O&&(a.O=this.O.copy())};t=S.prototype;t.yf=function(a){V.prototype.yf.call(this,a);this.Xe=a.Xe;this.sf=a.sf;a.ph=null;a.Ua();a.Mf=this.Mf;var b=a.fromPort;null!==b&&Vo(b);a=a.toPort;null!==a&&Vo(a)}; t.jb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===dg||a===$f||a===Zf?this.curve=a:a===jp||a===kp||a===lp?this.adjusting=a:a!==ip&&a!==ag&&B("Unknown Link enum value for a Link property: "+a):V.prototype.jb.call(this,a)};t.Kc=function(){null===this.O&&(this.O=new jl)};t.rj=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(vj(a)||wj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),vj(a)||wj(a))?!1:!0};t.Ew=function(){return!1}; t.lu=function(){};t.Nc=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case ag:a=0;break;case Zm:a=b;break;case Sm:a=b+90;break;case Um:a=b-90;break;case mp:a=b+180;break;case $m:a=L.Tq(b);90a&&(a-=180);break;case Tm:a=L.Tq(b+90);90a&&(a-=180);break;case Vm:a=L.Tq(b-90);90a&&(a-=180);break;case Wm:a=L.Tq(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Tq(a)}; function Qo(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.oy(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.mi;if(c!==b){null!==c&&Lo(c,a);a.mi=b;null!==b&&Ko(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.Z,g.Z=!0);e(a,c,b);null!==g&&(g.Z=f)}!a.ud||a.Mx!==c&&a.Nx!==c||a.Ua()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.o()} +t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.s()} t.Mq=function(a){V.prototype.Mq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Xo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Xo(c,this,d)}op(this)}};t.Nq=function(a){V.prototype.Nq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Yo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Yo(c,this,d)}pp(this)}}; t.uk=function(){this.ud=!0;if(null!==this.nd){var a=this.diagram;if(null!==a)for(var b=this.nd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};S.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; S.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?V.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),V.prototype.move.call(this,a,!1),J.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; @@ -1507,13 +1507,13 @@ f=this.i(c+2);c=this.i(c+3);L.yz(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assig S.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Pa(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===dg))return this.na.vy(.5);if(this.computeCurve()===dg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.xz(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Pa(d)};t=S.prototype;t.i=function(a){return this.Ab.j[a]};t.Qc=function(a,b){this.Ab.Pc(a,b)};t.L=function(a,b,c){this.Ab.Pc(a,new J(b,c))};t.wA=function(a,b){this.Ab.wb(a,b)}; t.m=function(a,b,c){this.Ab.wb(a,new J(b,c))};t.ce=function(a){this.Ab.add(a)};t.vf=function(a,b){this.Ab.add(new J(a,b))};t.uw=function(a){this.Ab.cb(a)};t.pk=function(){this.Ab.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.o():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.s():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& (a.defaultToPoint=a.i(a.pointsCount-1)));null!==g&&g.animationManager.sc&&(b=g.animationManager,a.jf=e,b.$l.add(a));a.g("points",f,e)}}t.Th=function(){null===this.ph&&(this.ph=this.Ab,this.Ab=this.Ab.copy())}; t.xf=function(){if(null!==this.ph){for(var a=this.ph,b=this.Ab,c=Infinity,d=Infinity,e=a.j,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,y=q;L.A(k,0)?y=0k?-1:1)*n+r,y=m*(v-r)+q);this.pk();this.ce(f);this.vf(u,w);this.vf(v,y);this.ce(p);this.Qc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Qc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.A(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ce(d),this.vf(f,h),this.ce(e);else{this.ce(d);this.ce(e);h=N.alloc();b.mj(h);k=h.$(e);p.mj(h);l=h.$(d);if(k||l)g=b.da(vp(g),new J),this.Qc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.da(vp(c),new J),this.Qc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));N.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.pk();var z=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r=this.getLinkDirection(a, @@ -1541,7 +1541,7 @@ S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this l=k/l;m=p-m;this.Qc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.L(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Qc(c,d)}}return!0;case lp:f=this.i(a);n=this.i(c);if(!f.Qa(b)||!n.Qa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Qc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.s()&&k.s()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.$(a)||h.$(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left, @@ -1560,7 +1560,7 @@ S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurvine function Sj(a){if(null===a.diagram||!a.isAvoiding||!uk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=vk(a.diagram,!0,a.containingGroup,null);for(var d=1;dIp&&Fp(b,m,n)!==l-1&&(Fp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Fp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Fp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Fp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Ip&&Fp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Ip)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ k)*k+k/2;l>Ip&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Fp(b,g,m)===l-1?Hp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Fp(b,g,m)===l-1&&Hp(a,b,g,m,f,!1,f)));a.vf(c,d)}S.prototype.Sz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=xb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=ud,this.$m=!0,a;var c=!1,d=this.diagram;null!==d&&np(this)&&d.Vg.contains(this)&&(0!==this.Yl.width||0!==this.Yl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ab.j;var g=this.computeCurve();if(g===dg&&3<=b&&!L.aa(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(g.x=v-z,g.y=r-z,b.x=v+u,b.y= @@ -1574,19 +1574,19 @@ function Kp(a,b,c,d){for(var e=a.pointsCount,f=b;L.aa(b.x,f.x)&&L.aa(b.y,f.y);){ function Mp(a,b,c,d,e,f,g){if(!g&&np(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Np(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===$f?Gd(b,n,r,!1):Hd(b,p,m,n,m,n,r)}else if(L.A(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===$f?Gd(b,r,m,!1):Hd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Np(a,b,c,d){var e=a.diagram;if(null===e||b.w(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ea.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!L.A(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!L.A(n,r)&& L.A(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.A(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function np(a){a=a.curve;return a===Zf||a===$f}function rp(a,b){if(b||np(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Vg.contains(a)||0===a.Yl.width&&0===a.Yl.height||b.Vg.add(a,a.Yl.copy())} -S.prototype.Oq=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ea.j;for(var g=e.length,h=0;ha&&wa(a,">= 0",S,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength",b,a),this.Ua())}}, fromShortLength:{get:function(){return null!==this.O?this.O.ah:NaN},set:function(a){this.Kc();var b=this.O.ah;b!==a&&(this.O.ah=a,this.dc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.O?this.O.Ch:Vc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),(b.Oc()||a.Oc())&&null!==this.toNode&&Vo(this.toPort),this.Ua())}},toEndSegmentLength:{get:function(){return null!== @@ -1624,7 +1624,7 @@ na.Object.defineProperties(wk.prototype,{bounds:{get:function(){return new N(thi function yp(){Xa(this);this.port=this.node=null;this.de=[];this.Sq=!1}yp.prototype.toString=function(){for(var a=this.de,b=this.node.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}yp.prototype.Dm=function(){this.de.length=0}; -function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.s()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.o()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Kd(d),n=l.computeSpot(m,a.port);if(n.Oc()){var p=m?l.toPort:l.fromPort;if(null!==p&&(m=p.part,null!==m)){var r=m.findVisibleNode();null!==r&&r!==m&&(m=r,p=m.port);m=l.computeOtherPoint(m,p);p=h.Pa(p.da(zc));p+=(h.Pa(m)-p)/360;p-=k;0>p?p+=360:360<=p&&(p-=360);n=Zp(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.de[f];void 0===r?(r=new $p(l,p,n),a.de[f]= r):(r.link=l,r.angle=p,r.Ac=n);r.ow.set(m);f++}}}}J.free(h);a.de.sort(yp.prototype.l);k=a.de.length;d=-1;for(f=h=0;fMath.abs(u)?(y=Math.abs(u)/p,p=Math.abs(u)):y=1;break;case 2:r>Math.abs(z)?(y=Math.abs(z)/r,r=Math.abs(z)):y=1;break;case 1:n>Math.abs(u)?(y=Math.abs(u)/n,n=Math.abs(u)):y=1;break;default:case 4:m> @@ -1632,31 +1632,31 @@ Math.abs(z)?(y=Math.abs(z)/m,m=Math.abs(z)):y=1}v=0}var F=A.Qq;if(d===fp){A=A.li c[a],null!==e&&e.link===b)return e;return null}yp.prototype.l=function(a,b){return a===b?0:null===a?-1:null===b?1:a.Acb.Ac?1:a.angleb.angle?1:0}; yp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.Lq;if(0>d)return c;var e=a.wm;if(1>=e||!b.isOrthogonal)return c;b=a.ow;var f=a.Qq;if(2===a.Ac||8===a.Ac)d=e-1-d;return((a=2===a.Ac||4===a.Ac)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ai.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ai.prototype.Rh=function(a){return!a.location.s()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} -function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Ai.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ai.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ai.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ai.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ai.prototype.workerLayout=function(){return!1}; -function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ai.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; +jl.prototype.copy=function(){var a=new jl;a.bh=this.bh.H();a.Ch=this.Ch.H();a.$g=this.$g;a.Ah=this.Ah;a.ah=this.ah;a.Bh=this.Bh;a.co=this.co;a.kq=this.kq;a.eo=this.eo;a.lq=this.lq;return a};jl.className="LinkSettings";function Bi(){Xa(this);this.u=this.B=null;this.zi=this.xo=!0;this.Co=!1;this.nn=(new J(0,0)).freeze();this.zo=!0;this.vn=this.yo=null;this.Bo=!1;this.l=null;this.I=0;this.To=this.qq=null;this.wt=!1;this.yg=this.ek=null;this.lt=!1} +Bi.prototype.cloneProtected=function(a){a.xo=this.xo;a.zi=this.zi;a.Co=this.Co;a.nn.assign(this.nn);a.zo=this.zo;a.yo=this.yo;a.vn=this.vn;a.Bo=!0;a.To=this.To;a.qq=this.qq};Bi.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};Bi.prototype.serializeLayoutProperties=function(a){a.arrangementOrigin={x:this.arrangementOrigin.x,y:this.arrangementOrigin.y};a.isRouting=this.isRouting}; +Bi.prototype.deserializeLayoutProperties=function(a){null!==a&&(this.arrangementOrigin=new J(a.arrangementOrigin.x,a.arrangementOrigin.y),this.isRouting=a.isRouting)};Bi.prototype.jb=function(){};Bi.prototype.toString=function(){var a=Ja(this.constructor);a+="(";null!==this.group&&(a+=" in "+this.group);null!==this.diagram&&(a+=" for "+this.diagram);return a+")"}; +Bi.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(null!==a&&!a.undoManager.isUndoingRedoing){var b=a.animationManager;!b.isTicking&&(b.defaultAnimation.isAnimating&&b.Bc(),this.isOngoing&&a.pj||this.isInitial&&!a.pj)&&(this.isValidLayout=!1,a.Db())}}};Bi.prototype.createNetwork=function(){return new aq(this)};Bi.prototype.makeNetwork=function(a){var b=this.createNetwork();a instanceof R?(b.Ag(a.nodes,!0),b.Ag(a.links,!0)):a instanceof U?b.Ag(a.memberParts):b.Ag(a.iterator);return b}; +Bi.prototype.updateParts=function(){this.isValidLayout=!0;if(!this.workerLayout()){var a=this.diagram;if(null===a&&null!==this.network)for(var b=this.network.vertexes.iterator;b.next();){var c=b.value.node;if(null!==c&&(a=c.diagram,null!==a))break}try{null!==a&&a.xa("Layout"),this.commitLayout()}finally{null!==a&&a.Xa("Layout")}}};Bi.prototype.commitLayout=function(){if(null!==this.network){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}}; +Bi.prototype.doLayout=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,this.Rh,!0,!1,!0),bq(this,b,a.parts,!0,this.Rh,!0,!1,!0)):a instanceof U?bq(this,b,a.memberParts,!1,this.Rh,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Bi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Bi.prototype.Rh=function(a){return!a.location.o()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} +function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Bi.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Bi.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Bi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Bi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Bi.prototype.workerLayout=function(){return!1}; +function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Bi.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; function gq(a,b){var c=fq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function fq(a){var b=null;if("function"===typeof a){if(b=hq.get(a),!b){var c=Ja(a);b=hq.get(c);b||(b=new iq,b.Lv=a,b.name=c,b.l=a.name,b.Cy=jq,hq.set(c,b),hq.set(a,b),hq.set(a.name,b))}}else"string"===typeof a&&(b=hq.get(a));return b} -Ai.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= +Bi.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)xa("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Fm.get(c.id)){a.Fm.remove(c.id);b.wt=!1;b.ek=null;if(b.lt)b.lt=!1,b.yg=null;else{var d=lq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}dq(b,c.time);c=b.yg;if(null!==c)b.yg=null;else for(d=a.Fm.iteratorValues;d.next();){var e=d.value;c=e.yg;if(null!==c){e.yg=null;break}}null!==c&&mq(b,c)}},a.Pe.postMessage({_GoJS:"_GoJS", url:a.Cy}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Pe.postMessage({_GoJS:"_GoJS",url:b})}),a.Pe.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.ek?this.yg=this.network:mq(this,this.network);dq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function mq(a,b){a.wt=!0;var c=fq(a.constructor),d=nq(a,b,!0);d._GoJS="_GoJS";c.Pe.postMessage(d);c.Fm.set(kb(a),a);a.ek=b} function nq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?kb(a):a.id,layout:Ja(a.constructor),p:d,jB:e,Qz:f};a.onNetworkSerialization(2,c,b,d);return d} function lq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.jB,g=new H;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Cb(a.key));null!==b?b=e.mk(b):(b=e.createVertex(),e.Bg(b));c&&null!==a.key&&(b.data={Di:a.key});g.set(a.id,b)});var h=b.Qz,k=new H;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.tm(f);f.link=b;c&&null!==a.key&&(f.data={Di:a.key});k.set(a.id,f)}); -f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ai.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ai.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.C=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, -isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.B()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== -a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.B())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.B())}},id:{get:function(){return this.I},set:function(a){this.I= -a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Ai.prototype.useWorker=Ai.prototype.Uw;Ai.declareWorkerLayout=gq;Ai.prototype.cancelWorker=Ai.prototype.zz;Ai.prototype.collectParts=Ai.prototype.$x;Ai.prototype.getLayoutBounds=Ai.prototype.nj;Ai.prototype.invalidateLayout=Ai.prototype.B; -var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ai.className="Layout";Ai.GoJSScriptURL=jq;Ai.declareWorkerLayout=gq; +f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Bi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Bi.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.B=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, +isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.C()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== +a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.C())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.C())}},id:{get:function(){return this.I},set:function(a){this.I= +a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Bi.prototype.useWorker=Bi.prototype.Uw;Bi.declareWorkerLayout=gq;Bi.prototype.cancelWorker=Bi.prototype.zz;Bi.prototype.collectParts=Bi.prototype.$x;Bi.prototype.getLayoutBounds=Bi.prototype.nj;Bi.prototype.invalidateLayout=Bi.prototype.C; +var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Bi.className="Layout";Bi.GoJSScriptURL=jq;Bi.declareWorkerLayout=gq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=fq(a.layout));var d=null;c&&c.Lv&&(d=new c.Lv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=lq(d,a,!0); d.workerLayout=function(){var a=nq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function iq(){this.Lv=null;this.Cy=this.l=this.name="";this.scripts=[];this.Pe=null;this.Fm=new H}function aq(a){Xa(this);this.kc=a;this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H} aq.prototype.clear=function(){if(this.tf)for(var a=this.tf.iterator;a.next();)a.value.clear();if(this.le)for(a=this.le.iterator;a.next();)a.value.clear();this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H}; @@ -1677,10 +1677,10 @@ function oq(a){Xa(this);this.Tc=a;this.l=(new N(0,0,10,10)).freeze();this.u=(new oq.prototype.serializeVertexProperties=function(a){a.id=kb(this);a.key=this.node?this.node.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.x=this.bounds.x;a.y=this.bounds.y;a.kB=this.bounds.width;a.tA=this.bounds.height;a.fx=this.focus.x;a.fy=this.focus.y;var b=[];this.td.each(function(a){b.push(kb(a))});a.Uy=b;var c=[];this.Gd.each(function(a){c.push(kb(a))});a.jy=c}; oq.prototype.Cq=function(a,b,c){if(null!==a){this.x=a.x;this.y=a.y;this.width=a.kB;this.height=a.tA;this.focusX=a.fx;this.focusY=a.fy;var d=this;a.Uy&&a.Uy.forEach(function(a){(a=c.get(a))&&d.td.add(a)});a.jy&&a.jy.forEach(function(a){(a=c.get(a))&&d.Gd.add(a)})}};oq.prototype.clear=function(){this.Mi=this.ob=null;this.td=new E;this.Gd=new E}; oq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutVertex#"+kb(this);if(0b?1:0):1:null!==b?-1:0} na.Object.defineProperties(oq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.td._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Gd._dataArray}},data:{get:function(){return this.ob},set:function(a){this.ob=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.u.h(d/2,b/2);this.l.h(a,c,d,b)}}},node:{get:function(){return this.Mi}, -set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.s())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| +set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.o())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| this.u.assign(a)}},centerX:{get:function(){return this.l.x+this.u.x},set:function(a){var b=this.l;b.x+this.u.x!==a&&(b.ea(),b.x=a-this.u.x,b.freeze())}},centerY:{get:function(){return this.l.y+this.u.y},set:function(a){var b=this.l;b.y+this.u.y!==a&&(b.ea(),b.y=a-this.u.y,b.freeze())}},focusX:{get:function(){return this.u.x},set:function(a){var b=this.u;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},focusY:{ get:function(){return this.u.y},set:function(a){var b=this.u;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},x:{get:function(){return this.l.x},set:function(a){var b=this.l;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},y:{get:function(){return this.l.y},set:function(a){var b=this.l;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},width:{get:function(){return this.l.width},set:function(a){var b=this.l;b.width!==a&&(b.ea(),b.width= a,b.freeze())}},height:{get:function(){return this.l.height},set:function(a){var b=this.l;b.height!==a&&(b.ea(),b.height=a,b.freeze())}},network:{get:function(){return this.Tc},set:function(a){this.Tc=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= @@ -1691,55 +1691,55 @@ e}}else if(""!==b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}retur pq.prototype.serializeEdgeProperties=function(a){a.id=kb(this);a.key=this.link?this.link.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.from=this.fromVertex?kb(this.fromVertex):null;a.fB=this.toVertex?kb(this.toVertex):null};pq.prototype.deserializeEdgeProperties=function(a,b){if(null!==a){var c=b.get(a.from);c&&(this.fromVertex=c);if(a=b.get(a.fB))this.toVertex=a}}; pq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+kb(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.va("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;n=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.xa("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new N(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Dq:A=-A.width;break;default:A= 0}z.moveTo(q+A,u);switch(p){case Dq:q-=C;break;default:q+=C}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case wq:k=g;m=f;n=b;p=c;g=N.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=z=0;C=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=J.alloc();for(Q=0;Qm-1||0k){d.push(new N(0,F?y-f:y,k+n,A+f+p));for(K=0;Kl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -na.Object.defineProperties(Sk.prototype,{wrappingWidth:{get:function(){return this.sq},set:function(a){this.sq!==a&&(0n)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};vi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Da(a);for(b=this.nodes.iterator;b.next();)b.value.Da(a);for(b=this.links.iterator;b.next();)b.value.Da(a)}; -vi.prototype.ir=function(){for(var a=this.C.model,b=new G,c=a.nodeDataArray,d=0;dn)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};wi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ea(a);for(b=this.nodes.iterator;b.next();)b.value.Ea(a);for(b=this.links.iterator;b.next();)b.value.Ea(a)}; +wi.prototype.ir=function(){for(var a=this.B.model,b=new G,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1805,9 +1805,9 @@ rr(a.y),rr(a.offsetX),rr(a.offsetY));else if("Brush"===b){if(c=new zl,c.type=Ya( t.zt=function(a){this.skipsUndoManager||this.undoManager.aw(a);for(var b=this.cv,c=b.length,d=0;db&&(b=a.length);Ca(a,b,c);ur(this,"",ze,"",a,null,c,null,b)};t.tw=function(a,b){void 0===b&&(b=-1);a===this.Fc&&B("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",Ae,"",a,c,null,b,null)}; t.Iq=function(a){if(null===a)return"";var b=this.Yj;if(""===b)return"";b=vn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;B("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};t.Um=function(a,b){if(null!==a){var c=this.Yj;if(""!==c)if(this.ab(a)){var d=vn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),ur(this,"nodeCategory",xe,c,a,d,b))}else Uj(a,c,b)}};t.Wm=function(a,b){this.Um(b,this.Iq(a))};t.Em=function(){return!1};t.Ck=function(){return!1};t.qj=function(){return!1}; -t.Ut=function(){return!1};t.Dk=function(){return!1};function yi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} +t.Ut=function(){return!1};t.Dk=function(){return!1};function zi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function vn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Uj(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}} na.Object.defineProperties(Z.prototype,{name:{get:function(){return this.oa},set:function(a){var b=this.oa;b!==a&&(this.oa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Da(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; +get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Ea(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; b!==a&&(""===a&&B("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Ae){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Wb(a),b?(this.ag.add(a),this.$c[c]!==a&&this.$c.splice(c,0,a),void 0!==d&&this.gb.add(d,a)):(this.ag.remove(a),this.$c[c]=== a&&this.$c.splice(c,1),void 0!==d&&this.gb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Bf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=zr.prototype;t.Gm=function(a){if(void 0!==a){var b=this.Aj;if(null!==b){var c=this.Kb(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.uf(c))}return a}}; t.xy=function(a){return Sq(this,a,!0)};t.Bw=function(a,b){$q(this,a,b,!0)};t.Ay=function(a){return Sq(this,a,!1)};t.Gw=function(a,b){$q(this,a,b,!1)};function Sq(a,b,c){if(null!==b&&(a=c?a.af:a.bf,""!==a&&(a=vn(b,a),void 0!==a))){if(Uq(a))return a;B((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function $q(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.af:a.bf;if(""!==e)if(c=a.Gm(c),a.xc(b)){var f=vn(b,e);f!==c&&(Yq(a,f,b),Uj(b,e,c),null===a.Kb(c)&&Zq(a,c,b),ur(a,d?"linkFromKey":"linkToKey",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.yy=function(a){return Rq(this,a,!0)};t.Cw=function(a,b){ar(this,a,b,!0)};t.By=function(a){return Rq(this,a,!1)};t.Hw=function(a,b){ar(this,a,b,!1)}; -function Rq(a,b,c){if(null===b)return"";a=c?a.Uj:a.Vj;if(""===a)return"";b=vn(b,a);return void 0===b?"":b}function ar(a,b,c,d){if(null!==b){var e=d?a.Uj:a.Vj;if(""!==e)if(a.xc(b)){var f=vn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.Bf=function(a){if(null===a)return Cr;var b=this.ae;if(""===b)return Cr;a=vn(a,b);return void 0===a?Cr:a}; -t.ju=function(a,b){if(null!==a){var c=this.ae;if(""!==c)if(this.xc(a)){var d=vn(a,c);void 0===d&&(d=Cr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.xc(a)&&(Yq(this,b,a),ur(this,"linkLabelKeys",Ae,c,a,b,null,e,null)))}else void 0!==d&&B(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Wb=function(a){if(null!==a){var b=this.Hi;if(""!==b&&(b=vn(a,b),void 0!==b)){if(Uq(b))return b;B("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Da(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; +t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Ea(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; t.Rq=function(a){if(null!==a){var b=this.Hi;if(""!==b){var c=this.Wb(a);if(void 0===c||this.gb.contains(c)){var d=this.Ql;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.gb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.gb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.gb.count-1;this.gb.contains(c);)c--;Uj(a,b,c)}}}}};t.xc=function(a){return null===a?!1:this.ag.contains(a)};t.bj=function(a){null!==a&&(mb(a),this.xc(a)||Wq(this,a,!0))}; function Wq(a,b,c){if(""!==a.linkKeyProperty){var d=a.Wb(b);if(void 0!==d&&a.gb.G(d)===b)return;a.Rq(b);d=a.Wb(b);if(void 0===d){B("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.gb.add(d,b)}a.ag.add(b);d=null;c&&(d=a.$c.length,a.$c.splice(d,0,b));ur(a,"linkDataArray",ze,"linkDataArray",a,null,b,null,d);Dr(a,b)}t.pz=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.$c.splice(d,1)}ur(a,"linkDataArray",Ae,"linkDataArray",a,b,null,d,null);c=Sq(a,b,!0);Yq(a,c,b);c=Sq(a,b,!1);Yq(a,c,b);d=a.Bf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.Gr;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Ur&&k===Vr?h=Gr:h===Ur&&k!==Vr&&(h=this.arrangement);if((this.direction===Pr||this.direction===Qr)&&this.sorting!==Jr){for(k=0;!(k>=d.length);k+=2){a.add(d.J(k));if(k+1>=d.length)break;c.add(d.J(k+1))}this.direction===Pr?(this.arrangement===Ur&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Ur&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Ir?1:-1)/k,u=d.J(r).diameter;isNaN(u)&&(u=Xr(d.J(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Ur){isNaN(b)&&(b=6);if(h!==Gr&&h!==Ur){f=-Infinity;for(g=0;gb[c[q]].indexOf(c[q===c.length-1?0:q+1])&&r.push(q===c.length-1?0:q+1);if(0===r.length)for(q=0;qc.indexOf(F)||Cc.indexOf(F)||C=u?C+1:C)),v+=C=u&&C++,z>=u&&z++,C>z&&(A=z,z=C,C=A),z-C<(c.length+2)/2===(Cr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.mm=a:this.mm=360,this.B())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.B())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.B())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& -a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.B())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.B())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.B())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.B())}},actualXRadius:{get:function(){return this.$b}}, +na.Object.defineProperties(Fr.prototype,{radius:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(0=a?this.mm=a:this.mm=360,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.C())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& +a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.C())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.C())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.C())}},actualXRadius:{get:function(){return this.$b}}, actualYRadius:{get:function(){return this.be}},actualSpacing:{get:function(){return this.Ij}},actualCenter:{get:function(){return this.mx}}}); var Gr=new D(Fr,"ConstantSpacing",0),Tr=new D(Fr,"ConstantDistance",1),Sr=new D(Fr,"ConstantAngle",2),Ur=new D(Fr,"Packed",3),Ir=new D(Fr,"Clockwise",4),Rr=new D(Fr,"Counterclockwise",5),Pr=new D(Fr,"BidirectionalLeft",6),Qr=new D(Fr,"BidirectionalRight",7),Nr=new D(Fr,"Forwards",8),Or=new D(Fr,"Reverse",9),Lr=new D(Fr,"Ascending",10),Mr=new D(Fr,"Descending",11),Jr=new D(Fr,"Optimized",12),Kr=new D(Fr,"Pythagorean",13),Vr=new D(Fr,"Circular",14);Fr.className="CircularLayout";Fr.ConstantSpacing=Gr; Fr.ConstantDistance=Tr;Fr.ConstantAngle=Sr;Fr.Packed=Ur;Fr.Clockwise=Ir;Fr.Counterclockwise=Rr;Fr.BidirectionalLeft=Pr;Fr.BidirectionalRight=Qr;Fr.Forwards=Nr;Fr.Reverse=Or;Fr.Ascending=Lr;Fr.Descending=Mr;Fr.Optimized=Jr;Fr.Pythagorean=Kr;Fr.Circular=Vr;function Hr(){this.Am=-Infinity;this.cn=this.Wk=null} @@ -1942,11 +1942,11 @@ Hr.prototype.compare=function(a,b){if(0this.Am||Math.abs(a)u&&0u&&0=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right:z<=n.bounds.x)F= -(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q-1).x,v=b.i(q- -1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]);C=Math.max(10, -this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A=u.centerY,p?180===this.K||0===this.K? -(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++,z,A),b.m(q++,z,A+C)):270===this.K? -(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y),A),b.m(q++,w,y),b.m(q++,z,y)))}null!== -d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.s()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.s()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +c.fromVertex,n=c.toVertex;if(c.valid){if(b.curve===dg&&4===b.pointsCount)if(m.column===n.column)c=b.getLinkPoint(e,g,l,!0,!1,f,h),g=b.getLinkPoint(f,h,k,!1,!1,e,g),c.o()||c.set(e.actualBounds.center),g.o()||g.set(f.actualBounds.center),b.pk(),b.vf(c.x,c.y),b.vf((2*c.x+g.x)/3,(2*c.y+g.y)/3),b.vf((c.x+2*g.x)/3,(c.y+2*g.y)/3),b.vf(g.x,g.y);else{var p=!1,r=!1;null!==g&&l===sc&&(p=!0);null!==h&&k===sc&&(r=!0);if(p||r){var q=b.i(0).x;c=b.i(0).y;m=b.i(3).x;d=b.i(3).y;p&&(90===this.K||270===this.K?(p=q,n= +(c+d)/2):(p=(q+m)/2,n=c),b.L(1,p,n),l=b.getLinkPoint(e,g,l,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y));r&&(90===this.K||270===this.K?(l=m,c=(c+d)/2):(l=(q+m)/2,c=d),b.L(2,l,c),e=b.getLinkPoint(f,h,k,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(3,e.x,e.y))}}b.xf()}else if(m.layer===n.layer)b.xf();else{p=r=!1;q=b.firstPickIndex+1;if(b.isOrthogonal){p=!0;var u=b.pointsCount;4=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right: +z<=n.bounds.x)F=(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q- +1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]); +C=Math.max(10,this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););if(null===u)break;u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A= +u.centerY,p?180===this.K||0===this.K?(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++, +z,A),b.m(q++,z,A+C)):270===this.K?(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y), +A),b.m(q++,w,y),b.m(q++,z,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; As.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xb.Xb||a.lb.l||a.fdb.fd?1:a.vcb.vc?1:0:0};t.A=function(a,b){a-=b;return-1a}; t.uj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&B("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.xe.length){var d=[];for(var e=0;ea&&(this.ng=a,this.B())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.B())}}, -linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.B())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); +na.Object.defineProperties(As.prototype,{layerSpacing:{get:function(){return this.ue},set:function(a){this.ue!==a&&0<=a&&(this.ue=a,this.C())}},columnSpacing:{get:function(){return this.Zb},set:function(a){this.Zb!==a&&0a&&(this.ng=a,this.C())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.C())}}, +linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.C())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); var Bs=new D(As,"CycleDepthFirst",0),Us=new D(As,"CycleGreedy",1),Gs=new D(As,"CycleFromLayers",2),Cs=new D(As,"LayerOptimalLinkLength",0),Zs=new D(As,"LayerLongestPathSink",1),at=new D(As,"LayerLongestPathSource",2),Ds=new D(As,"InitDepthFirstOut",0),gt=new D(As,"InitDepthFirstIn",1),et=new D(As,"InitNaive",2),kt=new D(As,"AggressiveNone",0),Es=new D(As,"AggressiveLess",1),lt=new D(As,"AggressiveMore",2),mt=8;As.className="LayeredDigraphLayout";As.CycleDepthFirst=Bs;As.CycleGreedy=Us; As.CycleFromLayers=Gs;As.LayerOptimalLinkLength=Cs;As.LayerLongestPathSink=Zs;As.LayerLongestPathSource=at;As.InitDepthFirstOut=Ds;As.InitDepthFirstIn=gt;As.InitNaive=et;As.AggressiveNone=kt;As.AggressiveLess=Es;As.AggressiveMore=lt;As.PackNone=0;As.PackExpand=1;As.PackStraighten=2;As.PackMedian=4;As.PackAll=15;function ut(){this.index=this.vc=this.fd=this.Xb=this.first=this.layer=0;this.link=null;this.l=0}ut.className="SegInfo";function Fs(a){aq.call(this,a)}ma(Fs,aq);Fs.prototype.createVertex=function(){return new vt(this)}; Fs.prototype.createEdge=function(){return new wt(this)};Fs.className="LayeredDigraphNetwork";function vt(a){oq.call(this,a);this.Ra=this.Rg=this.Fi=-1;this.I=NaN;this.T=null;this.valid=!1;this.finish=this.Cg=NaN;this.wf=0;this.Mk=this.Nk=null}ma(vt,oq); @@ -2089,9 +2089,9 @@ wt.prototype.serializeEdgeProperties=function(a,b){pq.prototype.serializeEdgePro wt.prototype.deserializeEdgeProperties=function(a,b,c,d){pq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; na.Object.defineProperties(wt.prototype,{fromVertex:{get:function(){return this.Yc},set:function(a){this.Yc!==a&&(this.Yc=a)}},toVertex:{get:function(){return this.ed},set:function(a){this.ed!==a&&(this.ed=a)}},valid:{get:function(){return this.eb},set:function(a){this.eb!==a&&(this.eb=a)}},rev:{get:function(){return this.La},set:function(a){this.La!==a&&(this.La=a)}},forest:{ get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a)}},portFromPos:{get:function(){return this.I},set:function(a){this.I!==a&&(this.I=a)}},portToPos:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},portFromColOffset:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToColOffset:{get:function(){return this.T}, -set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Ai.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Ai); -xt.prototype.cloneProtected=function(a){Ai.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; -xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Ai.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; +set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Bi.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Bi); +xt.prototype.cloneProtected=function(a){Bi.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; +xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Bi.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; xt.prototype.makeNetwork=function(a){function b(a){if(a instanceof W)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof S){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof R?(c.Ag(a.nodes,!0,b),c.Ag(a.links,!0,b)):a instanceof U?c.Ag(a.memberParts,!1,b):c.Ag(a.iterator,!1,b);return c}; xt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Ft&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof R&&(b=a);this.path===yt&&null!==b?this.kd=b.isTreePathToChildren?zt:Gt:this.kd=this.path===yt?zt:this.path;if(0e?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(Ke?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(KGa&&(xu(a,-Ga,0,ja,qa-1),yu(A,-Ga,0),yu(C,-Ga,0),Ga=0)}Ma.S.h(Ga,T);v=Math.max(v,F);y=Math.max(y,z+(0===P?0:q)+eb.height);K=F}else{0n&&(TGa&&(xu(a,0,-Ga,ja,qa-1),yu(A,0,-Ga),yu(C,0,-Ga),Ga=0);Ma.S.h(K,Ga);y=Math.max(y,Q);v=Math.max(v,z+(0===P?0:q)+eb.width);T=Q}I++}0l&&(l=0),135l&&(l=0),135u&&(u=0),k===bu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Du(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Bu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Du(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Cu(a,y,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, -A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qe[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, +A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qn&&(n=0),135v&&(v=0));b.fa.h(n,v);b.ua.h(z,A)}} -function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.ua.width,e=a.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& +q,A+=q);break;case nu:c?(n+=z-b.width+q,z+=q):(v+=A-b.height+q,A+=q);break;case $t:case Qt:c?1n&&(n=0),135v&&(v=0));b.fa.h(n,v);b.wa.h(z,A)}} +function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.wa.width,e=a.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& (c=Gu(a,b.S.x,!1,c,g))):(b.S.h(d+h,c+g/2-b.focus.y-b.fa.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.fa.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.S.y&&(c=Gu(a,b.S.y,!0,c,g))));return new N(c,0,d,e)} -function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.ua.width,e=b.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.wa.width,e=b.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.S.x&&(c=Gu(a,h.S.x,!1,c,g))):(h.S.h(-d-l.width-q,c+g/2-h.focus.y-h.fa.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.fa.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.S.y&&(c=Gu(a,h.S.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case qu:return a.width>b?a.width:b;case nu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case $t:case Qt:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case au:return a.width-a.focus.x+a.nodeSpacing/2+b;case bu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Cu(a,b,c){switch(a.alignment){case Au:case zu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case qu:return a.height>b?a.height:b;case nu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case $t:case Qt:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case au:return a.height-a.focus.y+a.nodeSpacing/2+b;case bu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Du(a,b,c){switch(a){case zu:b/=2;c/=2;break;case Au:b/=2;c/=2;break;case qu:c=b=0;break;case nu:break;default:B("Unhandled alignment value "+a.toString())}return new J(b,c)}function uu(a,b,c,d,e,f){b=Du(b,c,d);xu(a,b.x,b.y,e,f)}function xu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].S;f.x+=b;f.y+=c}} function vu(a,b,c,d){var e=b.parent;switch(a.kd){case zt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case Gt:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:B("Unhandled path value "+a.kd.toString())}}function yu(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c=0;cn.length||null===r||2>r.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=tu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=tu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d= for(;lf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}function ou(a){var b=mu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.U.nodeIndentPastParent=a,this.B())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.B())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== -a&&(this.U.layerSpacing=a,this.B())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.B())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.B())}},breadthLimit:{get:function(){return this.U.breadthLimit}, -set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.B())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.B())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.B())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== -a&&(this.U.commentSpacing=a,this.B())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.B())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.B())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= -a,this.B())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.B())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.B())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& -a!==Xt&&!Yt||(this.V.sorting=a,this.B())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.B())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.B())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== -a&&(this.V.alignment=a,this.B())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.B())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.B())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, -set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.B())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.B())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.B())}},alternateCompaction:{ -get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.B())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.B())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.B())}},alternateRowIndent:{ -get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.B())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.B())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.B())}},alternateSetsPortSpot:{ -get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.B())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.B())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.B())}},alternateChildPortSpot:{ -get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.B())}}}); +na.Object.defineProperties(xt.prototype,{roots:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a,this.C())}},path:{get:function(){return this.vp},set:function(a){this.vp!==a&&(this.vp=a,this.C())}},treeStyle:{get:function(){return this.oq},set:function(a){this.Eb===a||a!==At&&a!==Tt&&a!==Ut&&a!==St||(this.oq=a,this.C())}},layerStyle:{get:function(){return this.ts}, +set:function(a){this.Eb===a||a!==Bt&&a!==Ot&&a!==Nt||(this.ts=a,this.C())}},comments:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ct&&a!==Iu&&a!==Ft||(this.Eb=a,this.C())}},arrangementSpacing:{get:function(){return this.Pd},set:function(a){this.Pd.w(a)||(this.Pd.assign(a),this.C())}},rootDefaults:{ +get:function(){return this.U},set:function(a){this.U!==a&&(this.U=a,this.C())}},alternateDefaults:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a,this.C())}},sorting:{get:function(){return this.U.sorting},set:function(a){this.U.sorting===a||a!==Vt&&a!==Wt&&a!==Xt&&!Yt||(this.U.sorting=a,this.C())}},comparer:{get:function(){return this.U.comparer},set:function(a){this.U.comparer!== +a&&(this.U.comparer=a,this.C())}},angle:{get:function(){return this.U.angle},set:function(a){this.U.angle!==a&&(0===a||90===a||180===a||270===a?(this.U.angle=a,this.C()):B("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.U.alignment},set:function(a){this.U.alignment!==a&&(this.U.alignment=a,this.C())}},nodeIndent:{get:function(){return this.U.nodeIndent},set:function(a){this.U.nodeIndent!== +a&&0<=a&&(this.U.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.U.nodeIndentPastParent},set:function(a){this.U.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.U.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== +a&&(this.U.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.C())}},breadthLimit:{get:function(){return this.U.breadthLimit}, +set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== +a&&(this.U.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= +a,this.C())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& +a!==Xt&&!Yt||(this.V.sorting=a,this.C())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.C())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.C())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== +a&&(this.V.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, +set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ +get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.C())}},alternateSetsPortSpot:{ +get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ +get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.C())}}}); var yt=new D(xt,"PathDefault",-1),zt=new D(xt,"PathDestination",0),Gt=new D(xt,"PathSource",1),Vt=new D(xt,"SortingForwards",10),Wt=new D(xt,"SortingReverse",11),Xt=new D(xt,"SortingAscending",12),Yt=new D(xt,"SortingDescending",13),zu=new D(xt,"AlignmentCenterSubtrees",20),Au=new D(xt,"AlignmentCenterChildren",21),qu=new D(xt,"AlignmentStart",22),nu=new D(xt,"AlignmentEnd",23),$t=new D(xt,"AlignmentBus",24),Qt=new D(xt,"AlignmentBusBranching",25),au=new D(xt,"AlignmentTopLeftBus",26),bu=new D(xt, "AlignmentBottomRightBus",27),ju=new D(xt,"CompactionNone",30),lu=new D(xt,"CompactionBlock",31),At=new D(xt,"StyleLayered",40),Ut=new D(xt,"StyleLastParents",41),Tt=new D(xt,"StyleAlternating",42),St=new D(xt,"StyleRootOnly",43),Ct=new D(xt,"ArrangementVertical",50),Iu=new D(xt,"ArrangementHorizontal",51),Ft=new D(xt,"ArrangementFixedRoots",52),Bt=new D(xt,"LayerIndividual",60),Ot=new D(xt,"LayerSiblings",61),Nt=new D(xt,"LayerUniform",62);xt.className="TreeLayout";xt.PathDefault=yt; xt.PathDestination=zt;xt.PathSource=Gt;xt.SortingForwards=Vt;xt.SortingReverse=Wt;xt.SortingAscending=Xt;xt.SortingDescending=Yt;xt.AlignmentCenterSubtrees=zu;xt.AlignmentCenterChildren=Au;xt.AlignmentStart=qu;xt.AlignmentEnd=nu;xt.AlignmentBus=$t;xt.AlignmentBusBranching=Qt;xt.AlignmentTopLeftBus=au;xt.AlignmentBottomRightBus=bu;xt.CompactionNone=ju;xt.CompactionBlock=lu;xt.StyleLayered=At;xt.StyleLastParents=Ut;xt.StyleAlternating=Tt;xt.StyleRootOnly=St;xt.ArrangementVertical=Ct; xt.ArrangementHorizontal=Iu;xt.ArrangementFixedRoots=Ft;xt.LayerIndividual=Bt;xt.LayerSiblings=Ot;xt.LayerUniform=Nt;function Dt(a){aq.call(this,a)}ma(Dt,aq);Dt.prototype.createVertex=function(){return new Et(this)};Dt.prototype.createEdge=function(){return new Ku(this)};Dt.className="TreeNetwork"; -function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.ua=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); +function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.wa=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); Et.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.bd=a.sorting,this.Wc=a.comparer,this.Yb=a.angle,this.yb=a.alignment,this.Cs=a.nodeIndent,this.Ds=a.nodeIndentPastParent,this.Es=a.nodeSpacing,this.ue=a.layerSpacing,this.ss=a.layerSpacingParentOverlap,this.Er=a.compaction,this.wr=a.breadthLimit,this.Rs=a.rowSpacing,this.Qs=a.rowIndent,this.Dr=a.commentSpacing,this.Cr=a.commentMargin,this.dt=a.setsPortSpot,this.Ms=a.portSpot,this.ct=a.setsChildPortSpot,this.zr=a.childPortSpot)}; na.Object.defineProperties(Et.prototype,{initialized:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},parent:{get:function(){return this.Cc},set:function(a){this.Cc!==a&&(this.Cc=a)}},children:{get:function(){return this.I},set:function(a){if(this.I!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-pu(c))))):c.alignment===qu?(e=d.top+b.y,0===b.y&&m.yc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);c=[];for(var d=0,e=0;ec;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;gb?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}t.OA=function(a,b,c,d){L.Qh(a,b,c,d,this.x,this.y,this);return this};t.PA=function(a,b){L.Qh(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};t.cB=function(a,b,c,d){L.Gq(this.x,this.y,a,b,c,d,this);return this};t.dB=function(a,b){L.Gq(this.x,this.y,a.x,a.y,b.width,b.height,this);return this}; t.tj=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};t.Uk=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};t.transform=function(a){a.ta(this);return this};function wb(a,b){b.Jd(a);return a}function xb(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}function yb(a,b,c,d){a=c-a;b=d-b;return a*a+b*b} -function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.s=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.s; +function zb(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}t.o=function(){return isFinite(this.x)&&isFinite(this.y)};J.alloc=function(){var a=Ab.pop();return void 0===a?new J:a};J.allocAt=function(a,b){var c=Ab.pop();if(void 0===c)return new J(a,b);c.x=a;c.y=b;return c};J.free=function(a){Ab.push(a)};J.prototype.isReal=J.prototype.o; J.prototype.setSpot=J.prototype.Uk;J.prototype.setRectSpot=J.prototype.tj;J.prototype.snapToGridPoint=J.prototype.dB;J.prototype.snapToGrid=J.prototype.cB;J.prototype.projectOntoLineSegmentPoint=J.prototype.PA;J.prototype.projectOntoLineSegment=J.prototype.OA;J.intersectingLineSegments=function(a,b,c,d,e,f,g,h){return L.Cm(a,b,c,d,e,f,g,h)};J.prototype.direction=J.prototype.direction;J.prototype.directionPoint=J.prototype.Pa;J.prototype.normalize=J.prototype.normalize; J.prototype.distanceSquared=J.prototype.qd;J.prototype.distanceSquaredPoint=J.prototype.Ie;J.prototype.scale=J.prototype.scale;J.prototype.rotate=J.prototype.rotate;J.prototype.offset=J.prototype.offset;J.prototype.subtract=J.prototype.ge;J.prototype.add=J.prototype.add;J.prototype.equalsApprox=J.prototype.Qa;J.prototype.equalTo=J.prototype.fj;J.prototype.equals=J.prototype.w;J.prototype.set=J.prototype.set;J.prototype.setTo=J.prototype.Ig;var Bb=null,Cb=null,Fb=null,Gb=null,Hb=null,Ab=[]; J.className="Point";J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb;J.Origin=Bb=(new J(0,0)).ca();J.InfiniteTopLeft=Cb=(new J(-Infinity,-Infinity)).ca();J.InfiniteBottomRight=Fb=(new J(Infinity,Infinity)).ca();J.SixPoint=Gb=(new J(6,6)).ca();J.NoPoint=Hb=(new J(NaN,NaN)).ca();J.parse=tb;J.stringify=ub;J.distanceLineSegmentSquared=xb;J.distanceSquared=yb;J.direction=zb; function M(a,b){void 0===a?this.height=this.width=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):B("Invalid arguments to Size constructor: "+a+", "+b);this.v=!1}var Ib,Jb,Kb,Lb,Mb,Nb,Ob;M.prototype.assign=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.h=function(a,b){this.width=a;this.height=b;return this};M.prototype.Ig=function(a,b){this.width=a;this.height=b;return this}; M.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};M.prototype.copy=function(){var a=new M;a.width=this.width;a.height=this.height;return a};t=M.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function Pb(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new M(c,e)}return new M}function Qb(a){return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.w=function(a){return a instanceof M?this.width===a.width&&this.height===a.height:!1};t.fj=function(a,b){return this.width===a&&this.height===b}; -t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.s=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.s;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; +t.Qa=function(a){return L.A(this.width,a.width)&&L.A(this.height,a.height)};t.o=function(){return isFinite(this.width)&&isFinite(this.height)};M.alloc=function(){var a=Rb.pop();return void 0===a?new M:a};M.free=function(a){Rb.push(a)};M.prototype.isReal=M.prototype.o;M.prototype.equalsApprox=M.prototype.Qa;M.prototype.equalTo=M.prototype.fj;M.prototype.equals=M.prototype.w;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Ig;var Rb=[];M.className="Size";M.parse=Pb;M.stringify=Qb; M.ZeroSize=Ib=(new M(0,0)).ca();M.OneSize=Jb=(new M(1,1)).ca();M.SixSize=Kb=(new M(6,6)).ca();M.EightSize=Lb=(new M(8,8)).ca();M.TenSize=Mb=(new M(10,10)).ca();M.InfiniteSize=Nb=(new M(Infinity,Infinity)).ca();M.NoSize=Ob=(new M(NaN,NaN)).ca();M.parse=Pb;M.stringify=Qb; function N(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof J?(c=a.x,a=a.y,b instanceof J?(d=b.x,b=b.y,this.x=Math.min(c,d),this.y=Math.min(a,b),this.width=Math.abs(c-d),this.height=Math.abs(a-b)):b instanceof M?(this.x=c,this.y=a,this.width=b.width,this.height=b.height):B("Incorrect arguments supplied to Rect constructor")):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c, this.height=d):B("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}t=N.prototype;t.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};t.h=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};function Sb(a,b,c){a.width=b;a.height=c}t.Ig=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};t.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this}; @@ -110,10 +110,10 @@ t.offset=function(a,b){this.x+=a;this.y+=b;return this};t.Jc=function(a,b){retur t.bw=function(a,b,c,d){return $b(this,a,b,c,d)};function $b(a,b,c,d,e){var f=Math.max(a.x,b),g=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}t.Mc=function(a){return this.cw(a.x,a.y,a.width,a.height)}; t.cw=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function ac(a,b){var c=a.width,d=a.x,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1;c=a.height;a=a.y;d=b.y-10;return a>b.height+10+10+d||d>c+a?!1:!0}t.Oe=function(a){return bc(this,a.x,a.y,0,0)};t.Rc=function(a){return bc(this,a.x,a.y,a.width,a.height)}; t.Rw=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return bc(this,a,b,c,d)};function bc(a,b,c,d,e){var f=Math.min(a.x,b),g=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=g;a.width=b-f;a.height=c-g;return a}t.Uk=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};function cc(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.s=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; +function dc(a,b,c,d,e,f,g,h){return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.o=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.yA=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=hc.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=hc.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){hc.push(a)}; na.Object.defineProperties(N.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{ get:function(){return new J(this.x,this.y)},set:function(a){this.x=a.x;this.y=a.y}},size:{get:function(){return new M(this.width,this.height)},set:function(a){this.width=a.width;this.height=a.height}},center:{get:function(){return new J(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2}, -set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.s;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; +set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}});N.prototype.isEmpty=N.prototype.yA;N.prototype.isReal=N.prototype.o;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return L.Ey(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.Uk;N.prototype.union=N.prototype.Rw;N.prototype.unionRect=N.prototype.Rc;N.prototype.unionPoint=N.prototype.Oe;N.prototype.intersects=N.prototype.cw; N.prototype.intersectsRect=N.prototype.Mc;N.prototype.intersect=N.prototype.bw;N.prototype.intersectRect=N.prototype.Dy;N.prototype.grow=N.prototype.sA;N.prototype.subtractMargin=N.prototype.Jw;N.prototype.addMargin=N.prototype.uq;N.prototype.inflate=N.prototype.Jc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Ge;N.prototype.containsPoint=N.prototype.$;N.prototype.equalsApprox=N.prototype.Qa;N.prototype.equalTo=N.prototype.fj; N.prototype.equals=N.prototype.w;N.prototype.setSize=N.prototype.bB;N.prototype.setPoint=N.prototype.Qc;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.Ig;var ic=null,jc=null,hc=[];N.className="Rect";N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc;N.ZeroRect=ic=(new N(0,0,0,0)).ca();N.NoRect=jc=(new N(NaN,NaN,NaN,NaN)).ca();N.parse=Tb;N.stringify=Ub;N.contains=cc;N.intersects=dc; function kc(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(this.top=a,this.right=b,this.bottom=a,this.left=b):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):B("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.v=!1}kc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; @@ -121,7 +121,7 @@ kc.prototype.Ig=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.lef t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this}; function lc(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new kc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new kc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new kc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new kc(c,e):new kc(c,e,f,g)}return new kc} function mc(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}t.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};t.w=function(a){return a instanceof kc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.fj=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.s=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.s;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; +t.Qa=function(a){return L.A(this.top,a.top)&&L.A(this.right,a.right)&&L.A(this.bottom,a.bottom)&&L.A(this.left,a.left)};t.o=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};kc.alloc=function(){var a=pc.pop();return void 0===a?new kc:a};kc.free=function(a){pc.push(a)};kc.prototype.isReal=kc.prototype.o;kc.prototype.equalsApprox=kc.prototype.Qa;kc.prototype.equalTo=kc.prototype.fj;kc.prototype.equals=kc.prototype.w;kc.prototype.set=kc.prototype.set; kc.prototype.setTo=kc.prototype.Ig;var qc=null,rc=null,pc=[];kc.className="Margin";kc.parse=lc;kc.stringify=mc;kc.ZeroMargin=qc=(new kc(0,0,0,0)).ca();kc.TwoMargin=rc=(new kc(2,2,2,2)).ca();kc.parse=lc;kc.stringify=mc;function O(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.v=!1} var sc,tc,uc,vc,yc,zc,Ac,Bc,Cc,Dc,Ec,Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Zc,$c,ad,bd,cd,dd,ed,fd,gd;O.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};O.prototype.Ig=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};O.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; O.prototype.copy=function(){var a=new O;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};t=O.prototype;t.ca=function(){this.v=!0;Object.freeze(this);return this};t.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this.v=!0;return this};t.ea=function(){Object.isFrozen(this)&&B("cannot thaw constant: "+this);this.v=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} @@ -233,25 +233,25 @@ va(this,a);this.oc=a;this.ra=!0}},point1X:{get:function(){return this.Ce},set:fu va(this,a);this.qh=a;this.ra=!0}},centerX:{get:function(){return this.Ce},set:function(a){this.v&&va(this,a);this.Ce=a;this.ra=!0}},centerY:{get:function(){return this.Qi},set:function(a){this.v&&va(this,a);this.Qi=a;this.ra=!0}},radiusX:{get:function(){return this.Ri},set:function(a){0>a&&wa(a,">= zero",ke,"radiusX");this.v&&va(this,a);this.Ri=a;this.ra=!0}},radiusY:{get:function(){return this.qh}, set:function(a){0>a&&wa(a,">= zero",ke,"radiusY");this.v&&va(this,a);this.qh=a;this.ra=!0}},startAngle:{get:function(){return this.hc},set:function(a){this.hc!==a&&(this.v&&va(this,a),a%=360,0>a&&(a+=360),this.hc=a,this.ra=!0)}},sweepAngle:{get:function(){return this.oc},set:function(a){this.v&&va(this,a);360a&&(a=-360);this.oc=a;this.ra=!0}},isClockwiseArc:{get:function(){return this.el},set:function(a){this.v&& va(this,a);this.el=a;this.ra=!0}},isLargeArc:{get:function(){return this.Ll},set:function(a){this.v&&va(this,a);this.Ll=a;this.ra=!0}},xAxisRotation:{get:function(){return this.Ce},set:function(a){a%=360;0>a&&(a+=360);this.v&&va(this,a);this.Ce=a;this.ra=!0}}});ke.prototype.equalsApprox=ke.prototype.Qa; -var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.C=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} -me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.C=this.C;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; +var Zd=new D(ke,"Move",0),wd=new D(ke,"Line",1),$d=new D(ke,"Bezier",2),ae=new D(ke,"QuadraticBezier",3),be=new D(ke,"Arc",4),ce=new D(ke,"SvgArc",4);ke.className="PathSegment";ke.Move=Zd;ke.Line=wd;ke.Bezier=$d;ke.QuadraticBezier=ae;ke.Arc=be;ke.SvgArc=ce;function me(){this.B=null;this.yv=(new J(0,0)).freeze();this.Iu=(new J(0,0)).freeze();this.xr=this.zs=0;this.yr=1;this.Di="";this.st=this.Rr=!1;this.Or=this.Ar=0;this.Pg=this.bs=this.ms=!1;this.Wr=null;this.nt=0;this.pd=this.mt=null} +me.prototype.copy=function(){var a=new me;return this.clone(a)};me.prototype.clone=function(a){a.B=this.B;a.yv.assign(this.viewPoint);a.Iu.assign(this.documentPoint);a.zs=this.zs;a.xr=this.xr;a.yr=this.yr;a.Di=this.Di;a.Rr=this.Rr;a.st=this.st;a.Ar=this.Ar;a.Or=this.Or;a.ms=this.ms;a.bs=this.bs;a.Pg=this.Pg;a.Wr=this.Wr;a.nt=this.nt;a.mt=this.mt;a.pd=this.pd;return a}; me.prototype.toString=function(){var a="^";0!==this.modifiers&&(a+="M:"+this.modifiers);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.clickCount&&(a+="C:"+this.clickCount);0!==this.delta&&(a+="D:"+this.delta);this.handled&&(a+="h");this.bubbles&&(a+="b");null!==this.documentPoint&&(a+="@"+this.documentPoint.toString());return a};me.prototype.Jq=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);return b}; me.prototype.mA=function(a,b){var c=this.diagram;if(null===c)return b;ue(c,this.event,a,b);b.assign(c.ou(b));return b}; -na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, +na.Object.defineProperties(me.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},viewPoint:{get:function(){return this.yv},set:function(a){this.yv.assign(a)}},documentPoint:{get:function(){return this.Iu},set:function(a){this.Iu.assign(a)}},modifiers:{get:function(){return this.zs},set:function(a){this.zs=a}},button:{get:function(){return this.xr}, set:function(a){this.xr=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.yr},set:function(a){this.yr=a}},key:{get:function(){return this.Di},set:function(a){this.Di=a}},down:{get:function(){return this.Rr},set:function(a){this.Rr=a}},up:{get:function(){return this.st},set:function(a){this.st= a}},clickCount:{get:function(){return this.Ar},set:function(a){this.Ar=a}},delta:{get:function(){return this.Or},set:function(a){this.Or=a}},isMultiTouch:{get:function(){return this.ms},set:function(a){this.ms=a}},handled:{get:function(){return this.bs},set:function(a){this.bs=a}},bubbles:{get:function(){return this.Pg},set:function(a){this.Pg=a}},event:{ get:function(){return this.Wr},set:function(a){this.Wr=a}},isTouchEvent:{get:function(){var a=x.TouchEvent,b=this.event;return a&&b instanceof a?!0:(a=x.PointerEvent)&&b instanceof a&&("touch"===b.pointerType||"pen"===b.pointerType)}},timestamp:{get:function(){return this.nt},set:function(a){this.nt=a}},targetDiagram:{get:function(){return this.mt},set:function(a){this.mt=a}},targetObject:{ get:function(){return this.pd},set:function(a){this.pd=a}},control:{get:function(){return 0!==(this.modifiers&1)},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return 0!==(this.modifiers&4)},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return 0!==(this.modifiers&2)},set:function(a){this.modifiers=a?this.modifiers| 2:this.modifiers&-3}},meta:{get:function(){return 0!==(this.modifiers&8)},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&1):0===this.button},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a= this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&2):2===this.button},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return null===a||"mousedown"!==a.type&&"mouseup"!==a.type&&"pointerdown"!==a.type&&"pointerup"!==a.type?0!==(this.buttons&4):1===this.button},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}); -me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.C=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.C=this.C;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; -function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}; -we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.C=this.C;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; +me.prototype.getMultiTouchDocumentPoint=me.prototype.mA;me.prototype.getMultiTouchViewPoint=me.prototype.Jq;me.className="InputEvent";function ve(){this.B=null;this.oa="";this.Js=this.kt=null}ve.prototype.copy=function(){var a=new ve;a.B=this.B;a.oa=this.oa;a.kt=this.kt;a.Js=this.Js;return a};ve.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; +na.Object.defineProperties(ve.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},subject:{get:function(){return this.kt},set:function(a){this.kt=a}},parameter:{get:function(){return this.Js},set:function(a){this.Js=a}}});ve.className="DiagramEvent"; +function we(){this.wn=xe;this.gf=this.ys="";this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}we.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.B=this.cc=null}; +we.prototype.copy=function(){var a=new we;a.wn=this.wn;a.ys=this.ys;a.gf=this.gf;a.cc=this.cc;a.B=this.B;a.np=this.np;var b=this.pp;a.pp=za(b)&&"function"===typeof b.H?b.H():b;b=this.op;a.op=za(b)&&"function"===typeof b.H?b.H():b;b=this.ip;a.ip=za(b)&&"function"===typeof b.H?b.H():b;b=this.hp;a.hp=za(b)&&"function"===typeof b.H?b.H():b;return a};we.prototype.jb=function(a){a.classType===we&&(this.change=a)}; we.prototype.toString=function(){var a="";a=this.change===ye?a+"* ":this.change===xe?a+(null!==this.model?"!m":"!d"):a+((null!==this.model?"!m":"!d")+this.change);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange);a+=": ";this.change===ye?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ka(this.object)),null!==this.oldValue&&(a+=" old: "+Ka(this.oldValue)),null!== this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ka(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};we.prototype.G=function(a){return a?this.oldValue:this.newValue};we.prototype.oA=function(a){return a?this.oldParam:this.newParam};we.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; we.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};we.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};we.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.C},set:function(a){this.C=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, +na.Object.defineProperties(we.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.B},set:function(a){this.B=a}},change:{get:function(){return this.wn},set:function(a){this.wn=a}},modelChange:{get:function(){return this.ys},set:function(a){this.ys=a}},propertyName:{get:function(){return this.gf}, set:function(a){this.gf=a}},isTransactionFinished:{get:function(){return this.wn===ye&&("CommittedTransaction"===this.gf||"FinishedUndo"===this.gf||"FinishedRedo"===this.gf)}},object:{get:function(){return this.np},set:function(a){this.np=a}},oldValue:{get:function(){return this.pp},set:function(a){this.pp=a}},oldParam:{get:function(){return this.op},set:function(a){this.op=a}}, newValue:{get:function(){return this.ip},set:function(a){this.ip=a}},newParam:{get:function(){return this.hp},set:function(a){this.hp=a}}});we.prototype.redo=we.prototype.redo;we.prototype.canRedo=we.prototype.canRedo;we.prototype.undo=we.prototype.undo;we.prototype.canUndo=we.prototype.canUndo;we.prototype.getParam=we.prototype.oA;we.prototype.getValue=we.prototype.G;we.prototype.clear=we.prototype.clear; var ye=new D(we,"Transaction",-1),xe=new D(we,"Property",0),ze=new D(we,"Insert",1),Ae=new D(we,"Remove",2);we.className="ChangedEvent";we.Transaction=ye;we.Property=xe;we.Insert=ze;we.Remove=Ae;function Be(){this.u=(new E).freeze();this.oa="";this.l=!1}Be.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0a.transactionLevel&&xa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Bb("CommittingTransaction",c,e));var f=0;if(0a.historyIndex;d--)f=b.J(d),null!==f&&f.clear(),b.cb(d),a.ks=!0;d=a.maxHistoryLength;0<=d&&(0===d?b.clear():b.count>=d&&(f=b.J(0),null!==f&&f.clear(),b.cb(0),a.Xd--));0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Xd++);b.freeze()}a.isInternalTransaction||a.Bb("CommittedTransaction",c,e)}else{a.se=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction|| @@ -274,30 +274,30 @@ Ce.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.o na.Object.defineProperties(Ce.prototype,{models:{get:function(){return this.gv.iterator}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.J(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe&&(e=-3),0g&&(g=-3);if(void 0===h||void 0===e||void 0===g||0===e&&0===g||b.shift)!b.shift&&a.allowVerticalScroll?(f=3*f*a.scrollVerticalLineChange,0e||Math.abs(b.y-a.y)>d}; -na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.C},set:function(a){a instanceof R&&(this.C=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, -set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.va;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; +na.Object.defineProperties(Ee.prototype,{diagram:{get:function(){return this.B},set:function(a){a instanceof R&&(this.B=a)}},name:{get:function(){return this.oa},set:function(a){this.oa=a}},isEnabled:{get:function(){return this.md},set:function(a){this.md=a}},isActive:{get:function(){return this.Sc},set:function(a){this.Sc=a}},transactionResult:{get:function(){return this.ix}, +set:function(a){this.ix=a}}});Ee.prototype.stopTransaction=Ee.prototype.Jg;Ee.prototype.startTransaction=Ee.prototype.xa;Ee.className="Tool";function Pa(){Ee.call(this);this.name="ToolManager";this.Cc=new E;this.Tc=new E;this.Od=new E;this.T=this.Ka=850;this.u=(new M(2,2)).ca();this.eb=5E3;this.La=Ie;this.I=Ke;this.Kr=this.l=null;this.ik=-1}ma(Pa,Ee);Pa.prototype.initializeStandardTools=function(){}; Pa.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Je&&this.Kr===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; Pa.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Qe&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Re){b.bubbles=!0;return}if(this.gestureBehavior===Qe)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;dg&&(g=l),m>h&&(h=m))}}Infinity===d?f.h(0,0,0,0):f.h(d,e,g-d,h-e);d=f.x+f.width/2;e=f.y+f.height/2;N.free(f); f=a.it;g=new H;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.G(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Cd())));for(b=b.iterator;b.next();)l=b.value,l.Nc()&&l.canCopy()&&(k=c.G(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Ta(),g.add(k,a.Cd(h))));J.free(h);a.copiedParts=g;Ye(a,g.Kf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,rf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ @@ -383,8 +383,8 @@ a}},originalToPort:{get:function(){return this.Wh},set:function(a){this.Wh=a}},i get:function(){return this.lr},set:function(a){this.lr=a}}});Jf.className="LinkingBaseTool";function Vf(){Jf.call(this);this.name="Linking";this.T={};this.I=null;this.K=Wf;this.en=null}ma(Vf,Jf);Vf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.Ut()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:null!==this.findLinkablePort()}; Vf.prototype.findLinkablePort=function(){var a=this.diagram,b=this.startObject;null===b&&(b=a.Vb(a.firstInput.documentPoint,null,null));if(null===b)return null;a=b.part;if(!(a instanceof W))return null;var c=this.direction;if(c===Wf||c===Xf){var d=this.findValidLinkablePort(b,!1);if(null!==d||this.startObject===a&&(d=a.port,this.findValidLinkablePort(d,!1)))return this.isForwards=!0,d}if(c===Wf||c===Yf)if(b=this.findValidLinkablePort(b,!0),null!==b||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b, !0)))return this.isForwards=!1,b;return null}; -Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.va(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.s()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, -this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.s()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= +Vf.prototype.doActivate=function(){var a=this.diagram,b=this.findLinkablePort();null===b?this.stopTool():(this.xa(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.o()||(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=b,b=this.originalFromPort.part,b instanceof W&&(this.originalFromNode=b),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode, +this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.o()||(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=b,b=this.originalToPort.part,b instanceof W&&(this.originalToNode=b),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode= this.temporaryFromNode),null!==this.temporaryToNode&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.Ua(),a.add(this.temporaryLink)),this.isActive=!0)};Vf.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink);a.remove(this.temporaryFromNode);a.remove(this.temporaryToNode);a.isMouseCaptured=!1;a.currentCursor="";this.Jg()}; Vf.prototype.doStop=function(){Jf.prototype.doStop.call(this);this.startObject=null}; Vf.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.transactionResult=null,c=null,d=null,e=null,f=null;try{var g=this.targetPort=this.findTargetPort(this.isForwards);if(null!==g){var h=g.part;h instanceof W&&(this.isForwards?(null!==this.originalFromNode&&(b=this.originalFromNode,c=this.originalFromPort),d=h,e=g):(b=h,c=g,null!==this.originalToNode&&(d=this.originalToNode,e=this.originalToPort)))}else this.isForwards?null!==this.originalFromNode&&this.isUnconnectedLinkValid&& @@ -394,27 +394,27 @@ Vf.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(null===a)r na.Object.defineProperties(Vf.prototype,{archetypeLinkData:{get:function(){return this.T},set:function(a){this.T=a}},archetypeLabelNodeData:{get:function(){return this.I},set:function(a){this.I=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.en},set:function(a){this.en=a}}}); var Wf=new D(Vf,"Either",0),Xf=new D(Vf,"ForwardsOnly",0),Yf=new D(Vf,"BackwardsOnly",0);Vf.className="LinkingTool";Vf.Either=Wf;Vf.ForwardsOnly=Xf;Vf.BackwardsOnly=Yf; function bf(){Jf.call(this);this.name="Relinking";var a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.T=a;a=new Kf;a.figure="Diamond";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.en=a;this.I=null;this.Hx=new N}ma(bf,Jf); -bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.s()&&a.isVisible()&&d.actualBounds.s()&&d.Gf()&& -(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.o()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +bf.prototype.updateAdornments=function(a){if(null!==a&&a instanceof S){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&&(c=a.wk(b),null===c&&(c=this.makeAdornment(d,!1),a.Gh(b,c)))}null===c&&a.Hf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.o()&&a.isVisible()&&d.actualBounds.o()&&d.Gf()&& +(c=a.wk(b),null===c?(c=this.makeAdornment(d,!0),a.Gh(b,c)):c.s()));null===c&&a.Hf(b)}};bf.prototype.makeAdornment=function(a,b){var c=new Je;c.type=X.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; bf.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.Ut()||!a.lastInput.left)return!1;var b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"));return null!==b}; -bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.va(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +bf.prototype.doActivate=function(){var a=this.diagram;if(null===this.originalLink){var b=this.handle;null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),null===b&&(b=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")));if(null===b)return;var c=b.part;if(!(c instanceof Je&&c.adornedPart instanceof S))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.xa(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; this.originalFromPort=this.originalLink.fromPort;this.originalFromNode=this.originalLink.fromNode;this.originalToPort=this.originalLink.toPort;this.originalToNode=this.originalLink.toNode;this.Hx.set(this.originalLink.actualBounds);null!==this.originalLink&&0b.firstPickIndex+1&&c=c.x)b=0>=c.y?b+225:1<=c.y?b+135:b+180;else if(1<=c.x)0>=c.y?b+=315:1<=c.y&&(b+=45);else if(0>=c.y)b+=270;else if(1<=c.y)b+=90;else break a;0>b?b+=360:360<=b&&(b-=360);a.cursor=22.5>b?"e-resize":67.5>b?"se-resize":112.5>b?"s-resize":157.5>b?"sw-resize":202.5>b?"w-resize":247.5>b?"nw-resize":292.5>b?"n-resize":337.5>b?"ne-resize": "e-resize"}else if(a instanceof X)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};vg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.va(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= +vg.prototype.doActivate=function(){var a=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(a.isMouseCaptured=!0,a.animationManager.Bc(),this.xa(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu= this.computeMinSize(),this.Mu=this.computeMaxSize(),this.isActive=!0))};vg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.isActive=a.isMouseCaptured=!1};vg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()}; vg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();J.free(e)}}; vg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Nu,c=this.Mu,d=this.Lu,e=this.adornedObject.Mt(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);J.free(e);a.Na();this.transactionResult=this.name;a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; @@ -451,11 +451,11 @@ na.Object.defineProperties(vg.prototype,{handleArchetype:{get:function(){return a);this.ie=a}},minSize:{get:function(){return this.fg},set:function(a){if(!this.fg.w(a)){var b=a.width;isNaN(b)&&(b=0);a=a.height;isNaN(a)&&(a=0);this.fg.h(b,a)}}},maxSize:{get:function(){return this.eg},set:function(a){if(!this.eg.w(a)){var b=a.width;isNaN(b)&&(b=Infinity);a=a.height;isNaN(a)&&(a=Infinity);this.eg.h(b,a)}}},cellSize:{get:function(){return this.Qg},set:function(a){this.Qg.w(a)||this.Qg.assign(a)}}, isGridSnapEnabled:{get:function(){return this.I},set:function(a){this.I=a}},dragsMembers:{get:function(){return this.T},set:function(a){this.T=a}},oppositePoint:{get:function(){return this.Hs},set:function(a){this.Hs.w(a)||this.Hs.assign(a)}},originalDesiredSize:{get:function(){return this.Gx}},originalLocation:{get:function(){return this.qp}}}); vg.className="ResizingTool";Na("resizingTool",function(){return this.findTool("Resizing")},function(a){this.Ya("Resizing",a,this.mouseDownTools)});function Cg(){Ee.call(this);this.name="Rotating";this.La=45;this.Ka=2;this.qp=new J;this.ie=null;var a=new Kf;a.figure="Ellipse";a.desiredSize=Lb;a.fill="lightblue";a.stroke="dodgerblue";a.strokeWidth=1;a.cursor="pointer";this.u=a;this.l=null;this.Fx=0;this.Ps=new J(NaN,NaN);this.I=0;this.T=50}ma(Cg,Ee); -Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.s()&&a.isVisible()&&b.actualBounds.s()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; +Cg.prototype.updateAdornments=function(a){if(null!==a){if(a.Ph()){var b=a.rotateObject;if(b===a||b===a.path||b.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(b=a.rotateObject,null!==b&&a.canRotate()&&a.actualBounds.o()&&a.isVisible()&&b.actualBounds.o()&&b.Gf())){var c=a.wk(this.name);if(null===c||c.adornedObject!==b)c=this.makeAdornment(b);if(null!==c){c.angle=b.lj();null===c.placeholder&&(c.location=this.computeAdornmentLocation(b));a.Gh(this.name,c);return}}a.Hf(this.name)}}; Cg.prototype.makeAdornment=function(a){var b=a.part.rotateAdornmentTemplate;if(null===b){b=new Je;b.type=X.Position;b.locationSpot=zc;var c=this.handleArchetype;null!==c&&b.add(c.copy())}else if(yg(b),b=b.copy(),null===b)return null;b.adornedObject=a;return b};Cg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?null!==this.findToolHandleAt(a.firstInput.documentPoint,this.name):!1}; -Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.va(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; +Cg.prototype.doActivate=function(){var a=this.diagram;if(null===this.adornedObject){null===this.handle&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name));if(null===this.handle)return;this.adornedObject=this.handle.part.adornedObject}null!==this.adornedObject&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.xa(this.name),this.Fx=this.adornedObject.angle,this.Ps=this.computeRotationPoint(this.adornedObject),this.qp=this.adornedObject.part.location.copy(),this.isActive=!0)}; Cg.prototype.computeRotationPoint=function(a){var b=a.part,c=b.locationObject;return b.rotationSpot.kb()?a.da(b.rotationSpot):a===b||a===c?c.da(b.locationSpot):a.da(zc)}; -Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.s()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ +Cg.prototype.computeAdornmentLocation=function(a){var b=this.rotationPoint;b.o()||(b=this.computeRotationPoint(a));b=a.Mt(b);var c=this.handleAngle;0>c?c+=360:360<=c&&(c-=360);c=Math.round(45*Math.round(c/45));var d=this.handleDistance;0===c?b.x=a.naturalBounds.width+d:45===c?(b.x=a.naturalBounds.width+d,b.y=a.naturalBounds.height+d):90===c?b.y=a.naturalBounds.height+d:135===c?(b.x=-d,b.y=a.naturalBounds.height+d):180===c?b.x=-d:225===c?(b.x=-d,b.y=-d):270===c?b.y=-d:315===c&&(b.x=a.naturalBounds.width+ d,b.y=-d);return a.da(b)};Cg.prototype.doDeactivate=function(){var a=this.diagram;this.Jg();this.ie=this.handle=null;this.Ps=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Cg.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()};Cg.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))}; Cg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Na();this.transactionResult=this.name;a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Cg.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Ta();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Gg(d))c=this.qp.copy(),b.location=c.ge(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; @@ -469,7 +469,7 @@ Eg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInp Eg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.Xk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};Eg.prototype.doStop=function(){this.Xk=null};Eg.className="ActionTool";function Fg(){Ee.call(this);this.name="ClickCreating";this.Aj=null;this.u=!0;this.l=!1;this.xx=new J(0,0)}ma(Fg,Ee); Fg.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===a.lastInput.clickCount&&(this.xx=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.xx))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.zm(a.lastInput.documentPoint,!0)?!1:!0}; Fg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.va(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= +Fg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.R("ChangingSelection",b.selection);this.xa(this.name);if(c instanceof V)c.Nc()&&(yg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.uf(e),d=b.zc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Na();this.transactionResult= this.name;b.R("PartCreated",d)}finally{this.Jg(),b.R("ChangedSelection",b.selection)}return d};na.Object.defineProperties(Fg.prototype,{archetypeNodeData:{get:function(){return this.Aj},set:function(a){this.Aj=a}},isDoubleClick:{get:function(){return this.u},set:function(a){this.u=a}},isGridSnapEnabled:{get:function(){return this.l},set:function(a){this.l=a}}});Fg.className="ClickCreatingTool"; function Hg(){Ee.call(this);this.name="DragSelecting";this.pl=175;this.u=!1;var a=new V;a.layerName="Tool";a.selectable=!1;var b=new Kf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.l=a}ma(Hg,Ee); Hg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var b=a.lastInput;return!b.left||a.currentTool!==this&&(!this.isBeyondDragSize()||b.timestamp-a.firstInput.timestampa.lastInput.clickCount?!1:!0};Vg.prototype.doStart=function(){eh=this;null!==this.textBlock&&this.doActivate()}; Vg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.Vb(a.lastInput.documentPoint));if(null!==b&&b instanceof Wg&&(this.textBlock=b,null!==b.part)){this.isActive=!0;this.ia=bh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.zh=this.textBlock.copy();var d=new N(this.textBlock.da(tc),this.textBlock.da(Dc));a.Aw(d);c.show(b,a,this);this.currentTextEditor=c}}}};Vg.prototype.doCancel=function(){this.stopTool()}; Vg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Vg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(fh)};Vg.prototype.acceptText=function(a){switch(a){case fh:if(this.ia===hh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this);break;case kh:case $g:case ah:if($g!==a||!0!==this.textBlock.isMultiline)if(this.ia===bh||this.ia===dh||this.ia===ch)this.ia=ih,jh(this)}}; -function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.va(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} +function jh(a){var b=a.textBlock,c=a.diagram,d=a.currentTextEditor;if(null!==b&&null!==d){var e=b.text,f="";null!==d.valueFunction&&(f=d.valueFunction());a.isValidText(b,e,f)?(a.xa(a.name),a.ia=hh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.R("TextEdited",b,e),a.Jg(),a.stopTool(),null!==c&&c.doFocus()):(a.ia=dh,a.doError(e,f))}} Vg.prototype.doError=function(a,b){var c=this.textBlock;null!==c.errorFunction&&c.errorFunction(this,a,b);(a=this.currentTextEditor)&&a.show(c,this.diagram,this)};Vg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Vg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.ia=Yg,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.isActive=!1)};Vg.prototype.doStop=function(){eh=null}; Vg.prototype.isValidText=function(a,b,c){var d=this.textValidation;if(null!==d&&!d(a,b,c))return!1;d=a.textValidation;return null===d||d(a,b,c)?!0:!1};Vg.prototype.Jy=function(a){var b=this.zh;b.text=a;b.measure(this.textBlock.Ei,Infinity);return b}; na.Object.defineProperties(Vg.prototype,{textBlock:{get:function(){return this.La},set:function(a){this.La=a}},currentTextEditor:{get:function(){return this.u},set:function(a){this.u=a}},defaultTextEditor:{get:function(){return this.l},set:function(a){this.l=a}},starting:{get:function(){return this.Ka},set:function(a){this.Ka=a}},textValidation:{get:function(){return this.Wi}, set:function(a){this.Wi=a}},minimumEditorScale:{get:function(){return this.I},set:function(a){this.I=a}},selectsTextOnActivate:{get:function(){return this.T},set:function(a){this.T=a}},state:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}}});Vg.prototype.measureTemporaryTextBlock=Vg.prototype.Jy; var kh=new D(Vg,"LostFocus",0),fh=new D(Vg,"MouseDown",1),ah=new D(Vg,"Tab",2),$g=new D(Vg,"Enter",3),lh=new D(Vg,"SingleClick",0),Xg=new D(Vg,"SingleClickSelected",1),gh=new D(Vg,"DoubleClick",2),Yg=new D(Vg,"StateNone",0),bh=new D(Vg,"StateActive",1),ch=new D(Vg,"StateEditing",2),ih=new D(Vg,"StateValidating",3),dh=new D(Vg,"StateInvalid",4),hh=new D(Vg,"StateValidated",5),eh=null;Vg.className="TextEditingTool";Vg.LostFocus=kh;Vg.MouseDown=fh;Vg.Tab=ah;Vg.Enter=$g;Vg.SingleClick=lh; Vg.SingleClickSelected=Xg;Vg.DoubleClick=gh;Vg.StateNone=Yg;Vg.StateActive=bh;Vg.StateEditing=ch;Vg.StateValidating=ih;Vg.StateInvalid=dh;Vg.StateValidated=hh;Na("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.Ya("TextEditing",a,this.mouseUpTools)}); -function mh(){nh||(oh(),nh=!0);this.C=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.C=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} -function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();return a.sc=!0} -function th(a){if(a.md&&a.sc){var b=a.Rd,c=a.C,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===uh&&b.lc.clear(),a.Qx=a.Al===vh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),wh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==xh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Kh(c),a.sc=!1,a.ef=!1,b.start(),Lh(a),c.Na(),Mh(b,0),Hf(c,!0),Nh(a),c.R("AnimationStarting",a))}))}}function Oh(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; -function Ph(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} +function mh(){nh||(oh(),nh=!0);this.B=Fe;this.zl=this.ef=this.sc=this.ps=this.jc=!1;this.Qx=!0;this.Al=ph;this.tn=!1;this.zi=this.md=!0;this.Yg=600;this.ox=this.Px=!1;this.Re=new G;this.Rd=new qh;this.Rd.Uc=this;this.yj=new G;this.tv=new G;this.ot=new G;this.$l=new G}mh.prototype.ee=function(a){this.B=a};mh.prototype.canStart=function(){return!0};function rh(a,b){sh(a,b)&&(a.ef=!0)} +function sh(a,b){if(!a.md||!a.canStart(b))return!1;a.Re.add(b);a.defaultAnimation.isAnimating&&a.Bc();th(a.B);return a.sc=!0} +function uh(a){if(a.md&&a.sc){var b=a.Rd,c=a.B,d=a.Re.contains("Model");d&&(a.zl=!0,a.Al===ph?(b.isViewportUnconstrained=!0,b.lc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Al===vh&&b.lc.clear(),a.Qx=a.Al===wh&&c.Ts.w(c.la)?!0:!1,c.R("InitialAnimationStarting",a));d&&!a.zi||0===b.lc.count?(a.Re.clear(),a.sc=!1,a.ef=!1,b.lc.clear(),xh(b,c),a.zl=!1,c.M()):(a.Re.clear(),c.Ee=!1,d=b.lc.get(c),c.autoScale!==Kh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.sc||b.jc||(c.Ke("temporaryPixelRatio")&&Ze(c),Lh(c),a.sc=!1,a.ef=!1,b.start(),Mh(a),c.Na(),Nh(b,0),Hf(c,!0),Oh(a),c.R("AnimationStarting",a))}))}}function Ph(a,b,c,d){a.isTicking||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.Rd.add(b,"position",c,d,!1)}t=mh.prototype;t.cu=function(a){return this.Rd.cu(a)};t.ew=function(a){return this.Rd.ew(a)}; +function Qh(a,b){function c(){0f?f+=360:k+=360);f=e(c,f,k-f,d)%360;g=e(c,g,l-g,d);h=e(c,h,m-h,d);c=e(c,a,b-a,d);return"hsla("+f+", "+g+"%, "+h+"%, "+c+")"} function oh(){function a(a,b,e,f,g,h){a.position=new J(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new H;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&wa(a,">= 1",mh,"duration");this.Yg=a}},isAnimating:{get:function(){return this.jc}}, isTicking:{get:function(){return this.ps}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a}},defaultAnimation:{get:function(){return this.Rd}},activeAnimations:{get:function(){return this.yj}},initialAnimationStyle:{get:function(){return this.Al},set:function(a){this.Al=a}}});mh.prototype.stopAnimation=mh.prototype.Bc; -var Wh=null,nh=!1,ph=new D(mh,"Default",1),vh=new D(mh,"AnimateLocations",2),uh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Wh.add(a,b)};mh.Default=ph;mh.AnimateLocations=vh;mh.None=uh; -function qh(){this.xv=this.Ox=this.Uc=this.C=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Xh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Yh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Qh(this,!0);Lh(this.Uc);Hf(this.C);Nh(this.Uc);this.C.redraw()}; -function wh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} -function Mh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Wh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; -t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.C,c=this.Uc;this.Il=this.jc=c.zl=!1;Lh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.o();e=this.Fp;d=d.iterator;for(var f=Wh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Nh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),wh(this,null),c.xm(this),b.Db())}}; +var Xh=null,nh=!1,ph=new D(mh,"Default",1),wh=new D(mh,"AnimateLocations",2),vh=new D(mh,"None",3);mh.className="AnimationManager";mh.defineAnimationEffect=function(a,b){nh||(oh(),nh=!0);Xh.add(a,b)};mh.Default=ph;mh.AnimateLocations=wh;mh.None=vh; +function qh(){this.xv=this.Ox=this.Uc=this.B=null;this.Il=this.jc=this.l=!1;this.Zn=this.Dd=0;this.Ir=this.Ku=Yh;this.Hl=this.Fp=!1;this.nv=1;this.mv=0;this.vd=this.Yg=NaN;this.tx=0;this.$n=null;this.u=Bb;this.lc=new H;this.iv=new H;this.qm=new G;this.jv=new G;this.px=Zh}qh.prototype.suspend=function(){this.Il=!0};qh.prototype.advanceTo=function(a,b){b&&(this.Il=!1);this.Fp&&a>=this.vd&&(this.Hl=!0,a-=this.vd);this.tx=a;Rh(this,!0);Mh(this.Uc);Hf(this.B);Oh(this.Uc);this.B.redraw()}; +function xh(a,b){a.iv.clear();a.Hl=!1;a.mv=0;a.vd=NaN;0a.Zn?a.vd:d-a.Dd;b&&(e=a.tx,ea.Zn&&(a.Fp&&!a.Hl?(a.Dd=+new Date,a.Zn=a.Dd+a.vd,a.Hl=!0):a.xm(!1))}}} +function Nh(a,b){for(var c=a.vd,d=a.lc.iterator,e=a.Hl;d.next();){var f=d.key;if(!(f instanceof Y&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=Xh,l;for(l in g)"position"===l&&(g["position:placeholder"]||g["position:nodeCollapse"])||null===k.get(l)||k.get(l)(f,h[l],g[l],a.Ir,b,c,a)}}}t.stop=function(){this.jc&&this.xm(!0)}; +t.xm=function(a){null!==this.xv&&this.xv.Mp.remove(this.Ox);if(this.jc){var b=this.B,c=this.Uc;this.Il=this.jc=c.zl=!1;Mh(c);for(var d=this.lc,e=this.qm.iterator;e.next();)b.remove(e.value);for(e=this.jv.iterator;e.next();)e.value.s();e=this.Fp;d=d.iterator;for(var f=Xh;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Qv,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Kv||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Kv?k[n]:l[n],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==m.location&&g instanceof V&&(g.location=m.location);h.sw&&g instanceof V&&g.Ob(!1)}b.Yt.clear();mf(b,!1);b.Na();b.M();Hf(b,!0);if(c.defaultAnimation===this){for(n=c.$l.iterator;n.next();)e=n.value,null!==e.jf&&(e.points=e.jf,e.jf=null);c.$l.clear()}this.isViewportUnconstrained&&(b.scrollMode=this.px);Oh(c);this.mv++;!a&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),xh(this,null),c.xm(this),b.Db())}}; t.lk=function(a,b){var c=b.actualBounds,d=null;b instanceof U&&(d=b.placeholder);null!==d?(c=d.da(tc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new J(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof U)for(a=a.memberParts;a.next();)d=a.value,d instanceof W&&this.lk(d,b)}; t.jk=function(a,b){if(a.isVisible()){var c=null;b instanceof U&&(c=b.placeholder);null!==c?this.add(a,"position:placeholder",a.position,c,!0):this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);c=this.lc;c.contains(a)&&(c.G(a).sw=!0);if(a instanceof U)for(a=a.memberParts;a.next();)c=a.value,c instanceof W&&this.jk(c,b)}};t.pA=function(a){var b=this.iv.get(a);null===b&&(b={},this.iv.add(a,b));return b}; na.Object.defineProperties(qh.prototype,{duration:{get:function(){return this.Yg},set:function(a){1>a&&wa(a,">= 1",qh,"duration");this.Yg=a}},reversible:{get:function(){return this.Fp},set:function(a){this.Fp=a}},runCount:{get:function(){return this.nv},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Zh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Xh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=Zh; -function ei(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}ei.className="AnimationState";function fi(a,b,c){this.pd=null;this.gf=a;this.cq=c||gi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=hi))}fi.prototype.copy=function(){var a=new fi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; -function ii(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(fi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); -var gi=new D(fi,"Default",1),hi=new D(fi,"Immediate",2),ji=new D(fi,"Bundled",3);fi.className="AnimationTrigger";fi.Default=gi;fi.Immediate=hi;fi.Bundled=ji;function ki(){Xa(this);this.C=null;this.Ea=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=ki.prototype;t.clear=function(){this.Ea.clear();this.rp.length=0};t.ee=function(a){this.C=a}; -t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ea.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function $h(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}qh.className="Animation";qh.EaseLinear=function(a,b,c,d){return c*a/d+b};qh.EaseInOutQuad=Yh;qh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};qh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};qh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};qh.EaseOutExpo=$h; +function fi(a,b,c){this.start=a;this.end=b;this.Qv={};this.Kv=c;this.sw=!1}fi.className="AnimationState";function gi(a,b,c){this.pd=null;this.gf=a;this.cq=c||hi;this.bl=null;void 0!==b&&(this.bl=b,void 0===c&&(this.cq=ii))}gi.prototype.copy=function(){var a=new gi(this.gf);a.cq=this.cq;var b=this.bl;if(null!==b){var c={};void 0!==b.duration&&(c.ny=b.duration);void 0!==b.finished&&(c.ny=b.finished);void 0!==b.easing&&(c.ny=b.easing);a.bl=c}return a}; +function ji(a,b){a=a.bl;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}na.Object.defineProperties(gi.prototype,{propertyName:{get:function(){return this.gf},set:function(a){this.gf=a}},animationSettings:{get:function(){return this.bl},set:function(a){this.bl=a}},startCondition:{get:function(){return this.cq},set:function(a){this.cq=a}}}); +var hi=new D(gi,"Default",1),ii=new D(gi,"Immediate",2),ki=new D(gi,"Bundled",3);gi.className="AnimationTrigger";gi.Default=hi;gi.Immediate=ii;gi.Bundled=ki;function li(){Xa(this);this.B=null;this.Fa=new E;this.oa="";this.hb=1;this.u=!1;this.l=this.Pi=this.I=this.ii=this.hi=this.gi=this.fi=this.di=this.ei=this.ci=this.ki=this.bi=this.ji=this.ai=this.$h=!0;this.rp=[]}t=li.prototype;t.clear=function(){this.Fa.clear();this.rp.length=0};t.ee=function(a){this.B=a}; +t.toString=function(a){void 0===a&&(a=0);var b='Layer "'+this.name+'"';if(0>=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Fa.iterator;h.next();){var k=h.value;k instanceof U?e++:k instanceof W?d++:k instanceof S?f++:k instanceof Je?g++:c++}h="";0c.Xo||h.height*e>c.Xo?b.mc(a,c):(e=b.actualBounds,f=b.naturalBounds,0===e.width||0===e.height||isNaN(e.x)|| -isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(ni(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ni(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),ni(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* -c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Ea;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));oi(this,a,b);return a}; -t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Ea;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; -function oi(a,b,c){b=pi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ea.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< +isNaN(e.y)||!b.isVisible()||(c=b.transform,null!==b.areaBackground&&(oi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(oi(b,a,"rgba(0,0,0,0.3)",!0,!1,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null!==b.background&&(a.transform(c.m11,c.m12,c.m21,c.m22,c.dx,c.dy),oi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22* +c.dx),b*(c.m12*c.dx-c.m11*c.dy))))));d&&(a.restore(),a.uc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.Va(xe,a,this,b,c,d,e)};t.oj=function(a,b,c){var d=this.Fa;b.Fi=this;if(a>=d.count)a=d.count;else if(d.J(a)===b)return-1;d.wb(a,b);b.Mq(c);d=this.diagram;null!==d&&(c?d.M():d.oj(b));pi(this,a,b);return a}; +t.Lc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Lc(a,b,c);var d=this.Fa;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.J(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Nq(c);d.cb(a);d=this.diagram;null!==d&&(c?d.M():d.Lc(b));b.Fi=null;return a}; +function pi(a,b,c){b=qi(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Fa.j,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,g=NaN;0<=f;){g=a.J(f).zOrder;if(!isNaN(g))break;f--}for(var h=b+1,k=NaN;hd)for(;;){if(-1===f||g<=d){f++;if(f===b)break;a.cb(b);a.wb(f,c);return f}for(g=NaN;0<=--f&&(g=a.J(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.cb(b);a.wb(h,c);return h}for(k=NaN;++h< e&&(k=a.J(h).zOrder,isNaN(k)););}return b} -na.Object.defineProperties(ki.prototype,{parts:{get:function(){return this.Ea.iterator}},partsBackwards:{get:function(){return this.Ea.iteratorBackwards}},diagram:{get:function(){return this.C}},name:{get:function(){return this.oa},set:function(a){var b=this.oa;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&B("Cannot rename default Layer to: "+a),c=c.layers;c.next();)c.value.name=== -a&&B("Layer.name is already present in this diagram: "+a);this.oa=a;this.g("name",b,a);for(a=this.Ea.iterator;a.next();)a.value.layerName=this.oa}}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a||1=a)return b;for(var c=this.Ma.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b};R.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})}; R.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function Qi(a){var b=a.wa.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, +function Ri(a){var b=a.ya.Ja;b instanceof HTMLCanvasElement&&(a.zj?(a.addEventListener(b,"pointerdown",a.Ok,!1),a.addEventListener(b,"pointermove",a.Pk,!1),a.addEventListener(b,"pointerup",a.Rk,!1),a.addEventListener(b,"pointerout",a.Qk,!1)):(a.addEventListener(b,"touchstart",a.Ow,!1),a.addEventListener(b,"touchmove",a.Nw,!1),a.addEventListener(b,"touchend",a.Mw,!1),a.addEventListener(b,"mousemove",a.Ik,!1),a.addEventListener(b,"mousedown",a.Hk,!1),a.addEventListener(b,"mouseup",a.Kk,!1),a.addEventListener(b, "mouseout",a.Jk,!1)),a.addEventListener(b,"mouseenter",a.Oz,!1),a.addEventListener(b,"mouseleave",a.Pz,!1),a.addEventListener(b,"wheel",a.Lk,!1),a.addEventListener(b,"keydown",a.BA,!1),a.addEventListener(b,"keyup",a.CA,!1),a.addEventListener(b,"blur",a.Az,!1),a.addEventListener(b,"focus",a.Bz,!1),a.addEventListener(b,"selectstart",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"contextmenu",function(a){a.preventDefault();return!1},!1),a.addEventListener(b,"gesturestart",function(b){a.toolManager.gestureBehavior!== -Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.wa.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.ya/e.width*e.left,b.pageY-x.scrollY-a.xa/e.height*e.top); +Re&&(a.toolManager.gestureBehavior===Qe?b.preventDefault():a.re&&a.lastInput.handled||(b.preventDefault(),a.Vl=a.scale,a.currentTool.doCancel()))},!1),a.addEventListener(b,"gesturechange",function(b){if(a.toolManager.gestureBehavior!==Re)if(a.toolManager.gestureBehavior===Qe)b.preventDefault();else if(!a.re||!a.lastInput.handled){b.preventDefault();var c=b.scale;if(null!==a.Vl){var e=a.ya.getBoundingClientRect();b=new J(b.pageX-x.scrollX-a.va/e.width*e.left,b.pageY-x.scrollY-a.ua/e.height*e.top); c=a.Vl*c;e=a.commandHandler;if(c!==a.scale&&e.canResetZoom(c)){var f=a.zoomPoint;a.zoomPoint=b;e.resetZoom(c);a.zoomPoint=f}}}},!1),a.addEventListener(x,"resize",a.Ww,!1))}function Ze(a){30p&&(this.position=q.h(-(this.Ys.scrollWidth-this.ya)+u-this.ya/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, --(this.Ys.scrollHeight-this.xa)+a.scrollTop-this.xa/c+d))),J.free(q),Vi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0p&&(this.position=q.h(-(this.Ys.scrollWidth-this.va)+u-this.va/c+k,this.position.y))),a.iz&&this.allowVerticalScroll&&(fr&&(this.position=q.h(this.position.x, +-(this.Ys.scrollHeight-this.ua)+a.scrollTop-this.ua/c+d))),J.free(q),Wi(this),this.wi=this.Op=!1,b=this.documentBounds,c=this.viewportBounds,k=b.right,p=c.right,d=b.bottom,r=c.bottom,e=b.x,l=c.x,f=b.y,b=c.y,m>=g&&e>=l&&k<=p&&(this.Pp.style.width="1px"),n>=h&&f>=b&&d<=r&&(this.Pp.style.height="1px"))}};R.prototype.computeBounds=function(){0c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Yh;this.scale=Zi(this,cj);a!==Yh&&(Yi(this,!1),$i(this,this.documentBounds,this.ya/this.Aa,this.xa/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; -t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.ya;var f=this.xa;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function Zi(a,b){var c=a.Qn;if(null===a.ya)return c;a.Ta();var d=a.documentBounds;if(!d.o())return c;var e=d.width;d=d.height;var f=a.va+(a.Ye?a.rb:0),g=a.ua+(a.pe?a.rb:0),h=f/e,k=g/d;return b===cj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===dj?(b=k>h?(g-a.rb)/d:(f-a.rb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +R.prototype.zoomToFit=function(){var a=this.Ti;this.Ti=Zh;this.scale=Zi(this,cj);a!==Zh&&(Yi(this,!1),$i(this,this.documentBounds,this.va/this.Aa,this.ua/this.Aa,this.Dj,!1));this.Ti=a};t=R.prototype; +t.mB=function(a,b){void 0===b&&(b=cj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===cj||b===dj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.va;var f=this.ua;e=b===dj?f/d>e/c?(f-(this.pe?this.rb:0))/d:(e-(this.Ye?this.rb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.uz=function(a,b){this.Ta();var c=this.documentBounds,d=this.viewportBounds;this.position=new J(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};t.kA=function(a){if(a instanceof Y){this.ao=a;var b=J.alloc();this.bo=this.gr(a.da(tc,b));J.free(b)}else this.ao=null,this.bo=Hb}; -function $i(a,b,c,d,e,f){var g=J.allocAt(a.la.x,a.la.y),h=g.x,k=g.y;if(null!==a.ao){var l=J.alloc();l=a.ao.da(tc,l);h=l.x-a.bo.x/a.scale;k=l.y-a.bo.y/a.scale;e=sc;J.free(l)}if(f||a.scrollMode===Yh)e.kb()&&(c>b.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.width&&(h=b.x+(e.x*b.width+e.offsetX)-(e.x*c-e.offsetX)),d>b.height&&(k=b.y+(e.y*b.height+e.offsetY)-(e.y*d-e.offsetY))),e=a.Si,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.wa;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.ya/c.width*c.left,b.clientY-a.xa/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||Wi(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Vi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; +R.prototype.CA=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!1);c.key=String.fromCharCode(a.which);c.up=!0;switch(a.which){case 8:c.key="Backspace";break;case 33:c.key="PageUp";break;case 34:c.key="PageDown";break;case 35:c.key="End";break;case 36:c.key="Home";break;case 37:c.key="Left";break;case 38:c.key="Up";break;case 39:c.key="Right";break;case 40:c.key="Down";break;case 45:c.key="Insert";break;case 46:c.key="Del"}b.doKeyUp();return nj(c,a)}; +R.prototype.Oz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseEnter&&b.mouseEnter(c);return nj(c,a)};R.prototype.Pz=function(a){var b=this.B;if(!b.isEnabled)return!1;var c=hj(b,a,!0);null!==b.mouseLeave&&b.mouseLeave(c);return nj(c,a)}; +R.prototype.getMouse=function(a){var b=this.ya;if(null===b)return new J(0,0);var c=b.getBoundingClientRect();b=a.clientX-this.va/c.width*c.left;a=a.clientY-this.ua/c.height*c.top;return null!==this.sb?wb(new J(b,a),this.sb):new J(b,a)}; +function ij(a,b,c){var d=a.ya,e=a.va,f=a.ua,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.viewPoint.h(g,h);null!==a.sb?(b=J.allocAt(g,h),a.sb.Jd(b),c.documentPoint.assign(b),J.free(b)):c.documentPoint.h(g,h)} +function ue(a,b,c,d){if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;b=b.targetTouches[c]}else if(null!==a.bk[0])b=a.bk[c];else return;c=a.ya;null!==c&&(c=c.getBoundingClientRect(),d.h(b.clientX-a.va/c.width*c.left,b.clientY-a.ua/c.height*c.top))}R.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))};function oj(a){a.ac||th(a);a.Ta()}R.prototype.redraw=function(){this.Sb||this.ac||(this.M(),aj(this),Wi(this),this.Na(),this.hd())};t=R.prototype;t.AA=function(){return this.Ee}; t.Jz=function(a){void 0===a&&(a=null);var b=this.animationManager,c=b.isEnabled;b.Bc();b.isEnabled=!1;Hf(this);this.qe=!1;this.Ts=new J(NaN,NaN);b.isEnabled=c;this.ac=!0;var d=this;null!==a&&ta(function(){d.ac=!1;rh(b,"Model");a(d)},1)};t.Db=function(a){void 0===a&&(a=!1);if(!0!==this.Ee&&!(this.Sb||!1===a&&this.ac)){this.Ee=!0;var b=this;x.requestAnimationFrame(function(){b.Ee&&b.hd()})}};t.hd=function(){if(!this.Kj||this.Ee)this.Kj&&(this.Kj=!1),Hf(this)}; -function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ti(a)||(b&&Wi(a),c&&Yi(a,!1))} -function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Fa||a.sm.s())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} +function bj(a,b,c){a.animationManager.defaultAnimation.isAnimating||a.Sb||!a.wi||Ui(a)||(b&&th(a),c&&Yi(a,!1))} +function Hf(a,b){if(!a.ac&&(a.Ee=!1,null!==a.Da||a.sm.o())){a.ac=!0;var c=a.animationManager,d=a.Wl;if(!c.isAnimating&&0!==d.length){for(var e=d.j,f=e.length,g=0;gb;b++){var c=a.wd.iterator;if(null===c||0===a.wd.count)break;a.wd=new G;a.Vw(c,a.wd)}a.nodes.each(function(a){a instanceof U&&0!==(a.P&65536)!==!1&&(a.P=a.P^65536)})}} t.Vw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Nc()||c instanceof U||(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Je&&c.isVisible()&&(c.rj()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; function tj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof S?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;ec&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): -(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Yh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.ya,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.xa,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.ya,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1c&&(r=y.left,q=y.right),p.height>v&&(u=y.top,w=y.bottom)): +(r=y.left,q=y.right,u=y.top,w=y.bottom);y=p.width+r+q;var z=p.height+u+w;r=p.x-r;var A=n.x;q=p.right+q;var C=n.right+h;u=p.y-u;var F=n.y;p=p.bottom+w;n=n.bottom+k;var Q="1px",K="1px";w=a.scale;l=y>l/w;m=z>m/w;a.scrollMode===Zh&&(l||m)&&(l&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(l=1,r+1C+1&&(l=Math.max((q-C)*w+a.va,l)),c+h+1n+1&&(l=Math.max((p-n)*w+a.ua,l)),v+k+1C+1&&(h=Math.max((q-C)*w+a.va,h)),c+1n+1&&(k=Math.max((p-n)*w+h,k)),v+1C+1&&(k=a.position.x*w));if(a.Gl)switch(a.Ss){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(v+1n+1&&(b.scrollTop= -a.position.y*w));l=a.ya;m=a.xa;b.style.width=l+(a.Ye?a.rb:0)+"px";b.style.height=m+(a.pe?a.rb:0)+"px";return d!==l||e!==m||a.animationManager.sc?(a.onViewportBoundsChanged(f,a.viewportBounds,w,g),!1):!0}t=R.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&B("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.xk(a.layerName),null===b&&(b=this.xk("")),null===b&&B('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oj(99999999,a,a.diagram===this);0<=c&&this.Va(ze,"parts",b,null,a,null,c);b.isTemporary||this.Na();a.B(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oj=function(a){this.partManager.oj(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof Je||a instanceof U&&null!==a.placeholder)&&a.o();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.wd.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()}; -t.Lc=function(a){a.nk();this.partManager.Lc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.wd.remove(a);Lj(a)?(a.actualBounds.s()&&this.M(Fj(a,a.actualBounds)),this.Na()):a.isVisible()&&a.actualBounds.s()&&this.M(Fj(a,a.actualBounds));this.Db()};t.remove=function(a){Nj(this,a,!0)}; -function Nj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.B(2),c&&b.uk(),c=d.Lc(-1,b,!1),0<=c&&a.Va(Ae,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.gu=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Na()}; t.nz=function(a,b){Tj(this,a,b);a.ee(this);var c=this.Ma,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.cc&&this.Va(Ae,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Na()}; -t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ea.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.TA=function(a){a.diagram!==this&&B("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Ma,c=b.indexOf(a);if(b.remove(a)){for(b=a.Fa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.cc&&this.Va(Ae,"layers",this,a,null,c,null);this.M();this.Na()}}};t.xk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Wx=function(a){null===this.we&&(this.we=new E);this.we.add(a);this.model.Hh(a)};t.VA=function(a){null!==this.we&&(this.we.remove(a),0===this.we.count&&(this.we=null));this.model.Tk(a)};t.Hh=function(a){null===this.Of&&(this.Of=new E);this.Of.add(a)};t.Tk=function(a){null!==this.Of&&(this.Of.remove(a),0===this.Of.count&&(this.Of=null))}; t.zt=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.aw(a);a.change!==ye&&(this.isModified=!0);if(null!==this.Of)for(var b=this.Of,c=b.length,d=0;dn.Ea.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof ki&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= -c}}};R.prototype.va=function(a){return this.undoManager.va(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.va(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; +b?void 0:k):Xj(g,h,b?void 0:k));else if(g instanceof li){var m=!0===a.oldParam;"number"===typeof h&&k instanceof V&&(b?(k.isSelected=!1,k.isHighlighted=!1,k.Lb(),g.Lc(m?h:-1,k,m)):g.oj(h,k,m))}else g instanceof R?"number"===typeof h&&k instanceof li&&(b?this.Ma.cb(h):(k.ee(this),this.Ma.wb(h,k))):B("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(d===Ae){var n=a.object,p=a.oldParam,r=a.oldValue;if(n instanceof X)"number"===typeof p&&r instanceof Y?b?n.wb(p,r):n.Lc(p): +"number"===typeof p&&r instanceof Vj&&(r.isRow?Wj(n,p,b?r:void 0):Xj(n,p,b?r:void 0));else if(n instanceof li){var q=!0===a.newParam;"number"===typeof p&&r instanceof V&&(b?0>n.Fa.indexOf(r)&&n.oj(p,r,q):(r.isSelected=!1,r.isHighlighted=!1,r.Lb(),n.Lc(q?p:-1,r,q)))}else n instanceof R?"number"===typeof p&&r instanceof li&&(b?(r.ee(this),this.Ma.wb(p,r)):this.Ma.cb(p)):B("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ye&&B("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +c}}};R.prototype.xa=function(a){return this.undoManager.xa(a)};R.prototype.Xa=function(a){return this.undoManager.Xa(a)};R.prototype.If=function(){return this.undoManager.If()};R.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.xa(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.Xa(b):this.undoManager.If(),this.skipsUndoManager=c}};R.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; R.prototype.ir=function(){this.partManager.ir()}; -function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);else if(null===a.wa)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.ya,g=a.xa;e.width=a.ya/b;e.height=a.xa/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, -c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.C,"scale",b,a.Aa);a.M();aj(a)}} -R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Vi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==xh||d||a.width===b.width&&a.height===b.height||e.B();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= -Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.ya;this.Ic.kw.height=this.xa;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; -function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.s()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, +function Yj(a,b,c){var d=a.animationManager;if(a.Sb||a.ac)a.Aa=c,d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);else if(null===a.ya)a.Aa=c;else{a.Sb=!0;var e=a.viewportBounds.copy(),f=a.va,g=a.ua;e.width=a.va/b;e.height=a.ua/b;var h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.Oc()?l.Ef(Gc)?h=0:l.Ef(Hc)&&(h=f-1):h=l.kb()?l.x*(f-1):f/2);isNaN(k)&&(l.Oc()?l.Ef(Ec)?k=0:l.Ef(Ic)&&(k=g-1):k=l.kb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c=a.scaleComputation(a, +c));ca.maxScale&&(c=a.maxScale);f=J.allocAt(a.la.x+h/b-h/c,a.la.y+k/b-k/c);a.position=f;J.free(f);a.Aa=c;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);a.Sb=!1;Yi(a,!1);d.ef&&d.Rd.add(d.B,"scale",b,a.Aa);a.M();aj(a)}} +R.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.w(b)){void 0===d&&(d=!1);d||aj(this);Wi(this);var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Kh||d||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Zf&&e instanceof Pa&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Se(e,this));this.Sb||this.invalidateViewport(a,b);qj(this);this.Ic.scale=c;this.Ic.position.x=a.x;this.Ic.position.y=a.y;this.Ic.bounds.assign(a);this.Ic.Gv.width= +Math.round(a.width*c);this.Ic.Gv.height=Math.round(a.height*c);this.Ic.kw.width=this.va;this.Ic.kw.height=this.ua;this.Ic.hw=d;this.R("ViewportBoundsChanged",this.Ic,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Mc(b)&&a.Ua()})}}; +function qj(a,b){void 0===b&&(b=null);var c=a.Ib;if(null!==c&&c.visible){for(var d=M.alloc(),e=1,f=1,g=c.W.j,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/L.uy(f,m):e=e*m/L.uy(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(null!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=N.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.o()){N.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;N.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=J.alloc();L.Gq(a, g,0,0,d.width,d.height,b);b.offset(-d.width,-d.height);M.free(d);c.part.location=b;J.free(b)}}R.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.R("ChangingSelection",b);for(var c=b.ma(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),Wi(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||th(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.s(),e.doLayout(b),b.B(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; -function si(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); +t.cA=function(){return this.Dh.iterator};t.EA=function(a){th(this);a&&gk(this,!0);this.ac?rj(this,!1):(this.Hj=!0,Hf(this))};function gk(a,b){for(var c=a.Dh.iterator;c.next();)hk(a,c.value,b);null!==a.layout&&(b?a.layout.isValidLayout=!1:a.layout.C())}function hk(a,b,c){if(null!==b){for(var d=b.Sl.iterator;d.next();)hk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.C())}} +function rj(a,b){if(a.Ng&&!a.Nr){var c=a.Z;a.Z=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.xa("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.sc&&(b||rh(f,"Layout"));a.Ng=!1;for(var g=a.Dh.iterator;g.next();)pk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),th(a),e.isValidLayout=!0):a.Ng=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.Xa("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||uh(f),a.Z=c}}}function pk(a,b,c,d){if(null!==b){for(var e=b.Sl.iterator;e.next();)pk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Rh=!b.location.o(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.Ng=!0)}}t.jA=function(){for(var a=new E,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.jj()&&a.add(c)}return a.iterator}; +function ti(a){function b(a){var b=a.toLowerCase(),e=new E;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new H,d=new H;b("InitialAnimationStarting");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("GainedFocus");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped"); b("LostFocus");b("Modified");b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");b("InvalidateDraw");a.Qr=c;a.Pr=d} function Cj(a,b){var c=a.Pr.G(b);return null!==c?c:a.Pr.G(b.toLowerCase())}function tk(a,b){var c=a.Qr.G(b);if(null!==c)return c;c=a.Qr.G(b.toLowerCase());if(null!==c)return c;B("Unknown DiagramEvent name: "+b)}t.kk=function(a,b){a=tk(this,a);null!==a&&a.add(b)};t.Lm=function(a,b){a=tk(this,a);null!==a&&a.remove(b)}; t.R=function(a,b,c){var d=tk(this,a),e=new ve;e.diagram=this;a=Cj(this,a);null!==a&&(e.name=a);void 0!==b&&(e.subject=b);void 0!==c&&(e.parameter=c);b=d.length;if(1===b)d.J(0)(e);else if(0!==b)for(d=d.ma(),c=0;cw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& +function Fk(a,b,c,d){a.animationManager.Bc();a.hd();if(null===a.ya)return null;"object"!==typeof b&&B("properties argument must be an Object.");var e=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(g="SVG"===c?new M(Infinity,Infinity):new M(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,r=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!n);b=b.showGrid;void 0===b&&(b=q);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new kc(l):l instanceof kc||B("MakeImage padding must be a Margin or a number.");l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Gb.uc(!0);n=new Hk(null,p);var u=n.context;if(!(e||f||k||h)){n.width=a.va+Math.ceil(l.left+l.right);n.height=a.ua+Math.ceil(l.top+l.bottom);if("SVG"===c){if(null===d)return null;d.resize(n.width, +n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(n.width,n.height),a.Aa,a.la,k,m,q,b);a.rl=!0;return n.context}var w=a.Qn,v=a.documentBounds.copy();v.Jw(a.ib);if(q)for(var y=a.Ma.j,z=y.length,A=0;Aw?(f=w,e=v.width,v=v.height):(e=g.width,v=g.height)):(e=v.width*f,v=v.height*f):(f=w,e=v.width,v=v.height);null!==l?(e+=h,v+=T):l=new kc(0);null!==g&&(w=g.width,g=g.height,isNaN(w)&&(w=2E3),isNaN(g)&&(g=2E3),isFinite(w)&& (e=Math.min(e,w)),isFinite(g)&&(v=Math.min(v,g)));n.width=Math.ceil(e);n.height=Math.ceil(v);if("SVG"===c){if(null===d)return null;d.resize(n.width,n.height,n.width,n.height);d.ownerDocument=p;d.Dq=r;Aj(a,d.context,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);return d.context}a.rl=!1;Aj(a,u,l,new M(Math.ceil(e),Math.ceil(v)),f,y,k,m,q,b);a.rl=!0;return n.context} -na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Fa},set:function(a){if(this.Fa!==a){var b=this.Fa;null!==b?(b.C=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.wa&&(b=this.wa.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, -!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.wa.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.wa=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, -"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Fa=null;if(null!==a){if(b=a.C)b.div=null;Ci(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ +na.Object.defineProperties(R.prototype,{div:{get:function(){return this.Da},set:function(a){if(this.Da!==a){var b=this.Da;null!==b?(b.B=void 0,b.goDiagram=void 0,b.innerHTML="",null!==this.ya&&(b=this.ya.Ja,this.zj?(this.removeEventListener(b,"pointermove",this.Pk,!1),this.removeEventListener(b,"pointerdown",this.Ok,!1),this.removeEventListener(b,"pointerup",this.Rk,!1),this.removeEventListener(b,"pointerout",this.Qk,!1)):(this.removeEventListener(b,"touchstart",this.Ow, +!1),this.removeEventListener(b,"touchmove",this.Nw,!1),this.removeEventListener(b,"touchend",this.Mw,!1)),this.ya.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),b=this.toolManager,null!==b&&(b.mouseDownTools.each(function(a){a.cancelWaitAfter()}),b.mouseMoveTools.each(function(a){a.cancelWaitAfter()}),b.mouseUpTools.each(function(a){a.cancelWaitAfter()})),b.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.ya=null,this.removeEventListener(x,"resize",this.Ww,!1),this.zj||(this.removeEventListener(x, +"mousemove",this.Ik,!0),this.removeEventListener(x,"mousedown",this.Hk,!0),this.removeEventListener(x,"mouseup",this.Kk,!0),this.removeEventListener(x,"mouseout",this.Jk,!0)),this.removeEventListener(x,"wheel",this.Lk,!0),Fe===this&&(Fe=null)):this.qe=!1;this.Da=null;if(null!==a){if(b=a.B)b.div=null;Di(this,a);this.redraw()}}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{ get:function(){return this.Sr},set:function(a){this.Sr!==a&&(this.Sr=a,null!==a&&(this.Fs=a.fromPort,this.Gs=a.toPort))}},Ky:{get:function(){return this.Fs},set:function(a){this.Fs=a}},Ly:{get:function(){return this.Gs},set:function(a){this.Gs=a}},animationManager:{get:function(){return this.Uc}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{ get:function(){return this.vg},set:function(a){this.vg=a;this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.Nr},set:function(a){this.Nr=a}},opacity:{get:function(){return this.hb},set:function(a){var b=this.hb;b!==a&&((0>a||1a&&wa(a,">= 0",R,"scrollHorizontalLineChange"),this.Ws=a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(0>a&&wa(a,">= 0",R,"scrollVerticalLineChange"),this.$s=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.hh},set:function(a){this.hh= -a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.wa,c=this.Fa;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= +a}},previousInput:{get:function(){return this.od},set:function(a){this.od=a}},firstInput:{get:function(){return this.Wf},set:function(a){this.Wf=a}},currentCursor:{get:function(){return this.Hr},set:function(a){""===a&&(a=this.Pn);if(this.Hr!==a){var b=this.ya,c=this.Da;if(null!==b){this.Hr=a;var d=b.style.cursor;b.style.cursor=a;c.style.cursor=a;b.style.cursor===d&&(b.style.cursor="-webkit-"+a,c.style.cursor= "-webkit-"+a,b.style.cursor===d&&(b.style.cursor="-moz-"+a,c.style.cursor="-moz-"+a,b.style.cursor===d&&(b.style.cursor=a,c.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Pn},set:function(a){""===a&&(a="auto");var b=this.Pn;b!==a&&(this.Pn=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.Pf},set:function(a){var b=this.Pf;b!==a&&(this.Pf=a,this.g("click",b,a))}},doubleClick:{ get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.g("doubleClick",b,a))}},contextClick:{get:function(){return this.Qf},set:function(a){var b=this.Qf;b!==a&&(this.Qf=a,this.g("contextClick",b,a))}},mouseOver:{get:function(){return this.lg},set:function(a){var b=this.lg;b!==a&&(this.lg=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return this.jg},set:function(a){var b= this.jg;b!==a&&(this.jg=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return this.ig},set:function(a){var b=this.ig;b!==a&&(this.ig=a,this.g("mouseHold",b,a))}},mouseDragOver:{get:function(){return this.As},set:function(a){var b=this.As;b!==a&&(this.As=a,this.g("mouseDragOver",b,a))}},mouseDrop:{get:function(){return this.gg},set:function(a){var b=this.gg;b!==a&&(this.gg=a,this.g("mouseDrop",b,a))}}, @@ -773,137 +773,137 @@ get:function(){return this.wg},set:function(a){var b=this.wg;b!==a&&(this.wg=a,t get:function(){return this.qv}},maxSelectionCount:{get:function(){return this.ws},set:function(a){var b=this.ws;if(b!==a)if(0<=a&&!isNaN(a)){if(this.ws=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",R,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{ get:function(){return this.kp},set:function(a){var b=this.kp;b!==a&&(this.kp=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.qo},set:function(a){var b=this.qo;b!==a&&(this.qo=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Lo},set:function(a){var b=this.Lo;b!==a&&(this.Lo=a,this.g("linkSelectionAdornmentTemplate", b,a))}},highlighteds:{get:function(){return this.Su}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.wo&&this.Xd!==a.historyIndex:this.wo},set:function(a){if(this.wo!==a){this.wo=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Xd=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.cc},set:function(a){var b=this.cc;if(b!==a){this.currentTool.doCancel(); -null!==b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&B("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Bc(!0);var c=Fi(this,!0);this.qe=!1;this.Kj=!0;this.Xd=-2;this.Ee=!1;var d=this.ac;this.ac=!0;rh(this.animationManager,"Model");null!==b&&(null!==this.we&&this.we.each(function(a){b.Tk(a)}),b.Tk(this.Tc));this.cc=a;this.partManager=bk(this.cc.type);for(var e=0;ethis.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{ -get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to;b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib}, -set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}}, -parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs},set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}}, -treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ti&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{ -get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}});na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz; -R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek;R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA; -R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc;R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou; -R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw;R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings; -R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.va;R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk; -R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um;R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww; -R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty;R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg; -R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz;R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus; -R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; -var Fe=null,ui=new H,Pi=null,Ii=null,Ug=void 0!==x.document,Di=null,Ei="",xh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Yh=new D(R,"DocumentScroll",1),$h=new D(R,"InfiniteScroll",2),ti=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, -"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.53",Gk="image",Nk=null,qi=!1; -function ri(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; -Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.C instanceof R?b.C:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=xh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; -R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Yh;R.InfiniteScroll=$h;R.TreeParentCollapsed=ti;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Bi(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} +Vh(this.animationManager,b,this.la);this.Sb||null===this.ya&&!this.sm.o()||(this.Sb=!0,a=this.scale,$i(this,this.Rn,this.va/a,this.ua/a,this.Dj,!1),this.Sb=!1);if(!this.Sb)this.onViewportBoundsChanged(c,this.viewportBounds,this.Aa,!1)}J.free(b)}},initialPosition:{get:function(){return this.es},set:function(a){this.es.w(a)||(this.es=a.H())}},initialScale:{get:function(){return this.fs},set:function(a){this.fs!==a&&(this.fs=a)}},grid:{ +get:function(){null===this.Ib&&Si(this);return this.Ib},set:function(a){var b=this.Ib;if(b!==a){null===b&&(Si(this),b=this.Ib);a.type!==X.Grid&&B("Diagram.grid must be a Panel of type Panel.Grid");var c=b.panel;null!==c&&c.remove(b);this.Ib=a;a.name="GRID";null!==c&&c.add(a);qj(this);this.M();this.g("grid",b,a)}}},viewportBounds:{get:function(){var a=this.Rx,b=this.la,c=this.Aa;a.h(b.x,b.y,Math.max(this.va,0)/c,Math.max(this.ua,0)/c);return a}},viewSize:{ +get:function(){return this.sm},set:function(a){var b=this.viewSize;b.w(a)||(this.sm=a=a.H(),this.ua=this.va=0,a.o()?(this.va=a.width,this.ua=a.height):null!==this.Da&&(this.va=this.Da.clientWidth||1,this.ua=this.Da.clientHeight||1),this.Na(),this.g("viewSize",b,a),this.redraw())}},fixedBounds:{get:function(){return this.Zr},set:function(a){var b=this.Zr;b.w(a)||(-Infinity!==a.width&&Infinity!==a.height&&-Infinity!==a.height||B("fixedBounds width/height must not be Infinity"), +this.Zr=a=a.H(),this.Na(),this.g("fixedBounds",b,a))}},scrollMargin:{get:function(){return this.Si},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.Si;b.w(a)||(this.Si=a=a.H(),this.g("scrollMargin",b,a),this.Yq())}},scrollMode:{get:function(){return this.Ti},set:function(a){var b=this.Ti;b!==a&&(this.Ti=a,a===Zh&&Yi(this,!1),this.g("scrollMode",b,a),this.M())}},scrollsPageOnFocus:{get:function(){return this.at}, +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("scrollsPageOnFocus",b,a))}},positionComputation:{get:function(){return this.Ns},set:function(a){var b=this.Ns;b!==a&&(this.Ns=a,Yi(this,!1),this.g("positionComputation",b,a))}},scaleComputation:{get:function(){return this.Us},set:function(a){var b=this.Us;b!==a&&(this.Us=a,Yj(this,this.scale,this.scale),this.g("scaleComputation",b,a))}},documentBounds:{ +get:function(){return this.Rn}},isVirtualized:{get:function(){return this.rs},set:function(a){var b=this.rs;b!==a&&(this.rs=a,this.g("isVirtualized",b,a))}},scale:{get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&Yj(this,b,a)}},defaultScale:{get:function(){return this.Qn},set:function(a){this.Qn=a}},autoScale:{get:function(){return this.Og},set:function(a){var b= +this.Og;b!==a&&(this.Og=a,this.g("autoScale",b,a),a!==Kh&&Yi(this,!1))}},initialAutoScale:{get:function(){return this.Yf},set:function(a){var b=this.Yf;b!==a&&(this.Yf=a,this.g("initialAutoScale",b,a))}},initialViewportSpot:{get:function(){return this.gs},set:function(a){var b=this.gs;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.gs=a,this.g("initialViewportSpot",b,a))}},initialDocumentSpot:{ +get:function(){return this.ds},set:function(a){var b=this.ds;b!==a&&(a.kb()||B("initialViewportSpot must be a specific Spot: "+a),this.ds=a,this.g("initialDocumentSpot",b,a))}},minScale:{get:function(){return this.xs},set:function(a){var b=this.xs;b!==a&&(0this.scale&&(this.scale=a)):wa(a,"> 0",R,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(a){var b=this.vs;b!==a&&(0 0",R,"maxScale"))}},zoomPoint:{get:function(){return this.xt},set:function(a){this.xt.w(a)||(this.xt=a=a.H())}},contentAlignment:{get:function(){return this.Dj},set:function(a){var b=this.Dj;b.w(a)||(this.Dj=a=a.H(),this.g("contentAlignment",b,a),Yi(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(a){var b=this.to; +b.w(a)||(this.to=a=a.H(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.Na(),this.g("padding",b,a))}},partManager:{get:function(){return this.La},set:function(a){var b=this.La;b!==a&&(null!==a.diagram&&B("Cannot share PartManagers between Diagrams: "+a.toString()),null!==b&&b.ee(null),this.La=a,a.ee(this))}},nodes:{ +get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(this.kc=a,a.diagram=this,a.group=null,this.Ng=!0,this.g("layout",b,a),this.Db())}},isTreePathToChildren:{get:function(){return this.qs}, +set:function(a){var b=this.qs;if(b!==a&&(this.qs=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Ik(a.value)}},treeCollapsePolicy:{get:function(){return this.rt},set:function(a){var b=this.rt;b!==a&&(a!==ui&&a!==Jk&&a!==Kk&&B("Unknown Diagram.treeCollapsePolicy: "+a),this.rt=a,this.g("treeCollapsePolicy",b,a))}},Le:{get:function(){return this.Uu},set:function(a){this.Uu=a}},autoScrollInterval:{ +get:function(){return this.qn},set:function(a){var b=this.qn;b!==a&&(this.qn=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.sn},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sn;b.w(a)||(this.sn=a=a.H(),this.Na(),this.g("autoScrollRegion",b,a))}}}); +na.Object.defineProperties(R,{licenseKey:{get:function(){return Lk.Xb()},set:function(a){Lk.add(a)}},version:{get:function(){return Mk}}});R.prototype.makeImageData=R.prototype.Hy;R.prototype.makeImage=R.prototype.GA;R.prototype.addRenderer=R.prototype.rz;R.prototype.makeSVG=R.prototype.iw;R.prototype.makeSvg=R.prototype.$t;R.prototype.stopAutoScroll=R.prototype.Jf;R.prototype.doAutoScroll=R.prototype.Et;R.prototype.isUnoccupied=R.prototype.Ek; +R.prototype.raiseDiagramEvent=R.prototype.R;R.prototype.removeDiagramListener=R.prototype.Lm;R.prototype.addDiagramListener=R.prototype.kk;R.prototype.findTreeRoots=R.prototype.jA;R.prototype.layoutDiagram=R.prototype.EA;R.prototype.findTopLevelGroups=R.prototype.cA;R.prototype.findTopLevelNodesAndLinks=R.prototype.dA;R.prototype.ensureBounds=R.prototype.Ta;R.prototype.findLinksByExample=R.prototype.Ht;R.prototype.findNodesByExample=R.prototype.It;R.prototype.findLinkForData=R.prototype.yc; +R.prototype.findNodeForData=R.prototype.gj;R.prototype.findPartForData=R.prototype.zc;R.prototype.findLinkForKey=R.prototype.findLinkForKey;R.prototype.findNodeForKey=R.prototype.Cb;R.prototype.findPartForKey=R.prototype.findPartForKey;R.prototype.rebuildParts=R.prototype.Md;R.prototype.transformViewToDoc=R.prototype.ou;R.prototype.transformRectDocToView=R.prototype.iB;R.prototype.transformDocToView=R.prototype.gr;R.prototype.centerRect=R.prototype.At;R.prototype.scrollToRect=R.prototype.Aw; +R.prototype.scroll=R.prototype.scroll;R.prototype.highlightCollection=R.prototype.vA;R.prototype.highlight=R.prototype.uA;R.prototype.selectCollection=R.prototype.$A;R.prototype.select=R.prototype.select;R.prototype.updateAllRelationshipsFromData=R.prototype.ir;R.prototype.updateAllTargetBindings=R.prototype.updateAllTargetBindings;R.prototype.commit=R.prototype.commit;R.prototype.rollbackTransaction=R.prototype.If;R.prototype.commitTransaction=R.prototype.Xa;R.prototype.startTransaction=R.prototype.xa; +R.prototype.raiseChanged=R.prototype.g;R.prototype.raiseChangedEvent=R.prototype.Va;R.prototype.removeChangedListener=R.prototype.Tk;R.prototype.addChangedListener=R.prototype.Hh;R.prototype.removeModelChangedListener=R.prototype.VA;R.prototype.addModelChangedListener=R.prototype.Wx;R.prototype.findLayer=R.prototype.xk;R.prototype.removeLayer=R.prototype.TA;R.prototype.addLayerAfter=R.prototype.nz;R.prototype.addLayerBefore=R.prototype.Ux;R.prototype.addLayer=R.prototype.um; +R.prototype.moveParts=R.prototype.moveParts;R.prototype.copyParts=R.prototype.tk;R.prototype.removeParts=R.prototype.gu;R.prototype.remove=R.prototype.remove;R.prototype.add=R.prototype.add;R.prototype.clearDelayedGeometries=R.prototype.Hv;R.prototype.setProperties=R.prototype.Fw;R.prototype.resetInputOptions=R.prototype.ww;R.prototype.setInputOption=R.prototype.aB;R.prototype.getInputOption=R.prototype.Bm;R.prototype.resetRenderingHints=R.prototype.xw;R.prototype.setRenderingHint=R.prototype.Ty; +R.prototype.getRenderingHint=R.prototype.Ke;R.prototype.maybeUpdate=R.prototype.hd;R.prototype.requestUpdate=R.prototype.Db;R.prototype.delayInitialization=R.prototype.Jz;R.prototype.isUpdateRequested=R.prototype.AA;R.prototype.invalidateDocumentBounds=R.prototype.Na;R.prototype.findObjectsNear=R.prototype.Eg;R.prototype.findPartsNear=R.prototype.$z;R.prototype.findObjectsIn=R.prototype.zf;R.prototype.findPartsIn=R.prototype.ty;R.prototype.findObjectsAt=R.prototype.hj;R.prototype.findPartsAt=R.prototype.Zz; +R.prototype.findObjectAt=R.prototype.Vb;R.prototype.findPartAt=R.prototype.zm;R.prototype.focusObject=R.prototype.kA;R.prototype.alignDocument=R.prototype.uz;R.prototype.zoomToRect=R.prototype.mB;R.prototype.zoomToFit=R.prototype.zoomToFit;R.prototype.diagramScroll=R.prototype.iy;R.prototype.focus=R.prototype.focus;R.useDOM=function(a){Ug=a?void 0!==x.document:!1};R.isUsingDOM=function(){return Ug}; +var Fe=null,vi=new H,Qi=null,Pi=null,Ug=void 0!==x.document,Ei=null,Fi="",Kh=new D(R,"None",0),cj=new D(R,"Uniform",1),dj=new D(R,"UniformToFill",2),Mf=new D(R,"CycleAll",10),Qf=new D(R,"CycleNotDirected",11),Sf=new D(R,"CycleNotDirectedFast",12),Tf=new D(R,"CycleNotUndirected",13),Nf=new D(R,"CycleDestinationTree",14),Pf=new D(R,"CycleSourceTree",15),Zh=new D(R,"DocumentScroll",1),ai=new D(R,"InfiniteScroll",2),ui=new D(R,"TreeParentCollapsed",21),Jk=new D(R,"AllParentsCollapsed",22),Kk=new D(R, +"AnyParentsCollapsed",23),Lk=new E,Mk="2.1.54",Gk="image",Nk=null,ri=!1; +function si(){if(Ug){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Qa("7ca11abfd022028846");b[c]=Qa("398c3597c01238");for(var d=["5da73c80a36455d5038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.za],e=1;5>e;e++)b[Qa("7ca11abfd7330390")](Qa(d[e-1]),10,15*e);b[c]=Qa("39f046ebb36e4b");for(c=1;5>c;c++)b[Qa("7ca11abfd7330390")](Qa(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Jd=ld.prototype.Zx; +Nk=a}}R.className="Diagram";R.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.B instanceof R?b.B:null};R.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};R.None=Kh;R.Uniform=cj;R.UniformToFill=dj;R.CycleAll=Mf;R.CycleNotDirected=Qf;R.CycleNotDirectedFast=Sf; +R.CycleNotUndirected=Tf;R.CycleDestinationTree=Nf;R.CycleSourceTree=Pf;R.DocumentScroll=Zh;R.InfiniteScroll=ai;R.TreeParentCollapsed=ui;R.AllParentsCollapsed=Jk;R.AnyParentsCollapsed=Kk;function Ci(){this.jz=null;this.l="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null} function zj(a,b){b.Gb.setTransform(b.Tb,0,0,b.Tb,0,0);if(null===a.Ve)a:{b="f";var c=x[Qa("76a715b2f73f148a")][Qa("72ba13b5")];a.Ve=!0;if(Ug){var d=R[Qa("76a115b6ed251eaf4692")];if(d)for(var e=Lk.iterator;e.next();){d=e.value;d=Qa(d).split(Qa("39e9"));if(6>d.length)break;var f=Qa(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Qa(ra[Qa("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){f=c[Qa("76ad18b4f73e")];for(g=c[Qa("73a612b6fb191d")](Qa("35e7"))+2;gf&&Qa(d[2])!==Qa("7da71ca0ad381e90")&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=b[Qa("73a612b6fb191d")](Qa("76a715b2ef3e149757")));0>f&&(f=c[Qa("73a612b6fb191d")](Qa("7baa19a6f76c1988428554")));a.Ve=!(0<=f&&fh.length;)h+="9";h=h.substr(h.length-4);d="";d+=["gsh","gsf"][parseInt(h.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(h.substr(0,1),10)%4];g[Qa("79a417a0f0181a8946")]=d;if(x.document[Qa("78a712aa")]){if(x.document[Qa("78a712aa")][Qa("7bb806b6ed32388c4a875b")](g),h=x.getComputedStyle(g).getPropertyValue(Qa("78a704b7e62456904c9b12701b6532a8")),x.document[Qa("78a712aa")][Qa("68ad1bbcf533388c4a875b")](g),h)if(-1!==h.indexOf(parseInt(f[1]+f[2],16))&&-1!==h.indexOf(parseInt(f[3]+f[4],16))){a.Ve=!1;break}else if(Ra||Sa||Ta||Ua)for(d="."+d,f=0;fMath.abs(b.deltaY)?-d:-e):void 0!==b.wheelDeltaX?(0!==b.wheelDeltaX&&(d=0Math.abs(b.wheelDeltaY)?-d:-e):void 0!==b.wheelDelta&&0!==b.wheelDelta&&(c.delta=0e||Math.abs(d.y-b.screenY)>e)?a.xd++:a.xd=1;c.clickCount=a.xd;a.Sj=b.timeStamp;a.Go.Ig(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():nj(c,b)}};a.Pk= function(b){if(a.isEnabled){a.Zf=!0;var c=a.bk;if(null!==c[0]&&c[0].pointerId===b.pointerId)c[0]=b;else{if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}c[0].pointerId===b.pointerId&&(c=mj(a,b,b,null!==c[1]),c.targetDiagram=jj(b),a.doMouseMove(),nj(c,b))}};a.Rk=function(b){if(a.isEnabled){a.Zf=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Ls;if(c&&a.hk)delete d[b.pointerId],b.preventDefault();else if(d=a.bk,null!==d[0]&&d[0].pointerId===b.pointerId){d[0]= -null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.C instanceof R&&e.C!==a&&ij(e.C,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.C?d.targetDiagram=e.C:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); -null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Qi(a)}}Bi.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} +null;d=lj(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY);null!==e&&e.B instanceof R&&e.B!==a&&ij(e.B,b,d);ij(a,b,d);d.clickCount=a.xd;null===e?d.targetDiagram=jj(b):e.B?d.targetDiagram=e.B:d.targetDiagram=null;d.targetObject=null;a.doMouseUp();nj(d,b);c&&(a.re=!1)}else null!==d[1]&&d[1].pointerId===b.pointerId&&(d[1]=null)}};a.Qk=function(b){if(a.isEnabled){a.Zf=!1;var c=a.Ls;c[b.pointerId]&&delete c[b.pointerId];c=a.bk;null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null); +null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null);"touch"!==b.pointerType&&"pen"!==b.pointerType&&(b=a.currentTool,b.cancelWaitAfter(),b.standardMouseOver())}};a.Tr=d.Y["d"+Ok[1]+Ok[2]+"wI"+Gk.slice(1,5)]["b"+Pk.slice(1,b)](d.Y,Nk,b,b);d.uc(!0);Ri(a)}}Ci.className="DiagramHelper";function cf(a){this.l=void 0===a?new J:a;this.u=new J} na.Object.defineProperties(cf.prototype,{point:{get:function(){return this.l},set:function(a){this.l=a}},shifted:{get:function(){return this.u},set:function(a){this.u=a}}});var Ok="DraggingInfo";cf.className="DraggingInfo";function Rj(a,b,c){this.node=a;this.info=b;this.$v=c}Rj.className="DraggingNodeInfoPair";function We(){this.reset()} We.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new M(NaN,NaN)).freeze();this.gridSnapCellSpot=tc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};We.className="DraggingOptions";function Qk(a){1 b.updateDelay?b.M():b.u||(b.u=!0,setTimeout(function(){return b.redraw()},b.updateDelay))};this.Od=function(){null!==b.observed&&Vk(b)};this.autoScale=cj;this.Sb=!1}ma(Tk,R);Tk.prototype.computePixelRatio=function(){return 1}; -Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.wa,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.wa=this.fm,this.Gb=this.wa.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.wa.width,this.wa.height),Wk(this)}finally{this.wa=a,this.Gb=b}}}R.prototype.redraw.call(this)}; -Tk.prototype.mc=function(){null===this.Fa&&B("No div specified");null===this.wa&&B("No canvas specified");if(!(this.wa instanceof Ej)&&(li(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.wa;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +Tk.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var a=this.ya,b=this.Gb;if(null!==a&&null!==b){xj(this);if(null===this.fm){var c=new Hk(null);c.width=a.width;c.height=a.height;this.fm=c}try{this.ya=this.fm,this.Gb=this.ya.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.ya.width,this.ya.height),Wk(this)}finally{this.ya=a,this.Gb=b}}}R.prototype.redraw.call(this)}; +Tk.prototype.mc=function(){null===this.Da&&B("No div specified");null===this.ya&&B("No canvas specified");if(!(this.ya instanceof Ej)&&(mi(this.box),this.Dc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pj){xj(this);var b=this.ya;a=this.Gb;a.uc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Wk(this):null!==this.fm&&(a.drawImage(this.fm.Ja,0,0),b=this.sb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& 0===this.position.y||b.translate(-this.position.x,-this.position.y),a.scale(this.Tb,this.Tb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy));b=this.Ma.j;for(var c=b.length,d=0;da&&(a=0);this.eb!==a&&(this.eb=a)}}});Tk.className="Overview";function Uk(){Ve.call(this);this.l=null}ma(Uk,Ve); Uk.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(null===a||!a.allowMove||!a.allowSelect)return!1;var b=a.observed;if(null===b)return!1;var c=a.lastInput;if(!c.left||a.currentTool!==this&&(!this.isBeyondDragSize()||c.isTouchEvent&&c.timestamp-a.firstInput.timestampb.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===xh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==xh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Xk.prototype.copyToClipboard=function(a){var b=this.diagram,c=null;if(null===a)Ei=null,Fi="";else{c=b.model;var d=!1,e=!1,f=null;try{c.Em()&&(d=c.sk,c.sk=this.copiesParentKey),c.Ck()&&(e=c.rk,c.rk=this.copiesGroupKey),f=b.tk(a,null,!0)}finally{c.Em()&&(c.sk=d),c.Ck()&&(c.rk=e),c=new E,c.addAll(f),Ei=c,Fi=b.model.dataFormat}}b.R("ClipboardChanged",c)}; +Xk.prototype.pasteFromClipboard=function(){var a=new G,b=Ei;if(null===b)return a;var c=this.diagram;if(Fi!==c.model.dataFormat)return a;var d=c.model,e=!1,f=!1,g=null;try{d.Em()&&(e=d.sk,d.sk=this.copiesParentKey),d.Ck()&&(f=d.rk,d.rk=this.copiesGroupKey),g=c.tk(b,c,!1)}finally{for(d.Em()&&(d.sk=e),d.Ck()&&(d.rk=f),b=g.iterator;b.next();)c=b.value,d=b.key,c.location.o()||(d.location.o()?c.location=d.location:!c.position.o()&&d.position.o()&&(c.position=d.position)),a.add(c)}return a}; +Xk.prototype.pasteSelection=function(a){void 0===a&&(a=null);var b=this.diagram;try{b.currentCursor="wait";b.R("ChangingSelection",b.selection);b.xa("Paste");var c=this.pasteFromClipboard();0b.maxScale||(b.scale=a))};Xk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Xk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===Kh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Xk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==Kh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Xk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; Xk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Xk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Bc();a.redraw();var c=a.position,d=a.scale;rh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Bv&&!isNaN(this.bv)&&a.documentBounds.w(this.Av)?(a.scale=this.bv,a.position=this.yx,this.Bv=NaN,this.Av=ic):(this.bv=d,this.yx=c.copy(),a.zoomToFit(),this.Bv=a.scale,this.Av=a.documentBounds.copy());th(b)};Xk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Xk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Ta();if(null===a){try{null!==this.rg&&(this.rg.next()?a=this.rg.value:this.rg=null)}catch(k){this.rg=null}null===a&&(0c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case bl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case cl:isFinite(b)&&b>d&&(g=b),e=0,h&&(a=Infinity)}h=this.maxSize;var k=this.minSize;e>h.width&&k.widthh.height&&k.heighta.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.s()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; -function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.s()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} +this.us>a.height||this.vb>a.width)))c=!0;this.F=c?this.F|256:this.F&-257;this.xb.o()||B("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString());this.Im(f,this.xb);rl(this,!1);N.free(f)};t=Y.prototype;t.Ih=function(){}; +function sl(a,b,c,d,e){a.xb.h(b,c,d,e);if(!a.desiredSize.o()){var f=a.qc;c=a.jh;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ql(a,!0);c===d&&f===e&&(b=zg);switch(b){case zg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case td:pj(a,!0);a.measure(d,e,0,0);break;case bl:pj(a,!0);a.measure(d,f,0,0);break;case cl:pj(a,!0),a.measure(c,e,0,0)}}} t.Im=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||tl(c,!0),this.M(),Vb(a,b)||(c.Oh(),this.mp(c)))};t.mp=function(a){null!==this.portId&&(tl(a,!0),a instanceof W&&ul(a,this))}; t.mc=function(a,b){if(this.visible){var c=this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn),d=this.xb;if(c||0!==d.width&&0!==d.height&&!isNaN(d.x)&&!isNaN(d.y)){var e=this.opacity;if(0!==e){var f=1;1!==e&&(f=a.globalAlpha,a.globalAlpha=f*e);if(!this.ly(a,b))if(c)vl(this,a,b);else{this instanceof S&&this.Gk(!1);c=this.transform;var g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=this.part,k=!1,l=0;if(h&&b.Ke("drawShadows")&&(k=h.isShadowed)){var m=h.shadowOffset;l=Math.max(m.y, m.x)*b.scale*b.Tb}if(!(m=b.yi||!this.Ff())){var n=this.naturalBounds;m=this.Zh;var p=m.m11,r=m.m21,q=m.dx,u=m.m12,w=m.m22,v=m.dy,y,z=y=0;m=y*p+z*r+q;var A=y*u+z*w+v;y=n.width+l;z=0;var C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);var F=Math.min(A,y);var Q=Math.max(m+0,C)-z;var K=Math.max(A+0,y)-F;m=z;A=F;y=n.width+l;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y);Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;y=0;z=n.height+l;C=y*p+z*r+q;y=y*u+z*w+v;z=Math.min(m,C);F=Math.min(A,y); Q=Math.max(m+Q,C)-z;K=Math.max(A+K,y)-F;m=z;A=F;l=b.viewportBounds;n=l.x;p=l.y;m=!(m>l.width+n||n>Q+m||A>l.height+p||p>K+A)}if(m){m=0!==(this.F&256);a.clipInsteadOfFill&&(m=!1);this instanceof Wg&&(a.font=this.font);if(m){A=g.he()?g.naturalBounds:g.actualBounds;null!==this.Za?(n=this.Za,Q=n.x,K=n.y,l=n.width,n=n.height):(Q=Math.max(d.x,A.x),K=Math.max(d.y,A.y),l=Math.min(d.right,A.right)-Q,n=Math.min(d.bottom,A.bottom)-K);if(Q>d.width+d.x||d.x>A.width+A.x){1!==e&&(a.globalAlpha=f);return}a.save(); -a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(ni(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, -c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),ni(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== +a.beginPath();a.rect(Q,K,l,n);a.clip()}if(this.Ff()){if(!h.isVisible()){1!==e&&(a.globalAlpha=f);return}k&&(A=h.shadowOffset,a.Iw(A.x*b.scale*b.Tb,A.y*b.scale*b.Tb,h.shadowBlur),xl(a),a.shadowColor=h.shadowColor)}k&&!0===this.shadowVisible?xl(a):k&&!1===this.shadowVisible&&yl(a);h=this.naturalBounds;null!==this.ec&&(oi(this,a,this.ec,!0,!0,h,d),this.ec instanceof zl&&this.ec.type===Al?(a.beginPath(),a.rect(d.x,d.y,d.width,d.height),a.Je(this.ec)):a.fillRect(d.x,d.y,d.width,d.height));a.transform(c.m11, +c.m12,c.m21,c.m22,c.dx,c.dy);k&&(null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)&&null===this.shadowVisible&&yl(a);null!==this.mb&&(l=this.naturalBounds,Q=A=0,K=l.width,l=l.height,n=0,this instanceof Kf&&(l=this.na.bounds,A=l.x,Q=l.y,K=l.width,l=l.height,n=this.strokeWidth),oi(this,a,this.mb,!0,!1,h,d),this.mb instanceof zl&&this.mb.type===Al?(a.beginPath(),a.rect(A-n/2,Q-n/2,K+n,l+n),a.Je(this.mb)):a.fillRect(A-n/2,Q-n/2,K+n,l+n));k&&(null!==this.mb||null!== this.ec||null!==g&&0!==(g.F&512)||null!==g&&(g.type===X.Auto||g.type===X.Spot)&&g.tb()!==this)?(Bl(this,!0),null===this.shadowVisible&&yl(a)):Bl(this,!1);this.ej(a,b);k&&0!==(this.F&512)===!0&&xl(a);this.Ff()&&k&&yl(a);m?(a.restore(),this instanceof X?a.uc(!0):a.uc(!1)):c.Tt()||(b=1/(c.m11*c.m22-c.m12*c.m21),a.transform(c.m22*b,-c.m12*b,-c.m21*b,c.m11*b,b*(c.m21*c.dy-c.m22*c.dx),b*(c.m12*c.dx-c.m11*c.dy)))}}1!==e&&(a.globalAlpha=f)}}}};t.ly=function(){return!1}; -function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(ni(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(ni(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; -function ni(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ +function vl(a,b,c){var d=a.xb,e=a.rc;null!==a.ec&&(oi(a,b,a.ec,!0,!0,e,d),a.ec instanceof zl&&a.ec.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.ec)):b.fillRect(d.x,d.y,d.width,d.height));null!==a.mb&&(oi(a,b,a.mb,!0,!1,e,d),a.mb instanceof zl&&a.mb.type===Al?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Je(a.mb)):b.fillRect(d.x,d.y,d.width,d.height));a.ej(b,c)}t.ej=function(){}; +function oi(a,b,c,d,e,f,g){if(null!==c){var h=1,k=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Cl)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var l=0;a instanceof Kf&&(l=a.strokeWidth);h=f.width;k=f.height;e?(h=g.width,k=g.height):d||(h+=l,k+=l);if((f=b instanceof Dl)&&c.ke&&(c.type===El||c.gl===h&&c.Au===k))var m=c.ke;else{var n=0,p=0,r=0,q=0,u=0,w=0;w=u=0;e?(u=g.x,w=g.y):d||(u-=l/2,w-=l/2);n=c.start.x*h+c.start.offsetX;p=c.start.y*k+c.start.offsetY;r=c.end.x*h+ c.end.offsetX;q=c.end.y*k+c.end.offsetY;n+=u;r+=u;p+=w;q+=w;if(c.type===Fl)m=b.createLinearGradient(n,p,r,q);else if(c.type===Al)w=isNaN(c.endRadius)?Math.max(h,k)/2:c.endRadius,isNaN(c.startRadius)?(u=0,w=Math.max(h,k)/2):u=c.startRadius,m=b.createRadialGradient(n,p,u,r,q,w);else if(c.type===El)try{m=b.createPattern(c.pattern,"repeat")}catch(y){m=null}if(c.type!==El&&(e=c.colorStops,null!==e))for(e=e.iterator;e.next();)m.addColorStop(e.key,e.value);if(f&&(c.ke=m,null!==m&&(c.gl=h,c.Au=k),null=== m&&c.type===El&&-1!==c.gl)){c.gl=-1;var v=a.diagram;null!==v&&-1===c.gl&&ta(function(){v.redraw()},600)}}d?b.fillStyle=m:b.strokeStyle=m}}}t.Gg=function(a){if(a instanceof X)a:{if(this!==a&&null!==a)for(var b=this.panel;null!==b;){if(b===a){a=!0;break a}b=b.panel}a=!1}else a=!1;return a};t.Gf=function(){if(!this.visible)return!1;var a=this.panel;return null!==a?a.Gf():!0};t.Hg=function(){for(var a=this instanceof X?this:this.panel;null!==a&&a.isEnabled;)a=a.panel;return null===a}; -function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.s()||!a.qc.s()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} +function wl(a){if(0!==(a.F&2048)===!0){var b=a.sb;b.reset();if(!a.xb.o()||!a.qc.o()){Gl(a,!1);return}b.translate(a.xb.x-a.qc.x,a.xb.y-a.qc.y);if(1!==a.scale||0!==a.angle){var c=a.naturalBounds;ol(a,b,c.x,c.y,c.width,c.height)}Gl(a,!1);Hl(a,!0)}0!==(a.F&4096)===!0&&(b=a.panel,null===b?(a.Zh.set(a.sb),a.ql=a.scale,Hl(a,!1)):null!==b.Fd&&(c=a.Zh,c.reset(),b.he()?c.multiply(b.Zh):null!==b.panel&&c.multiply(b.panel.Zh),c.multiply(a.sb),a.ql=a.scale*b.ql,Hl(a,!1)))} function ol(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.Yb){var g=zc;a.Ff()&&a.locationSpot.kb()&&(g=a.locationSpot);var h=J.alloc();if(a instanceof V&&a.locationObject!==a)for(c=a.locationObject,d=c.naturalBounds,h.Uk(d.x,d.y,d.width,d.height,g),c.cg.ta(h),h.offset(-c.measuredBounds.x,-c.measuredBounds.y),g=c.panel;null!==g&&g!==a;)g.cg.ta(h),h.offset(-g.measuredBounds.x,-g.measuredBounds.y),g=g.panel;else h.Uk(c,d,e,f,g);b.rotate(a.Yb,h.x,h.y);J.free(h)}} -t.o=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.o()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.o():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; +t.s=function(a){if(!uj(this)){void 0===a&&(a=!1);pj(this,!0);rl(this,!0);var b=this.panel;null===b||a||b.s()}};t.Bk=function(){uj(this)||(pj(this,!0),rl(this,!0))};function Il(a){if(!vj(a)){var b=a.panel;null!==b?b.s():a.Ff()&&(b=a.diagram,null!==b&&(b.wd.add(a),a instanceof W&&a.sd(),b.Db()));rl(a,!0)}}t.Fl=function(){0!==(this.F&2048)===!1&&(Gl(this,!0),Hl(this,!0))};t.dw=function(){Hl(this,!0)};t.M=function(){var a=this.part;null!==a&&a.M()}; function ql(a,b){var c=a.stretch,d=a.panel;if(null!==d&&d.type===X.Table)return Jl(a,d.getRowDefinition(a.row),d.getColumnDefinition(a.column),b);if(null!==d&&d.type===X.Auto&&d.tb()===a)return Kl(a,td,b);if(c===al){if(null!==d){if(d.type===X.Spot&&d.tb()===a)return Kl(a,td,b);c=d.defaultStretch;return c===al?Kl(a,zg,b):Kl(a,c,b)}return Kl(a,zg,b)}return Kl(a,c,b)} function Jl(a,b,c,d){var e=a.stretch;if(e!==al)return Kl(a,e,d);var f=e=null;switch(b.stretch){case cl:f=!0;break;case td:f=!0}switch(c.stretch){case bl:e=!0;break;case td:e=!0}b=a.panel.defaultStretch;null===e&&(e=b===bl||b===td);null===f&&(f=b===cl||b===td);return!0===e&&!0===f?Kl(a,td,d):!0===e?Kl(a,bl,d):!0===f?Kl(a,cl,d):Kl(a,zg,d)} -function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.s())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} +function Kl(a,b,c){if(c)return b;if(b===zg)return zg;c=a.desiredSize;if(c.o())return zg;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===bl)return zg;if(b===td)return cl}else{if(b===cl)return zg;if(b===td)return bl}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===cl)return zg;if(b===td)return bl}else{if(b===bl)return zg;if(b===td)return cl}return b}function Bl(a,b){a.F=b?a.F|512:a.F&-513}function kl(a){return 0!==(a.F&1024)}function Ll(a,b){a.F=b?a.F|1024:a.F&-1025} function Gl(a,b){a.F=b?a.F|2048:a.F&-2049}function Hl(a,b){a.F=b?a.F|4096:a.F&-4097}function uj(a){return 0!==(a.F&8192)}function pj(a,b){a.F=b?a.F|8192:a.F&-8193}function vj(a){return 0!==(a.F&16384)}function rl(a,b){a.F=b?a.F|16384:a.F&-16385}t.sj=function(a){this.og=a};t.lu=function(){};t.Ew=function(a){this.la.assign(a);Il(this);return!0};t.er=function(a,b){if(this.la.x!==a||this.la.y!==b)this.la.h(a,b),this.Fl()}; function Ml(a){var b=a.part;if(b instanceof W&&(null!==a.portId||a===b.port)){var c=b.diagram;null===c||c.undoManager.isUndoingRedoing||ul(b,a)}}function Nl(a){var b=a.diagram;null===b||b.undoManager.isUndoingRedoing||(a instanceof X?a instanceof W?a.sd():a.an(a,function(a){Ml(a)}):Ml(a))}t.bind=function(a){a.pd=this;var b=this.ij();null!==b&&Ol(b)&&B("Cannot add a Binding to a template that has already been copied: "+a);null===this.fb&&(this.fb=new E);this.fb.add(a)}; t.ij=function(){for(var a=this instanceof X?this:this.panel;null!==a;){if(null!==a.li)return a;a=a.panel}return null};t.Fw=function(a){Bj(this,a)};t.Qw=function(a){a.pd=this;null===this.Mg&&(this.Mg=new H);this.Mg.add(a.propertyName,a)}; function Pl(a,b){for(var c=1;ce)&&B("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.isRow= !0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&B("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new $a;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Bj(a,e)}else Bj(a,b);else B('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function Ul(a,b){Ql.add(a,b)} function Vl(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b} na.Object.defineProperties(Y.prototype,{shadowVisible:{get:function(){return this.em},set:function(a){var b=this.em;b!==a&&(this.em=a,this.M(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.N?this.N.Wn:null},set:function(a){hl(this);var b=this.N.Wn;b!==a&&(this.N.Wn=a,this.g("enabledChanged",b,a))}},segmentOrientation:{get:function(){return this.cm},set:function(a){var b=this.cm; -b!==a&&(this.cm=a,this.o(),this.g("segmentOrientation",b,a),a===ag&&(this.angle=0))}},segmentIndex:{get:function(){return this.Qp},set:function(a){a=Math.round(a);var b=this.Qp;b!==a&&(this.Qp=a,this.o(),this.g("segmentIndex",b,a))}},segmentFraction:{get:function(){return this.am},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1a?a=0:1a||1=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.o(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.o(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= -d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& -(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.o(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= -0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.o(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.o(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ -get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.o(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& -B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.o(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, -this.o(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.o(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.o(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= -this.aq;b!==a&&(this.aq=a,this.o(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.o(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= +get:function(){return this.Aa},set:function(a){var b=this.Aa;b!==a&&(0>=a&&B("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Aa=a,this.s(),this.g("scale",b,a))}},angle:{get:function(){return this.Yb},set:function(a){var b=this.Yb;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Yb=a,Nl(this),this.s(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.Xc},set:function(a){var b=a.width,c=a.height,d=this.Xc,e= +d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Xc=a=a.H(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",d,a),kl(this)&&(a=this.part,null!==a&&(ll(this,a,"width"),ll(this,a,"height"))))}},width:{get:function(){return this.Xc.width},set:function(a){var b=this.Xc.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(a,this.Xc.height)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&& +(a=this.part,null!==a&&ll(this,a,"width")))}},height:{get:function(){return this.Xc.height},set:function(a){var b=this.Xc.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Xc,this.Xc=a=(new M(this.Xc.width,a)).freeze(),this.s(),this instanceof Kf&&this.dc(),this.g("desiredSize",b,a),kl(this)&&(a=this.part,null!==a&&ll(this,a,"height")))}},minSize:{get:function(){return this.fg},set:function(a){var b=this.fg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width= +0),isNaN(a.height)&&(a.height=0),a.freeze(),this.fg=a,this.s(),this.g("minSize",b,a))}},maxSize:{get:function(){return this.eg},set:function(a){var b=this.eg;b.w(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.eg=a,this.s(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{ +get:function(){return this.jh},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.jh;b.w(a)||(this.jh=a=a.H(),this.s(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.F&2048)===!0&&wl(this);return this.sb}},Fd:{get:function(){0!==(this.F&4096)===!0&&wl(this);return this.Zh}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(a.nc()&&!a.Mb()&& +B("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.yb=a=a.H(),Il(this),this.g("alignment",b,a))}},column:{get:function(){return this.Rg},set:function(a){a=Math.round(a);var b=this.Rg;b!==a&&(0>a&&wa(a,">= 0",Y,"column"),this.Rg=a,this.s(),this.g("column",b,a))}},columnSpan:{get:function(){return this.zn},set:function(a){a=Math.round(a);var b=this.zn;b!==a&&(1>a&&wa(a,">= 1",Y,"columnSpan"),this.zn=a, +this.s(),this.g("columnSpan",b,a))}},row:{get:function(){return this.Jp},set:function(a){a=Math.round(a);var b=this.Jp;b!==a&&(0>a&&wa(a,">= 0",Y,"row"),this.Jp=a,this.s(),this.g("row",b,a))}},rowSpan:{get:function(){return this.Kp},set:function(a){a=Math.round(a);var b=this.Kp;b!==a&&(1>a&&wa(a,">= 1",Y,"rowSpan"),this.Kp=a,this.s(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return this.aq},set:function(a){var b= +this.aq;b!==a&&(this.aq=a,this.s(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.$k},set:function(a){var b=this.$k;b.w(a)||(this.$k=a=a.H(),this.s(),this.g("alignmentFocus",b,a))}},portId:{get:function(){return this.xp},set:function(a){var b=this.xp;if(b!==a){var c=this.part;null===c||c instanceof W||(B("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xl(c,this);this.xp=a;null!==a&&null!==c&&(c.Nh= !0,Yl(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.O?this.O.Ch:sc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),Ml(this))}},toEndSegmentLength:{get:function(){return null!==this.O?this.O.Ah:10},set:function(a){this.Kc();var b=this.O.Ah;b!==a&&(0>a&&wa(a,">= 0",Y,"toEndSegmentLength"),this.O.Ah=a,this.g("toEndSegmentLength",b,a),Ml(this))}},toShortLength:{ get:function(){return null!==this.O?this.O.Bh:0},set:function(a){this.Kc();var b=this.O.Bh;b!==a&&(this.O.Bh=a,this.g("toShortLength",b,a),Ml(this))}},toLinkable:{get:function(){return null!==this.O?this.O.kq:null},set:function(a){this.Kc();var b=this.O.kq;b!==a&&(this.O.kq=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.O?this.O.lq:Infinity},set:function(a){this.Kc();var b=this.O.lq;b!==a&&(0>a&& wa(a,">= 0",Y,"toMaxLinks"),this.O.lq=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.O?this.O.bh:sc},set:function(a){this.Kc();var b=this.O.bh;b.w(a)||(a=a.H(),this.O.bh=a,this.g("fromSpot",b,a),Ml(this))}},fromEndSegmentLength:{get:function(){return null!==this.O?this.O.$g:10},set:function(a){this.Kc();var b=this.O.$g;b!==a&&(0>a&&wa(a,">= 0",Y,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength", @@ -981,14 +981,14 @@ b.mouseLeave=function(a,b){b.Hg()&&b instanceof X&&(a=b.bb("ButtonBorder"),a ins d}}};b.actionUp=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed&&0===b.button){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram,g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionCancel=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=d.bb("ButtonBorder");if(c instanceof Kf){var f=b.diagram, g=f.skipsUndoManager;f.skipsUndoManager=!0;a(b,d)?(c.fill=d._buttonFillOver,c.stroke=d._buttonStrokeOver):(c.fill=d._buttonFillNormal,c.stroke=d._buttonStrokeNormal);f.skipsUndoManager=g}}};b.actionMove=function(b,d){if(d.Hg()&&d instanceof X&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.bb("ButtonBorder"),b instanceof Kf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= d._buttonStrokePressed;b.stroke!==g&&(b.stroke=g);c.skipsUndoManager=f}}};return b}); -Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Hi("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; +Ul("TreeExpanderButton",function(){var a=Pl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).Uq()),{visible:!1},(new Ii("visible","isTreeLeaf",function(a){return!a})).Uq());a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof W){var b=c.diagram; if(null!==b){b=b.commandHandler;if(c.isTreeExpanded){if(!b.canCollapseTree(c))return}else if(!b.canExpandTree(c))return;a.handled=!0;c.isTreeExpanded?b.collapseTree(c):b.expandTree(c)}}};return a}); -Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Hi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; +Ul("SubGraphExpanderButton",function(){var a=Pl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Pl(Kf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Lb},(new Ii("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).Uq()));a.click=function(a,c){c=c.part;c instanceof Je&&(c=c.adornedPart);if(c instanceof U){var b=c.diagram;if(null!==b){b=b.commandHandler;if(c.isSubGraphExpanded){if(!b.canCollapseSubGraph(c))return}else if(!b.canExpandSubGraph(c))return; a.handled=!0;c.isSubGraphExpanded?b.collapseSubGraph(c):b.expandSubGraph(c)}}};return a});Ul("ToolTip",function(){return Pl(Je,X.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Pl(Kf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new O(0,0,4,6),spot2:new O(1,1,-4,-4)}))}); -Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Hi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Hi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); -a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.va("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); -Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Hi("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.va("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +Ul("ContextMenu",function(){return Pl(Je,X.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ii("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});Ul("ContextMenuButton",function(){var a=Pl("Button");a.stretch=bl;var b=a.bb("ButtonBorder");b instanceof Kf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +Ul("PanelExpanderButton",function(a){var b=Vl(a,"COLLAPSIBLE"),c=Pl("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},Pl(Kf,{name:"ButtonIcon",strokeWidth:2},(new Ii("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Uq(b))); +a=c.bb("ButtonBorder");a instanceof Kf&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)");c.click=function(a,c){var d=c.diagram;if(null!==d&&!d.isReadOnly){var e=c.ij();null===e&&(e=c.part);null!==e&&(c=e.bb(b),null!==c&&(a.handled=!0,d.xa("Collapse/Expand Panel"),c.visible=!c.visible,d.Xa("Collapse/Expand Panel")))}};return c}); +Ul("CheckBoxButton",function(a){var b=Vl(a);a=Pl("Button",{desiredSize:new M(14,14)},Pl(Kf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:td,geometryStretch:Bg,visible:!1},""!==b?(new Ii("visible",b)).Iy():[]));a.click=function(a,d){if(d instanceof X){var c=a.diagram;if(!(null===c||c.isReadOnly||""!==b&&c.model.isReadOnly)){a.handled=!0;var f=d.bb("ButtonIcon");c.xa("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.Xa("checkbox")}}};return a}); Ul("CheckBox",function(a){a=Vl(a);a=Pl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new kc(0,1,0,0)});var b=Pl(X,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave, actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});a.mouseEnter=null;a.mouseLeave=null;a.actionDown=null;a.actionUp=null;a.actionCancel=null;a.actionMove=null;a.click=null;return b});Y.None=zg=new D(Y,"None",0);Y.Default=al=new D(Y,"Default",0);Y.Vertical=cl=new D(Y,"Vertical",4);Y.Horizontal=bl=new D(Y,"Horizontal",5);Y.Fill=td=new D(Y,"Fill",3);Y.Uniform=Bg=new D(Y,"Uniform",1); @@ -1026,12 +1026,12 @@ function yl(a){a.shadowOffsetX=0;a.shadowOffsetY=0;a.shadowBlur=0}function xl(a) R.prototype.$t=function(a){var b=new Ej(this,x.document);void 0===a&&(a=new $a);var c=this;return Ek(this,function(a,e){a=Fk(c,a,"SVG",b);a=null!==a?a.svg:null;return"function"===typeof e?(e(a),null):a},a)};R.prototype.makeSvg=R.prototype.$t;R.prototype.iw=function(a){return this.$t(a)};R.prototype.makeSVG=R.prototype.iw; Y.prototype.ly=function(a,b){if(!(a instanceof am))return!1;if(!this.visible)return!0;var c=null,d=a.Wt;if(this instanceof X&&(this.type===X.TableRow||this.type===X.TableColumn))return vl(this,a,b),!0;var e=this.xb;if(0===e.width||0===e.height||isNaN(e.x)||isNaN(e.y))return!0;var f=this.transform,g=this.panel;0!==(this.F&4096)===!0&&wl(this);var h=0!==(this.F&256);a.clipInsteadOfFill&&(h=!1);var k=!1;this instanceof Wg&&(a.font=this.font);if(h){k=g.he()?g.naturalBounds:g.actualBounds;if(null!==this.Za){var l= this.Za;var m=l.x;var n=l.y;var p=l.width;l=l.height}else m=Math.max(e.x,k.x),n=Math.max(e.y,k.y),p=Math.min(e.right,k.right)-m,l=Math.min(e.bottom,k.bottom)-n;if(m>e.width+e.x||e.x>k.width+k.x||n>e.height+e.y||e.y>k.height+k.y)return!0;k=!0;bm(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(m,n,p,l);a.clip()}if(this.Ff()&&!this.isVisible())return!0;a.He.Oa=[1,0,0,1,0,0];(this instanceof Wg&&1a)&&wa(a,"0 <= loc <= 1",zl,"addColorStop:loc");null===this.je&&(this.je=new H);this.je.add(a,b);this.qa===Cl&&(this.type=Fl);this.ke=null;return this}; -t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(b,c)} -t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)ai(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)ai(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;ai(a);return jm(-b,c)} -function mm(a,b,c){ai(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;ai(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} +t.FA=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(a,b));return this};function km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(b,c)} +t.Iz=function(a,b){this.v&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?im:b;if(this.type===Cl)bi(this.color),this.color=jm(-a,b);else if((this.type===Fl||this.type===Al)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)bi(c.value),this.addColorStop(c.key,jm(-a,b));return this};function lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?im:c;bi(a);return jm(-b,c)} +function mm(a,b,c){bi(a);a=nm.l;var d=nm.I,e=nm.u,f=nm.T;bi(b);void 0===c&&(c=.5);return"rgba("+Math.round((nm.l-a)*c+a)+", "+Math.round((nm.I-d)*c+d)+", "+Math.round((nm.u-e)*c+e)+", "+Math.round((nm.T-f)*c+f)+")"} t.Fy=function(){if(this.type===Cl)return om(this.color);if((this.type===Fl||this.type===Al)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Al)return om(a.first().value);if(null!==a.get(.5))return om(a.get(.5));if(2===a.count)return a=a.ma(),om(mm(a[0].value,a[1].value));for(var b=a.iterator,c=-1,d=-1,e=1,f=1;b.next();){var g=b.key,h=Math.abs(.5-b.key);e>f&&h=e&&hd&&(f=c,c=d,d=f,f=e);e=d-c;return om(mm(a.get(c),a.get(d),1-f/e))}return!1}; -function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();ai(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} +function om(a){if(!a)return!1;if(a instanceof zl)return a.Fy();bi(a);return 128>(299*nm.l+587*nm.I+114*nm.u)/1E3} function jm(a,b){switch(b){case im:b=100*pm(nm.l);var c=100*pm(nm.I),d=100*pm(nm.u);qm.l=.4124564*b+.3575761*c+.1804375*d;qm.I=.2126729*b+.7151522*c+.072175*d;qm.u=.0193339*b+.119192*c+.9503041*d;qm.T=nm.T;b=rm(qm.l/sm[0]);c=rm(qm.I/sm[1]);d=rm(qm.u/sm[2]);tm.l=116*c-16;tm.I=500*(b-c);tm.u=200*(c-d);tm.T=qm.T;tm.l=Math.min(100,Math.max(0,tm.l+100*a));a=(tm.l+16)/116;b=a-tm.u/200;qm.l=sm[0]*um(tm.I/500+a);qm.I=sm[1]*(tm.l>vm*wm?Math.pow(a,3):tm.l/vm);qm.u=sm[2]*um(b);qm.T=tm.T;a=-.969266*qm.l+1.8760108* -qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return bi(),ci.u=Math.min(100,Math.max(0,ci.u+100*a)),"hsla("+ci.l+", "+ci.I+"%, "+ci.u+"%, "+ -ci.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function ai(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} -function bi(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}ci.l=Math.round(g);ci.I=Math.round(100*a);ci.u=Math.round(100*e);ci.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +qm.I+.041556*qm.u;b=.0556434*qm.l+-.2040259*qm.I+1.0572252*qm.u;nm.l=255*xm((3.2404542*qm.l+-1.5371385*qm.I+-.4985314*qm.u)/100);nm.I=255*xm(a/100);nm.u=255*xm(b/100);nm.T=qm.T;nm.l=Math.round(nm.l);255nm.l&&(nm.l=0);nm.I=Math.round(nm.I);255nm.I&&(nm.I=0);nm.u=Math.round(nm.u);255nm.u&&(nm.u=0);return"rgba("+nm.l+", "+nm.I+", "+nm.u+", "+nm.T+")";case ym:return ci(),di.u=Math.min(100,Math.max(0,di.u+100*a)),"hsla("+di.l+", "+di.I+"%, "+di.u+"%, "+ +di.T+")";default:return B("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}function bi(a){gm||(hm(),gm=!0);var b=zm;if(null!==b){b.clearRect(0,0,1,1);b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;b.fillStyle!==c?(b.fillRect(0,0,1,1),a=b.getImageData(0,0,1,1).data,nm.l=a[0],nm.I=a[1],nm.u=a[2],nm.T=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,nm.l=0,nm.I=0,nm.u=0,nm.T=1)}} +function ci(){var a=nm.l/255,b=nm.I/255,c=nm.u/255,d=Math.max(a,b,c),e=Math.min(a,b,c),f=d-e;e=(d+e)/2;if(0===f)var g=a=0;else{switch(d){case a:g=(b-c)/f%6;break;case b:g=(c-a)/f+2;break;case c:g=(a-b)/f+4}g*=60;0>g&&(g+=360);a=f/(1-Math.abs(2*e-1))}di.l=Math.round(g);di.I=Math.round(100*a);di.u=Math.round(100*e);di.T=nm.T}function pm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function xm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} function rm(a){return a>wm?Math.pow(a,1/3):(vm*a+16)/116}function um(a){var b=a*a*a;return b>wm?b:(116*a-16)/vm}function Wl(a,b){"string"!==typeof a&&(a instanceof zl||B("Value for "+b+" must be a color string or a Brush, not "+a))}function hm(){zm=Ug?(new Hk(null)).context:null} na.Object.defineProperties(zl.prototype,{type:{get:function(){return this.qa},set:function(a){this.v&&va(this,a);this.qa=a;this.start.nc()&&(a===Fl?this.start=uc:a===Al&&(this.start=zc));this.end.nc()&&(a===Fl?this.end=Cc:a===Al&&(this.end=zc));this.ke=null}},color:{get:function(){return this.fl},set:function(a){this.v&&va(this,a);this.fl=a;this.ke=null}},start:{get:function(){return this.Dd},set:function(a){this.v&& va(this,a);this.Dd=a.H();this.ke=null}},end:{get:function(){return this.sl},set:function(a){this.v&&va(this,a);this.sl=a.H();this.ke=null}},startRadius:{get:function(){return this.jt},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"startRadius");this.jt=a;this.ke=null}},endRadius:{get:function(){return this.Vr},set:function(a){this.v&&va(this,a);0>a&&wa(a,">= zero",zl,"endRadius");this.Vr=a;this.ke= null}},colorStops:{get:function(){return this.je},set:function(a){this.v&&va(this,a);this.je=a;this.ke=null}},pattern:{get:function(){return this.Ks},set:function(a){this.v&&va(this,a);this.Ks=a;this.ke=null}}});zl.prototype.isDark=zl.prototype.Fy;zl.prototype.darkenBy=zl.prototype.Iz;zl.prototype.lightenBy=zl.prototype.FA;zl.prototype.addColorStop=zl.prototype.addColorStop; -var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,ci=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); +var wm=216/24389,vm=24389/27,sm=[95.047,100,108.883],zm=null,nm=new fm,di=new fm,qm=new fm,tm=new fm,gm=!1;zl.className="Brush";var Cl;zl.Solid=Cl=new D(zl,"Solid",0);var Fl;zl.Linear=Fl=new D(zl,"Linear",1);var Al;zl.Radial=Al=new D(zl,"Radial",2);var El;zl.Pattern=El=new D(zl,"Pattern",4);var im;zl.Lab=im=new D(zl,"Lab",5);var ym;zl.HSL=ym=new D(zl,"HSL",6); zl.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a);b=Math.floor(a+Math.random()*c).toString(16);var d=Math.floor(a+Math.random()*c).toString(16);a=Math.floor(a+Math.random()*c).toString(16);2>b.length&&(b="0"+b);2>d.length&&(d="0"+d);2>a.length&&(a="0"+a);return"#"+b+d+a}; zl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;gm||(hm(),gm=!0);var b=zm;if(null===b)return!0;b.fillStyle="#000000";var c=b.fillStyle;b.fillStyle=a;if(b.fillStyle!==c)return!0;b.fillStyle="#FFFFFF";c=b.fillStyle;b.fillStyle=a;return b.fillStyle!==c};zl.lighten=function(a){return km(a)};zl.lightenBy=km;zl.darken=function(a){return lm(a)};zl.darkenBy=lm;zl.mix=mm;zl.isDark=om;function Tl(){this.oa="Base"}Tl.prototype.measure=function(){}; Tl.prototype.IA=function(a,b,c,d,e){a.measure(b,c,d,e)};Tl.prototype.arrange=function(){};Tl.prototype.wz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Tl.prototype.RA=function(a){a.Bk()};Tl.prototype.mc=function(){};na.Object.defineProperties(Tl.prototype,{name:{get:function(){return this.oa},set:function(a){this.oa=a}},classType:{get:function(){return X}}});Tl.prototype.remeasureObject=Tl.prototype.RA;Tl.prototype.arrangeElement=Tl.prototype.wz; @@ -1114,9 +1114,9 @@ Nm.prototype.measure=function(a,b,c,d,e,f,g){1=c&&(c=1);var d=a.gridCellSize,e=d.width;d=d.height;var f=a.naturalBounds,g=a.actualBounds,h=f.width,k=f.height,l=Math.ceil(h/e),m=Math.ceil(k/d),n=a.gridOrigin,p=n.x;n=n.y;b.save();b.beginPath();b.rect(0,0,h,k);b.clip();for(var r=[],q=a.W.j,u=q.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(C))}}}}q= -a.W.j;u=q.length;for(w=0;we*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ee*v*c))){z=F.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=F.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}C=r[w];var Q=!1,K=F.strokeDashArray;null!==K&&(Q=!0,b.Ft(K,F.strokeDashOffset));if("LineV"===F.figure&&null!==F.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;ef)v.measure(Infinity,Infinity,0,0),y=v.measuredBounds,b.Rc(y),a.l.push(y);else{var z=v.segmentIndex,A=v.segmentFraction,C=v.alignmentFocus;C.nc()&&(C=zc);var F=v.segmentOrientation,Q=v.segmentOffset;if(isNaN(z)){var K=k.na;y=Ea();K.Yv(A,y);var T=J.allocAt(y[0],y[1]);T.add(k.i(0));K.type=== ud?T.offset(-K.startX,-K.startY):(K=K.figures.first(),T.offset(-K.startX,-K.startY));K=y[2];if(F!==ag){var P=k.computeAngle(v,F,K);v.Yb=P}P=T.x-m.x;var I=T.y-m.y;J.free(T);Ia(y)}else if(z<-f||z>=f)I=k.midPoint,K=k.midAngle,F!==ag&&(P=k.computeAngle(v,F,K),v.Yb=P),P=I.x-m.x,I=I.y-m.y;else{P=0;0<=z?(I=n.J(z),y=zja+10?0<=z?K.Pa(I): @@ -1151,17 +1151,17 @@ X.prototype.copy=function(){var a=Y.prototype.copy.call(this);if(null!==a){for(v t.mp=function(a){Y.prototype.mp.call(this,a);for(var b=this.W.j,c=b.length,d=0;df.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){ni(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= +function dn(a,b,c,d){for(var e=d.length,f=a.actualBounds,g=a.naturalBounds,h=!0,k=0;kf.height)continue}else if(l.position>f.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.Ug:a.Tg);var n=l.separatorStroke;null===n&&(n=c?a.si:a.Sg);if(0!==m&&null!==n){oi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray;null===p&&(p=c?a.ri:a.pi);null!==p&&(n=!0,b.Ft(p,0));b.beginPath();p=l.position+m;c?p>f.height&&(m-= p-f.height):p>f.width&&(m-=p-f.width);l=l.position+m/2;b.lineWidth=m;m=a.ib;c?(l+=m.top,p=f.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=f.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();n&&b.Dt()}}}} -function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,ni(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ +function cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=0;km)){var n=l.wc(),p=l.separatorStrokeWidth;isNaN(p)&&(p=c?a.Ug:a.Tg);var r=l.separatorStroke;null===r&&(r=c?a.si:a.Sg);null===r&&(p=0);n-=p;p=l.position+p;n+=l.actual;p+n>m&&(n=m-p);0>=n||(m=a.ib,oi(a,b,l.background,!0,!1,h,g),c?b.fillRect(m.left,p+m.top,g.width-(m.left+m.right),n):b.fillRect(p+ m.left,m.top,n,g.height-(m.top+m.bottom)))}}}}function Zj(a){return"LineV"===a||"BarV"===a} t.zk=function(a,b,c,d,e){var f=this.he(),g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),r=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.areaBackground)return g=this.actualBounds,L.Cf(g.left,g.top,g.right,g.bottom,a,b,c,d,e);if(null!==this.background)return f=a*k+b*m+p,h=a*l+b*n+r,a=c*k+d*m+p,k=c*l+d*n+r,e.h(0,0),c=this.naturalBounds,f=L.Cf(0,0,c.width,c.height,f,h,a,k,e),e.transform(g),f;f||(k=1,m=l=0,n=1,r=p=0);h=a*k+b*m+p;a=a*l+b* n+r;k=c*k+d*m+p;c=c*l+d*n+r;e.h(k,c);d=(k-h)*(k-h)+(c-a)*(c-a);l=!1;n=this.W.j;r=n.length;m=J.alloc();p=null;b=Infinity;var q=null,u=this.isClipping&&this.qa===X.Spot;u&&(q=J.alloc(),p=this.tb(),(l=p.zk(h,a,k,c,q))&&(b=(h-q.x)*(h-q.x)+(a-q.y)*(a-q.y)));for(var w=0;wd&&e.set(q),J.free(q));J.free(m);f&&e.transform(g);return l}; -t.o=function(a){if(!uj(this)){Y.prototype.o.call(this,a);a=null;if(this.qa===X.Auto||this.qa===X.Link)a=this.tb();for(var b=this.W.j,c=b.length,d=0;dc||f>d)this.o(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.o(!0);this.measure(c+h,d+g,0,0);break;case bl:this.o(!0);this.measure(c+h,f+g,0,0);break;case cl:this.o(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; +t.Ih=function(a,b,c,d){var e=this.W.j;this.actualBounds.h(a,b,c,d);if(0!==e.length){if(!this.desiredSize.o()){a=ql(this,!0);var f=this.measuredBounds;b=f.width;f=f.height;var g=this.jh,h=g.left+g.right;g=g.top+g.bottom;b===c&&f===d&&(a=zg);switch(a){case zg:if(b>c||f>d)this.s(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case td:this.s(!0);this.measure(c+h,d+g,0,0);break;case bl:this.s(!0);this.measure(c+h,f+g,0,0);break;case cl:this.s(!0),this.measure(b+h,d+g,0,0)}}this.qa.arrange(this,e,this.xg)}}; t.Kh=function(a){var b=this.naturalBounds,c=Bm(this);if(cc(0,0,b.width,b.height,a.x,a.y)){b=this.W.j;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(wb(e.set(a),f.transform),f.$(e))return J.free(e),!0}J.free(e);return null===this.mb&&null===this.ec?!1:!0}return!1};t.Gt=function(a){if(this.dl===a)return this;for(var b=this.W.j,c=b.length,d=0;d=e.count&&a>=e.count)return; -e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.o();b.o(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, +e.cb(f);d=f}else B("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.wb(a,b);if(0===a||b.isPanelMain)this.Ui=null;uj(this)||this.s();b.s(!1);null!==b.portId?this.Nh=!0:b instanceof X&&!0===b.Nh&&(this.Nh=!0);this.eh=null;c=this.part;null!==c&&(c.Xj=null,c.kh=NaN,this.Nh&&c instanceof W&&(c.Nh=!0),c.Nh&&c instanceof W&&(c.tc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&&c.Va(Ae,"elements",this,b,null,d,null),c.Va(ze, "elements",this,null,b,null,a),this.Hg()||mn(this,b,!1)))};function nn(a,b){a.F=b?a.F|16777216:a.F&-16777217}t.remove=function(a){for(var b=this.W.j,c=b.length,d=-1,e=0;ea&&wa(a,">= 0",X,"getRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!0;c.index=a;b[a]=c;this.Va(ze,"rowdefs",this,null,c,null,a)}return b[a]}; -X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.o()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +X.prototype.XA=function(a){0>a&&wa(a,">= 0",X,"removeRowDefinition:idx");a=Math.round(a);var b=this.qb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"rowdefs",this,c,null,a,null);this.s()}}};function Wj(a,b,c){var d=a.qb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} X.prototype.getColumnDefinition=function(a){0>a&&wa(a,">= 0",X,"getColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0===b)return null;if(void 0===b[a]){var c=new Vj;c.sj(this);c.isRow=!1;c.index=a;b[a]=c;this.Va(ze,"coldefs",this,null,c,null,a)}return b[a]};t=X.prototype; -t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.o()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.o()}} +t.SA=function(a){0>a&&wa(a,">= 0",X,"removeColumnDefinition:idx");a=Math.round(a);var b=this.nb;if(void 0!==b){var c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.Va(Ae,"coldefs",this,c,null,a,null);this.s()}}};function Xj(a,b,c){var d=a.nb;if(d&&!(0>b)){d[b]=c instanceof Vj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.s()}} t.aA=function(a){if(0>a||this.type!==X.Table)return-1;for(var b=0,c=this.qb,d=c.length,e=this.Xi;ea||this.type!==X.Table)return-1;for(var b=0,c=this.nb,d=c.length,e=this.Gi;ea;)this.Lc(this.W.length-1,!1);a=this.itemArray;if(null!==a)for(var b=a.length,c=0;cc)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Hi("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), +function qn(a,b,c){if(!(void 0===b||null===b||0>c)){var d=rn(a,b),e=a.itemTemplateMap,f=null;null!==e&&(f=e.G(d));null===f&&(null!==e&&(f=e.G("")),null===f&&(sn||(sn=!0,xa('No item template Panel found for category "'+d+'" on '+a),xa(" Using default item template."),d=new X,e=new Wg,e.bind(new Ii("text","",Ka)),d.add(e),tn=d),f=tn));d=f;null!==d&&(yg(d),d=d.copy(),0!==(d.F&16777216)&&(e=a.ij(),null!==e&&nn(e,!0)),"object"===typeof b&&(null===a.Zd&&(a.Zd=new H),a.Zd.add(b,d)),e=c+jn(a),a.wb(e,d), d.ob=b,un(a,e,c),d.ob=null,d.data=b)}}function un(a,b,c){for(a=a.W;ba&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.o(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.o(),this.g("defaultAlignment", -b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.o(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.o(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== -this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.o(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ +na.Object.defineProperties(X.prototype,{type:{get:function(){return this.qa},set:function(a){var b=this.qa;b!==a&&(this.qa=a,this.qa===X.Grid?this.isAtomic=!0:this.qa===X.Table&&an(this),this.s(),this.g("type",b,a))}},elements:{get:function(){return this.W.iterator}},naturalBounds:{get:function(){return this.rc}},padding:{get:function(){return this.ib},set:function(a){"number"=== +typeof a?(0>a&&wa(a,">= 0",X,"padding"),a=new kc(a)):(0>a.left&&wa(a.left,">= 0",X,"padding:value.left"),0>a.right&&wa(a.right,">= 0",X,"padding:value.right"),0>a.top&&wa(a.top,">= 0",X,"padding:value.top"),0>a.bottom&&wa(a.bottom,">= 0",X,"padding:value.bottom"));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.s(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Mn},set:function(a){var b=this.Mn;b.w(a)||(this.Mn=a=a.H(),this.s(),this.g("defaultAlignment", +b,a))}},defaultStretch:{get:function(){return this.Sf},set:function(a){var b=this.Sf;b!==a&&(this.Sf=a,this.s(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?qc:this.Fj},set:function(a){if(void 0!==this.Fj){"number"===typeof a&&(a=new kc(a));var b=this.Fj;b.w(a)||(this.Fj=a=a.H(),this.s(),this.g("defaultSeparatorPadding",b,a))}}},defaultRowSeparatorStroke:{get:function(){return void 0=== +this.si?null:this.si},set:function(a){var b=this.si;b!==a&&(null===a||"string"===typeof a||a instanceof zl)&&(a instanceof zl&&a.freeze(),this.si=a,this.M(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(a){if(void 0!==this.Ug){var b=this.Ug;b!==a&&isFinite(a)&&0<=a&&(this.Ug=a,this.s(),this.g("defaultRowSeparatorStrokeWidth",b,a))}}},defaultRowSeparatorDashArray:{ get:function(){return void 0===this.ri?null:this.ri},set:function(a){if(void 0!==this.ri){var b=this.ri;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.o(), -this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.o(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; -null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Da()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ +a,this.s(),this.g("rowSizing",b,a))}}},columnSizing:{get:function(){return void 0===this.Cj?bn:this.Cj},set:function(a){if(void 0!==this.Cj){var b=this.Cj;b!==a&&(this.Cj=a,this.s(),this.g("columnSizing",b,a))}}},topIndex:{get:function(){return void 0===this.Xi?0:this.Xi},set:function(a){if(void 0!==this.Xi){var b=this.Xi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Xi=a,this.s(), +this.g("topIndex",b,a))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(a){if(void 0!==this.Gi){var b=this.Gi;b!==a&&((!isFinite(a)||0>a)&&B("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Gi=a,this.s(),this.g("leftIndex",b,a))}}},data:{get:function(){return this.ob},set:function(a){var b=this.ob;if(b!==a){var c=this instanceof V&&!(this instanceof Je);yg(this);this.ob=a;var d=this.diagram; +null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.Te.remove(b),null!==a&&c.Te.add(a,this)):this instanceof V&&(null!==b&&c.Ue.remove(b),null!==a&&c.Ue.add(a,this))):(c=this.panel,null!==c&&null!==c.Zd&&(null!==b&&c.Zd.remove(b),null!==a&&c.Zd.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Ea()}}},itemIndex:{get:function(){return this.Do},set:function(a){var b=this.Do;b!==a&&(this.Do=a,this.g("itemIndex",b,a))}},itemArray:{ get:function(){return this.Ci},set:function(a){var b=this.Ci;if(b!==a||null!==a&&pn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Ci=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||this.eu()}}},itemTemplate:{get:function(){return null===this.te?null:this.te.G("")},set:function(a){if(null===this.te){if(null===a)return;this.te=new H}var b=this.te.G(""); b!==a&&((a instanceof V||a.isPanelMain)&&B("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.te.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.eu())}},itemTemplateMap:{get:function(){return this.te},set:function(a){var b=this.te;if(b!==a){for(var c=a.iterator;c.next(););this.te=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.eu()}}},itemCategoryProperty:{ get:function(){return this.Jl},set:function(a){var b=this.Jl;b!==a&&(this.Jl=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.F&1048576)},set:function(a){var b=0!==(this.F&1048576);b!==a&&(this.F^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.F&2097152)},set:function(a){var b=0!==(this.F&2097152);b!==a&&(!a||this.type===X.Spot||this instanceof U||xa("Warning: Panel.isClipping set on non-Spot Panel: "+ -this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.o(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.o(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", -b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.o(),this.g("alignmentFocusName",b,a))}}}); +this.toString()),this.F^=2097152,this instanceof U&&(this.Za=null),this.s(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.F&33554432)},set:function(a){var b=0!==(this.F&33554432);b!==a&&(this.F^=33554432,this.s(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.F&4194304)},set:function(a){var b=0!==(this.F&4194304);if(b!==a){var c=null===this.panel||this.panel.Hg();this.F^=4194304;this.g("isEnabled", +b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&mn(this,this,a)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(a){var b=this.Lg;b!==a&&(this.Lg=a,this.s(),this.g("alignmentFocusName",b,a))}}}); na.Object.defineProperties(X,{Position:{get:function(){return Sl.G("Position")}},Horizontal:{get:function(){return Sl.G("Horizontal")}},Vertical:{get:function(){return Sl.G("Vertical")}},Spot:{get:function(){return Sl.G("Spot")}},Auto:{get:function(){return Sl.G("Auto")}},Table:{get:function(){return Sl.G("Table")}},Viewbox:{ get:function(){return Sl.G("Viewbox")}},TableRow:{get:function(){return Sl.G("TableRow")}},TableColumn:{get:function(){return Sl.G("TableColumn")}},Link:{get:function(){return Sl.G("Link")}},Grid:{get:function(){return Sl.G("Grid")}},Graduated:{get:function(){return Sl.G("Graduated")}}});X.prototype.findItemPanelForData=X.prototype.qy; -X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Da;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; +X.prototype.rebuildItemElements=X.prototype.eu;X.prototype.updateTargetBindings=X.prototype.Ea;X.prototype.copyTemplate=X.prototype.Gz;X.prototype.graduatedValueForPoint=X.prototype.rA;X.prototype.graduatedPointForValue=X.prototype.qA;X.prototype.findColumnForLocalX=X.prototype.Tz;X.prototype.findRowForLocalY=X.prototype.aA;X.prototype.removeColumnDefinition=X.prototype.SA;X.prototype.removeRowDefinition=X.prototype.XA;X.prototype.removeAt=X.prototype.cb;X.prototype.remove=X.prototype.remove; X.prototype.insertAt=X.prototype.wb;X.prototype.elt=X.prototype.J;X.prototype.add=X.prototype.add;X.prototype.findObject=X.prototype.bb;X.prototype.findInVisualTree=X.prototype.ym;X.prototype.walkVisualTreeFrom=X.prototype.an;X.prototype.findMainElement=X.prototype.tb;var sn=!1,tn=null,Sl=new H;X.className="Panel";X.definePanelLayout=wn;wn("Position",new Am);wn("Vertical",new Dm);wn("Auto",new Fm);wn("Link",new Qm); function Vj(){Xa(this);this.og=null;this.ns=!0;this.Ra=0;this.ad=NaN;this.nh=0;this.lh=Infinity;this.yb=Vc;this.la=this.bc=this.ha=0;this.fb=null;this.Yp=xn;this.De=al;this.Up=this.sg=null;this.Vp=NaN;this.mb=this.fk=null;this.In=!1} Vj.prototype.copy=function(){var a=new Vj;a.ns=this.ns;a.Ra=this.Ra;a.ad=this.ad;a.nh=this.nh;a.lh=this.lh;a.yb=this.yb;a.ha=this.ha;a.bc=this.bc;a.la=this.la;a.De=this.De;a.Yp=this.Yp;null===this.sg?a.sg=null:a.sg=this.sg.H();a.Up=this.Up;a.Vp=this.Vp;a.fk=null;null!==this.fk&&(a.separatorDashArray=Ba(this.separatorDashArray));a.mb=this.mb;a.In=this.In;a.fb=this.fb;return a};t=Vj.prototype; @@ -1230,13 +1230,13 @@ c.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top:b.left)}; t.wc=function(){var a=0,b=this.og,c=0,d=this.isRow;if(null!==b&&b.type===X.Table)for(var e=d?b.qb.length:b.nb.length,f=0;fa&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(), -this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("minimum",b,a))}},maximum:{ -get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.o(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= -a,null!==this.panel&&this.panel.o(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.o(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), -a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.o(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&wa(a,">= 0",Vj,"height"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(), +this.Bb("height",b,a))}},width:{get:function(){return this.ad},set:function(a){var b=this.ad;b!==a&&(0>a&&wa(a,">= 0",Vj,"width"),this.ad=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("width",b,a))}},minimum:{get:function(){return this.nh},set:function(a){var b=this.nh;b!==a&&((0>a||!isFinite(a))&&wa(a,">= 0",Vj,"minimum"),this.nh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("minimum",b,a))}},maximum:{ +get:function(){return this.lh},set:function(a){var b=this.lh;b!==a&&(0>a&&wa(a,">= 0",Vj,"maximum"),this.lh=a,this.actual=this.ha,null!==this.panel&&this.panel.s(),this.Bb("maximum",b,a))}},alignment:{get:function(){return this.yb},set:function(a){var b=this.yb;b.w(a)||(this.yb=a.H(),null!==this.panel&&this.panel.s(),this.Bb("alignment",b,a))}},stretch:{get:function(){return this.De},set:function(a){var b=this.De;b!==a&&(this.De= +a,null!==this.panel&&this.panel.s(),this.Bb("stretch",b,a))}},separatorPadding:{get:function(){return this.sg},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.sg;null!==a&&null!==b&&b.w(a)||(null!==a&&(a=a.H()),this.sg=a,null!==this.panel&&this.panel.s(),this.Bb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.Up},set:function(a){var b=this.Up;b!==a&&(null!==a&&Wl(a,"RowColumnDefinition.separatorStroke"), +a instanceof zl&&a.freeze(),this.Up=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(a){var b=this.Vp;b!==a&&(this.Vp=a,null!==this.panel&&this.panel.s(),this.Bb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.fk},set:function(a){var b=this.fk;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ee)){var f=d.measuredBounds,g=Math.max(1,f.width);f=f.height;for(var h=c[0],k=c[1],l,m,n,p,r,q,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];for(var y=0;.1<=u;){0===y&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); if(e>u){Ia(w);return}e>q?(y=e-q,e=q):y=0;var z=Math.sqrt(e*e/(1+p*p));0>n&&(z=-z);h+=z;k+=p*z;a.translate(h,k);a.rotate(r);a.translate(-(g/2),-(f/2));0===y&&d.ej(a,b);a.translate(g/2,f/2);a.rotate(-r);a.translate(-h,-k);u-=e;q-=e;if(0!==y){v++;if(v===w.length){Ia(w);return}q=w[v];n=q[0];r=q[1];p=q[2];q=q[3];e=y}}Ia(w)}} -t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&ni(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(ni(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, +t.ej=function(a,b){var c=this.Hc,d=this.tl;if(null!==c||null!==d){var e=this.actualBounds,f=this.naturalBounds;null!==d&&oi(this,a,d,!0,!1,f,e);var g=this.part,h=this.wh;null===c||0!==h||null===g||!this.isPanelMain&&g.tb()!==this||(h=g.type===X.Link&&g instanceof Je&&"Selection"===g.category&&g.adornedObject instanceof Kf&&g.adornedPart.tb()===g.adornedObject?g.adornedObject.strokeWidth:0);0===h&&(c=null);null!==c&&0!==h&&(oi(this,a,c,!1,!1,f,e),a.lineWidth=h,a.lineJoin=this.lm,a.lineCap=this.km, a.miterLimit=this.gk);e=!1;g&&b.Ke("drawShadows")&&(e=g.isShadowed);g=!0;null===c||null!==d&&"transparent"!==d||(g=!1);f=!1;h=this.strokeDashArray;null!==h&&(f=!0,a.Ft(h,this.vh));var k=this.na;if(null!==k){if(k.type===ud)a.beginPath(),a.moveTo(k.startX,k.startY),a.lineTo(k.endX,k.endY),null!==c&&a.vj();else if(k.type===yd){var l=k.startX;h=k.startY;var m=k.endX,n=k.endY;k=Math.min(l,m);var p=Math.min(h,n);l=Math.abs(m-l);h=Math.abs(n-h);a.beginPath();a.rect(k,p,l,h);null!==d&&a.Je(d);if(null!==c){g&& e&&yl(a);if(0===l||0===h)a.beginPath(),a.rect(k,p,Math.max(l,.1),Math.max(h,.1));a.vj();g&&e&&xl(a)}}else if(k.type===zd)l=k.startX,h=k.startY,m=k.endX,n=k.endY,k=Math.abs(m-l)/2,p=Math.abs(n-h)/2,l=Math.min(l,m)+k,h=Math.min(h,n)+p,a.beginPath(),a.moveTo(l,h-p),a.bezierCurveTo(l+L.Kg*k,h-p,l+k,h-L.Kg*p,l+k,h),a.bezierCurveTo(l+k,h+L.Kg*p,l+L.Kg*k,h+p,l,h+p),a.bezierCurveTo(l-L.Kg*k,h+p,l-k,h+L.Kg*p,l-k,h),a.bezierCurveTo(l-k,h-L.Kg*p,l-L.Kg*k,h-p,l,h-p),a.closePath(),null!==d&&a.Je(d),null!==c&& (g&&e?(yl(a),a.vj(),xl(a)):a.vj());else if(k.type===sd)for(h=k.figures,k=h.length,p=0;pe)return!1;break;case $d:var p=Ea();L.Fe(g,m,n.point1X,n.p break}n=null;for(var q=Ea(),u=0;u= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= +na.Object.defineProperties(Kf.prototype,{geometry:{get:function(){return null!==this.na?this.na:this.Ed},set:function(a){var b=this.na,c=this.Ed;if(b!==a){null!==a?this.Ed=this.na=a.freeze():this.Ed=this.na=null;var d=this.part;null!==d&&(d.kh=NaN);this.s();this.g("geometry",b||c,a);kl(this)&&(a=this.part,null!==a&&ll(this,a,"geometryString"))}}},geometryString:{get:function(){return null===this.geometry?"":this.geometry.toString()},set:function(a){a= +Dd(a);var b=a.normalize();this.geometry=a;this.position=a=J.allocAt(-b.x,-b.y);J.free(a)}},isGeometryPositioned:{get:function(){return this.vo},set:function(a){var b=this.vo;b!==a&&(this.vo=a,this.s(),this.g("isGeometryPositioned",b,a))}},fill:{get:function(){return this.tl},set:function(a){var b=this.tl;b!==a&&(null!==a&&Wl(a,"Shape.fill"),a instanceof zl&&a.freeze(),this.tl=a,this.M(),this.g("fill",b,a))}},stroke:{ +get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"Shape.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},strokeWidth:{get:function(){return this.wh},set:function(a){var b=this.wh;if(b!==a)if(0<=a){this.wh=a;this.s();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeWidth",b,a)}else wa(a,"value >= 0",Kf,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(a){var b= this.km;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?wa(a,'"butt", "round", or "square"',Kf,"strokeCap"):(this.km=a,this.M(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return this.lm},set:function(a){var b=this.lm;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?wa(a,'"miter", "bevel", or "round"',Kf,"strokeJoin"):(this.lm=a,this.M(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return this.gk}, set:function(a){var b=this.gk;if(b!==a&&1<=a){this.gk=a;this.M();var c=this.part;null!==c&&(c.kh=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.uh},set:function(a){var b=this.uh;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& +a.mg=b.mg,a.zg=b.zg,a.oe=null,a.mf=b.mf,a.nf=b.nf,a.ve=b.ve,a.Ei=b.Ei,a.Yd=b.Yd,a.Wd=b.Wd,a.Ud=b.Ud,a.Lj=b.Lj,a.Vd=b.Vd)}t=Wg.prototype;t.jb=function(a){a.classType===Wg?this.wrap=a:Y.prototype.jb.call(this,a)};t.toString=function(){return 22p*m*m&&(c=!0);b.Gb!==a&&(c=!1);!1===b.Ke("textGreeking")&& (c=!1);b=this.mf;p=this.nf;switch(this.flip){case fl:a.translate(e,0);a.scale(-1,1);break;case el:a.translate(0,f);a.scale(1,-1);break;case gl:a.translate(e,f),a.scale(-1,-1)}m=this.Zc;n=(b+g+p)*m;f>n&&(d=this.aj,d=d.y*f-d.y*n+d.offsetY);if(1===m&&null!==this.me)p=this.vb,p>e&&(p=e),this.dj(this.me,a,0,d+b,e,g,p,c,h,k,l);else if(null!==this.Qb&&null!==this.lb)for(n=0;ne&&(r=e);d+=b;this.dj(this.lb[n],a,0,d,e,g,r,c,h,k,l);d+=g+p}switch(this.flip){case fl:a.scale(-1,1);a.translate(-e, 0);break;case el:a.scale(1,-1);a.translate(0,-f);break;case gl:a.scale(-1,-1),a.translate(-e,-f)}}}; t.dj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;h?("left"===k?n=0:"right"===k?n=e-g:"center"===k&&(n=(e-g)/2),b.fillRect(c+n,d+.25*f,g,1)):("left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2),e=null!==Vn?Vn(this,f):.75*f,b.fillText(a,c+n,d+e),a=f/20|0,0===a&&(a=1),"right"===k?n-=g:"center"===k&&(n-=g/2),l&&(k=null!==Wn?Wn(this,f):.8*f,b.beginPath(),b.lineWidth=a,b.moveTo(c+n,d+k),b.lineTo(c+n+g,d+k),b.stroke()),m&&(b.beginPath(),b.lineWidth=a,d=d+f-f/2.2|0,0!==a%2&&(d+=.5),b.moveTo(c+n,d),b.lineTo(c+ @@ -1313,35 +1313,35 @@ f+=bo;var m=Yn(f);a.vb=m;eo(a,f,m);null!==d&&d.h(m,h)}}else{k=0;0===g.length&&(k b[b.length-1]&&(b=b.substring(0,b.length-1)+"\u2010"),0===m.length?(n=l,f=Math.max(f,l)):(n=m=Yn(b),f=Math.max(f,m)),eo(a,b,n),k++,a.Zc+k>a.ve))break}a.Be=Math.min(a.ve,k);a.vb=Math.max(a.vb,f);null!==d&&d.h(a.vb,h*a.Be)}}function ho(a,b){if(a.zg===io)return b.substr(0,1);for(var c=b.length,d=0,e=jo;d=b.length?b:b.substr(0,d)}function Yn(a){return null===Qn?8*a.length:Qn.measureText(a).width} function Un(a){if(null!==a.oe)return a.oe;var b=a.ne;if(null===Qn){var c=16;return a.oe=c}void 0!==lo[b]&&5E3>mo?c=lo[b]:(c=1.3*Qn.measureText("M").width,lo[b]=c,mo++);return a.oe=c}function ao(a){if(null===Qn)return 6;if(void 0!==no[a]&&5E3>oo)var b=no[a];else b=Qn.measureText(bo).width,no[a]=b,oo++;return b} function Zn(a,b){var c=a.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.mf+a.nf;d=Math.max(0,Un(a)+d);if(0===c.length)return a.vb=0,a.Zc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Zc=0,g,h=!1;!h;){g=c.indexOf("\n",f);-1===g&&(g=c.length,h=!0);if(f<=g){f=c.substr(f,g-f);if(a.zg!==go){a.Be=0;var k=M.alloc();fo(a,f,b,k);e+=k.height;M.free(k);a.Zc+=a.Be}else fo(a,f,b,null),e+=d,a.Zc++;a.Zc===a.ve&&(h=!0)}f=g+1}return a.us=e} -na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.o(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.o(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== -a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.s()){var a= -M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.o(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, -a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.o(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.o(),this.g("overflow",b,a))}},stroke:{ +na.Object.defineProperties(Wg.prototype,{font:{get:function(){return this.ne},set:function(a){var b=this.ne;b!==a&&(this.ne=a,this.oe=null,this.s(),this.g("font",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.Ub=a,this.s(),this.g("text",b,a))}},textAlign:{get:function(){return this.Vi},set:function(a){var b=this.Vi;b===a||"start"!== +a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(this.Vi=a,this.M(),this.g("textAlign",b,a))}},flip:{get:function(){return this.Td},set:function(a){var b=this.Td;b!==a&&(this.Td=a,this.M(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return this.aj},set:function(a){var b=this.aj;b.w(a)||(this.aj=a=a.H(),Il(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.rc.o()){var a= +M.alloc();fo(this,this.Ub,999999,a);var b=a.width;M.free(a);a=Zn(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Sb(this.rc,b,a)}return this.rc}},isMultiline:{get:function(){return this.Pj},set:function(a){var b=this.Pj;b!==a&&(this.Pj=a,this.s(),this.g("isMultiline",b,a))}},isUnderline:{get:function(){return this.Bi},set:function(a){var b=this.Bi;b!==a&&(this.Bi=a,this.M(),this.g("isUnderline",b, +a))}},isStrikethrough:{get:function(){return this.Ai},set:function(a){var b=this.Ai;b!==a&&(this.Ai=a,this.M(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return this.zg},set:function(a){var b=this.zg;b!==a&&(this.zg=a,this.s(),this.g("wrap",b,a))}},overflow:{get:function(){return this.mg},set:function(a){var b=this.mg;b!==a&&(this.mg=a,this.s(),this.g("overflow",b,a))}},stroke:{ get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(null!==a&&Wl(a,"TextBlock.stroke"),a instanceof zl&&a.freeze(),this.Hc=a,this.M(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Zc}},editable:{get:function(){return this.Vn},set:function(a){var b=this.Vn;b!==a&&(this.Vn=a,this.g("editable",b,a))}},textEditor:{get:function(){return this.jq},set:function(a){var b=this.jq;b!==a&& -(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.o();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, -set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.o(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); +(this.jq=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return this.ld},set:function(a){var b=this.ld;b!==a&&(this.ld=a,this.g("errorFunction",b,a))}},interval:{get:function(){return this.Yd},set:function(a){var b=this.Yd;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){this.Yd=a;this.s();var c=this.panel;null!==c&&(c.eh=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return this.Wd}, +set:function(a){var b=this.Wd;b!==a&&(0>a?a=0:1a?a=0:1=a&&wa(a,"> 0",Wg,"maxLines"),this.ve=a,this.s(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(a){var b=this.xn;b!==a&&(this.xn=a,this.g("choices",b,a))}}}); var Vn=null,Wn=null,go=new D(Wg,"None",0),co=new D(Wg,"WrapFit",1),Sn=new D(Wg,"WrapDesiredSize",2),io=new D(Wg,"WrapBreakAll",3),Rn=new D(Wg,"OverflowClip",0),$n=new D(Wg,"OverflowEllipsis",1),Tn=new D(Wg,"FormatTrim",0),ko=new D(Wg,"FormatNone",0),jo=/[ \u200b\u00ad]/,lo=new $a,mo=0,no=new $a,oo=0,bo="...",Xn="",Qn=null,Pn=!1;Wg.className="TextBlock";Wg.getEllipsis=function(){return bo};Wg.setEllipsis=function(a){bo=a;no=new $a;oo=0};Wg.getBaseline=function(){return Vn}; Wg.setBaseline=function(a){Vn=a};Wg.getUnderline=function(){return Wn};Wg.setUnderline=function(a){Wn=a};Wg.isValidFont=function(a){Pn||(Qn=Ug?(new Hk(null)).context:null,Pn=!0);if(null===Qn)return!0;var b=Qn.font;if(a===b||"10px sans-serif"===a)return!0;Qn.font="10px sans-serif";Qn.font=a;var c=Qn.font;if("10px sans-serif"!==c)return Qn.font=b,!0;Qn.font="19px serif";var d=Qn.font;Qn.font=a;c=Qn.font;Qn.font=b;return c!==d};Wg.None=go;Wg.WrapFit=co;Wg.WrapDesiredSize=Sn;Wg.WrapBreakAll=io; Wg.OverflowClip=Rn;Wg.OverflowEllipsis=$n;function po(){this.Qb=[];this.lb=[]}po.prototype.reset=function(){this.Qb=[];this.lb=[]};po.prototype.gy=function(a){this.Qb=Ba(a.Qb);this.lb=Ba(a.lb)};po.className="TextBlockMetrics";function dk(){Y.call(this);this.Zg=null;this.$p="";this.th=jc;this.yl=td;this.xh=this.ld=null;this.xl=zc;this.Td=zg;this.nm=null;this.uo=!1;this.Yr=!0;this.Ol=!1;this.gm=null}ma(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Gi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} -function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ +dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.element=this.Zg;a.$p=this.$p;a.th=this.th.H();a.yl=this.yl;a.Td=this.Td;a.ld=this.ld;a.xh=this.xh;a.xl=this.xl.H();a.Yr=this.Yr;a.gm=this.gm};dk.prototype.jb=function(a){a===zg||a===Bg||a===dl?this.imageStretch=a:Y.prototype.jb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+kb(this)};function Hi(a){void 0===a&&(a="");""!==a?qo[a]&&(delete qo[a],ro--):(qo=new $a,ro=0)} +function so(a,b){b.fz||(b.dv=function(c){b.ls=!0;b.ro=!1;var d=b.Wg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;var f=b.getAttribute("src");var g=e.pg.G(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(e=e+r.offsetX+(m*r.x-d.width*r.x));n>=d.height&&(f=f+r.offsetY+(n*r.y-d.height*r.y));h=Math.min(d.width,m);g=Math.min(d.height,n);break;case td:m=d.width;n=d.height;break;case Bg:case dl:p===Bg?(p=Math.min(d.height/n,d.width/m),m*=p,n*=p):p===dl&&(p=Math.max(d.height/n,d.width/m),m*=p,n*=p,m>=d.width&&(e=(e+r.offsetX+(m*r.x-d.width*r.x)/m)*h),n>=d.height&&(f=(f+r.offsetY+(n*r.y-d.height*r.y)/n)*g),h*=1/(m/ d.width),g*=1/(n/d.height),m=d.width,n=d.height)}p=this.Af()*b.scale;var q=m*p*n*p,u=h*g/q,w=c.__goCache;p=null;var v=to;if(c.ls&&void 0!==w&&4v*v)for(null===w.cj&&(uo(w,4,k,l,c),uo(w,16,k,l,c)),k=w.cj,l=k.length,q=0;qe.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.righte.x&&a.y>e.y&&a.righte.x&&b.y>e.y&&b.right=c.maxSelectionCount)){this.D^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.ea();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.Lb();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.Db(),c.skipsUndoManager=d)}}}},isHighlighted:{get:function(){return 0!== (this.D&524288)},set:function(a){var b=0!==(this.D&524288);if(b!==a){this.D^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.ea(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.M();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{get:function(){return 0!==(this.D&8192)},set:function(a){var b=0!==(this.D&8192);b!==a&&(this.D^=8192,this.g("isShadowed",b,a),this.M())}},isAnimated:{get:function(){return 0!== @@ -1413,12 +1413,12 @@ get:function(){return this.Rp},set:function(a){var b=this.Rp;b!==a&&(this.Rp=a,t b!==a&&(this.Sp=a,this.g("selectionChanged",b,a))}},resizeAdornmentTemplate:{get:function(){return this.Cp},set:function(a){var b=this.Cp;b!==a&&(this.Cp=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{get:function(){return this.Ep},set:function(a){var b=this.Ep;b!==a&&(this.Ep=a,this.g("resizeObjectName",b,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.bb(a), null!==a)?a:this}},resizeCellSize:{get:function(){return this.Dp},set:function(a){var b=this.Dp;b.w(a)||(this.Dp=a=a.H(),this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{get:function(){return this.Gp},set:function(a){var b=this.Gp;b!==a&&(this.Gp=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{get:function(){return this.Hp},set:function(a){var b=this.Hp;b!==a&&(this.Hp=a,this.g("rotateObjectName", b,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.bb(a),null!==a)?a:this}},rotationSpot:{get:function(){return this.Ip},set:function(a){var b=this.Ip;b.w(a)||(this.Ip=a=a.H(),this.g("rotationSpot",b,a))}},text:{get:function(){return this.Ub},set:function(a){var b=this.Ub;b!==a&&(this.Ub=a,this.g("text",b,a))}},containingGroup:{get:function(){return this.mi}, -set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.B(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.B(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& -e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&oi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, +set:function(a){if(this.Nc()){var b=this.mi;if(b!==a){null===a||this!==a&&!a.Kd(this)||(this===a&&B("Cannot make a Group a member of itself: "+this.toString()),B("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.C(2);var c=this.diagram;null!==b?Lo(b,this):this instanceof U&&null!==c&&c.Dh.remove(this);this.mi=a;null!==a?Ko(a,this):this instanceof U&&null!==c&&c.Dh.add(this);this.C(1);if(null!==c&&c.Z){var d=this.data,e=c.model;if(null!==d&& +e.Dk()){var f=e.ja(null!==a?a.data:null);e.dr(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.Z,c.Z=!0),d(this,b,a),null!==c&&(c.Z=e));if(this instanceof U)for(c=new G,Yk(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof W)for(d=d.linksConnected;d.next();)Qo(d.value);if(this instanceof W){for(c=this.linksConnected;c.next();)Qo(c.value);c=this.labeledLink;null!==c&&Qo(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&pi(b,-1,a))}}else B("cannot set the Part.containingGroup of a Link or Adornment")}}, containingGroupChanged:{get:function(){return this.An},set:function(a){var b=this.An;b!==a&&(this.An=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{get:function(){return null!==this.containingGroup||this instanceof W&&null!==this.labeledLink?!1:!0}},layoutConditions:{get:function(){return this.Io},set:function(a){var b=this.Io;b!==a&&(this.Io=a,this.g("layoutConditions",b,a))}},dragComputation:{ get:function(){return this.Sn},set:function(a){var b=this.Sn;b!==a&&(this.Sn=a,this.g("dragComputation",b,a))}},shadowOffset:{get:function(){return this.Xp},set:function(a){var b=this.Xp;b.w(a)||(this.Xp=a=a.H(),this.M(),this.g("shadowOffset",b,a))}},shadowColor:{get:function(){return this.Wp},set:function(a){var b=this.Wp;b!==a&&(this.Wp=a,this.M(),this.g("shadowColor",b,a))}},shadowBlur:{get:function(){return this.ug}, -set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.B;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; -V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Da;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; +set:function(a){var b=this.ug;b!==a&&(this.ug=a,this.M(),this.g("shadowBlur",b,a))}}});V.prototype.invalidateLayout=V.prototype.C;V.prototype.findCommonContainingGroup=V.prototype.oy;V.prototype.isMemberOf=V.prototype.Kd;V.prototype.findTopLevelPart=V.prototype.eA;V.prototype.findSubGraphLevel=V.prototype.bA;V.prototype.ensureBounds=V.prototype.Ta;V.prototype.getDocumentBounds=V.prototype.mj;V.prototype.getRelativePoint=V.prototype.Df;V.prototype.findObject=V.prototype.bb;V.prototype.moveTo=V.prototype.moveTo; +V.prototype.invalidateAdornments=V.prototype.Lb;V.prototype.clearAdornments=V.prototype.nk;V.prototype.removeAdornment=V.prototype.Hf;V.prototype.addAdornment=V.prototype.Gh;V.prototype.findAdornment=V.prototype.wk;V.prototype.updateTargetBindings=V.prototype.Ea;var Io=!1;V.className="Part";V.LayoutNone=0;V.LayoutAdded=1;V.LayoutRemoved=2;V.LayoutShown=4;V.LayoutHidden=8;V.LayoutNodeSized=16;V.LayoutGroupLayout=32;V.LayoutNodeReplaced=64;V.LayoutStandard=127;V.LayoutAll=16777215; function Je(a){V.call(this,a);this.D&=-257;this.ih="Adornment";this.ie=null;this.Ex=0;this.Sx=!1;this.l=a instanceof Qm?[]:Ro;this.Sa=null}ma(Je,V);Je.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Je.prototype.updateRelationshipsFromData=function(){}; Je.prototype.Gk=function(a){var b=this.adornedObject.part;if(b instanceof S&&this.adornedObject instanceof Kf){var c=b.path;b.Gk(a);a=c.geometry;b=this.W.j;c=b.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);bp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}};function bp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ti);b.Le=!1}}; +W.prototype.expandTree=function(a){void 0===a&&(a=2);2>a&&(a=2);var b=this.diagram;if(null!==b&&!b.Le){b.Le=!0;var c=new G;c.add(this);dp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===ui);b.Le=!1}}; function dp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Fq():a.Hd();k.next();){var l=k.value;l.isTreeLink&&(h||l.ud||l.Ua(),l=l.Kq(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),h||(l.Ob(!0),l.Oh(),g&&e.lk(l,f)),2e&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.h(c,d,e-c,f-d):(b=b.location, -a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.o())}}});xg.className="Placeholder"; +a.h(b.x,b.y,0,0));return a};na.Object.defineProperties(xg.prototype,{padding:{get:function(){return this.ib},set:function(a){"number"===typeof a&&(a=new kc(a));var b=this.ib;b.w(a)||(this.ib=a=a.H(),this.g("padding",b,a),this.s())}}});xg.className="Placeholder"; function S(){V.call(this,X.Link);this.Ga=8;this.We=null;this.Xe="";this.rf=this.fo=null;this.sf="";this.mq=null;this.Yk=ag;this.Hn=0;this.Jn=ag;this.Kn=NaN;this.ck=ip;this.Zp=.5;this.nd=null;this.Ab=(new E).freeze();this.jf=this.ph=null;this.Yl=new N;this.na=new rd;this.I=this.u=this.Mf=this.Vf=null;this.l=[];this.vv=new J;this.$r=this.Nx=this.Mx=null;this.Ru=NaN;this.O=null}ma(S,V); S.prototype.cloneProtected=function(a){V.prototype.cloneProtected.call(this,a);a.Ga=this.Ga&-113;a.Xe=this.Xe;a.fo=this.fo;a.sf=this.sf;a.mq=this.mq;a.Yk=this.Yk;a.Hn=this.Hn;a.Jn=this.Jn;a.Kn=this.Kn;a.ck=this.ck;a.Zp=this.Zp;null!==this.O&&(a.O=this.O.copy())};t=S.prototype;t.yf=function(a){V.prototype.yf.call(this,a);this.Xe=a.Xe;this.sf=a.sf;a.ph=null;a.Ua();a.Mf=this.Mf;var b=a.fromPort;null!==b&&Vo(b);a=a.toPort;null!==a&&Vo(a)}; t.jb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===dg||a===$f||a===Zf?this.curve=a:a===jp||a===kp||a===lp?this.adjusting=a:a!==ip&&a!==ag&&B("Unknown Link enum value for a Link property: "+a):V.prototype.jb.call(this,a)};t.Kc=function(){null===this.O&&(this.O=new jl)};t.rj=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(vj(a)||wj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),vj(a)||wj(a))?!1:!0};t.Ew=function(){return!1}; t.lu=function(){};t.Nc=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case ag:a=0;break;case Zm:a=b;break;case Sm:a=b+90;break;case Um:a=b-90;break;case mp:a=b+180;break;case $m:a=L.Tq(b);90a&&(a-=180);break;case Tm:a=L.Tq(b+90);90a&&(a-=180);break;case Vm:a=L.Tq(b-90);90a&&(a-=180);break;case Wm:a=L.Tq(b);if(45a||225a)return 0;90a&&(a-=180)}return L.Tq(a)}; function Qo(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.oy(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.mi;if(c!==b){null!==c&&Lo(c,a);a.mi=b;null!==b&&Ko(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.Z,g.Z=!0);e(a,c,b);null!==g&&(g.Z=f)}!a.ud||a.Mx!==c&&a.Nx!==c||a.Ua()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.o()} +t.Oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&V.prototype.Oh.call(this)};t.Kq=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.nA=function(a){var b=this.fromPort;return a===b?this.toPort:b};function Zo(a,b){null===a.nd&&(a.nd=new G);a.nd.add(b);a.s()} t.Mq=function(a){V.prototype.Mq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Xo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Xo(c,this,d)}op(this)}};t.Nq=function(a){V.prototype.Nq.call(this,a);np(this)&&this.Oq(this.actualBounds);if(!a){a=this.We;var b=null;null!==a&&(b=this.fromPort,Yo(a,this,b));var c=this.rf;if(null!==c){var d=this.toPort;c===a&&d===b||Yo(c,this,d)}pp(this)}}; t.uk=function(){this.ud=!0;if(null!==this.nd){var a=this.diagram;if(null!==a)for(var b=this.nd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};S.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; S.prototype.move=function(a,b){var c=b?this.location:this.position,d=c.x;isNaN(d)&&(d=0);var e=c.y;isNaN(e)&&(e=0);d=a.x-d;e=a.y-e;!0===b?V.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),V.prototype.move.call(this,a,!1),J.free(a));rf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; @@ -1507,13 +1507,13 @@ f=this.i(c+2);c=this.i(c+3);L.yz(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assig S.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).Pa(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===dg))return this.na.vy(.5);if(this.computeCurve()===dg&&4<=a){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){c=Math.floor(c);a=this.i(c);b=this.i(c+1);var d=this.i(c+2);c=this.i(c+3);return L.xz(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0d/2)break;e+=f;c++}b=this.i(c);d=this.i(c+1);if(1>Math.abs(b.x-d.x)&&1>Math.abs(b.y-d.y)){if(0Math.abs(b.x-d.x))return b.y>d.y?270:90;if(1>Math.abs(b.y-d.y))return b.x>d.x?180:0}return b.Pa(d)};t=S.prototype;t.i=function(a){return this.Ab.j[a]};t.Qc=function(a,b){this.Ab.Pc(a,b)};t.L=function(a,b,c){this.Ab.Pc(a,new J(b,c))};t.wA=function(a,b){this.Ab.wb(a,b)}; t.m=function(a,b,c){this.Ab.wb(a,new J(b,c))};t.ce=function(a){this.Ab.add(a)};t.vf=function(a,b){this.Ab.add(new J(a,b))};t.uw=function(a){this.Ab.cb(a)};t.pk=function(){this.Ab.clear()}; -function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.o():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.copy().offset(b,c),a.defaultToPoint&&a.defaultToPoint.copy().offset(b,c);else{for(var d=a.ud,e=new E,f=a.Ab.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ab;a.Ab=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.sc?a.s():(a.dg.h(a.dg.x+b,a.dg.y+c),a.la.h(a.la.x+b,a.la.y+c),Il(a));d?qp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&& (a.defaultToPoint=a.i(a.pointsCount-1)));null!==g&&g.animationManager.sc&&(b=g.animationManager,a.jf=e,b.$l.add(a));a.g("points",f,e)}}t.Th=function(){null===this.ph&&(this.ph=this.Ab,this.Ab=this.Ab.copy())}; t.xf=function(){if(null!==this.ph){for(var a=this.ph,b=this.Ab,c=Infinity,d=Infinity,e=a.j,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+r,w=m*(u-r)+q);r=f.x+2*h/3;q=f.y+2*k/3;var v=r,y=q;L.A(k,0)?y=0k?-1:1)*n+r,y=m*(v-r)+q);this.pk();this.ce(f);this.vf(u,w);this.vf(v,y);this.ce(p);this.Qc(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.Qc(3,this.getLinkPoint(d,e,c,!1,!1,a,b))}else if(f=d,p=e,d=this.getLinkPoint(a,b,g,!0,!1,f,p),e=this.getLinkPoint(f,p,c,!1,!1,a,b),this.hasCurviness())p=e.x-d.x,c=e.y-d.y,g=this.computeCurviness(),a=d.x+p/2,b=d.y+c/2,f=a,h=b,L.A(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ce(d),this.vf(f,h),this.ce(e);else{this.ce(d);this.ce(e);h=N.alloc();b.mj(h);k=h.$(e);p.mj(h);l=h.$(d);if(k||l)g=b.da(vp(g),new J),this.Qc(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.da(vp(c),new J),this.Qc(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));N.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.pk();var z=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);r=u=q=0;if(m||!h||l)w=this.computeEndSegmentLength(a,b,g,!0),r=this.getLinkDirection(a, @@ -1541,7 +1541,7 @@ S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this l=k/l;m=p-m;this.Qc(a,b);for(a+=1;ak?-Math.PI/2:Math.PI/2:(k=Math.atan(k/Math.abs(h)),0>h&&(k=Math.PI-k)),h=k+m,b*=l,this.L(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Qc(c,d)}}return!0;case lp:f=this.i(a);n=this.i(c);if(!f.Qa(b)||!n.Qa(d)){e=f.x;f=f.y;g=n.x;n=n.y;l=(g-e)*(g-e)+(n-f)*(n-f);h=b.x;m=b.y;k=d.x;p=d.y;var r=1;if(0!==k-h){var q=(p-m)/(k-h);r=Math.sqrt(1+1/(q*q))}else q=9E9;this.Qc(a,b);for(a+=1;ab?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.s()&&k.s()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.addOrthoPoints=function(a,b,c,d,e,f){0>b?b+=360:360<=b&&(b-=360);0>d?d+=360:360<=d&&(d-=360);var g=d;b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=315<=d||45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.actualBounds.copy(),k=f.actualBounds.copy();if(h.o()&&k.o()){h.Jc(Dp,Dp);k.Jc(Dp,Dp);h.Oe(a);k.Oe(c);if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x){var l=new J(c.x,a.y);var m=new J(c.x,(a.y+c.y)/2);180===d?(l.x=this.computeMidOrthoPosition(a.x, a.y,c.x,c.y,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.$(a)||h.$(c))? l.y=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(a.x,h.bottom,c.x,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new J(Math.max((a.x+c.x)/2,a.x),a.y),m=new J(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,a.y,k.right,c.y,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):k.left, @@ -1560,7 +1560,7 @@ S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurvine function Sj(a){if(null===a.diagram||!a.isAvoiding||!uk(a.diagram))return!1;var b=a.points.j,c=b.length;if(4>c)return!1;a=vk(a.diagram,!0,a.containingGroup,null);for(var d=1;dIp&&Fp(b,m,n)!==l-1&&(Fp(b,c-h,d)===l-1?(e=180,m=c-h,n=d):Fp(b,c+h,d)===l-1?(e=0,m=c+h,n=d):Fp(b,c,d-k)===l-1?(e=270,m=c,n=d-k):Fp(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>Ip&&Fp(b,m,n)===l-1;)c=m,d=n,0===e?m+=h:90===e?n+=k:180===e?m-=h:n-=k,--l;if(f){if(l>Ip)if(180===e||0===e)c=Math.floor(c/h)*h+h/2;else if(90===e||270===e)d=Math.floor(d/k)*k+k/2}else c=Math.floor(c/h)*h+h/2,d=Math.floor(d/ k)*k+k/2;l>Ip&&(f=e,g=c,m=d,0===e?(f=90,m+=k):90===e?(f=180,g-=h):180===e?(f=270,m-=k):270===e&&(f=0,g+=h),Fp(b,g,m)===l-1?Hp(a,b,g,m,f,!1,f):(g=c,m=d,0===e?(f=270,m-=k):90===e?(f=0,g+=h):180===e?(f=90,m+=k):270===e&&(f=180,g-=h),Fp(b,g,m)===l-1&&Hp(a,b,g,m,f,!1,f)));a.vf(c,d)}S.prototype.Sz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=xb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gb)return a.type=ud,this.$m=!0,a;var c=!1,d=this.diagram;null!==d&&np(this)&&d.Vg.contains(this)&&(0!==this.Yl.width||0!==this.Yl.height)&&(c=!0);var e=this.i(0).copy(),f=e.copy();d=this.Ab.j;var g=this.computeCurve();if(g===dg&&3<=b&&!L.aa(this.smoothness,0))if(3===b){var h=this.i(1);d=Math.min(e.x,h.x);var k=Math.min(e.y,h.y);h=this.i(2);d=Math.min(d,h.x);k=Math.min(k,h.y)}else{if(this.isOrthogonal)for(k=0;k=b&&(d=b-1),k=this.i(d),f.x=Math.min(k.x,f.x),f.y=Math.min(k.y,f.y);d=f.x;k=f.y}else{for(k=0;kw?q>r?(g.x=v-z,g.y=r-z,b.x=v+u,b.y= @@ -1574,19 +1574,19 @@ function Kp(a,b,c,d){for(var e=a.pointsCount,f=b;L.aa(b.x,f.x)&&L.aa(b.y,f.y);){ function Mp(a,b,c,d,e,f,g){if(!g&&np(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=Np(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;r=f.y+d;a.curve===$f?Gd(b,n,r,!1):Hd(b,p,m,n,m,n,r)}else if(L.A(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;r=f.x+c;m+=d;a.curve===$f?Gd(b,r,m,!1):Hd(b,n,p,n,m,r,m)}}b.lineTo(f.x+c,f.y+d)} -function Np(a,b,c,d){var e=a.diagram;if(null===e||b.w(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ea.j;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yq&&Math.min(g,w)n&&!L.A(g,w)){h.x=q;h.y=n;m=!0;break a}}else if(!L.A(n,r)&& L.A(g,w)&&Math.min(n,r)g&&Math.min(q,u)m&&!L.A(q,u)){h.x=m;h.y=g;m=!0;break a}h.x=0;h.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}J.free(h)}function np(a){a=a.curve;return a===Zf||a===$f}function rp(a,b){if(b||np(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Vg.contains(a)||0===a.Yl.width&&0===a.Yl.height||b.Vg.add(a,a.Yl.copy())} -S.prototype.Oq=function(a){var b=this.layer;if(null!==b&&b.visible&&!b.isTemporary){var c=b.diagram;if(null!==c&&!c.animationManager.isTicking){var d=!1;for(c=c.layers;c.next();){var e=c.value;if(e.visible)if(e===b){d=!0;var f=!1;e=e.Ea.j;for(var g=e.length,h=0;ha&&wa(a,">= 0",S,"fromEndSegmentLength"),this.O.$g=a,this.g("fromEndSegmentLength",b,a),this.Ua())}}, fromShortLength:{get:function(){return null!==this.O?this.O.ah:NaN},set:function(a){this.Kc();var b=this.O.ah;b!==a&&(this.O.ah=a,this.dc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.O?this.O.Ch:Vc},set:function(a){this.Kc();var b=this.O.Ch;b.w(a)||(a=a.H(),this.O.Ch=a,this.g("toSpot",b,a),(b.Oc()||a.Oc())&&null!==this.toNode&&Vo(this.toPort),this.Ua())}},toEndSegmentLength:{get:function(){return null!== @@ -1624,7 +1624,7 @@ na.Object.defineProperties(wk.prototype,{bounds:{get:function(){return new N(thi function yp(){Xa(this);this.port=this.node=null;this.de=[];this.Sq=!1}yp.prototype.toString=function(){for(var a=this.de,b=this.node.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}yp.prototype.Dm=function(){this.de.length=0}; -function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.s()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& +function zp(a,b){var c=a.de;if(0===c.length){a:if(!a.Sq){c=a.Sq;a.Sq=!0;var d=null,e=a.node,f=e instanceof U?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.py();else{if(!f.actualBounds.o()){a.Sq=c;break a}d=f;g=d.Rv()}f=a.de.length=0;var h=a.port.da(tc,J.alloc()),k=a.port.da(Dc,J.alloc());e=N.allocAt(h.x,h.y,0,0);e.Oe(k);J.free(h);J.free(k);h=J.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.lj();for(g=g.iterator;g.next();){var l=g.value;if(l.isVisible()&& l.fromPort!==l.toPort){var m=l.fromPort===a.port||null!==l.fromNode&&l.fromNode.Kd(d),n=l.computeSpot(m,a.port);if(n.Oc()){var p=m?l.toPort:l.fromPort;if(null!==p&&(m=p.part,null!==m)){var r=m.findVisibleNode();null!==r&&r!==m&&(m=r,p=m.port);m=l.computeOtherPoint(m,p);p=h.Pa(p.da(zc));p+=(h.Pa(m)-p)/360;p-=k;0>p?p+=360:360<=p&&(p-=360);n=Zp(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));r=a.de[f];void 0===r?(r=new $p(l,p,n),a.de[f]= r):(r.link=l,r.angle=p,r.Ac=n);r.ow.set(m);f++}}}}J.free(h);a.de.sort(yp.prototype.l);k=a.de.length;d=-1;for(f=h=0;fMath.abs(u)?(y=Math.abs(u)/p,p=Math.abs(u)):y=1;break;case 2:r>Math.abs(z)?(y=Math.abs(z)/r,r=Math.abs(z)):y=1;break;case 1:n>Math.abs(u)?(y=Math.abs(u)/n,n=Math.abs(u)):y=1;break;default:case 4:m> @@ -1632,31 +1632,31 @@ Math.abs(z)?(y=Math.abs(z)/m,m=Math.abs(z)):y=1}v=0}var F=A.Qq;if(d===fp){A=A.li c[a],null!==e&&e.link===b)return e;return null}yp.prototype.l=function(a,b){return a===b?0:null===a?-1:null===b?1:a.Acb.Ac?1:a.angleb.angle?1:0}; yp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,sc,b.fromPort===this.port),d=a.Lq;if(0>d)return c;var e=a.wm;if(1>=e||!b.isOrthogonal)return c;b=a.ow;var f=a.Qq;if(2===a.Ac||8===a.Ac)d=e-1-d;return((a=2===a.Ac||4===a.Ac)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Ai.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= -0,c=b,d+=f+20,f=0):e++}}};Ai.prototype.Rh=function(a){return!a.location.s()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} -function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Ai.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Ai.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Ai.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Ai.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Ai.prototype.workerLayout=function(){return!1}; -function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Ai.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; +jl.prototype.copy=function(){var a=new jl;a.bh=this.bh.H();a.Ch=this.Ch.H();a.$g=this.$g;a.Ah=this.Ah;a.ah=this.ah;a.Bh=this.Bh;a.co=this.co;a.kq=this.kq;a.eo=this.eo;a.lq=this.lq;return a};jl.className="LinkSettings";function Bi(){Xa(this);this.u=this.B=null;this.zi=this.xo=!0;this.Co=!1;this.nn=(new J(0,0)).freeze();this.zo=!0;this.vn=this.yo=null;this.Bo=!1;this.l=null;this.I=0;this.To=this.qq=null;this.wt=!1;this.yg=this.ek=null;this.lt=!1} +Bi.prototype.cloneProtected=function(a){a.xo=this.xo;a.zi=this.zi;a.Co=this.Co;a.nn.assign(this.nn);a.zo=this.zo;a.yo=this.yo;a.vn=this.vn;a.Bo=!0;a.To=this.To;a.qq=this.qq};Bi.prototype.copy=function(){var a=new this.constructor;this.cloneProtected(a);return a};Bi.prototype.serializeLayoutProperties=function(a){a.arrangementOrigin={x:this.arrangementOrigin.x,y:this.arrangementOrigin.y};a.isRouting=this.isRouting}; +Bi.prototype.deserializeLayoutProperties=function(a){null!==a&&(this.arrangementOrigin=new J(a.arrangementOrigin.x,a.arrangementOrigin.y),this.isRouting=a.isRouting)};Bi.prototype.jb=function(){};Bi.prototype.toString=function(){var a=Ja(this.constructor);a+="(";null!==this.group&&(a+=" in "+this.group);null!==this.diagram&&(a+=" for "+this.diagram);return a+")"}; +Bi.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(null!==a&&!a.undoManager.isUndoingRedoing){var b=a.animationManager;!b.isTicking&&(b.defaultAnimation.isAnimating&&b.Bc(),this.isOngoing&&a.pj||this.isInitial&&!a.pj)&&(this.isValidLayout=!1,a.Db())}}};Bi.prototype.createNetwork=function(){return new aq(this)};Bi.prototype.makeNetwork=function(a){var b=this.createNetwork();a instanceof R?(b.Ag(a.nodes,!0),b.Ag(a.links,!0)):a instanceof U?b.Ag(a.memberParts):b.Ag(a.iterator);return b}; +Bi.prototype.updateParts=function(){this.isValidLayout=!0;if(!this.workerLayout()){var a=this.diagram;if(null===a&&null!==this.network)for(var b=this.network.vertexes.iterator;b.next();){var c=b.value.node;if(null!==c&&(a=c.diagram,null!==a))break}try{null!==a&&a.xa("Layout"),this.commitLayout()}finally{null!==a&&a.Xa("Layout")}}};Bi.prototype.commitLayout=function(){if(null!==this.network){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}}; +Bi.prototype.doLayout=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,this.Rh,!0,!1,!0),bq(this,b,a.parts,!0,this.Rh,!0,!1,!0)):a instanceof U?bq(this,b,a.memberParts,!1,this.Rh,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Bi.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var b=this.arrangementOrigin.x,c=b,d=this.arrangementOrigin.y,e=0,f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value.node;if(!(null===h||h instanceof S)&&(cq(h),this.Rh(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof U&&(h.Rh=!1);c+=Math.max(l,50)+20;f=Math.max(f,Math.max(k,50));e>=a-1?(e= +0,c=b,d+=f+20,f=0):e++}}};Bi.prototype.Rh=function(a){return!a.location.o()||a instanceof U&&a.Rh?!0:!1};function bq(a,b,c,d,e,f,g,h){for(c=c.iterator;c.next();){var k=c.value;d&&!k.isTopLevel||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof W?k.isLinkLabel||(k instanceof U?null===k.layout?bq(a,b,k.memberParts,!1,e,f,g,h):(cq(k),b.add(k)):(cq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.Nc()||k instanceof W||(cq(k),b.add(k)))}} +function cq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ta()}Bi.prototype.nj=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new N),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Bi.prototype.$x=function(a){var b=new G;a instanceof R?(bq(this,b,a.nodes,!0,null,!0,!0,!0),bq(this,b,a.links,!0,null,!0,!0,!0),bq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof U?bq(this,b,a.memberParts,!1,null,!0,!0,!0):bq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Bi.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.da(tc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a};Bi.prototype.mayUseWorker=function(){return this.mayUseWorkerFunction?this.mayUseWorkerFunction(this):!1};Bi.prototype.workerLayout=function(){return!1}; +function dq(a,b){if(null!==a.workerStateChanged){var c={key:a.group?a.group.key:null};void 0!==b&&(c.time=b);null!==a.ek&&(c.running=eq(a.ek));null!==a.yg&&(c.waiting=eq(a.yg));a.workerStateChanged(c,a)}}function eq(a){return{vertexes:a.vertexes.count,edges:a.edges.count}}Bi.prototype.zz=function(){var a=fq(this.constructor);a&&(null!==a.Pe&&a.Pe.terminate(),a.Pe=null,a.Fm.iteratorValues.each(function(a){a.wt=!1;a.ek=null;a.yg=null;a.lt=!1;dq(a)}),a.Fm.clear())}; function gq(a,b){var c=fq(a);if(c){if(b)for(var d in b)c[d]=b[d]}else throw Error("Unknown Layout class: "+a);}function fq(a){var b=null;if("function"===typeof a){if(b=hq.get(a),!b){var c=Ja(a);b=hq.get(c);b||(b=new iq,b.Lv=a,b.name=c,b.l=a.name,b.Cy=jq,hq.set(c,b),hq.set(a,b),hq.set(a.name,b))}}else"string"===typeof a&&(b=hq.get(a));return b} -Ai.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= +Bi.prototype.Uw=function(){if("undefined"===typeof Worker||!kq||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,dq(this)),!1;var a=fq(this.constructor);if(null===a)return!1;null===a.Pe&&(a.Pe=new Worker(kq),a.Pe.onerror=function(a){a.preventDefault();xa("Worker Error at: "+a.filename+" "+a.lineno+" "+a.colno+"\n "+a.message)},a.Pe.l=function(a){xa("Worker serialization error: "+a)},a.Pe.onmessage= function(b){var c=b.data;if("_GoJS"===c._GoJS)if(c.version&&R.version&&c.version!==R.version)xa("Failure: GoJS v"+R.version+" Worker v"+c.version);else if(b=a.Fm.get(c.id)){a.Fm.remove(c.id);b.wt=!1;b.ek=null;if(b.lt)b.lt=!1,b.yg=null;else{var d=lq(b,c,!1);b.network=d;b.updateParts();b.network=null;b.isValidLayout=!0}dq(b,c.time);c=b.yg;if(null!==c)b.yg=null;else for(d=a.Fm.iteratorValues;d.next();){var e=d.value;c=e.yg;if(null!==c){e.yg=null;break}}null!==c&&mq(b,c)}},a.Pe.postMessage({_GoJS:"_GoJS", url:a.Cy}),Array.isArray(a.scripts)&&a.scripts.forEach(function(b){a.Pe.postMessage({_GoJS:"_GoJS",url:b})}),a.Pe.postMessage({_GoJS:"_GoJS",version:-1}));null!==this.ek?this.yg=this.network:mq(this,this.network);dq(this);this.doMinimalNetworkLayout();this.network=null;return this.isValidLayout=!0};function mq(a,b){a.wt=!0;var c=fq(a.constructor),d=nq(a,b,!0);d._GoJS="_GoJS";c.Pe.postMessage(d);c.Fm.set(kb(a),a);a.ek=b} function nq(a,b,c){a.onNetworkSerialization(1,c,b,null);var d={};a.serializeLayoutProperties(d,c);var e=[];b.vertexes.each(function(a){var b={};a.serializeVertexProperties(b,c);e.push(b)});var f=[];b.edges.each(function(a){var b={};a.serializeEdgeProperties(b,c);f.push(b)});d={id:c?kb(a):a.id,layout:Ja(a.constructor),p:d,jB:e,Qz:f};a.onNetworkSerialization(2,c,b,d);return d} function lq(a,b,c){c&&(a.id=b.id);var d=a.diagram,e=a.createNetwork();a.onNetworkSerialization(3,c,e,b);var f=b.jB,g=new H;f&&f.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.Cb(a.key));null!==b?b=e.mk(b):(b=e.createVertex(),e.Bg(b));c&&null!==a.key&&(b.data={Di:a.key});g.set(a.id,b)});var h=b.Qz,k=new H;h&&h.forEach(function(a){var b=null;null===a.key||null===d||c||(b=d.findLinkForKey(a.key));var f=e.createEdge();e.tm(f);f.link=b;c&&null!==a.key&&(f.data={Di:a.key});k.set(a.id,f)}); -f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Ai.prototype.onNetworkSerialization=function(){}; -na.Object.defineProperties(Ai.prototype,{diagram:{get:function(){return this.C},set:function(a){this.C=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.C=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, -isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.B()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== -a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.B())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.B())}},id:{get:function(){return this.I},set:function(a){this.I= -a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Ai.prototype.useWorker=Ai.prototype.Uw;Ai.declareWorkerLayout=gq;Ai.prototype.cancelWorker=Ai.prototype.zz;Ai.prototype.collectParts=Ai.prototype.$x;Ai.prototype.getLayoutBounds=Ai.prototype.nj;Ai.prototype.invalidateLayout=Ai.prototype.B; -var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Ai.className="Layout";Ai.GoJSScriptURL=jq;Ai.declareWorkerLayout=gq; +f&&f.forEach(function(a){var b=g.get(a.id);b&&b.Cq(a,g,k,c)});h&&h.forEach(function(a){var b=k.get(a.id);b&&b.deserializeEdgeProperties(a,g,k,c)});a.deserializeLayoutProperties(b.p,g,k,c,e);a.onNetworkSerialization(4,c,e,b);return e}Bi.prototype.onNetworkSerialization=function(){}; +na.Object.defineProperties(Bi.prototype,{diagram:{get:function(){return this.B},set:function(a){this.B=a}},group:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,null!==a&&(this.B=a.diagram))}},isOngoing:{get:function(){return this.xo},set:function(a){this.xo!==a&&(this.xo=a)}},isInitial:{get:function(){return this.zi},set:function(a){this.zi=a;a||(this.Bo=!0)}}, +isViewportSized:{get:function(){return this.Co},set:function(a){this.Co!==a&&(this.Co=a)&&this.C()}},isRouting:{get:function(){return this.zo},set:function(a){this.zo!==a&&(this.zo=a)}},isRealtime:{get:function(){return this.yo},set:function(a){this.yo!==a&&(this.yo=a)}},isValidLayout:{get:function(){return this.Bo},set:function(a){this.Bo!==a&&(this.Bo=a,a||(a=this.diagram,null!== +a&&(a.Ng=!0)))}},network:{get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a,null!==a&&(a.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a,this.C())}},arrangementOrigin:{get:function(){return this.nn},set:function(a){this.nn.w(a)||(this.nn.assign(a),this.C())}},id:{get:function(){return this.I},set:function(a){this.I= +a}},mayUseWorkerFunction:{get:function(){return this.To},set:function(a){this.To!==a&&(this.To=a)}},workerStateChanged:{get:function(){return this.qq},set:function(a){this.qq!==a&&(this.qq=a)}}});Bi.prototype.useWorker=Bi.prototype.Uw;Bi.declareWorkerLayout=gq;Bi.prototype.cancelWorker=Bi.prototype.zz;Bi.prototype.collectParts=Bi.prototype.$x;Bi.prototype.getLayoutBounds=Bi.prototype.nj;Bi.prototype.invalidateLayout=Bi.prototype.C; +var hq=new H,jq="object"===typeof x.document&&x.document.currentScript?x.document.currentScript.src:"",kq="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";Bi.className="Layout";Bi.GoJSScriptURL=jq;Bi.declareWorkerLayout=gq; "undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(a){a=a.data;if("_GoJS"===a._GoJS)if(a.url)importScripts(a.url);else if(a.version)self.postMessage({_GoJS:"_GoJS",version:R.version},void 0);else{var b=performance.now(),c=null;a.layout&&(c=fq(a.layout));var d=null;c&&c.Lv&&(d=new c.Lv);if(!d)throw Error("no registered Worker Layout: "+a.layout);d.network=lq(d,a,!0); d.workerLayout=function(){var a=nq(d,d.network,!1);a._GoJS="_GoJS";a.time=performance.now()-b;self.postMessage(a,void 0);return!0};d.doLayout(new E)}});function iq(){this.Lv=null;this.Cy=this.l=this.name="";this.scripts=[];this.Pe=null;this.Fm=new H}function aq(a){Xa(this);this.kc=a;this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H} aq.prototype.clear=function(){if(this.tf)for(var a=this.tf.iterator;a.next();)a.value.clear();if(this.le)for(a=this.le.iterator;a.next();)a.value.clear();this.tf=new G;this.le=new G;this.bu=new H;this.Xt=new H}; @@ -1677,10 +1677,10 @@ function oq(a){Xa(this);this.Tc=a;this.l=(new N(0,0,10,10)).freeze();this.u=(new oq.prototype.serializeVertexProperties=function(a){a.id=kb(this);a.key=this.node?this.node.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.x=this.bounds.x;a.y=this.bounds.y;a.kB=this.bounds.width;a.tA=this.bounds.height;a.fx=this.focus.x;a.fy=this.focus.y;var b=[];this.td.each(function(a){b.push(kb(a))});a.Uy=b;var c=[];this.Gd.each(function(a){c.push(kb(a))});a.jy=c}; oq.prototype.Cq=function(a,b,c){if(null!==a){this.x=a.x;this.y=a.y;this.width=a.kB;this.height=a.tA;this.focusX=a.fx;this.focusY=a.fy;var d=this;a.Uy&&a.Uy.forEach(function(a){(a=c.get(a))&&d.td.add(a)});a.jy&&a.jy.forEach(function(a){(a=c.get(a))&&d.Gd.add(a)})}};oq.prototype.clear=function(){this.Mi=this.ob=null;this.td=new E;this.Gd=new E}; oq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutVertex#"+kb(this);if(0b?1:0):1:null!==b?-1:0} na.Object.defineProperties(oq.prototype,{sourceEdgesArrayAccess:{get:function(){return this.td._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.Gd._dataArray}},data:{get:function(){return this.ob},set:function(a){this.ob=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.u.h(d/2,b/2);this.l.h(a,c,d,b)}}},node:{get:function(){return this.Mi}, -set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.s())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| +set:function(a){if(this.Mi!==a){this.Mi=a;a.Ta();var b=this.network.layout,c=N.alloc(),d=b.nj(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.l.h(b,e,f,d);N.free(c);if(!(a instanceof U)&&(a=a.locationObject.da(zc),a.o())){this.u.h(a.x-b,a.y-e);return}this.u.h(f/2,d/2)}}},bounds:{get:function(){return this.l},set:function(a){this.l.w(a)||this.l.assign(a)}},focus:{get:function(){return this.u},set:function(a){this.u.w(a)|| this.u.assign(a)}},centerX:{get:function(){return this.l.x+this.u.x},set:function(a){var b=this.l;b.x+this.u.x!==a&&(b.ea(),b.x=a-this.u.x,b.freeze())}},centerY:{get:function(){return this.l.y+this.u.y},set:function(a){var b=this.l;b.y+this.u.y!==a&&(b.ea(),b.y=a-this.u.y,b.freeze())}},focusX:{get:function(){return this.u.x},set:function(a){var b=this.u;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},focusY:{ get:function(){return this.u.y},set:function(a){var b=this.u;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},x:{get:function(){return this.l.x},set:function(a){var b=this.l;b.x!==a&&(b.ea(),b.x=a,b.freeze())}},y:{get:function(){return this.l.y},set:function(a){var b=this.l;b.y!==a&&(b.ea(),b.y=a,b.freeze())}},width:{get:function(){return this.l.width},set:function(a){var b=this.l;b.width!==a&&(b.ea(),b.width= a,b.freeze())}},height:{get:function(){return this.l.height},set:function(a){var b=this.l;b.height!==a&&(b.ea(),b.height=a,b.freeze())}},network:{get:function(){return this.Tc},set:function(a){this.Tc=a}},sourceVertexes:{get:function(){for(var a=new G,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new G,b= @@ -1691,55 +1691,55 @@ e}}else if(""!==b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}retur pq.prototype.serializeEdgeProperties=function(a){a.id=kb(this);a.key=this.link?this.link.key:this.data?this.data.Di:void 0;void 0===a.key&&(a.key=null);a.from=this.fromVertex?kb(this.fromVertex):null;a.fB=this.toVertex?kb(this.toVertex):null};pq.prototype.deserializeEdgeProperties=function(a,b){if(null!==a){var c=b.get(a.from);c&&(this.fromVertex=c);if(a=b.get(a.fB))this.toVertex=a}}; pq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+kb(this);0=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.va("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;n=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.xa("Layout");d=[];switch(this.alignment){case Eq:var h=b,k=c,l=N.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0g)d.push(new N(0,u,g+h,v)),w=0,q=r,u+=v,v=0;v=Math.max(v,F);switch(p){case Dq:A=-A.width;break;default:A= 0}z.moveTo(q+A,u);switch(p){case Dq:q-=C;break;default:q+=C}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case wq:k=g;m=f;n=b;p=c;g=N.alloc();r=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(q=0;q=l&&(k-=l);l=z=0;C=Math.max(this.cellSize.height,1);A=f=0;F=!0;w=J.alloc();for(Q=0;Qm-1||0k){d.push(new N(0,F?y-f:y,k+n,A+f+p));for(K=0;Kl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -na.Object.defineProperties(Sk.prototype,{wrappingWidth:{get:function(){return this.sq},set:function(a){this.sq!==a&&(0n)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};vi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Da(a);for(b=this.nodes.iterator;b.next();)b.value.Da(a);for(b=this.links.iterator;b.next();)b.value.Da(a)}; -vi.prototype.ir=function(){for(var a=this.C.model,b=new G,c=a.nodeDataArray,d=0;dn)){var u=n+jn(q);q.Lc(u,!0);un(q,u,n)}}b.isModified=!0}}finally{b.Z=!0}}}}};wi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Ea(a);for(b=this.nodes.iterator;b.next();)b.value.Ea(a);for(b=this.links.iterator;b.next();)b.value.Ea(a)}; +wi.prototype.ir=function(){for(var a=this.B.model,b=new G,c=a.nodeDataArray,d=0;df?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}}return'"'+b+'"'}; @@ -1805,9 +1805,9 @@ rr(a.y),rr(a.offsetX),rr(a.offsetY));else if("Brush"===b){if(c=new zl,c.type=Ya( t.zt=function(a){this.skipsUndoManager||this.undoManager.aw(a);for(var b=this.cv,c=b.length,d=0;db&&(b=a.length);Ca(a,b,c);ur(this,"",ze,"",a,null,c,null,b)};t.tw=function(a,b){void 0===b&&(b=-1);a===this.Fc&&B("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);ur(this,"",Ae,"",a,c,null,b,null)}; t.Iq=function(a){if(null===a)return"";var b=this.Yj;if(""===b)return"";b=vn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;B("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};t.Um=function(a,b){if(null!==a){var c=this.Yj;if(""!==c)if(this.ab(a)){var d=vn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),ur(this,"nodeCategory",xe,c,a,d,b))}else Uj(a,c,b)}};t.Wm=function(a,b){this.Um(b,this.Iq(a))};t.Em=function(){return!1};t.Ck=function(){return!1};t.qj=function(){return!1}; -t.Ut=function(){return!1};t.Dk=function(){return!1};function yi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} +t.Ut=function(){return!1};t.Dk=function(){return!1};function zi(){return new Z}function nr(a,b){if("function"===typeof b){if(b.className)return b.className;if(b.name)return b.name}else if("object"===typeof b&&null!==b&&b.constructor)return nr(a,b.constructor);return typeof b}function tr(a){return xr[a]?xr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} function vn(a,b){if(!a||!b)return null;try{if("function"===typeof b)var c=b(a);else"function"===typeof a.getAttribute?(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c}function Uj(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}} na.Object.defineProperties(Z.prototype,{name:{get:function(){return this.oa},set:function(a){var b=this.oa;b!==a&&(this.oa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.$f},set:function(a){var b=this.$f;b!==a&&(this.$f=a,this.g("isReadOnly",b,a))}},modelData:{ -get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Da(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; +get:function(){return this.l},set:function(a){var b=this.l;b!==a&&(this.l=a,this.g("modelData",b,a),this.Ea(a))}},undoManager:{get:function(){return this.u},set:function(a){var b=this.u;b!==a&&(null!==b&&b.Py(this),this.u=a,null!==a&&a.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(a){this.vg=a}},nodeKeyProperty:{get:function(){return this.Ni},set:function(a){var b=this.Ni; b!==a&&(""===a&&B("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===Ae){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Wb(a),b?(this.ag.add(a),this.$c[c]!==a&&this.$c.splice(c,0,a),void 0!==d&&this.gb.add(d,a)):(this.ag.remove(a),this.$c[c]=== a&&this.$c.splice(c,1),void 0!==d&&this.gb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Bf(a.object);Array.isArray(d)&&"number"===typeof c&&(b?0>d.indexOf(a.newValue)&&d.splice(c,0,a.newValue):(c=d.indexOf(a.newValue),0<=c&&d.splice(c,1)));return}}Z.prototype.changeState.call(this,a,b)}};t=zr.prototype;t.Gm=function(a){if(void 0!==a){var b=this.Aj;if(null!==b){var c=this.Kb(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.uf(c))}return a}}; t.xy=function(a){return Sq(this,a,!0)};t.Bw=function(a,b){$q(this,a,b,!0)};t.Ay=function(a){return Sq(this,a,!1)};t.Gw=function(a,b){$q(this,a,b,!1)};function Sq(a,b,c){if(null!==b&&(a=c?a.af:a.bf,""!==a&&(a=vn(b,a),void 0!==a))){if(Uq(a))return a;B((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function $q(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.af:a.bf;if(""!==e)if(c=a.Gm(c),a.xc(b)){var f=vn(b,e);f!==c&&(Yq(a,f,b),Uj(b,e,c),null===a.Kb(c)&&Zq(a,c,b),ur(a,d?"linkFromKey":"linkToKey",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.yy=function(a){return Rq(this,a,!0)};t.Cw=function(a,b){ar(this,a,b,!0)};t.By=function(a){return Rq(this,a,!1)};t.Hw=function(a,b){ar(this,a,b,!1)}; -function Rq(a,b,c){if(null===b)return"";a=c?a.Uj:a.Vj;if(""===a)return"";b=vn(b,a);return void 0===b?"":b}function ar(a,b,c,d){if(null!==b){var e=d?a.Uj:a.Vj;if(""!==e)if(a.xc(b)){var f=vn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),ur(a,d?"linkFromPortId":"linkToPortId",xe,e,b,f,c),"string"===typeof e&&a.Da(b,e))}else Uj(b,e,c)}}t.Bf=function(a){if(null===a)return Cr;var b=this.ae;if(""===b)return Cr;a=vn(a,b);return void 0===a?Cr:a}; -t.ju=function(a,b){if(null!==a){var c=this.ae;if(""!==c)if(this.xc(a)){var d=vn(a,c);void 0===d&&(d=Cr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.xc(a)&&(Yq(this,b,a),ur(this,"linkLabelKeys",Ae,c,a,b,null,e,null)))}else void 0!==d&&B(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Wb=function(a){if(null!==a){var b=this.Hi;if(""!==b&&(b=vn(a,b),void 0!==b)){if(Uq(b))return b;B("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Da(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; +t.iu=function(a,b){if(null!==a){var c=this.Hi;if(""!==c)if(this.xc(a)){var d=vn(a,c);d!==b&&null===this.Dg(b)&&(Uj(a,c,b),void 0!==d&&this.gb.remove(d),this.gb.add(b,a),ur(this,"linkKey",xe,c,a,d,b),"string"===typeof c&&this.Ea(a,c))}else Uj(a,c,b)}};t.Dg=function(a){null===a&&B("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&Uq(a)?this.gb.G(a):null}; t.Rq=function(a){if(null!==a){var b=this.Hi;if(""!==b){var c=this.Wb(a);if(void 0===c||this.gb.contains(c)){var d=this.Ql;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.gb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.gb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.gb.count-1;this.gb.contains(c);)c--;Uj(a,b,c)}}}}};t.xc=function(a){return null===a?!1:this.ag.contains(a)};t.bj=function(a){null!==a&&(mb(a),this.xc(a)||Wq(this,a,!0))}; function Wq(a,b,c){if(""!==a.linkKeyProperty){var d=a.Wb(b);if(void 0!==d&&a.gb.G(d)===b)return;a.Rq(b);d=a.Wb(b);if(void 0===d){B("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");return}a.gb.add(d,b)}a.ag.add(b);d=null;c&&(d=a.$c.length,a.$c.splice(d,0,b));ur(a,"linkDataArray",ze,"linkDataArray",a,null,b,null,d);Dr(a,b)}t.pz=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.$c.splice(d,1)}ur(a,"linkDataArray",Ae,"linkDataArray",a,b,null,d,null);c=Sq(a,b,!0);Yq(a,c,b);c=Sq(a,b,!1);Yq(a,c,b);d=a.Bf(b);if(Array.isArray(d))for(var e=d.length,f=0;f=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new E;b.addAll(a.iterator);a=new E;var c=new E;var d=this.sort(b);var e,f,g=this.Gr;var h=this.arrangement;var k=this.nodeDiameterFormula;var l=this.radius;if(!isFinite(l)||0>=l)l=NaN;var m=this.aspectRatio;if(!isFinite(m)||0>=m)m=1;var n=this.startAngle; isFinite(n)||(n=0);var p=this.sweepAngle;if(!isFinite(p)||360p)p=360;b=this.spacing;isFinite(b)||(b=NaN);h===Ur&&k===Vr?h=Gr:h===Ur&&k!==Vr&&(h=this.arrangement);if((this.direction===Pr||this.direction===Qr)&&this.sorting!==Jr){for(k=0;!(k>=d.length);k+=2){a.add(d.J(k));if(k+1>=d.length)break;c.add(d.J(k+1))}this.direction===Pr?(this.arrangement===Ur&&a.reverse(),d=new E,d.addAll(a),d.addAll(c)):(this.arrangement===Ur&&c.reverse(),d=new E,d.addAll(c),d.addAll(a))}k=d.length;for(var r=f=e=0;r< d.length;r++){var q=n+p*f*(this.direction===Ir?1:-1)/k,u=d.J(r).diameter;isNaN(u)&&(u=Xr(d.J(r),q));360>p&&(0===r||r===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===Ur){isNaN(b)&&(b=6);if(h!==Gr&&h!==Ur){f=-Infinity;for(g=0;gb[c[q]].indexOf(c[q===c.length-1?0:q+1])&&r.push(q===c.length-1?0:q+1);if(0===r.length)for(q=0;qc.indexOf(F)||Cc.indexOf(F)||C=u?C+1:C)),v+=C=u&&C++,z>=u&&z++,C>z&&(A=z,z=C,C=A),z-C<(c.length+2)/2===(Cr||r===m||(q=r>m?r-m:m-r,n+=rg-q?1:-1);c.splice(0>n?m:m+1,0,k);d.splice(h,1);h--}else f=!1;if(f)break;else c.push(d[0]),d.splice(0,1)}for(b=0;b=a?this.mm=a:this.mm=360,this.B())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.B())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.B())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& -a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.B())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.B())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.B())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.B())}},actualXRadius:{get:function(){return this.$b}}, +na.Object.defineProperties(Fr.prototype,{radius:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(0=a?this.mm=a:this.mm=360,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ur&&a!==Gr&&a!==Tr&&a!==Sr||(this.Eb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ir&&a!==Rr&&a!==Pr&&a!==Qr||(this.K=a,this.C())}},sorting:{get:function(){return this.bd},set:function(a){this.bd===a||a!==Nr&&a!==Or&& +a!==Lr&&!Mr&&a!==Jr||(this.bd=a,this.C())}},comparer:{get:function(){return this.Wc},set:function(a){this.Wc!==a&&(this.Wc=a,this.C())}},spacing:{get:function(){return this.lf},set:function(a){this.lf!==a&&(this.lf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(a){this.jp===a||a!==Kr&&a!==Vr||(this.jp=a,this.C())}},actualXRadius:{get:function(){return this.$b}}, actualYRadius:{get:function(){return this.be}},actualSpacing:{get:function(){return this.Ij}},actualCenter:{get:function(){return this.mx}}}); var Gr=new D(Fr,"ConstantSpacing",0),Tr=new D(Fr,"ConstantDistance",1),Sr=new D(Fr,"ConstantAngle",2),Ur=new D(Fr,"Packed",3),Ir=new D(Fr,"Clockwise",4),Rr=new D(Fr,"Counterclockwise",5),Pr=new D(Fr,"BidirectionalLeft",6),Qr=new D(Fr,"BidirectionalRight",7),Nr=new D(Fr,"Forwards",8),Or=new D(Fr,"Reverse",9),Lr=new D(Fr,"Ascending",10),Mr=new D(Fr,"Descending",11),Jr=new D(Fr,"Optimized",12),Kr=new D(Fr,"Pythagorean",13),Vr=new D(Fr,"Circular",14);Fr.className="CircularLayout";Fr.ConstantSpacing=Gr; Fr.ConstantDistance=Tr;Fr.ConstantAngle=Sr;Fr.Packed=Ur;Fr.Clockwise=Ir;Fr.Counterclockwise=Rr;Fr.BidirectionalLeft=Pr;Fr.BidirectionalRight=Qr;Fr.Forwards=Nr;Fr.Reverse=Or;Fr.Ascending=Lr;Fr.Descending=Mr;Fr.Optimized=Jr;Fr.Pythagorean=Kr;Fr.Circular=Vr;function Hr(){this.Am=-Infinity;this.cn=this.Wk=null} @@ -1942,11 +1942,11 @@ Hr.prototype.compare=function(a,b){if(0this.Am||Math.abs(a)u&&0u&&0=n.bounds.bottom? -(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right:z<=n.bounds.x)F= -(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q-1).x,v=b.i(q- -1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]);C=Math.max(10, -this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A=u.centerY,p?180===this.K||0===this.K? -(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++,z,A),b.m(q++,z,A+C)):270===this.K? -(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y),A),b.m(q++,w,y),b.m(q++,z,y)))}null!== -d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.s()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.s()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; +c.fromVertex,n=c.toVertex;if(c.valid){if(b.curve===dg&&4===b.pointsCount)if(m.column===n.column)c=b.getLinkPoint(e,g,l,!0,!1,f,h),g=b.getLinkPoint(f,h,k,!1,!1,e,g),c.o()||c.set(e.actualBounds.center),g.o()||g.set(f.actualBounds.center),b.pk(),b.vf(c.x,c.y),b.vf((2*c.x+g.x)/3,(2*c.y+g.y)/3),b.vf((c.x+2*g.x)/3,(c.y+2*g.y)/3),b.vf(g.x,g.y);else{var p=!1,r=!1;null!==g&&l===sc&&(p=!0);null!==h&&k===sc&&(r=!0);if(p||r){var q=b.i(0).x;c=b.i(0).y;m=b.i(3).x;d=b.i(3).y;p&&(90===this.K||270===this.K?(p=q,n= +(c+d)/2):(p=(q+m)/2,n=c),b.L(1,p,n),l=b.getLinkPoint(e,g,l,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y));r&&(90===this.K||270===this.K?(l=m,c=(c+d)/2):(l=(q+m)/2,c=d),b.L(2,l,c),e=b.getLinkPoint(f,h,k,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(3,e.x,e.y))}}b.xf()}else if(m.layer===n.layer)b.xf();else{p=r=!1;q=b.firstPickIndex+1;if(b.isOrthogonal){p=!0;var u=b.pointsCount;4=n.bounds.bottom?(n=n.bounds.y+n.bounds.height,b.m(q++,z,n+C),b.m(q++,z,n),b.m(q++,z,n-y)):(b.m(q++,z,A+C),b.m(q++,z,A),b.m(q++,z,A-y)):270===this.K?A<=n.bounds.y?(n=n.bounds.y,b.m(q++,z,n-y),b.m(q++,z,n),b.m(q++,z,n+C)):(b.m(q++,z,A-y),b.m(q++,z,A),b.m(q++,z,A+C)):0===this.K&&(z>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(q++,n+C,A),b.m(q++,n,A),b.m(q++,n-y,A)):(b.m(q++,z+C,A),b.m(q++,z,A),b.m(q++,z-y,A)));else{b.m(q++,w,v);var F=0;if(180===this.K||0===this.K){if(180===this.K?z>=n.bounds.right: +z<=n.bounds.x)F=(0===this.K?-y:C)/2;b.m(q++,w+F,A)}else{if(270===this.K?A>=n.bounds.bottom:A<=n.bounds.y)F=(90===this.K?-y:C)/2;b.m(q++,z,v+F)}b.m(q++,z,A)}}else y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(r&&b.m(q++,z-y,A),b.m(q++,z,A),r&&b.m(q++,z+C,A)):90===this.K?(r&&b.m(q++,z,A+C),b.m(q++,z,A),r&&b.m(q++,z,A-y)):270===this.K?(r&&b.m(q++,z,A-y),b.m(q++,z,A),r&&b.m(q++,z,A+C)):(r&&b.m(q++,z+C,A),b.m(q++,z,A),r&&b.m(q++,z-y,A))}n=u}if(null===h||l!==sc||p)if(w=b.i(q- +1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,p)n=this.zd[m.layer],180===this.K||0===this.K?(p=v,p>=m.bounds.y&&p<=m.bounds.bottom&&(180===this.K?z>=m.bounds.x:z<=m.bounds.right)&&(n=m.centerX+(180===this.K?-n:n),p=m.bounds.x&&p<=m.bounds.right&&(270===this.K?A>=m.bounds.y:A<=m.bounds.bottom)&&(n=m.centerY+(270===this.K?-n:n),p=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.L(q-2,n,v),b.L(q-1,n+C,v)):90===this.K&&A<=m.bounds.bottom?(n=m.bounds.y,b.L(q-2,w,n),b.L(q-1,w,n-y)):270===this.K&&A>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.L(q-2,w,n),b.L(q-1,w,n+C)):0===this.K&&z<=m.bounds.right&&(n=m.bounds.x,b.L(q-2,n,v),b.L(q-1,n-y,v));else{y=Math.max(10,this.$d[m.layer]); +C=Math.max(10,this.zd[m.layer]);p=0;if(180===this.K||0===this.K){if(180===this.K?z<=m.bounds.x:z>=m.bounds.right)p=(0===this.K?C:-y)/2;b.m(q++,z+p,v)}else{if(270===this.K?A<=m.bounds.y:A>=m.bounds.bottom)p=(90===this.K?C:-y)/2;b.m(q++,w,A+p)}b.m(q++,z,A)}}else{for(;null!==m&&m!==n;){y=u=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(u=w.toVertex,y=w.fromVertex,null!==y.node&&(y=null),null!==u.node)););if(null===u)break;u!==n&&(w=b.i(q-1).x,v=b.i(q-1).y,z=u.centerX,A= +u.centerY,p?180===this.K||0===this.K?(null!==y?y.centerY:v)!==A&&(y=this.Ia[u.layer]+this.Vc.x,q===b.firstPickIndex+1&&(y=0===this.K?Math.max(y,w):Math.min(y,w)),b.m(q++,y,v),b.m(q++,y,A)):(null!==y?y.centerX:w)!==z&&(y=this.Ia[u.layer]+this.Vc.y,q===b.firstPickIndex+1&&(y=90===this.K?Math.max(y,v):Math.min(y,v)),b.m(q++,w,y),b.m(q++,z,y)):(y=Math.max(10,this.$d[u.layer]),C=Math.max(10,this.zd[u.layer]),180===this.K?(b.m(q++,z+C,A),r&&b.m(q++,z,A),b.m(q++,z-y,A)):90===this.K?(b.m(q++,z,A-y),r&&b.m(q++, +z,A),b.m(q++,z,A+C)):270===this.K?(b.m(q++,z,A+C),r&&b.m(q++,z,A),b.m(q++,z,A-y)):(b.m(q++,z-y,A),r&&b.m(q++,z,A),b.m(q++,z+C,A))));m=u}p&&(w=b.i(q-1).x,v=b.i(q-1).y,z=b.i(q).x,A=b.i(q).y,180===this.K||0===this.K?v!==A&&(y=0===this.K?Math.min(Math.max((z+w)/2,this.Ia[n.layer]+this.Vc.x),z):Math.max(Math.min((z+w)/2,this.Ia[n.layer]+this.Vc.x),z),b.m(q++,y,v),b.m(q++,y,A)):w!==z&&(y=90===this.K?Math.min(Math.max((A+v)/2,this.Ia[n.layer]+this.Vc.y),A):Math.max(Math.min((A+v)/2,this.Ia[n.layer]+this.Vc.y), +A),b.m(q++,w,y),b.m(q++,z,y)))}null!==d&&r&&(null!==g&&(l===sc&&(l=b.i(0),d=b.i(2),l.w(d)||b.L(1,(l.x+d.x)/2,(l.y+d.y)/2)),l=b.getLinkPoint(e,g,sc,!0,!1,f,h),l.o()||l.set(e.actualBounds.center),b.L(0,l.x,l.y)),null!==h&&(k===sc&&(k=b.i(b.pointsCount-1),l=b.i(b.pointsCount-3),k.w(l)||b.L(b.pointsCount-2,(k.x+l.x)/2,(k.y+l.y)/2)),e=b.getLinkPoint(f,h,sc,!1,!1,e,g),e.o()||e.set(f.actualBounds.center),b.L(b.pointsCount-1,e.x,e.y)));b.xf();c.commit()}}}this.avoidOrthogonalOverlaps()}; As.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new E,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0f.y&&(m=l.y>f.y?0:g.xb.Xb||a.lb.l||a.fdb.fd?1:a.vcb.vc?1:0:0};t.A=function(a,b){a-=b;return-1a}; t.uj=function(a,b,c,d){var e=a.length,f=d-c;if(!(1>=f))if((0>c||c>=e-1)&&B("not in range 0 <= from < length: "+c),2===f)d=a[c],e=a[c+1],0=e)a.sort(b);else for(c=a.slice(0,d),c.sort(b),b=0;b=e)for(d=a.slice(c),d.sort(b),b=c;b=a.xe.length){var d=[];for(var e=0;ea&&(this.ng=a,this.B())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.B())}}, -linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.B())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); +na.Object.defineProperties(As.prototype,{layerSpacing:{get:function(){return this.ue},set:function(a){this.ue!==a&&0<=a&&(this.ue=a,this.C())}},columnSpacing:{get:function(){return this.Zb},set:function(a){this.Zb!==a&&0a&&(this.ng=a,this.C())}},setsPortSpots:{get:function(){return this.kf},set:function(a){this.kf!==a&&(this.kf=a,this.C())}}, +linkSpacing:{get:function(){return this.Mo},set:function(a){this.Mo!==a&&0<=a&&(this.Mo=a,this.C())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}}); var Bs=new D(As,"CycleDepthFirst",0),Us=new D(As,"CycleGreedy",1),Gs=new D(As,"CycleFromLayers",2),Cs=new D(As,"LayerOptimalLinkLength",0),Zs=new D(As,"LayerLongestPathSink",1),at=new D(As,"LayerLongestPathSource",2),Ds=new D(As,"InitDepthFirstOut",0),gt=new D(As,"InitDepthFirstIn",1),et=new D(As,"InitNaive",2),kt=new D(As,"AggressiveNone",0),Es=new D(As,"AggressiveLess",1),lt=new D(As,"AggressiveMore",2),mt=8;As.className="LayeredDigraphLayout";As.CycleDepthFirst=Bs;As.CycleGreedy=Us; As.CycleFromLayers=Gs;As.LayerOptimalLinkLength=Cs;As.LayerLongestPathSink=Zs;As.LayerLongestPathSource=at;As.InitDepthFirstOut=Ds;As.InitDepthFirstIn=gt;As.InitNaive=et;As.AggressiveNone=kt;As.AggressiveLess=Es;As.AggressiveMore=lt;As.PackNone=0;As.PackExpand=1;As.PackStraighten=2;As.PackMedian=4;As.PackAll=15;function ut(){this.index=this.vc=this.fd=this.Xb=this.first=this.layer=0;this.link=null;this.l=0}ut.className="SegInfo";function Fs(a){aq.call(this,a)}ma(Fs,aq);Fs.prototype.createVertex=function(){return new vt(this)}; Fs.prototype.createEdge=function(){return new wt(this)};Fs.className="LayeredDigraphNetwork";function vt(a){oq.call(this,a);this.Ra=this.Rg=this.Fi=-1;this.I=NaN;this.T=null;this.valid=!1;this.finish=this.Cg=NaN;this.wf=0;this.Mk=this.Nk=null}ma(vt,oq); @@ -2089,9 +2089,9 @@ wt.prototype.serializeEdgeProperties=function(a,b){pq.prototype.serializeEdgePro wt.prototype.deserializeEdgeProperties=function(a,b,c,d){pq.prototype.deserializeEdgeProperties.call(this,a,b,c,d);this.valid=a.valid;this.rev=a.rev;this.forest=a.forest;this.portFromPos=a.portFromPos;this.portToPos=a.portToPos;this.portFromColOffset=a.portFromColOffset;this.portToColOffset=a.portToColOffset}; na.Object.defineProperties(wt.prototype,{fromVertex:{get:function(){return this.Yc},set:function(a){this.Yc!==a&&(this.Yc=a)}},toVertex:{get:function(){return this.ed},set:function(a){this.ed!==a&&(this.ed=a)}},valid:{get:function(){return this.eb},set:function(a){this.eb!==a&&(this.eb=a)}},rev:{get:function(){return this.La},set:function(a){this.La!==a&&(this.La=a)}},forest:{ get:function(){return this.l},set:function(a){this.l!==a&&(this.l=a)}},portFromPos:{get:function(){return this.I},set:function(a){this.I!==a&&(this.I=a)}},portToPos:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},portFromColOffset:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToColOffset:{get:function(){return this.T}, -set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Ai.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Ai); -xt.prototype.cloneProtected=function(a){Ai.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; -xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Ai.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; +set:function(a){this.T!==a&&(this.T=a)}}});wt.className="LayeredDigraphEdge";function xt(){Bi.call(this);this.Jb=new G;this.vp=yt;this.kd=zt;this.oq=At;this.ts=Bt;this.nx=[];this.jd=!0;this.Eb=Ct;this.Pd=(new M(10,10)).freeze();var a=new Dt(this);this.U=new Et(a);this.V=new Et(a);this.uv=[]}ma(xt,Bi); +xt.prototype.cloneProtected=function(a){Bi.prototype.cloneProtected.call(this,a);a.vp=this.vp;a.oq=this.oq;a.ts=this.ts;a.jd=this.jd;a.Eb=this.Eb;a.Pd.assign(this.Pd);a.U.copyInheritedPropertiesFrom(this.U);a.V.copyInheritedPropertiesFrom(this.V)}; +xt.prototype.jb=function(a){a.classType===xt?0===a.name.indexOf("Alignment")?this.alignment=a:0===a.name.indexOf("Arrangement")?this.arrangement=a:0===a.name.indexOf("Compaction")?this.compaction=a:0===a.name.indexOf("Path")?this.path=a:0===a.name.indexOf("Sorting")?this.sorting=a:0===a.name.indexOf("Style")?this.treeStyle=a:B("Unknown enum value: "+a):Bi.prototype.jb.call(this,a)};xt.prototype.createNetwork=function(){return new Dt(this)}; xt.prototype.makeNetwork=function(a){function b(a){if(a instanceof W)return!a.isLinkLabel&&"Comment"!==a.category;if(a instanceof S){var b=a.fromNode;if(null===b||b.isLinkLabel||"Comment"===b.category)return!1;a=a.toNode;return null===a||a.isLinkLabel||"Comment"===a.category?!1:!0}return!1}var c=this.createNetwork();a instanceof R?(c.Ag(a.nodes,!0,b),c.Ag(a.links,!0,b)):a instanceof U?c.Ag(a.memberParts,!1,b):c.Ag(a.iterator,!1,b);return c}; xt.prototype.doLayout=function(a){null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==Ft&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof R&&(b=a);this.path===yt&&null!==b?this.kd=b.isTreePathToChildren?zt:Gt:this.kd=this.path===yt?zt:this.path;if(0e?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(Ke?ru(a,g,ba,v,y):su(a,g,ba,v,y);ba=y.x;v=y.width;y=y.height;break;case au:for(A=0;An&&(KGa&&(xu(a,-Ga,0,ja,qa-1),yu(A,-Ga,0),yu(C,-Ga,0),Ga=0)}Ma.S.h(Ga,T);v=Math.max(v,F);y=Math.max(y,z+(0===P?0:q)+eb.height);K=F}else{0n&&(TGa&&(xu(a,0,-Ga,ja,qa-1),yu(A,0,-Ga),yu(C,0,-Ga),Ga=0);Ma.S.h(K,Ga);y=Math.max(y,Q);v=Math.max(v,z+(0===P?0:q)+eb.width);T=Q}I++}0l&&(l=0),135l&&(l=0),135u&&(u=0),k===bu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Du(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Bu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Du(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Cu(a,y,u),0>u&&(h-=u,u=0),g+=d+c);if(0e[0].x?e[2].assign(e[1]):e[1].assign(e[2])),e[3].ye[0].x?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(l+d,0),P[1].h(P[0].x,w),P[2].ye[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, -A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qe[0].y?e[2].assign(e[1]):e[1].assign(e[2])),e[3].xe[0].y?e[3].assign(e[2]):e[2].assign(e[3])),P[0].h(0,u+w),P[1].h(d,P[0].y),P[2].xd?ru(b,e,I,z, +A):su(b,e,I,z,A);I=A.x;z=A.width;A=A.height;break;case au:for(a=0;ap&&(Fp&&(Qn&&(n=0),135v&&(v=0));b.fa.h(n,v);b.ua.h(z,A)}} -function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.ua.width,e=a.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& +q,A+=q);break;case nu:c?(n+=z-b.width+q,z+=q):(v+=A-b.height+q,A+=q);break;case $t:case Qt:c?1n&&(n=0),135v&&(v=0));b.fa.h(n,v);b.wa.h(z,A)}} +function ru(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return a=b[0],d=a.wa.width,e=a.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=90===mu(a),l=0,m=0,n=0,p=0;pk&&(d-=k),e=Math.max(e,Math.max(p,n)+h+f.height),0>b.S.x&& (c=Gu(a,b.S.x,!1,c,g))):(b.S.h(d+h,c+g/2-b.focus.y-b.fa.y),d=Math.max(d,Math.max(r,m)+h+f.width),n=c+g/2-b.focus.y-b.fa.y,e=Math.max(e,n+f.height),0>n&&(e-=n),0>b.S.y&&(c=Gu(a,b.S.y,!0,c,g))));return new N(c,0,d,e)} -function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.ua.width,e=b.ua.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), +function su(a,b,c,d,e){var f=b.length;if(0===f)return new N(c,0,d,e);if(1===f)return b=b[0],d=b.wa.width,e=b.wa.height,new N(c,0,d,e);for(var g=a.nodeSpacing,h=a.rowSpacing,k=270===mu(a),l=0,m=0,n=0,p=0;pm&&(d-=m),e=Math.max(e,Math.abs(Math.min(p,n))+q+l.height), 0>h.S.x&&(c=Gu(a,h.S.x,!1,c,g))):(h.S.h(-d-l.width-q,c+g/2-h.focus.y-h.fa.y),d=Math.max(d,Math.abs(Math.min(r,m))+q+l.width),n=c+g/2-h.focus.y-h.fa.y,e=Math.max(e,n+l.height),0>n&&(e-=n),0>h.S.y&&(c=Gu(a,h.S.y,!0,c,g))));for(a=0;ab&&(b=c+a.width),0>c&&(b-=c),b;case qu:return a.width>b?a.width:b;case nu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case $t:case Qt:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case au:return a.width-a.focus.x+a.nodeSpacing/2+b;case bu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} function Cu(a,b,c){switch(a.alignment){case Au:case zu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case qu:return a.height>b?a.height:b;case nu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case $t:case Qt:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case au:return a.height-a.focus.y+a.nodeSpacing/2+b;case bu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} function Du(a,b,c){switch(a){case zu:b/=2;c/=2;break;case Au:b/=2;c/=2;break;case qu:c=b=0;break;case nu:break;default:B("Unhandled alignment value "+a.toString())}return new J(b,c)}function uu(a,b,c,d,e,f){b=Du(b,c,d);xu(a,b.x,b.y,e,f)}function xu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].S;f.x+=b;f.y+=c}} function vu(a,b,c,d){var e=b.parent;switch(a.kd){case zt:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case Gt:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:B("Unhandled path value "+a.kd.toString())}}function yu(a,b,c){for(var d=0;dn.length||null===r||2>r.length))for(e=c=0;cn.length||null===r||2>r.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=tu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=tu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;cn.length||null===r||2>r.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=tu(a,b.length+c.length);for(d= for(;lf;)k=n[c++],m[e++].h(k.x,k.y);f=tu(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}function ou(a){var b=mu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.U.nodeIndentPastParent=a,this.B())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.B())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== -a&&(this.U.layerSpacing=a,this.B())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.B())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.B())}},breadthLimit:{get:function(){return this.U.breadthLimit}, -set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.B())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.B())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.B())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== -a&&(this.U.commentSpacing=a,this.B())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.B())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.B())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= -a,this.B())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.B())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.B())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& -a!==Xt&&!Yt||(this.V.sorting=a,this.B())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.B())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.B())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== -a&&(this.V.alignment=a,this.B())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.B())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.B())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, -set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.B())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.B())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.B())}},alternateCompaction:{ -get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.B())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.B())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.B())}},alternateRowIndent:{ -get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.B())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.B())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.B())}},alternateSetsPortSpot:{ -get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.B())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.B())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.B())}},alternateChildPortSpot:{ -get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.B())}}}); +na.Object.defineProperties(xt.prototype,{roots:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a,this.C())}},path:{get:function(){return this.vp},set:function(a){this.vp!==a&&(this.vp=a,this.C())}},treeStyle:{get:function(){return this.oq},set:function(a){this.Eb===a||a!==At&&a!==Tt&&a!==Ut&&a!==St||(this.oq=a,this.C())}},layerStyle:{get:function(){return this.ts}, +set:function(a){this.Eb===a||a!==Bt&&a!==Ot&&a!==Nt||(this.ts=a,this.C())}},comments:{get:function(){return this.jd},set:function(a){this.jd!==a&&(this.jd=a,this.C())}},arrangement:{get:function(){return this.Eb},set:function(a){this.Eb===a||a!==Ct&&a!==Iu&&a!==Ft||(this.Eb=a,this.C())}},arrangementSpacing:{get:function(){return this.Pd},set:function(a){this.Pd.w(a)||(this.Pd.assign(a),this.C())}},rootDefaults:{ +get:function(){return this.U},set:function(a){this.U!==a&&(this.U=a,this.C())}},alternateDefaults:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a,this.C())}},sorting:{get:function(){return this.U.sorting},set:function(a){this.U.sorting===a||a!==Vt&&a!==Wt&&a!==Xt&&!Yt||(this.U.sorting=a,this.C())}},comparer:{get:function(){return this.U.comparer},set:function(a){this.U.comparer!== +a&&(this.U.comparer=a,this.C())}},angle:{get:function(){return this.U.angle},set:function(a){this.U.angle!==a&&(0===a||90===a||180===a||270===a?(this.U.angle=a,this.C()):B("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.U.alignment},set:function(a){this.U.alignment!==a&&(this.U.alignment=a,this.C())}},nodeIndent:{get:function(){return this.U.nodeIndent},set:function(a){this.U.nodeIndent!== +a&&0<=a&&(this.U.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.U.nodeIndentPastParent},set:function(a){this.U.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.U.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(a){this.U.nodeSpacing!==a&&(this.U.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(a){this.U.layerSpacing!== +a&&(this.U.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(a){this.U.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.U.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.U.compaction},set:function(a){this.U.compaction===a||a!==ju&&a!==lu||(this.U.compaction=a,this.C())}},breadthLimit:{get:function(){return this.U.breadthLimit}, +set:function(a){this.U.breadthLimit!==a&&0<=a&&(this.U.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(a){this.U.rowSpacing!==a&&(this.U.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(a){this.U.rowIndent!==a&&0<=a&&(this.U.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(a){this.U.commentSpacing!== +a&&(this.U.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(a){this.U.commentMargin!==a&&(this.U.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(a){this.U.setsPortSpot!==a&&(this.U.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.U.portSpot},set:function(a){this.U.portSpot.w(a)||(this.U.portSpot= +a,this.C())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(a){this.U.setsChildPortSpot!==a&&(this.U.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(a){this.U.childPortSpot.w(a)||(this.U.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.V.sorting},set:function(a){this.V.sorting===a||a!==Vt&&a!==Wt&& +a!==Xt&&!Yt||(this.V.sorting=a,this.C())}},alternateComparer:{get:function(){return this.V.comparer},set:function(a){this.V.comparer!==a&&(this.V.comparer=a,this.C())}},alternateAngle:{get:function(){return this.V.angle},set:function(a){this.V.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.V.angle=a,this.C())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(a){this.V.alignment!== +a&&(this.V.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(a){this.V.nodeIndent!==a&&0<=a&&(this.V.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(a){this.V.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.V.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing}, +set:function(a){this.V.nodeSpacing!==a&&(this.V.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(a){this.V.layerSpacing!==a&&(this.V.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(a){this.V.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.V.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ +get:function(){return this.V.compaction},set:function(a){this.V.compaction===a||a!==ju&&a!==lu||(this.V.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(a){this.V.breadthLimit!==a&&0<=a&&(this.V.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(a){this.V.rowSpacing!==a&&(this.V.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.V.rowIndent},set:function(a){this.V.rowIndent!==a&&0<=a&&(this.V.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(a){this.V.commentSpacing!==a&&(this.V.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(a){this.V.commentMargin!==a&&(this.V.commentMargin=a,this.C())}},alternateSetsPortSpot:{ +get:function(){return this.V.setsPortSpot},set:function(a){this.V.setsPortSpot!==a&&(this.V.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(a){this.V.portSpot.w(a)||(this.V.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(a){this.V.setsChildPortSpot!==a&&(this.V.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ +get:function(){return this.V.childPortSpot},set:function(a){this.V.childPortSpot.w(a)||(this.V.childPortSpot=a,this.C())}}}); var yt=new D(xt,"PathDefault",-1),zt=new D(xt,"PathDestination",0),Gt=new D(xt,"PathSource",1),Vt=new D(xt,"SortingForwards",10),Wt=new D(xt,"SortingReverse",11),Xt=new D(xt,"SortingAscending",12),Yt=new D(xt,"SortingDescending",13),zu=new D(xt,"AlignmentCenterSubtrees",20),Au=new D(xt,"AlignmentCenterChildren",21),qu=new D(xt,"AlignmentStart",22),nu=new D(xt,"AlignmentEnd",23),$t=new D(xt,"AlignmentBus",24),Qt=new D(xt,"AlignmentBusBranching",25),au=new D(xt,"AlignmentTopLeftBus",26),bu=new D(xt, "AlignmentBottomRightBus",27),ju=new D(xt,"CompactionNone",30),lu=new D(xt,"CompactionBlock",31),At=new D(xt,"StyleLayered",40),Ut=new D(xt,"StyleLastParents",41),Tt=new D(xt,"StyleAlternating",42),St=new D(xt,"StyleRootOnly",43),Ct=new D(xt,"ArrangementVertical",50),Iu=new D(xt,"ArrangementHorizontal",51),Ft=new D(xt,"ArrangementFixedRoots",52),Bt=new D(xt,"LayerIndividual",60),Ot=new D(xt,"LayerSiblings",61),Nt=new D(xt,"LayerUniform",62);xt.className="TreeLayout";xt.PathDefault=yt; xt.PathDestination=zt;xt.PathSource=Gt;xt.SortingForwards=Vt;xt.SortingReverse=Wt;xt.SortingAscending=Xt;xt.SortingDescending=Yt;xt.AlignmentCenterSubtrees=zu;xt.AlignmentCenterChildren=Au;xt.AlignmentStart=qu;xt.AlignmentEnd=nu;xt.AlignmentBus=$t;xt.AlignmentBusBranching=Qt;xt.AlignmentTopLeftBus=au;xt.AlignmentBottomRightBus=bu;xt.CompactionNone=ju;xt.CompactionBlock=lu;xt.StyleLayered=At;xt.StyleLastParents=Ut;xt.StyleAlternating=Tt;xt.StyleRootOnly=St;xt.ArrangementVertical=Ct; xt.ArrangementHorizontal=Iu;xt.ArrangementFixedRoots=Ft;xt.LayerIndividual=Bt;xt.LayerSiblings=Ot;xt.LayerUniform=Nt;function Dt(a){aq.call(this,a)}ma(Dt,aq);Dt.prototype.createVertex=function(){return new Et(this)};Dt.prototype.createEdge=function(){return new Ku(this)};Dt.className="TreeNetwork"; -function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.ua=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); +function Et(a){oq.call(this,a);this.Ka=!1;this.Cc=null;this.I=[];this.Sc=this.eb=this.T=this.La=0;this.jd=null;this.S=new J(0,0);this.wa=new M(0,0);this.fa=new J(0,0);this.Tm=this.Sm=this.ZA=!1;this.br=this.Pq=null;this.bd=Vt;this.Wc=vq;this.Yb=0;this.yb=Au;this.Ds=this.Cs=0;this.Es=20;this.ue=50;this.ss=0;this.Er=lu;this.wr=0;this.Rs=25;this.Dr=this.Qs=10;this.Cr=20;this.dt=!0;this.Ms=Vc;this.ct=!0;this.zr=Vc}ma(Et,oq); Et.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.bd=a.sorting,this.Wc=a.comparer,this.Yb=a.angle,this.yb=a.alignment,this.Cs=a.nodeIndent,this.Ds=a.nodeIndentPastParent,this.Es=a.nodeSpacing,this.ue=a.layerSpacing,this.ss=a.layerSpacingParentOverlap,this.Er=a.compaction,this.wr=a.breadthLimit,this.Rs=a.rowSpacing,this.Qs=a.rowIndent,this.Dr=a.commentSpacing,this.Cr=a.commentMargin,this.dt=a.setsPortSpot,this.Ms=a.portSpot,this.ct=a.setsChildPortSpot,this.zr=a.childPortSpot)}; na.Object.defineProperties(Et.prototype,{initialized:{get:function(){return this.Ka},set:function(a){this.Ka!==a&&(this.Ka=a)}},parent:{get:function(){return this.Cc},set:function(a){this.Cc!==a&&(this.Cc=a)}},children:{get:function(){return this.I},set:function(a){if(this.I!==a){if(null!==a)for(var b=a.length,c=0;cp.y+c.rowIndent&&(e=Math.min(e,Math.max(m.y,e-pu(c))))):c.alignment===qu?(e=d.top+b.y,0===b.y&&m.y