diff --git a/api/index.html b/api/index.html index 1d2cdc4aa..b8e992f89 100644 --- a/api/index.html +++ b/api/index.html @@ -1,4 +1,4 @@ -GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

GoJS API

GoJS Class Index

Diagram Classes

Geometry Classes

Model Classes

Layout Classes

Tool Classes

Collection Classes

Extension Classes

Layout Extension Classes

Part Extension Classes

Tool Extension Classes

Storage Classes

Type

+GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

GoJS API

GoJS Class Index

Diagram Classes

Geometry Classes

Model Classes

Layout Classes

Tool Classes

Collection Classes

Extension Classes

Layout Extension Classes

Part Extension Classes

Tool Extension Classes

Storage Classes

Type

For bindings: The optional conversion function to convert property values back to data values. Specifying this function modifies a binding to set its Binding.mode to be Binding.TwoWay. If you want a two-way binding without a back-conversion function, specify null for a BackConversion. diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 67866defc..5fa7b4254 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -1,4 +1,4 @@ -ActionTool | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionTool

Hierarchy

+ActionTool | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionTool

Hierarchy

The ActionTool is responsible for handling and dispatching mouse events on GraphObjects that have GraphObject.isActionable set to true. This is how one implements "controls", such as buttons or sliders or knobs, as GraphObjects diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 11cc9b517..906c03577 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -1,4 +1,4 @@ -Adornment | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Adornment

Hierarchy

+Adornment | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Adornment

Hierarchy

An Adornment is a special kind of Part that is associated with another Part, the Adornment.adornedPart.

Adornments are normally associated with a particular GraphObject in the adorned Part -- diff --git a/api/symbols/Animation.html b/api/symbols/Animation.html index 14393d91e..014a10b8b 100644 --- a/api/symbols/Animation.html +++ b/api/symbols/Animation.html @@ -1,4 +1,4 @@ -Animation | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

Hierarchy

  • Animation
+Animation | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

Hierarchy

  • Animation

Animations are used to animate GraphObject and Diagram properties.

This class is useful for creating manual animations. If you wish to animate particular properties on a GraphObject every time their value changes, diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 01b9f3743..0ebfa04ef 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -1,4 +1,4 @@ -AnimationManager | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationManager

Hierarchy

  • AnimationManager
+AnimationManager | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationManager

Hierarchy

  • AnimationManager

AnimationManager handles animations in a Diagram. Each Diagram has one, Diagram.animationManager. Setting the Model, performing a Layout, Group expansion and Tree expansion automatically start animations through the defaultAnimation. Animations can be manually started by creating Animations, which are associated with an diff --git a/api/symbols/AnimationTrigger.html b/api/symbols/AnimationTrigger.html index 987f368ea..df5ca214d 100644 --- a/api/symbols/AnimationTrigger.html +++ b/api/symbols/AnimationTrigger.html @@ -1,4 +1,4 @@ -AnimationTrigger | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationTrigger

Hierarchy

  • AnimationTrigger
+AnimationTrigger | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AnimationTrigger

Hierarchy

  • AnimationTrigger

An AnimationTrigger describes how to automatically animate a property on a GraphObject when it changes value. The target property name is a string, and all name matching is case-sensitive.

diff --git a/api/symbols/ArrangingLayout.html b/api/symbols/ArrangingLayout.html index 0b9c23ad9..c9f606fa2 100644 --- a/api/symbols/ArrangingLayout.html +++ b/api/symbols/ArrangingLayout.html @@ -1,4 +1,4 @@ -ArrangingLayout | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrangingLayout Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

+ArrangingLayout | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArrangingLayout Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

A custom Layout that provides one way to have a layout of layouts. It partitions nodes and links into separate subnetworks, applies a primary layout to each subnetwork, and then arranges those results by an diff --git a/api/symbols/BalloonLink.html b/api/symbols/BalloonLink.html index c9c61fd22..14c2f3318 100644 --- a/api/symbols/BalloonLink.html +++ b/api/symbols/BalloonLink.html @@ -1,4 +1,4 @@ -BalloonLink | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BalloonLink Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

+BalloonLink | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BalloonLink Extension

This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

Hierarchy

This custom Link class customizes its Shape to surround the comment node (the from node). If the Shape is filled, it will obscure the comment itself unless the Link is behind the comment node. Thus the default layer for BalloonLinks is "Background".

diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index c07f4f9b6..8f66297d1 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -1,4 +1,4 @@ -Binding | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Binding

Hierarchy

  • Binding
+Binding | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Binding

Hierarchy

  • Binding

A Binding describes how to automatically set a property on a GraphObject to a value of a property of data in the model. The target property name and the data source property name are strings. diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 63735877f..f6ceca831 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -1,4 +1,4 @@ -Brush | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Brush

Hierarchy

  • Brush
+Brush | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Brush

Hierarchy

  • Brush

A Brush holds color information and describes how to draw the inside of a Shape or the stroke of a shape or a TextBlock or the background of any GraphObject.

diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index c2125994f..28c91cb76 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -1,4 +1,4 @@ -ChangedEvent | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChangedEvent

Hierarchy

  • ChangedEvent
+ChangedEvent | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChangedEvent

Hierarchy

  • ChangedEvent

A ChangedEvent represents a change to an object, typically a GraphObject, but also for model data, a Model, or a Diagram. The most common case is for remembering the name of a property diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index a7e4413e9..cdf750e10 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -1,4 +1,4 @@ -CircularEdge | GoJS API

Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CircularEdge

Hierarchy

+CircularEdge | GoJS API
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CircularEdge

Hierarchy

This holds CircularLayout-specific information about Links.

This class inherits from LayoutEdge.

Index

Constructors

Inherited Members

Constructors

  • diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index 57ce700f6..2e7aa24d2 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -1,4 +1,4 @@ -CircularLayout | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularLayout

    Hierarchy

    +CircularLayout | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularLayout

    Hierarchy

    This layout positions nodes in a circular arrangement. There are several samples that use CircularLayout. The layout cannot guarantee that it provides optimal positioning of nodes when trying to minimize link crossings.

    diff --git a/api/symbols/CircularNetwork.html b/api/symbols/CircularNetwork.html index 6ea9aab05..be37d98f1 100644 --- a/api/symbols/CircularNetwork.html +++ b/api/symbols/CircularNetwork.html @@ -1,4 +1,4 @@ -CircularNetwork | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularNetwork

    Hierarchy

    +CircularNetwork | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularNetwork

    Hierarchy

    This class represents an abstract graph of CircularVertexes and CircularEdges that can be constructed based on the Nodes and Links of a Diagram so that the CircularLayout can operate independently of the diagram until it diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index a89509a41..e91afe944 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -1,4 +1,4 @@ -CircularVertex | GoJS API

    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularVertex

    Hierarchy

    +CircularVertex | GoJS API
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Class CircularVertex

    Hierarchy

    This holds CircularLayout-specific information about Nodes.

    This class inherits from LayoutVertex.

    Index

    Constructors

    Properties

    Inherited Members

    Constructors

    • diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index a7ff76b82..14471e278 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -1,4 +1,4 @@ -ClickCreatingTool | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ClickCreatingTool

      Hierarchy

      • Tool
        • ClickCreatingTool
      +ClickCreatingTool | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ClickCreatingTool

      Hierarchy

      • Tool
        • ClickCreatingTool

      The ClickCreatingTool lets the user create a node by clicking where they want the new node to be. By default a double-click is required to start this tool; set isDoubleClick to false if you want a single-click to create a node.

      diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index 72b296fb4..6ae590247 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -1,4 +1,4 @@ -ClickSelectingTool | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ClickSelectingTool

      Hierarchy

      • Tool
        • ClickSelectingTool
      +ClickSelectingTool | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ClickSelectingTool

      Hierarchy

      • Tool
        • ClickSelectingTool

      The ClickSelectingTool selects and deselects Parts when there is a click. It does this by calling Tool.standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects diff --git a/api/symbols/ColumnResizingTool.html b/api/symbols/ColumnResizingTool.html index 7c222ffe9..bae088ac9 100644 --- a/api/symbols/ColumnResizingTool.html +++ b/api/symbols/ColumnResizingTool.html @@ -1,4 +1,4 @@ -ColumnResizingTool | GoJS API

      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ColumnResizingTool Extension

      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

      Hierarchy

      • Tool
        • ColumnResizingTool
      +ColumnResizingTool | GoJS API
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Class ColumnResizingTool Extension

      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

      Hierarchy

      • Tool
        • ColumnResizingTool

      The ColumnResizingTool class lets the user resize each column of a named Table Panel in a selected Part.

      If you want to experiment with this extension, try the Column Resizing sample.

      Index

      Inherited Members

      Constructors

      • diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index dd79b2141..c25127ab0 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -1,4 +1,4 @@ -CommandHandler | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class CommandHandler

        Hierarchy

        +CommandHandler | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class CommandHandler

        Hierarchy

        The Diagram.commandHandler implements various commands such as CommandHandler.deleteSelection or CommandHandler.redo. The CommandHandler includes keyboard event handling to interpret diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index 929e07c68..024a3afdc 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -1,4 +1,4 @@ -ContextMenuTool | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ContextMenuTool

        Hierarchy

        +ContextMenuTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class ContextMenuTool

        Hierarchy

        The ContextMenuTool is used to create and show a context menu. It automatically disables any browser context menu.

        Define context menus on individual GraphObjects by setting GraphObject.contextMenu. diff --git a/api/symbols/CurvedLinkReshapingTool.html b/api/symbols/CurvedLinkReshapingTool.html index 738a294a6..64079324c 100644 --- a/api/symbols/CurvedLinkReshapingTool.html +++ b/api/symbols/CurvedLinkReshapingTool.html @@ -1,4 +1,4 @@ -CurvedLinkReshapingTool | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class CurvedLinkReshapingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +CurvedLinkReshapingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class CurvedLinkReshapingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        This CurvedLinkReshapingTool class allows for a Link's path to be modified by the user via the dragging of a single tool handle at the middle of the link. Dragging the handle changes the value of Link.curviness.

        diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index 50bfc09f9..b3b8b3edd 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -1,4 +1,4 @@ -Diagram | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class Diagram

        Hierarchy

        +Diagram | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class Diagram

        Hierarchy

        A Diagram is associated with an HTML DIV element. Constructing a Diagram creates an HTML Canvas element which it places inside of the given DIV element, in addition to several helper DIVs. GoJS will manage the contents of this DIV -- you should not modify the contents of the DIV, diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index 50ef616bb..2dcc12bf8 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -1,4 +1,4 @@ -DiagramEvent | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DiagramEvent

        Hierarchy

        • DiagramEvent
        +DiagramEvent | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DiagramEvent

        Hierarchy

        • DiagramEvent

        A DiagramEvent represents a more abstract event than an InputEvent. They are raised on the Diagram class. One can receive such events by registering a DiagramEvent listener on a Diagram diff --git a/api/symbols/DiagramFile.html b/api/symbols/DiagramFile.html index 7a2d6a2a8..7e7181f53 100644 --- a/api/symbols/DiagramFile.html +++ b/api/symbols/DiagramFile.html @@ -1,4 +1,4 @@ -DiagramFile | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Interface DiagramFile Storage

        This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

        Hierarchy

        • DiagramFile
        +DiagramFile | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Interface DiagramFile Storage

        This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

        Hierarchy

        • DiagramFile

        A simple interface containing basic information about a diagram saved to a storage service. Guarantees the existence of file id, name, and path.

        DiagramFiles are used as a minimal representation of files stored in data. GoCloudStorage.currentDiagramFile. diff --git a/api/symbols/DimensioningLink.html b/api/symbols/DimensioningLink.html index 4a978ef5f..80cb5fea5 100644 --- a/api/symbols/DimensioningLink.html +++ b/api/symbols/DimensioningLink.html @@ -1,4 +1,4 @@ -DimensioningLink | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DimensioningLink Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +DimensioningLink | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DimensioningLink Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        A custom routed Link for showing the distances between a point on one node and a point on another node.

        Note that because this is a Link, the points being measured must be on Nodes, not simple Parts. The exact point on each Node is determined by the Link.fromSpot and Link.toSpot.

        diff --git a/api/symbols/DoubleTreeLayout.html b/api/symbols/DoubleTreeLayout.html index 5ea22409d..19fbf11ff 100644 --- a/api/symbols/DoubleTreeLayout.html +++ b/api/symbols/DoubleTreeLayout.html @@ -1,4 +1,4 @@ -DoubleTreeLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DoubleTreeLayout Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +DoubleTreeLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DoubleTreeLayout Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        Perform two TreeLayouts, one going rightwards and one going leftwards. The choice of direction is determined by the mandatory predicate directionFunction, which is called on each child Node of the root Node.

        diff --git a/api/symbols/DragCreatingTool.html b/api/symbols/DragCreatingTool.html index a8c7e5f84..be4c9e4f5 100644 --- a/api/symbols/DragCreatingTool.html +++ b/api/symbols/DragCreatingTool.html @@ -1,4 +1,4 @@ -DragCreatingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragCreatingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        • Tool
          • DragCreatingTool
        +DragCreatingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragCreatingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        • Tool
          • DragCreatingTool

        The DragCreatingTool lets the user create a new node by dragging in the background to indicate its size and position.

        The default drag selection box is a magenta rectangle. diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index 905be3540..b5d7706e4 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -1,4 +1,4 @@ -DragSelectingTool | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragSelectingTool

        Hierarchy

        +DragSelectingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragSelectingTool

        Hierarchy

        The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user. There is a temporary part, the box, that shows the current area encompassed between the mouse-down diff --git a/api/symbols/DragZoomingTool.html b/api/symbols/DragZoomingTool.html index 5b0ae8c4a..821eac420 100644 --- a/api/symbols/DragZoomingTool.html +++ b/api/symbols/DragZoomingTool.html @@ -1,4 +1,4 @@ -DragZoomingTool | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragZoomingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +DragZoomingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DragZoomingTool Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        The DragZoomingTool lets the user zoom into a diagram by stretching a box to indicate the new contents of the diagram's viewport (the area of the model shown by the Diagram). diff --git a/api/symbols/DraggingInfo.html b/api/symbols/DraggingInfo.html index c3c387718..b1fed0671 100644 --- a/api/symbols/DraggingInfo.html +++ b/api/symbols/DraggingInfo.html @@ -1,4 +1,4 @@ -DraggingInfo | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingInfo

        Hierarchy

        • DraggingInfo
        +DraggingInfo | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingInfo

        Hierarchy

        • DraggingInfo

        This is used in dragging methods to remember initial locations, for relative positioning and for cancellation. You do not typically need to create these unless you are overriding tools.

        CommandHandler.computeEffectiveCollection returns a Map of Parts and DraggingInfo, diff --git a/api/symbols/DraggingOptions.html b/api/symbols/DraggingOptions.html index e4cb13190..e058a441d 100644 --- a/api/symbols/DraggingOptions.html +++ b/api/symbols/DraggingOptions.html @@ -1,4 +1,4 @@ -DraggingOptions | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingOptions

        Hierarchy

        • DraggingOptions
        +DraggingOptions | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingOptions

        Hierarchy

        • DraggingOptions

        New in 2.0, this class contains options for dragging and moving parts.

        This is used by Diagram.moveParts, Diagram.computeMove, and DraggingTool.computeMove.

        Both the Diagram and its DraggingTool have a DraggingOptions instance. diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index 8810d47dd..f5b33b1d4 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -1,4 +1,4 @@ -DraggingTool | GoJS API

        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingTool

        Hierarchy

        +DraggingTool | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DraggingTool

        Hierarchy

        The DraggingTool is used to move or copy selected parts with the mouse. This sets the Part.location property; you may want to save the location to the model by using a TwoWay Binding on the "location" property in your Parts/Nodes/Groups templates.

        diff --git a/api/symbols/DrawCommandHandler.html b/api/symbols/DrawCommandHandler.html index e0d8f84cc..dd44aaf59 100644 --- a/api/symbols/DrawCommandHandler.html +++ b/api/symbols/DrawCommandHandler.html @@ -1,4 +1,4 @@ -DrawCommandHandler | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DrawCommandHandler Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +DrawCommandHandler | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class DrawCommandHandler Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        This CommandHandler class allows the user to position selected Parts in a diagram relative to the first part selected, in addition to overriding the doKeyDown method of the CommandHandler for handling the arrow keys in additional manners.

        diff --git a/api/symbols/FishboneLayout.html b/api/symbols/FishboneLayout.html index 56e2e61b4..751725508 100644 --- a/api/symbols/FishboneLayout.html +++ b/api/symbols/FishboneLayout.html @@ -1,4 +1,4 @@ -FishboneLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class FishboneLayout Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +FishboneLayout | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class FishboneLayout Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        FishboneLayout is a custom Layout derived from TreeLayout for creating "fishbone" diagrams. A fishbone diagram also requires a Link class that implements custom routing, FishboneLink.

        This only works for angle === 0 or angle === 180.

        diff --git a/api/symbols/FishboneLink.html b/api/symbols/FishboneLink.html index eb3d1a679..31dc7f13a 100644 --- a/api/symbols/FishboneLink.html +++ b/api/symbols/FishboneLink.html @@ -1,4 +1,4 @@ -FishboneLink | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class FishboneLink Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        +FishboneLink | GoJS API
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Class FishboneLink Extension

        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

        Hierarchy

        Custom Link class for FishboneLayout.

        Index

        Inherited Members

        Properties

        Methods

        Constructors

        • Constructs an empty link that does not connect any nodes. diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index c7b98efd1..2945e6c40 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -1,4 +1,4 @@ -ForceDirectedEdge | GoJS API

          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class ForceDirectedEdge

          Hierarchy

          +ForceDirectedEdge | GoJS API
          Options
          All
          • Public
          • Public/Protected
          • All
          Menu

          Class ForceDirectedEdge

          Hierarchy

          This holds ForceDirectedLayout-specific information about Links.

          This class inherits from LayoutEdge.

          Index

          Constructors

          Properties

          Inherited Members

          Constructors

          • diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index ca96afbbe..fbb795e53 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -1,4 +1,4 @@ -ForceDirectedLayout | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedLayout

            Hierarchy

            +ForceDirectedLayout | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedLayout

            Hierarchy

            Force-directed layout treats the graph as if it were a system of physical bodies with repulsive electrical, attractional gravitational, and spring forces acting on them and between them.

            Electrical forces come both from the field at the vertex's location as well as from neighboring vertexes and are quadratic by distance. diff --git a/api/symbols/ForceDirectedNetwork.html b/api/symbols/ForceDirectedNetwork.html index 8eeb1a005..dc608ce40 100644 --- a/api/symbols/ForceDirectedNetwork.html +++ b/api/symbols/ForceDirectedNetwork.html @@ -1,4 +1,4 @@ -ForceDirectedNetwork | GoJS API

            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedNetwork

            Hierarchy

            +ForceDirectedNetwork | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedNetwork

            Hierarchy

            This class represents an abstract graph of ForceDirectedVertexes and ForceDirectedEdges that can be constructed based on the Nodes and Links of a Diagram so that the ForceDirectedLayout can operate independently of the diagram until it diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index 562825e9f..488e0f65b 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -1,4 +1,4 @@ -ForceDirectedVertex | GoJS API

            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedVertex

            Hierarchy

            +ForceDirectedVertex | GoJS API
            Options
            All
            • Public
            • Public/Protected
            • All
            Menu

            Class ForceDirectedVertex

            Hierarchy

            This holds ForceDirectedLayout-specific information about Nodes.

            This class inherits from LayoutVertex.

            Index

            Inherited Members

            Constructors

            • diff --git a/api/symbols/FreehandDrawingTool.html b/api/symbols/FreehandDrawingTool.html index 8f8af3bc7..0630a4a15 100644 --- a/api/symbols/FreehandDrawingTool.html +++ b/api/symbols/FreehandDrawingTool.html @@ -1,4 +1,4 @@ -FreehandDrawingTool | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class FreehandDrawingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              • Tool
                • FreehandDrawingTool
              +FreehandDrawingTool | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class FreehandDrawingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              • Tool
                • FreehandDrawingTool

              The FreehandDrawingTool allows the user to draw a shape using the mouse. It collects all of the points from a mouse-down, all mouse-moves, until a mouse-up, and puts all of those points in a Geometry used by a Shape. diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index d3f30b9c8..e5a7ed6a3 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -1,4 +1,4 @@ -Geometry | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Geometry

              Hierarchy

              • Geometry
              +Geometry | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Geometry

              Hierarchy

              • Geometry

              The Geometry class is used to define the "shape" of a Shape. A Geometry can be simple straight lines, rectangles, or ellipses. A Geometry can also be an arbitrarily complex path, consisting of a list of PathFigures.

              diff --git a/api/symbols/GeometryReshapingTool.html b/api/symbols/GeometryReshapingTool.html index 66642f174..68103b3b3 100644 --- a/api/symbols/GeometryReshapingTool.html +++ b/api/symbols/GeometryReshapingTool.html @@ -1,4 +1,4 @@ -GeometryReshapingTool | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GeometryReshapingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              • Tool
                • GeometryReshapingTool
              +GeometryReshapingTool | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GeometryReshapingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              • Tool
                • GeometryReshapingTool

              The GeometryReshapingTool class allows for a Shape's Geometry to be modified by the user via the dragging of tool handles. This does not handle Links, whose routes should be reshaped by the LinkReshapingTool. diff --git a/api/symbols/GoCloudStorage.html b/api/symbols/GoCloudStorage.html index 1bf817cbb..97f114794 100644 --- a/api/symbols/GoCloudStorage.html +++ b/api/symbols/GoCloudStorage.html @@ -1,4 +1,4 @@ -GoCloudStorage | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoCloudStorage Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              +GoCloudStorage | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoCloudStorage Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              An abstract class for storing GoJS Models in various cloud storage services.

              GoCloudStorage is never used on its own. Its subclasses can be used to manage diagram model storage programatically, or any subset of GoCloudStorage subclasses can be bundled and used graphically with the GoCloudStorageManager.

              diff --git a/api/symbols/GoCloudStorageManager.html b/api/symbols/GoCloudStorageManager.html index 66488f712..569cfbc47 100644 --- a/api/symbols/GoCloudStorageManager.html +++ b/api/symbols/GoCloudStorageManager.html @@ -1,4 +1,4 @@ -GoCloudStorageManager | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoCloudStorageManager Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              • GoCloudStorageManager
              +GoCloudStorageManager | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoCloudStorageManager Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              • GoCloudStorageManager

              Class for easily saving / loading GoJS Models to / from a user-defined set of Cloud Storage Services with a pre-defined UI.

              GoCloudStorageManager holds a set of GoCloudStorage subclass instances (storages) to manage. When one is selected from the storage selection menu, it becomes the currentStorage property, which is used to save / load / delete / create files.

              diff --git a/api/symbols/GoDropBox.html b/api/symbols/GoDropBox.html index b5ea04faf..7e2bb3273 100644 --- a/api/symbols/GoDropBox.html +++ b/api/symbols/GoDropBox.html @@ -1,4 +1,4 @@ -GoDropBox | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoDropBox Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              +GoDropBox | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoDropBox Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              Class for saving / loading GoJS Models to / from Dropbox. As with all GoCloudStorage subclasses (with the exception of GoLocalStorage, any page using GoDropBox must be served on a web server.

              Note: Any page using GoDropBox must include a script tag with a reference to the Dropbox JS SDK.

              diff --git a/api/symbols/GoGoogleDrive.html b/api/symbols/GoGoogleDrive.html index bfe1d5784..2c865e279 100644 --- a/api/symbols/GoGoogleDrive.html +++ b/api/symbols/GoGoogleDrive.html @@ -1,4 +1,4 @@ -GoGoogleDrive | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoGoogleDrive Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              +GoGoogleDrive | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoGoogleDrive Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              Class for saving / loading GoJS Models to / from Google Drive. Uses the Google Drive V3 API by use of a Google Client API object. diff --git a/api/symbols/GoLocalStorage.html b/api/symbols/GoLocalStorage.html index 357a14c60..589dbabb8 100644 --- a/api/symbols/GoLocalStorage.html +++ b/api/symbols/GoLocalStorage.html @@ -1,4 +1,4 @@ -GoLocalStorage | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoLocalStorage Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              +GoLocalStorage | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoLocalStorage Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              Class for saving / loading GoJS Models to / from Local Storage. GoLocalStorage is the only GoCloudStorage subclass than can be used in a local page; that is, one not served by a web server.

              diff --git a/api/symbols/GoOneDrive.html b/api/symbols/GoOneDrive.html index dea7521e6..2cf780e24 100644 --- a/api/symbols/GoOneDrive.html +++ b/api/symbols/GoOneDrive.html @@ -1,4 +1,4 @@ -GoOneDrive | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoOneDrive Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              +GoOneDrive | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GoOneDrive Storage

              This is part of GoCloudStorage and not part of the main GoJS library. Storage can be found in the GoJS kit under the projects folder. See the Storage intro page for more information.

              Hierarchy

              Class for saving / loading GoJS Diagram.models to / from Microsoft One Drive. As with all GoCloudStorage subclasses (with the exception of GoLocalStorage, any page using GoDropBox must be served on a web server.

              Note: Makes use of OneDrive FilePicker for JavaScript v7.2. Any page diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index 2600526f3..05438587c 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -1,4 +1,4 @@ -GraphLinksModel | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GraphLinksModel

              Hierarchy

              +GraphLinksModel | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GraphLinksModel

              Hierarchy

              GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index 9aa1a27b8..a95d0e438 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -1,4 +1,4 @@ -GraphObject | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GraphObject Abstract

              Hierarchy

              +GraphObject | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GraphObject Abstract

              Hierarchy

              This is the abstract base class for all graphical objects. Classes inheriting from GraphObject include: Shape, TextBlock, Picture, and Panel. diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index c08d9d61b..88bcc7563 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -1,4 +1,4 @@ -GridLayout | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GridLayout

              Hierarchy

              +GridLayout | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GridLayout

              Hierarchy

              This simple layout places all of the Parts in a grid-like arrangement, ordered, spaced apart, and wrapping as needed. It ignores any Links connecting the Nodes being laid out. There are many samples that use GridLayout. diff --git a/api/symbols/Group.html b/api/symbols/Group.html index 39ee0aef4..e5f047441 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -1,4 +1,4 @@ -Group | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Group

              Hierarchy

              +Group | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class Group

              Hierarchy

              A Group is a Node that can contain a subgraph of Nodes and Links, which are members of the group.

              diff --git a/api/symbols/GuidedDraggingTool.html b/api/symbols/GuidedDraggingTool.html index 28ecfeb29..afd9a4a09 100644 --- a/api/symbols/GuidedDraggingTool.html +++ b/api/symbols/GuidedDraggingTool.html @@ -1,4 +1,4 @@ -GuidedDraggingTool | GoJS API

              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GuidedDraggingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              +GuidedDraggingTool | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class GuidedDraggingTool Extension

              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

              Hierarchy

              The GuidedDraggingTool class makes guidelines visible as the parts are dragged around a diagram when the selected part is nearly aligned with another part.

              If you want to experiment with this extension, try the Guided Dragging sample.

              diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index efe4b8791..f6fbe75cf 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -1,4 +1,4 @@ -HTMLInfo | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class HTMLInfo

              Hierarchy

              • HTMLInfo
              +HTMLInfo | GoJS API
              Options
              All
              • Public
              • Public/Protected
              • All
              Menu

              Class HTMLInfo

              Hierarchy

              • HTMLInfo

              HTMLInfo is used to show and hide custom HTML page elements, such as a context menu, tooltip, or text editor made of HTML.

              Properties that can be set to an HTMLInfo include:

                diff --git a/api/symbols/IncrementalData.html b/api/symbols/IncrementalData.html index 860471662..b4244f22c 100644 --- a/api/symbols/IncrementalData.html +++ b/api/symbols/IncrementalData.html @@ -1,4 +1,4 @@ -IncrementalData | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Interface IncrementalData

                Hierarchy

                • IncrementalData
                +IncrementalData | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Interface IncrementalData

                Hierarchy

                • IncrementalData

                Interface for the output object of Model.toIncrementalData.

                All properties of this object are optional, as they are only included if changes occurred. For instance, if a transaction didn't include any changes to modelData, the modelData property of this interface won't be included on the output object.

                diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index 4e344c5c1..6ecb0b3be 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -1,4 +1,4 @@ -InputEvent | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class InputEvent

                Hierarchy

                • InputEvent
                +InputEvent | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class InputEvent

                Hierarchy

                • InputEvent

                An InputEvent represents a mouse or keyboard or touch event. The principal properties hold information about a particular input event. These properties include the documentPoint at which a mouse event diff --git a/api/symbols/Inspector.html b/api/symbols/Inspector.html index b2664046b..3fd40b2ec 100644 --- a/api/symbols/Inspector.html +++ b/api/symbols/Inspector.html @@ -1,4 +1,4 @@ -Inspector | GoJS API

                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class Inspector Extension

                This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                Hierarchy

                • Inspector
                +Inspector | GoJS API
                Options
                All
                • Public
                • Public/Protected
                • All
                Menu

                Class Inspector Extension

                This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                Hierarchy

                • Inspector

                This class implements an inspector for GoJS model data objects. The constructor takes three arguments:

                  diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index 159acb8ec..802aa4fb5 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -1,4 +1,4 @@ -Iterable | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface Iterable<T>

                  Hierarchy

                  +Iterable | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface Iterable<T>

                  Hierarchy

                  This interface is implemented by the List, Set, and Map classes; it provides the iterator read-only property that returns an Iterator.

                  Typical usage is:

                  diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index cb0d6c0ef..dcce01823 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -1,4 +1,4 @@ -Iterator | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface Iterator<T>

                  Hierarchy

                  +Iterator | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Interface Iterator<T>

                  Hierarchy

                  This interface defines properties and methods for iterating over a collection; it provides the next predicate and the value read-only property. Some Iterators also provide key property values along with each value.

                  diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index 11fd19917..3ffe13007 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -1,4 +1,4 @@ -Layer | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Layer

                  Hierarchy

                  • Layer
                  +Layer | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class Layer

                  Hierarchy

                  • Layer

                  Layers are how named collections of Parts are drawn in front or behind other collections of Parts in a Diagram. Layers can only contain Parts, such as Nodes and Links. They cannot hold GraphObjects directly.

                  You put a Part into a Layer by assigning Part.layerName with the name of the Layer. diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index 2a624a138..c6ead45c6 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -1,4 +1,4 @@ -LayeredDigraphEdge | GoJS API

                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LayeredDigraphEdge

                  Hierarchy

                  +LayeredDigraphEdge | GoJS API
                  Options
                  All
                  • Public
                  • Public/Protected
                  • All
                  Menu

                  Class LayeredDigraphEdge

                  Hierarchy

                  This holds LayeredDigraphLayout-specific information about Links.

                  This class inherits from LayoutEdge.

                  Index

                  Inherited Members

                  Constructors

                  • diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index 085790f8b..c8504d49e 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -1,4 +1,4 @@ -LayeredDigraphLayout | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphLayout

                    Hierarchy

                    +LayeredDigraphLayout | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphLayout

                    Hierarchy

                    This arranges nodes of directed graphs into layers (rows or columns). There are many samples that use LayeredDigraphLayout.

                    diff --git a/api/symbols/LayeredDigraphNetwork.html b/api/symbols/LayeredDigraphNetwork.html index 9653ee8f4..cd33cff34 100644 --- a/api/symbols/LayeredDigraphNetwork.html +++ b/api/symbols/LayeredDigraphNetwork.html @@ -1,4 +1,4 @@ -LayeredDigraphNetwork | GoJS API

                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphNetwork

                    Hierarchy

                    +LayeredDigraphNetwork | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphNetwork

                    Hierarchy

                    This class represents an abstract graph of LayeredDigraphVertexes and LayeredDigraphEdges that can be constructed based on the Nodes and Links of a Diagram so that the LayeredDigraphLayout can operate independently of the diagram until it diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index d9ea5c7fc..d4e27a1d0 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -1,4 +1,4 @@ -LayeredDigraphVertex | GoJS API

                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphVertex

                    Hierarchy

                    +LayeredDigraphVertex | GoJS API
                    Options
                    All
                    • Public
                    • Public/Protected
                    • All
                    Menu

                    Class LayeredDigraphVertex

                    Hierarchy

                    This holds LayeredDigraphLayout-specific information about Nodes.

                    This class inherits from LayoutVertex.

                    Index

                    Inherited Members

                    Constructors

                    • diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index c073ab7c6..4e8d0a028 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -1,4 +1,4 @@ -Layout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Layout

                      Hierarchy

                      +Layout | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Layout

                      Hierarchy

                      This is the base class for all of the predefined diagram layout implementations. They only arrange Parts (primarily Nodes and Links) in a Diagram, not to GraphObjects in Panels (i.e. panel layout).

                      diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index fa5567883..134db4d57 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -1,4 +1,4 @@ -LayoutEdge | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutEdge

                      Hierarchy

                      +LayoutEdge | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutEdge

                      Hierarchy

                      An edge represents a Link in a LayoutNetwork, along with its fromVertex and toVertex. The link property may be null for edges that represent "dummy" links, diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index 1ed678332..6f4322f18 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -1,4 +1,4 @@ -LayoutNetwork | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutNetwork

                      Hierarchy

                      +LayoutNetwork | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutNetwork

                      Hierarchy

                      This provides an abstract view of a diagram as a network (graph) of vertexes and directed edges. The network contains vertexes and edges corresponding to Nodes and Links.

                      diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index 8536a5970..84b41e952 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -1,4 +1,4 @@ -LayoutVertex | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutVertex

                      Hierarchy

                      +LayoutVertex | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LayoutVertex

                      Hierarchy

                      A vertex represents a Node in a LayoutNetwork, along with its bounds and focus and collections of LayoutEdges that come into and go out of the vertex. The node property may be null for vertexes that represent "dummy" nodes, diff --git a/api/symbols/Link.html b/api/symbols/Link.html index 6e84ea56c..ce82a163d 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -1,4 +1,4 @@ -Link | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Link

                      Hierarchy

                      +Link | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Link

                      Hierarchy

                      A Link is a Part that connects Nodes. The link relationship is directional, going from Link.fromNode to Link.toNode. A link can connect to a specific port element in a node, as named by the Link.fromPortId diff --git a/api/symbols/LinkLabelDraggingTool.html b/api/symbols/LinkLabelDraggingTool.html index 76a0ea303..782384061 100644 --- a/api/symbols/LinkLabelDraggingTool.html +++ b/api/symbols/LinkLabelDraggingTool.html @@ -1,4 +1,4 @@ -LinkLabelDraggingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkLabelDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkLabelDraggingTool
                      +LinkLabelDraggingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkLabelDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkLabelDraggingTool

                      The LinkLabelDraggingTool class lets the user move a label on a Link.

                      This tool only works when the Link has a label that is positioned at the Link.midPoint plus some offset. diff --git a/api/symbols/LinkLabelOnPathDraggingTool.html b/api/symbols/LinkLabelOnPathDraggingTool.html index 1c76108e3..914a8220a 100644 --- a/api/symbols/LinkLabelOnPathDraggingTool.html +++ b/api/symbols/LinkLabelOnPathDraggingTool.html @@ -1,4 +1,4 @@ -LinkLabelOnPathDraggingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkLabelOnPathDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkLabelOnPathDraggingTool
                      +LinkLabelOnPathDraggingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkLabelOnPathDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkLabelOnPathDraggingTool

                      The LinkLabelOnPathDraggingTool class lets the user move a label on a Link while keeping the label on the link's path. This tool only works when the Link has a label marked by the "_isLinkLabel" property.

                      If you want to experiment with this extension, try the Link Label On Path Dragging sample.

                      diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index c219f747c..c30b879ef 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -1,4 +1,4 @@ -LinkReshapingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkReshapingTool

                      Hierarchy

                      +LinkReshapingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkReshapingTool

                      Hierarchy

                      The LinkReshapingTool is used to interactively change the route of a Link by setting its Link.points list. You may want to save the route to the model by using a TwoWay Binding on the "points" property of the Link.

                      diff --git a/api/symbols/LinkShiftingTool.html b/api/symbols/LinkShiftingTool.html index 6446bfad5..c691cbc91 100644 --- a/api/symbols/LinkShiftingTool.html +++ b/api/symbols/LinkShiftingTool.html @@ -1,4 +1,4 @@ -LinkShiftingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkShiftingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkShiftingTool
                      +LinkShiftingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkShiftingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • LinkShiftingTool

                      The LinkShiftingTool class lets the user shift the end of a link to be anywhere along the edges of the port; use it in a diagram.toolManager.mouseDownTools list:

                      myDiagram.toolManager.mouseDownTools.add(new LinkShiftingTool());
                      diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html
                      index 0fcda637a..11cacc5fd 100644
                      --- a/api/symbols/LinkingBaseTool.html
                      +++ b/api/symbols/LinkingBaseTool.html
                      @@ -1,4 +1,4 @@
                      -LinkingBaseTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkingBaseTool Abstract

                      Hierarchy

                      +LinkingBaseTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkingBaseTool Abstract

                      Hierarchy

                      This abstract class is the base class for the LinkingTool and RelinkingTool classes.

                      This class includes properties for defining and accessing any temporary nodes and temporary link that are used during any linking operation, as well as access to the existing diagram's nodes and link diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index 34386b5f0..dd2e4fd0a 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -1,4 +1,4 @@ -LinkingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkingTool

                      Hierarchy

                      +LinkingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LinkingTool

                      Hierarchy

                      The LinkingTool lets a user draw a new Link between two ports, using a mouse-drag operation.

                      By default an instance of this tool is installed as a mouse-move tool in the diff --git a/api/symbols/List.html b/api/symbols/List.html index 0de447f9b..86c98900e 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -1,4 +1,4 @@ -List | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class List<T>

                      Hierarchy

                      • List
                      +List | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class List<T>

                      Hierarchy

                      • List

                      NOTE: For 2.0 the constructor argument has changed. List now optionally accepts a collection, and only checks types in TypeScript.

                      An ordered iterable collection. diff --git a/api/symbols/LocalStorageCommandHandler.html b/api/symbols/LocalStorageCommandHandler.html index 85f643691..92a298e3b 100644 --- a/api/symbols/LocalStorageCommandHandler.html +++ b/api/symbols/LocalStorageCommandHandler.html @@ -1,4 +1,4 @@ -LocalStorageCommandHandler | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LocalStorageCommandHandler Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +LocalStorageCommandHandler | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class LocalStorageCommandHandler Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      This CommandHandler class uses localStorage as the repository for the clipboard, rather than an in-memory global variable. It requires that the Diagram.model be serializable and deserializable using Model.toJson and Model.fromJson.

                      diff --git a/api/symbols/Map.html b/api/symbols/Map.html index b2bb57ad3..edbdd80e1 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -1,4 +1,4 @@ -Map | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Map<K, V>

                      Hierarchy

                      • Map
                      +Map | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Map<K, V>

                      Hierarchy

                      • Map

                      NOTE: For 2.0 the constructor arguments have changed. Map now optionally accepts a collection, and only checks types in TypeScript.

                      An unordered iterable collection of key/value pairs that cannot contain two instances of the same key. diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 155ccafa5..adc40ca54 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -1,4 +1,4 @@ -Margin | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Margin

                      Hierarchy

                      • Margin
                      +Margin | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Margin

                      Hierarchy

                      • Margin

                      A Margin represents a band of space outside or inside a rectangular area, with possibly different values on each of the four sides.

                      Example uses include GraphObject.margin, Panel.padding, and Diagram.padding.

                      diff --git a/api/symbols/Model.html b/api/symbols/Model.html index ea504fa5e..a6cdbc455 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -1,4 +1,4 @@ -Model | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Model

                      Hierarchy

                      +Model | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Model

                      Hierarchy

                      Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

                      diff --git a/api/symbols/Node.html b/api/symbols/Node.html index 6f3d618ec..62758495e 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -1,4 +1,4 @@ -Node | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Node

                      Hierarchy

                      +Node | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class Node

                      Hierarchy

                      A Node is a Part that may connect to other nodes with Links, or that may be a member of a Group.

                      Group inherits from Node, diff --git a/api/symbols/NodeLabelDraggingTool.html b/api/symbols/NodeLabelDraggingTool.html index 59ecfadce..78a23fbad 100644 --- a/api/symbols/NodeLabelDraggingTool.html +++ b/api/symbols/NodeLabelDraggingTool.html @@ -1,4 +1,4 @@ -NodeLabelDraggingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class NodeLabelDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • NodeLabelDraggingTool
                      +NodeLabelDraggingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class NodeLabelDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      • Tool
                        • NodeLabelDraggingTool

                      The NodeLabelDraggingTool class lets the user move a label on a Node.

                      This tool only works when the Node has a label (any GraphObject) marked with { _isNodeLabel: true } that is positioned in a Spot Panel. diff --git a/api/symbols/NonRealtimeDraggingTool.html b/api/symbols/NonRealtimeDraggingTool.html index 1bcfc91a0..f0de84504 100644 --- a/api/symbols/NonRealtimeDraggingTool.html +++ b/api/symbols/NonRealtimeDraggingTool.html @@ -1,4 +1,4 @@ -NonRealtimeDraggingTool | GoJS API

                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class NonRealtimeDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +NonRealtimeDraggingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class NonRealtimeDraggingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      The NonRealtimeDraggingTool class lets the user drag an image instead of actually moving any selected nodes, until the mouse-up event.

                      If you want to experiment with this extension, try the Non Realtime Dragging sample.

                      diff --git a/api/symbols/ObjectData.html b/api/symbols/ObjectData.html index e2543fe91..39d58bd81 100644 --- a/api/symbols/ObjectData.html +++ b/api/symbols/ObjectData.html @@ -1,4 +1,4 @@ -ObjectData | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Interface ObjectData

                      Hierarchy

                      • ObjectData
                      +ObjectData | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Interface ObjectData

                      Hierarchy

                      • ObjectData

                      The ObjectData type is the same as { [index: string]: any; }. This is to ease writing someDataObject.anyPropertyName, when dealing with arbitrary JavaScript Objects used as model data.

                      diff --git a/api/symbols/OrthogonalLinkReshapingTool.html b/api/symbols/OrthogonalLinkReshapingTool.html index 91c1eb66f..ff1ed1a45 100644 --- a/api/symbols/OrthogonalLinkReshapingTool.html +++ b/api/symbols/OrthogonalLinkReshapingTool.html @@ -1,4 +1,4 @@ -OrthogonalLinkReshapingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class OrthogonalLinkReshapingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      +OrthogonalLinkReshapingTool | GoJS API
                      Options
                      All
                      • Public
                      • Public/Protected
                      • All
                      Menu

                      Class OrthogonalLinkReshapingTool Extension

                      This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                      Hierarchy

                      The OrthogonalLinkReshapingTool class lets a user drag a tool handle along the link segment, which will move the whole segment.

                      If you want to experiment with this extension, try the Orthogonal Link Reshaping sample.

                      Index

                      Inherited Members

                      Constructors

                      • diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index 2c65b1324..575e8c6b2 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -1,4 +1,4 @@ -Overview | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class Overview

                        Hierarchy

                        +Overview | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class Overview

                        Hierarchy

                        An Overview is a Diagram that displays all of a different diagram, with a rectangular box showing the viewport displayed by that other diagram.

                        diff --git a/api/symbols/OverviewResizingTool.html b/api/symbols/OverviewResizingTool.html index 34db4de3e..0218cceec 100644 --- a/api/symbols/OverviewResizingTool.html +++ b/api/symbols/OverviewResizingTool.html @@ -1,4 +1,4 @@ -OverviewResizingTool | GoJS API

                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class OverviewResizingTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        +OverviewResizingTool | GoJS API
                        Options
                        All
                        • Public
                        • Public/Protected
                        • All
                        Menu

                        Class OverviewResizingTool Extension

                        This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                        Hierarchy

                        The OverviewResizingTool class lets the user resize the box within an overview.

                        If you want to experiment with this extension, try the Overview Resizing sample.

                        Index

                        Constructors

                        Methods

                        Inherited Members

                        Constructors

                        • diff --git a/api/symbols/PackedLayout.html b/api/symbols/PackedLayout.html index 190eb3c47..ac38c93fb 100644 --- a/api/symbols/PackedLayout.html +++ b/api/symbols/PackedLayout.html @@ -1,4 +1,4 @@ -PackedLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PackedLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +PackedLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PackedLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          Custom layout which attempts to pack nodes as close together as possible without overlap. Each node is assumed to be either rectangular or circular (dictated by the hasCircularNodes property). This layout diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index 47750eec4..4a4accce0 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -1,4 +1,4 @@ -Palette | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Palette

                          Hierarchy

                          +Palette | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Palette

                          Hierarchy

                          Palette extends the Diagram class to allow objects to be dragged and placed onto other Diagrams. Its Diagram.layout is a GridLayout. The Palette is Diagram.isReadOnly but to support drag-and-drop its Diagram.allowDragOut is true.

                          diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index 7be982b86..c8051087f 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -1,4 +1,4 @@ -Panel | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Panel

                          Hierarchy

                          +Panel | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Panel

                          Hierarchy

                          A Panel is a GraphObject that holds other GraphObjects as its elements. A Panel is responsible for sizing and positioning its elements. The elements of a panel are drawn in the order in which they appear in the elements collection.

                          diff --git a/api/symbols/PanelLayout.html b/api/symbols/PanelLayout.html index af4cffe57..8faa6e854 100644 --- a/api/symbols/PanelLayout.html +++ b/api/symbols/PanelLayout.html @@ -1,4 +1,4 @@ -PanelLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanelLayout Abstract

                          Hierarchy

                          +PanelLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanelLayout Abstract

                          Hierarchy

                          This is the abstract base class for all Panel Layouts, which inform the possible Panel types. It is possible to create your own Panel type by creating a subclass of PanelLayout, though this is not common and not recommended for beginners.

                          diff --git a/api/symbols/PanelLayoutFlow.html b/api/symbols/PanelLayoutFlow.html index 2dfb386d7..6f8d685d0 100644 --- a/api/symbols/PanelLayoutFlow.html +++ b/api/symbols/PanelLayoutFlow.html @@ -1,4 +1,4 @@ -PanelLayoutFlow | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanelLayoutFlow Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +PanelLayoutFlow | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanelLayoutFlow Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom PanelLayout that arranges panel elements in rows or columns. A typical use might be:

                          diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html
                          index fffe78c6b..48fe38e4b 100644
                          --- a/api/symbols/PanningTool.html
                          +++ b/api/symbols/PanningTool.html
                          @@ -1,4 +1,4 @@
                          -PanningTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanningTool

                          Hierarchy

                          +PanningTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PanningTool

                          Hierarchy

                          The PanningTool supports manual panning, where the user can shift the Diagram.position by dragging the mouse.

                          This tool is a standard mouse-move tool, the ToolManager.panningTool. diff --git a/api/symbols/ParallelLayout.html b/api/symbols/ParallelLayout.html index fae195bc4..4a2d93183 100644 --- a/api/symbols/ParallelLayout.html +++ b/api/symbols/ParallelLayout.html @@ -1,4 +1,4 @@ -ParallelLayout | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ParallelLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +ParallelLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ParallelLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom TreeLayout that can be used for laying out stylized flowcharts. Each layout requires a single "Split" node and a single "Merge" node. The "Split" node should be the root of a tree-like structure if one excludes links to the "Merge" node. diff --git a/api/symbols/ParallelRouteLink.html b/api/symbols/ParallelRouteLink.html index 678410099..379acaf54 100644 --- a/api/symbols/ParallelRouteLink.html +++ b/api/symbols/ParallelRouteLink.html @@ -1,4 +1,4 @@ -ParallelRouteLink | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ParallelRouteLink Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +ParallelRouteLink | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ParallelRouteLink Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          This custom Link class customizes its route to go parallel to other links connecting the same ports, if the link is not orthogonal and is not Bezier curved.

                          If you want to experiment with this extension, try the Parallel Route Links sample.

                          diff --git a/api/symbols/Part.html b/api/symbols/Part.html index 426140b59..45103d473 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -1,4 +1,4 @@ -Part | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Part

                          Hierarchy

                          +Part | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Part

                          Hierarchy

                          This is the base class for all user-manipulated top-level objects. Because it inherits from Panel, it is automatically a visual container of other GraphObjects. diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index 1594bc86b..20957ffff 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -1,4 +1,4 @@ -PathFigure | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PathFigure

                          Hierarchy

                          • PathFigure
                          +PathFigure | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PathFigure

                          Hierarchy

                          • PathFigure

                          A PathFigure represents a section of a Geometry. It is a single connected series of two-dimensional geometric PathSegments.

                          diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index a8237a61a..ea8f6abde 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -1,4 +1,4 @@ -PathSegment | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PathSegment

                          Hierarchy

                          • PathSegment
                          +PathSegment | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PathSegment

                          Hierarchy

                          • PathSegment

                          A PathSegment represents a straight line or curved segment of a path between two or more points that are part of a PathFigure. The very first point is given by the PathFigure.startX and PathFigure.startY properties. diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index d00a99314..b626704c6 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -1,4 +1,4 @@ -Picture | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Picture

                          Hierarchy

                          +Picture | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Picture

                          Hierarchy

                          A Picture is a GraphObject that shows an image, video-frame, or Canvas element.

                          You can specify what to show by either setting the source URL property to a URL string or the element property to an HTMLImageElement, diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index 5f6ebca3e..9ef233727 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -1,4 +1,4 @@ -Placeholder | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Placeholder

                          Hierarchy

                          +Placeholder | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Placeholder

                          Hierarchy

                          If a Placeholder is in the visual tree of a Group, it represents the area of all of the member Parts of that Group. If a Placeholder is in the visual tree of an Adornment, it represents the area of the Adornment.adornedObject. Unlike other GraphObjects, the Placeholder measures itself based on these criteria, and not on its own desiredSize or scale. diff --git a/api/symbols/Point.html b/api/symbols/Point.html index 2943e7cfb..1e2d21001 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -1,4 +1,4 @@ -Point | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Point

                          Hierarchy

                          • Point
                          +Point | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Point

                          Hierarchy

                          • Point

                          A Point represents an x- and y-coordinate pair in two-dimensional space.

                          Use the static functions Point.parse and Point.stringify to convert to and from a standard string representation that is independent of the current locale.

                          diff --git a/api/symbols/PolygonDrawingTool.html b/api/symbols/PolygonDrawingTool.html index ffab887b7..444f6fc4e 100644 --- a/api/symbols/PolygonDrawingTool.html +++ b/api/symbols/PolygonDrawingTool.html @@ -1,4 +1,4 @@ -PolygonDrawingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PolygonDrawingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • PolygonDrawingTool
                          +PolygonDrawingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PolygonDrawingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • PolygonDrawingTool

                          The PolygonDrawingTool class lets the user draw a new polygon or polyline shape by clicking where the corners should go. Right click or type ENTER to finish the operation.

                          Set isPolygon to false if you want this tool to draw open unfilled polyline shapes. diff --git a/api/symbols/PolylineLinkingTool.html b/api/symbols/PolylineLinkingTool.html index 5340dc450..74fe58bab 100644 --- a/api/symbols/PolylineLinkingTool.html +++ b/api/symbols/PolylineLinkingTool.html @@ -1,4 +1,4 @@ -PolylineLinkingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PolylineLinkingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +PolylineLinkingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PolylineLinkingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          The PolylineLinkingTool class the user to draw a new Link by clicking where the route should go, until clicking on a valid target port.

                          This tool supports routing both orthogonal and straight links. diff --git a/api/symbols/PortShiftingTool.html b/api/symbols/PortShiftingTool.html index 515341085..67e80f7e0 100644 --- a/api/symbols/PortShiftingTool.html +++ b/api/symbols/PortShiftingTool.html @@ -1,4 +1,4 @@ -PortShiftingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PortShiftingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • PortShiftingTool
                          +PortShiftingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class PortShiftingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Tool
                            • PortShiftingTool

                          The PortShiftingTool class lets a user move a port on a Node.

                          This tool only works when the Node has a port (any GraphObject) marked with a non-null and non-empty portId that is positioned in a Spot Panel, diff --git a/api/symbols/Quadtree.html b/api/symbols/Quadtree.html index e228abfb0..ea6fe558d 100644 --- a/api/symbols/Quadtree.html +++ b/api/symbols/Quadtree.html @@ -1,4 +1,4 @@ -Quadtree | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Quadtree<T> Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Quadtree
                          +Quadtree | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Quadtree<T> Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          • Quadtree

                          Implementation of the quadtree data structure using the Rect class. Each Quadtree has defined bounds found at bounds, an array of member rectangles, and an array of child nodes diff --git a/api/symbols/RadialLayout.html b/api/symbols/RadialLayout.html index 46746a843..e7f154717 100644 --- a/api/symbols/RadialLayout.html +++ b/api/symbols/RadialLayout.html @@ -1,4 +1,4 @@ -RadialLayout | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RadialLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +RadialLayout | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RadialLayout Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          Given a root Node, this arranges connected nodes in concentric rings, layered by the minimum link distance from the root.

                          If you want to experiment with this extension, try the Radial Layout sample.

                          diff --git a/api/symbols/RealtimeDragSelectingTool.html b/api/symbols/RealtimeDragSelectingTool.html index 2dc4d7449..25bd57d0a 100644 --- a/api/symbols/RealtimeDragSelectingTool.html +++ b/api/symbols/RealtimeDragSelectingTool.html @@ -1,4 +1,4 @@ -RealtimeDragSelectingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RealtimeDragSelectingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +RealtimeDragSelectingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RealtimeDragSelectingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          The RealtimeDragSelectingTool class lets the user select and deselect Parts within the DragSelectingTool.box during a drag, not just at the end of the drag.

                          If you want to experiment with this extension, try the Realtime Drag Selecting sample.

                          diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index 4291e1b4b..955874853 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -1,4 +1,4 @@ -Rect | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Rect

                          Hierarchy

                          • Rect
                          +Rect | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class Rect

                          Hierarchy

                          • Rect

                          A Rect describes a rectangular two-dimensional area as a top-left point (x and y values) and a size (width and height values).

                          Use the static functions Rect.parse and Rect.stringify to convert to and from diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index b7efab5fe..7495633b8 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -1,4 +1,4 @@ -RelinkingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RelinkingTool

                          Hierarchy

                          +RelinkingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RelinkingTool

                          Hierarchy

                          The RelinkingTool allows the user to reconnect an existing Link if the Link.relinkableTo and/or Link.relinkableFrom properties are true.

                          diff --git a/api/symbols/RescalingTool.html b/api/symbols/RescalingTool.html index c03e3f66a..165d9ab07 100644 --- a/api/symbols/RescalingTool.html +++ b/api/symbols/RescalingTool.html @@ -1,4 +1,4 @@ -RescalingTool | GoJS API

                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RescalingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +RescalingTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class RescalingTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          A custom tool for rescaling an object.

                          Install the RescalingTool as a mouse-down tool by calling: myDiagram.toolManager.mouseDownTools.add(new RescalingTool());

                          diff --git a/api/symbols/ResizeMultipleTool.html b/api/symbols/ResizeMultipleTool.html index 312b8e178..999791133 100644 --- a/api/symbols/ResizeMultipleTool.html +++ b/api/symbols/ResizeMultipleTool.html @@ -1,4 +1,4 @@ -ResizeMultipleTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ResizeMultipleTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          +ResizeMultipleTool | GoJS API
                          Options
                          All
                          • Public
                          • Public/Protected
                          • All
                          Menu

                          Class ResizeMultipleTool Extension

                          This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                          Hierarchy

                          The ResizeMultipleTool class lets the user resize multiple objects at once.

                          If you want to experiment with this extension, try the Resize Multiple sample.

                          Index

                          Constructors

                          Methods

                          Inherited Members

                          Constructors

                          • diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index 05471eb7e..aecfc4dab 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -1,4 +1,4 @@ -ResizingTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class ResizingTool

                            Hierarchy

                            +ResizingTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class ResizingTool

                            Hierarchy

                            The ResizingTool is used to interactively change the size of a GraphObject in the selected Part or Node by setting its GraphObject.desiredSize property. You may want to save the size to the model by using a TwoWay Binding on the "desiredSize" property diff --git a/api/symbols/Robot.html b/api/symbols/Robot.html index 26b90655b..9badc4013 100644 --- a/api/symbols/Robot.html +++ b/api/symbols/Robot.html @@ -1,4 +1,4 @@ -Robot | GoJS API

                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class Robot Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            • Robot
                            +Robot | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class Robot Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            • Robot

                            A class for simulating mouse and keyboard input.

                            As a special feature, this supports limited simulation of drag-and-drop between Diagrams, by setting both the sourceDiagram and targetDiagram properties diff --git a/api/symbols/RotateMultipleTool.html b/api/symbols/RotateMultipleTool.html index c4431b973..d54e48ed8 100644 --- a/api/symbols/RotateMultipleTool.html +++ b/api/symbols/RotateMultipleTool.html @@ -1,4 +1,4 @@ -RotateMultipleTool | GoJS API

                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RotateMultipleTool Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            +RotateMultipleTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RotateMultipleTool Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            The RotateMultipleTool class lets the user rotate multiple objects at a time. When more than one part is selected, rotates all parts, revolving them about their collective center. If the control key is held down during rotation, rotates all parts individually.

                            diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 929e7fe19..59c62bf3f 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -1,4 +1,4 @@ -RotatingTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RotatingTool

                            Hierarchy

                            +RotatingTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RotatingTool

                            Hierarchy

                            The RotatingTool is used to interactively change the GraphObject.angle of a GraphObject by setting its GraphObject.angle property. You may want to save the angle to the model by using a TwoWay Binding on the "angle" property diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index 262e51616..aa2c2b5d4 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -1,4 +1,4 @@ -RowColumnDefinition | GoJS API

                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RowColumnDefinition

                            Hierarchy

                            • RowColumnDefinition
                            +RowColumnDefinition | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RowColumnDefinition

                            Hierarchy

                            • RowColumnDefinition

                            The RowColumnDefinition class describes constraints on a row or a column in a Panel of type Panel.Table. It also provides information about the actual layout after the diff --git a/api/symbols/RowResizingTool.html b/api/symbols/RowResizingTool.html index c6bbd75c3..b2fd515b3 100644 --- a/api/symbols/RowResizingTool.html +++ b/api/symbols/RowResizingTool.html @@ -1,4 +1,4 @@ -RowResizingTool | GoJS API

                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RowResizingTool Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            +RowResizingTool | GoJS API
                            Options
                            All
                            • Public
                            • Public/Protected
                            • All
                            Menu

                            Class RowResizingTool Extension

                            This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                            Hierarchy

                            The RowResizingTool class lets the user resize each row of a named Table Panel in a selected Part.

                            If you want to experiment with this extension, try the Column Resizing sample.

                            Index

                            Inherited Members

                            Constructors

                            • diff --git a/api/symbols/SectorReshapingTool.html b/api/symbols/SectorReshapingTool.html index 7615ec210..8d0c8d4d0 100644 --- a/api/symbols/SectorReshapingTool.html +++ b/api/symbols/SectorReshapingTool.html @@ -1,4 +1,4 @@ -SectorReshapingTool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SectorReshapingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              • Tool
                                • SectorReshapingTool
                              +SectorReshapingTool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SectorReshapingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              • Tool
                                • SectorReshapingTool

                              The SectorReshapingTool class lets the user interactively modify the angles of a "pie"-shaped sector of a circle. When a node is selected, this shows two handles for changing the angles of the sides of the sector and one handle for changing the radius.

                              This depends on there being three data properties, "angle", "sweep", and "radius", diff --git a/api/symbols/SerpentineLayout.html b/api/symbols/SerpentineLayout.html index dcd939a51..8efa0bbdc 100644 --- a/api/symbols/SerpentineLayout.html +++ b/api/symbols/SerpentineLayout.html @@ -1,4 +1,4 @@ -SerpentineLayout | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SerpentineLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +SerpentineLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SerpentineLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              A custom Layout that lays out a chain of nodes in a snake-like fashion.

                              This layout assumes the graph is a chain of Nodes, positioning nodes in horizontal rows back and forth, alternating between left-to-right diff --git a/api/symbols/Set.html b/api/symbols/Set.html index 879d2223f..3487d90c8 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -1,4 +1,4 @@ -Set | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Set<T>

                              Hierarchy

                              • Set
                              +Set | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Set<T>

                              Hierarchy

                              • Set

                              NOTE: For 2.0 the constructor argument has changed. Set now optionally accepts a collection, and only checks types in TypeScript.

                              An unordered iterable collection that cannot contain two instances of the same value. diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 58fb2b895..4ea017542 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -1,4 +1,4 @@ -Shape | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Shape

                              Hierarchy

                              +Shape | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Shape

                              Hierarchy

                              A Shape is a GraphObject that shows a geometric figure. The Geometry determines what is drawn; the properties fill and stroke diff --git a/api/symbols/Size.html b/api/symbols/Size.html index 47c851b13..aeb5c7f65 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -1,4 +1,4 @@ -Size | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Size

                              Hierarchy

                              • Size
                              +Size | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Size

                              Hierarchy

                              • Size

                              A Size describes a width and a height in two-dimensional coordinates. The width and height must both be non-negative.

                              Use the static functions Size.parse and Size.stringify to convert to and from diff --git a/api/symbols/SnapLinkReshapingTool.html b/api/symbols/SnapLinkReshapingTool.html index f29d68f42..4b4c197fd 100644 --- a/api/symbols/SnapLinkReshapingTool.html +++ b/api/symbols/SnapLinkReshapingTool.html @@ -1,4 +1,4 @@ -SnapLinkReshapingTool | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SnapLinkReshapingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +SnapLinkReshapingTool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SnapLinkReshapingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              The SnapLinkReshapingTool class lets the user snap link reshaping handles to the nearest grid point. If avoidsNodes is true and the link is orthogonal, it also avoids reshaping the link so that any adjacent segments cross over any avoidable nodes.

                              diff --git a/api/symbols/SpiralLayout.html b/api/symbols/SpiralLayout.html index 4ba53ec46..66cb61b75 100644 --- a/api/symbols/SpiralLayout.html +++ b/api/symbols/SpiralLayout.html @@ -1,4 +1,4 @@ -SpiralLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SpiralLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +SpiralLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SpiralLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              A custom Layout that lays out a chain of nodes in a spiral.

                              This layout assumes the graph is a chain of Nodes, spacing controls the spacing between nodes.

                              diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 048aa8c3f..220b46b3e 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -1,4 +1,4 @@ -Spot | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Spot

                              Hierarchy

                              • Spot
                              +Spot | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Spot

                              Hierarchy

                              • Spot

                              A Spot represents a relative point from (0,0) to (1,1) within the bounds of a rectangular area plus an absolute offset.

                              Use the static functions Spot.parse and Spot.stringify to convert to and from diff --git a/api/symbols/SpotRotatingTool.html b/api/symbols/SpotRotatingTool.html index 2ecbe81c2..6561f4ae0 100644 --- a/api/symbols/SpotRotatingTool.html +++ b/api/symbols/SpotRotatingTool.html @@ -1,4 +1,4 @@ -SpotRotatingTool | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SpotRotatingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +SpotRotatingTool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SpotRotatingTool Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              A custom RotatingTool that also supports the user moving the point about which the object is rotated.

                              Typical usage:

                              diff --git a/api/symbols/SwimLaneLayout.html b/api/symbols/SwimLaneLayout.html
                              index 4129dba97..3de18648d 100644
                              --- a/api/symbols/SwimLaneLayout.html
                              +++ b/api/symbols/SwimLaneLayout.html
                              @@ -1,4 +1,4 @@
                              -SwimLaneLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SwimLaneLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +SwimLaneLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class SwimLaneLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              A custom LayeredDigraphLayout that knows about "lanes" and that positions each node in its respective lane.

                              This assumes that each Node.data.lane property is a string that names the lane the node should be in. diff --git a/api/symbols/TableLayout.html b/api/symbols/TableLayout.html index 954414ac6..cadb47e87 100644 --- a/api/symbols/TableLayout.html +++ b/api/symbols/TableLayout.html @@ -1,4 +1,4 @@ -TableLayout | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TableLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              +TableLayout | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TableLayout Extension

                              This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                              Hierarchy

                              This Layout positions non-Link Parts into a table according to the values of GraphObject.row, GraphObject.column, GraphObject.rowSpan, GraphObject.columnSpan, GraphObject.alignment, GraphObject.stretch. diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index e685fd260..5a365bbc8 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -1,4 +1,4 @@ -TextBlock | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TextBlock

                              Hierarchy

                              +TextBlock | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TextBlock

                              Hierarchy

                              A TextBlock is a GraphObject that displays a text string in a given font.

                              The size and appearance of the text is specified by font, which takes a well-formed CSS string as its value. diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index 50a3cd365..52e1949ac 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -1,4 +1,4 @@ -TextEditingTool | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TextEditingTool

                              Hierarchy

                              +TextEditingTool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TextEditingTool

                              Hierarchy

                              The TextEditingTool is used to let the user interactively edit text in place. This sets the TextBlock.text property; you may want to save the changed text to the model by using a TwoWay Binding on the "text" property of editable TextBlocks.

                              diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index 173539aa0..f63644b1e 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -1,4 +1,4 @@ -Tool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Tool Abstract

                              Hierarchy

                              +Tool | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Tool Abstract

                              Hierarchy

                              Tools handle mouse, keyboard, and touch events. The currently running tool, Diagram.currentTool, receives all input events from the Diagram via canonicalized InputEvents.

                              diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index 0e75d4146..c1b0acf64 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -1,4 +1,4 @@ -ToolManager | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class ToolManager

                              Hierarchy

                              +ToolManager | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class ToolManager

                              Hierarchy

                              This special Tool is responsible for managing all of the Diagram's mode-less tools, which you can access as the Diagram.toolManager.

                              Mode-less tools are tools that are present in one of the following lists: diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index b83539779..77c62ff0a 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -1,4 +1,4 @@ -Transaction | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Transaction

                              Hierarchy

                              • Transaction
                              +Transaction | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class Transaction

                              Hierarchy

                              • Transaction

                              A Transaction holds a list of ChangedEvents collected during a transaction, as the value of the read-only changes property.

                              Start a transaction by calling UndoManager.startTransaction diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index 3c96ac6fc..902a01de5 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -1,4 +1,4 @@ -TreeEdge | GoJS API

                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TreeEdge

                              Hierarchy

                              +TreeEdge | GoJS API
                              Options
                              All
                              • Public
                              • Public/Protected
                              • All
                              Menu

                              Class TreeEdge

                              Hierarchy

                              This holds TreeLayout-specific information about Links.

                              This class inherits from LayoutEdge.

                              Index

                              Inherited Members

                              Constructors

                              • diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index 463b234e3..2667736de 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -1,4 +1,4 @@ -TreeLayout | GoJS API
                                Options
                                All
                                • Public
                                • Public/Protected
                                • All
                                Menu

                                Class TreeLayout

                                Hierarchy

                                +TreeLayout | GoJS API
                                Options
                                All
                                • Public
                                • Public/Protected
                                • All
                                Menu

                                Class TreeLayout

                                Hierarchy

                                This layout positions nodes of a tree-structured graph in layers (rows or columns).

                                For a discussion and examples of the most commonly used properties, see Trees page in the Introduction. diff --git a/api/symbols/TreeMapLayout.html b/api/symbols/TreeMapLayout.html index 5a6ccd9d2..67cfcbd2b 100644 --- a/api/symbols/TreeMapLayout.html +++ b/api/symbols/TreeMapLayout.html @@ -1,4 +1,4 @@ -TreeMapLayout | GoJS API

                                Options
                                All
                                • Public
                                • Public/Protected
                                • All
                                Menu

                                Class TreeMapLayout Extension

                                This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                                Hierarchy

                                +TreeMapLayout | GoJS API
                                Options
                                All
                                • Public
                                • Public/Protected
                                • All
                                Menu

                                Class TreeMapLayout Extension

                                This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                                Hierarchy

                                A custom Layout that lays out hierarchical data using nested rectangles.

                                If you want to experiment with this extension, try the Tree Map Layout sample.

                                Index

                                Inherited Members

                                Constructors

                                • diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index 451c534a3..ce57f6c08 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -1,4 +1,4 @@ -TreeModel | GoJS API
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeModel

                                  Hierarchy

                                  +TreeModel | GoJS API
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeModel

                                  Hierarchy

                                  TreeModels support tree-structured graphs of nodes and links. Each node can have at most one "tree parent"; cycles are not permitted. The reference to the parent node's key is a property of the child node data.

                                  diff --git a/api/symbols/TreeNetwork.html b/api/symbols/TreeNetwork.html index 59343c31a..10d64a01b 100644 --- a/api/symbols/TreeNetwork.html +++ b/api/symbols/TreeNetwork.html @@ -1,4 +1,4 @@ -TreeNetwork | GoJS API
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeNetwork

                                  Hierarchy

                                  +TreeNetwork | GoJS API
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeNetwork

                                  Hierarchy

                                  This class represents an abstract graph of TreeVertexes and TreeEdges that can be constructed based on the Nodes and Links of a Diagram so that the TreeLayout can operate independently of the diagram until it diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index cee5dcb76..f3dd08767 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -1,4 +1,4 @@ -TreeVertex | GoJS API

                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeVertex

                                  Hierarchy

                                  +TreeVertex | GoJS API
                                  Options
                                  All
                                  • Public
                                  • Public/Protected
                                  • All
                                  Menu

                                  Class TreeVertex

                                  Hierarchy

                                  This holds TreeLayout-specific information about Nodes.

                                  This class inherits from LayoutVertex.

                                  Index

                                  Inherited Members

                                  Constructors

                                  • diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index 8ded45792..ccd127a52 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -1,4 +1,4 @@ -UndoManager | GoJS API
                                    Options
                                    All
                                    • Public
                                    • Public/Protected
                                    • All
                                    Menu

                                    Class UndoManager

                                    Hierarchy

                                    • UndoManager
                                    +UndoManager | GoJS API
                                    Options
                                    All
                                    • Public
                                    • Public/Protected
                                    • All
                                    Menu

                                    Class UndoManager

                                    Hierarchy

                                    • UndoManager

                                    An UndoManager observes and records model and diagram changes in transactions and supports undo/redo operations. You will need to set the isEnabled property to true in order for diff --git a/api/symbols/ZoomSlider.html b/api/symbols/ZoomSlider.html index ae0cff3f7..6d2ac517a 100644 --- a/api/symbols/ZoomSlider.html +++ b/api/symbols/ZoomSlider.html @@ -1,4 +1,4 @@ -ZoomSlider | GoJS API

                                    Options
                                    All
                                    • Public
                                    • Public/Protected
                                    • All
                                    Menu

                                    Class ZoomSlider Extension

                                    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                                    Hierarchy

                                    • ZoomSlider
                                    +ZoomSlider | GoJS API
                                    Options
                                    All
                                    • Public
                                    • Public/Protected
                                    • All
                                    Menu

                                    Class ZoomSlider Extension

                                    This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the extensions (for loading via script tags),extensionsTS (UMD modules), or extensionsJSM (ES6 modules) folders. See the Extensions intro page for more information.

                                    Hierarchy

                                    • ZoomSlider

                                    This class implements a zoom slider for GoJS diagrams. The constructor takes two arguments:

                                      diff --git a/assets/css/style.css b/assets/css/style.css index 874976ec9..7df8f8053 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1 +1 @@ -/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}body{font-size:.875rem;letter-spacing:0;line-height:1.25rem;line-height:1.5}img{aspect-ratio:attr(width) /attr(height)}.box{margin:1rem;padding:1rem}.bg-danger{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.diagramStyling{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}h1{font-size:2.25rem;line-height:2.5rem;line-height:1}h1,h2{font-weight:700;margin-bottom:.75rem;margin-top:.75rem}h2{font-size:1.875rem;line-height:2.25rem;line-height:1}h3{font-size:1.5rem;line-height:2rem;line-height:1}h3,h4{font-weight:600;margin-bottom:.75rem;margin-top:.75rem}h4{font-size:1.25rem;line-height:1.75rem;line-height:1}a{color:rgb(3 102 214/var(--tw-text-opacity));text-decoration-line:none;transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}a,a:hover{--tw-text-opacity:1}a:hover{box-shadow:inset 0 -1px 0 0 #fff,inset 0 -2px 0 0 rgba(31,73,99,.45);color:rgb(31 73 99/var(--tw-text-opacity))}.\!button a,.button a,.sidebar-nav a,.topnav-link a{--tw-text-opacity:1;color:rgb(98 127 145/var(--tw-text-opacity))}.button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit}.\!button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit!important}footer a{box-shadow:inset 0 -1px 0 0 hsla(0,0%,100%,.35),inset 0 -2px 0 0 rgba(31,73,99,.45)}footer a,footer a:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}ol,p,ul{padding-bottom:.75rem}ol,ul{list-style-position:inside;list-style-type:disc;padding-left:1rem;padding-right:1rem}input,textarea{padding:.5rem}input,select,textarea{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity));border-radius:.125rem;border-width:1px}pre{background:#272822;border-radius:.3em;color:#fff;margin:.5em 0;overflow:auto;padding:1em}code[class*=lang],pre[class*=lang],pre[class*=lang] code{background:#272822;color:#d4d4d4;direction:ltr;font-family:Menlo,Monaco,Consolas,Andale Mono,Ubuntu Mono,Courier New,monospace;font-size:13px;-webkit-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;text-shadow:none;white-space:pre;word-break:normal;word-spacing:normal}code{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity));border-radius:.125rem}canvas:focus{outline:2px solid transparent;outline-offset:2px}.\!button,.button,[type=button],button{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);background-color:rgb(31 73 99/var(--tw-bg-opacity));border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity));display:inline-block;margin:.25rem;padding:.25rem .5rem}.\!button:hover,.button:hover,button:hover{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);background-color:rgb(98 127 145/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity));transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bigger{font-weight:700;margin-bottom:.5rem;margin-top:.5rem;padding:1rem}.sidebar-nav>a{border-radius:.5rem;display:block;font-weight:600;padding:.25rem 1rem}.sidebar-nav>a:hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(31 73 99/var(--tw-bg-opacity));color:rgb(243 244 246/var(--tw-text-opacity))}.topnav-link{--tw-text-opacity:1;border-radius:.5rem;color:rgb(255 255 255/var(--tw-text-opacity));padding:.5rem}.topnav-link:hover{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;background-color:rgb(98 127 145/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity))}.feature-grid div{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity));border-top-width:1px;margin-top:2rem;padding-top:2rem}.feature-grid:nth-child(n)>:first-child,.feature-grid:nth-child(n)>:nth-child(2){border-top-width:0;margin-top:0;padding-top:0}@media (min-width:1024px){.feature-grid:nth-child(n)>:nth-child(3){border-top-width:0;margin-top:0;padding-top:0}}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{bottom:0;left:0;right:0;top:0}.top-0{top:0}.z-30{z-index:30}.z-20{z-index:20}.z-50{z-index:50}.row-span-2{grid-row:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-4{margin-bottom:1rem;margin-top:1rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.mt-0{margin-top:0}.mb-8{margin-bottom:2rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mt-6{margin-top:1.5rem}.mt-4{margin-top:1rem}.mt-1{margin-top:.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-6{height:1.5rem}.h-full{height:100%}.h-1{height:.25rem}.min-h-screen{min-height:100vh}.w-full{width:100%}.w-6{width:1.5rem}.w-auto{width:auto}.w-4\/5{width:80%}.w-14{width:3.5rem}.w-16{width:4rem}.w-5\/6{width:83.333333%}.w-64{width:16rem}.max-w-screen-lg{max-width:1024px}.max-w-5xl{max-width:64rem}.max-w-screen-xl{max-width:1280px}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.rotate-1{--tw-rotate:1deg}.rotate-1,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-y-10{row-gap:2.5rem}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded-xl{border-radius:.75rem}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.bg-nwoods-primary{--tw-bg-opacity:1;background-color:rgb(31 73 99/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-nwoods-secondary{--tw-bg-opacity:1;background-color:rgb(98 127 145/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-0{padding:0}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-2{padding:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-bottom:0;padding-top:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-8{padding-left:2rem;padding-right:2rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pb-0{padding-bottom:0}.pt-4{padding-top:1rem}.pb-16{padding-bottom:4rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pt-6{padding-top:1.5rem}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.text-xs{font-size:.75rem;line-height:1rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-5xl{font-size:3rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.leading-normal{line-height:1.5}.tracking-wide{letter-spacing:.025em}.tracking-normal{letter-spacing:0}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-nwoods-secondary{--tw-text-opacity:1;color:rgb(98 127 145/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.opacity-50{opacity:.5}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-nwoods-secondary:hover{--tw-bg-opacity:1;background-color:rgb(98 127 145/var(--tw-bg-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:drop-shadow-md:hover{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group:hover .group-hover\:opacity-75{opacity:.75}@media (min-width:640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:w-1\/2{width:50%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:p-0{padding:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\:mb-6{margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}.md\:w-full{width:100%}.md\:w-48{width:12rem}.md\:w-40{width:10rem}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.md\:overflow-y-auto{overflow-y:auto}.md\:p-8{padding:2rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-0{padding-left:0;padding-right:0}.md\:pl-4{padding-left:1rem}.md\:pb-0{padding-bottom:0}.md\:text-left{text-align:left}}@media (min-width:1024px){.lg\:mr-0{margin-right:0}.lg\:ml-4{margin-left:1rem}.lg\:h-80{height:20rem}.lg\:h-full{height:100%}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:1280px){.xl\:max-w-screen-xl{max-width:1280px}.xl\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}} \ No newline at end of file +/*! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}body{font-size:.875rem;letter-spacing:0;line-height:1.25rem;line-height:1.5}img{aspect-ratio:attr(width) /attr(height)}.box{margin:1rem;padding:1rem}.bg-danger{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-info{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.diagramStyling{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}h1{font-size:2.25rem;line-height:2.5rem;line-height:1}h1,h2{font-weight:700;margin-bottom:.75rem;margin-top:.75rem}h2{font-size:1.875rem;line-height:2.25rem;line-height:1}h3{font-size:1.5rem;line-height:2rem;line-height:1}h3,h4{font-weight:600;margin-bottom:.75rem;margin-top:.75rem}h4{font-size:1.25rem;line-height:1.75rem;line-height:1}a{color:rgb(3 102 214/var(--tw-text-opacity));text-decoration-line:none;transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}a,a:hover{--tw-text-opacity:1}a:hover{box-shadow:inset 0 -1px 0 0 #fff,inset 0 -2px 0 0 rgba(31,73,99,.45);color:rgb(31 73 99/var(--tw-text-opacity))}.\!button a,.button a,.sidebar-nav a,.topnav-link a{--tw-text-opacity:1;color:rgb(98 127 145/var(--tw-text-opacity))}.button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit}.\!button a:hover,.sidebar-nav a:hover,.topnav-link a:hover{box-shadow:inherit!important}footer a{box-shadow:inset 0 -1px 0 0 hsla(0,0%,100%,.35),inset 0 -2px 0 0 rgba(31,73,99,.45)}footer a,footer a:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}ol,p,ul{padding-bottom:.75rem}ol,ul{list-style-position:inside;list-style-type:disc;padding-left:1rem;padding-right:1rem}input,textarea{padding:.5rem}input,select,textarea{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity));border-radius:.125rem;border-width:1px}pre{background:#272822;border-radius:.3em;color:#fff;margin:.5em 0;overflow:auto;padding:1em}code[class*=lang],pre[class*=lang],pre[class*=lang] code{background:#272822;color:#d4d4d4;direction:ltr;font-family:Menlo,Monaco,Consolas,Andale Mono,Ubuntu Mono,Courier New,monospace;font-size:13px;-webkit-hyphens:none;hyphens:none;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;text-align:left;text-shadow:none;white-space:pre;word-break:normal;word-spacing:normal}code{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity));border-radius:.125rem}canvas:focus{outline:2px solid transparent;outline-offset:2px}.\!button,.button,[type=button],button{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);background-color:rgb(31 73 99/var(--tw-bg-opacity));border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity));display:inline-block;margin:.25rem;padding:.25rem .5rem}.\!button:hover,.button:hover,button:hover{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);background-color:rgb(98 127 145/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity));transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bigger{font-weight:700;margin-bottom:.5rem;margin-top:.5rem;padding:1rem}.sidebar-nav>a{border-radius:.5rem;display:block;font-weight:600;padding:.25rem 1rem}.sidebar-nav>a:hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(31 73 99/var(--tw-bg-opacity));color:rgb(243 244 246/var(--tw-text-opacity))}.topnav-link{--tw-text-opacity:1;border-radius:.5rem;color:rgb(255 255 255/var(--tw-text-opacity));padding:.5rem}.topnav-link:hover{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;background-color:rgb(98 127 145/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(255 255 255/var(--tw-text-opacity))}.feature-grid div{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity));border-top-width:1px;margin-top:2rem;padding-top:2rem}.feature-grid:nth-child(n)>:first-child,.feature-grid:nth-child(n)>:nth-child(2){border-top-width:0;margin-top:0;padding-top:0}@media (min-width:1024px){.feature-grid:nth-child(n)>:nth-child(3){border-top-width:0;margin-top:0;padding-top:0}}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{bottom:0;left:0;right:0;top:0}.top-0{top:0}.z-30{z-index:30}.z-20{z-index:20}.z-50{z-index:50}.row-span-2{grid-row:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-4{margin-bottom:1rem;margin-top:1rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.mt-0{margin-top:0}.mb-8{margin-bottom:2rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mt-6{margin-top:1.5rem}.mt-4{margin-top:1rem}.mt-1{margin-top:.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-6{height:1.5rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.w-6{width:1.5rem}.w-auto{width:auto}.w-4\/5{width:80%}.w-14{width:3.5rem}.w-16{width:4rem}.w-5\/6{width:83.333333%}.w-64{width:16rem}.max-w-screen-lg{max-width:1024px}.max-w-5xl{max-width:64rem}.max-w-screen-xl{max-width:1280px}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-y-10{row-gap:2.5rem}.gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded-xl{border-radius:.75rem}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.bg-nwoods-primary{--tw-bg-opacity:1;background-color:rgb(31 73 99/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-nwoods-secondary{--tw-bg-opacity:1;background-color:rgb(98 127 145/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-0{padding:0}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-2{padding:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-bottom:0;padding-top:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-8{padding-left:2rem;padding-right:2rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.pb-0{padding-bottom:0}.pt-4{padding-top:1rem}.pb-16{padding-bottom:4rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-4{padding-bottom:1rem}.text-center{text-align:center}.text-xs{font-size:.75rem;line-height:1rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-5xl{font-size:3rem;line-height:1}.font-bold{font-weight:700}.font-semibold{font-weight:600}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.leading-normal{line-height:1.5}.tracking-wide{letter-spacing:.025em}.tracking-normal{letter-spacing:0}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-nwoods-secondary{--tw-text-opacity:1;color:rgb(98 127 145/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.opacity-50{opacity:.5}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-nwoods-secondary:hover{--tw-bg-opacity:1;background-color:rgb(98 127 145/var(--tw-bg-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-none:hover{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:drop-shadow-md:hover{--tw-drop-shadow:drop-shadow(0 4px 3px rgba(0,0,0,.07)) drop-shadow(0 2px 2px rgba(0,0,0,.06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.group:hover .group-hover\:opacity-75{opacity:.75}@media (min-width:640px){.sm\:block{display:block}.sm\:hidden{display:none}.sm\:w-1\/2{width:50%}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:p-0{padding:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:768px){.md\:mb-6{margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}.md\:w-full{width:100%}.md\:w-48{width:12rem}.md\:w-40{width:10rem}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.md\:overflow-y-auto{overflow-y:auto}.md\:p-8{padding:2rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-0{padding-left:0;padding-right:0}.md\:pl-4{padding-left:1rem}.md\:pb-0{padding-bottom:0}.md\:text-left{text-align:left}}@media (min-width:1024px){.lg\:mr-0{margin-right:0}.lg\:ml-4{margin-left:1rem}.lg\:h-80{height:20rem}.lg\:h-full{height:100%}.lg\:w-48{width:12rem}.lg\:w-full{width:100%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-0{padding-left:0;padding-right:0}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:1280px){.xl\:max-w-screen-xl{max-width:1280px}.xl\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}} \ No newline at end of file diff --git a/changelog.html b/changelog.html index 903473591..9f090ae67 100644 --- a/changelog.html +++ b/changelog.html @@ -129,10 +129,19 @@

                                      General New Features in GoJS 2.3


                                      +

                                      Changes for 2.3.13

                                      +
                                        +
                                      • Geometry.parse and Shape.geometryString parsing fix for 'T' commands.
                                      • +
                                      • Fixed a bug with the rendering of temporary links when Diagram.renderer is set to SVG.
                                      • +
                                      • Table panels now allow elements that stretch in one direction and span in another to stretch more appropriately. +
                                      • +
                                      +

                                      Changes for 2.3.12

                                      Changes for 2.3.11

                                      diff --git a/index.html b/index.html index 11024ec47..f4daa8c54 100644 --- a/index.html +++ b/index.html @@ -69,11 +69,6 @@

                                      GoJS

                                      -
                                      -

                                      January 2023: GoJS 2.3 Released – Featuring a new SVG rendering context. - See the changelog for more details.

                                      -
                                      -

                                      Build Diagrams for the Web in JavaScript and TypeScript @@ -206,14 +201,19 @@

                                      Use GoJS in any Framework

                                      - react - react - angular - vue + react + react + angular + vue
                                      -

                                      GoJS is designed to work with all modern frameworks, including Svelte, React, Angular, and Vue.

                                      +

                                      GoJS is designed to work with all modern frameworks, including Svelte, React, Angular, and Vue.

                                      We publish a React component, gojs-react to simplify React diff --git a/package.json b/package.json index 504efffd6..66b2b3165 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "2.3.12", + "version": "2.3.13", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "GoJS", "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", "typescript" ], "homepage": "https://gojs.net", diff --git a/release/go-debug-module.js b/release/go-debug-module.js index 05c71d814..de9bfc319 100644 --- a/release/go-debug-module.js +++ b/release/go-debug-module.js @@ -1,8 +1,8 @@ /* - * GoJS v2.3.12 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.3.13 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-2023 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.12/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.13/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function ba(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;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};hb.prototype.Gd=function(){return this.next()}; -hb.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};hb.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};hb.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -hb.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};hb.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; -hb.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};hb.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};hb.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; -oa.Object.defineProperties(hb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});hb.prototype.first=hb.prototype.first;hb.prototype.hasNext=hb.prototype.Gd;hb.prototype.next=hb.prototype.next;hb.prototype.reset=hb.prototype.reset;hb.className="ListIteratorBackwards"; -function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};ib.prototype.Gd=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};ib.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Gd;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; +function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",I,"elt:i");return b[a]};t.get=function(a){return this.P(a)};t.jd=function(a,b){G&&D(a,I,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",I,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.jd(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; t.qc=function(){var a=this.s,b=a.length;return 0a||a>=b.length)&&Ba(a,"0 I.prototype.copy=function(){var a=new I,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",I,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new gb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new hb(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; +oa.Object.defineProperties(I.prototype,{_dataArray:{configurable:!0,get:function(){return this.s}},count:{configurable:!0,get:function(){return this.s.length}},size:{configurable:!0,get:function(){return this.s.length}},length:{configurable:!0,get:function(){return this.s.length}},iterator:{configurable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, +enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new ib(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; I.prototype.pop=I.prototype.pop;I.prototype.last=I.prototype.qc;I.prototype.first=I.prototype.first;I.prototype.set=I.prototype.set;I.prototype.setElt=I.prototype.jd;I.prototype.get=I.prototype.get;I.prototype.elt=I.prototype.P;I.prototype.indexOf=I.prototype.indexOf;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.clear=I.prototype.clear;I.prototype.addAll=I.prototype.addAll;I.prototype.push=I.prototype.push;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.qa; I.prototype.freeze=I.prototype.freeze;I.className="List";function lb(a){this.qg=a;a.Xa=null;this.wa=a.A;this.ya=null}lb.prototype.reset=function(){var a=this.qg;a.Xa=null;this.wa=a.A;this.ya=null};lb.prototype.next=function(){var a=this.qg;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=b.value,this.key=b.key,!0;this.je();return!1};lb.prototype.Gd=function(){return this.next()}; lb.prototype.first=function(){var a=this.qg;this.wa=a.A;a=a.ja;if(null!==a){this.ya=a;var b=a.value;this.key=a.key;return this.value=b}return null};lb.prototype.any=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};lb.prototype.all=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; lb.prototype.each=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Ca;return this};lb.prototype.map=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Ca;return c.iterator};lb.prototype.filter=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Ca}return c.iterator}; lb.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.qg.Xa=this};lb.prototype.toString=function(){return null!==this.ya?"SetIterator@"+this.ya.value:"SetIterator"};oa.Object.defineProperties(lb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.qg.Zb}}});lb.prototype.first=lb.prototype.first;lb.prototype.hasNext=lb.prototype.Gd;lb.prototype.next=lb.prototype.next;lb.prototype.reset=lb.prototype.reset; lb.className="SetIterator";function J(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=J.prototype;t.Db=function(){var a=this.A;a++;999999999=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; +function mb(a){var b=a.__gohashid;void 0===b&&(b=ob++,a.__gohashid=b);return b}function jb(a){return a.__gohashid}oa.Object.defineProperties(J.prototype,{count:{configurable:!0,get:function(){return this.Zb}},size:{configurable:!0,get:function(){return this.Zb}},iterator:{configurable:!0,get:function(){if(0>=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; J.prototype.clear=J.prototype.clear;J.prototype.retainAll=J.prototype.JA;J.prototype.removeAll=J.prototype.vp;J.prototype["delete"]=J.prototype.delete;J.prototype.remove=J.prototype.remove;J.prototype.first=J.prototype.first;J.prototype.containsAny=J.prototype.kz;J.prototype.containsAll=J.prototype.jz;J.prototype.has=J.prototype.has;J.prototype.contains=J.prototype.contains;J.prototype.addAll=J.prototype.addAll;J.prototype.add=J.prototype.add;J.prototype.thaw=J.prototype.qa;J.prototype.freeze=J.prototype.freeze; -var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=ib;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; +var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=jb;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; pb.prototype.first=function(){var a=this.sa;this.wa=a.A;a=a.ja;return null!==a?(this.ya=a,this.value=this.key=a=a.key):null};pb.prototype.any=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.key))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};pb.prototype.all=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.key))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; pb.prototype.each=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.key),b.A!==c&&Da(b),d=d.Ca;return this};pb.prototype.map=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e.key)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};pb.prototype.filter=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;){var f=e.key;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Ca}return d.iterator}; pb.prototype.je=function(){this.value=this.key=null;this.wa=-1};pb.prototype.toString=function(){return null!==this.ya?"MapKeySetIterator@"+this.ya.value:"MapKeySetIterator"};oa.Object.defineProperties(pb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});pb.prototype.first=pb.prototype.first;pb.prototype.hasNext=pb.prototype.Gd;pb.prototype.next=pb.prototype.next;pb.prototype.reset=pb.prototype.reset; @@ -85,16 +85,16 @@ ub.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key) ub.prototype.any=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};ub.prototype.all=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Ca}return!0};ub.prototype.each=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Ca;return this}; ub.prototype.map=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.filter=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.sa.Xa=this};ub.prototype.toString=function(){return null!==this.ya?"MapIterator@"+this.ya:"MapIterator"}; oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Gd;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapIterator"; -function vb(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.wf=this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=vb.prototype;t.Db=function(){var a=this.A;a++;999999999=this.count)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new ub(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?eb:new pb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return eb; var a=this.wf;return null!==a?(a.reset(),a):new rb(this)}}});vb.prototype.toKeySet=vb.prototype.Xf;vb.prototype.toArray=vb.prototype.La;vb.prototype.clear=vb.prototype.clear;vb.prototype["delete"]=vb.prototype.delete;vb.prototype.remove=vb.prototype.remove;vb.prototype.get=vb.prototype.get;vb.prototype.getValue=vb.prototype.L;vb.prototype.has=vb.prototype.has;vb.prototype.contains=vb.prototype.contains;vb.prototype.first=vb.prototype.first;vb.prototype.addAll=vb.prototype.addAll; -vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var yb,zb,Ab,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; +vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var xb,yb,zb,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; K.prototype.Eg=function(a,b){G&&(B(a,"number",K,"setTo:x"),B(b,"number",K,"setTo:y"),this.na());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(x(a,K,K,"set:p"),this.na());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Db(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 K(c,e)}return new K} function Eb(a){G&&x(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ui=function(a,b){return this.J===a&&this.K===b};t.cb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(x(a,K,K,"add:p"),this.na());this.J+=a.x;this.K+=a.y;return this};t.ze=function(a){G&&(x(a,K,K,"subtract:p"),this.na());this.J-=a.x;this.K-=a.y;return this}; @@ -112,7 +112,7 @@ oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return K.prototype.projectOntoLineSegmentPoint=K.prototype.AA;K.prototype.projectOntoLineSegment=K.prototype.zA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(D(a,K,"intersectingLineSegments:a1x"),D(b,K,"intersectingLineSegments:a1y"),D(c,K,"intersectingLineSegments:a2x"),D(d,K,"intersectingLineSegments:a2y"),D(e,K,"intersectingLineSegments:b1x"),D(f,K,"intersectingLineSegments:b1y"),D(g,K,"intersectingLineSegments:b2x"),D(h,K,"intersectingLineSegments:b2y"));return L.em(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.iz;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(D(a,K,"compareWithLineSegment:a1x"),D(b,K,"compareWithLineSegment:a1y"),D(c,K,"compareWithLineSegment:a2x"),D(d,K,"compareWithLineSegment:a2y"),D(e,K,"compareWithLineSegment:b1x"),D(f,K,"compareWithLineSegment:b1y"));return L.Tl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.gb;K.prototype.normalize=K.prototype.normalize; K.prototype.distanceSquared=K.prototype.Fd;K.prototype.distanceSquaredPoint=K.prototype.Nf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.ze;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.cb;K.prototype.equalTo=K.prototype.ui;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.Eg;var Nb=[];K.className="Point";K.parse=Db;K.stringify=Eb; -K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=yb=(new K(0,0)).pa();K.InfiniteTopLeft=zb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=Ab=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; +K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=xb=(new K(0,0)).pa();K.InfiniteTopLeft=yb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=zb=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; function Gb(a,b){void 0===a?this.ea=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.ea=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Ob,Pb,Qb,Rb,Sb,Tb,Ub;Gb.prototype.assign=function(a){this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.h=function(a,b){this.ga=a;this.ea=b;return this}; Gb.prototype.Eg=function(a,b){G&&(B(a,"number",Gb,"setTo:w"),B(b,"number",Gb,"setTo:h"),0>a&&Ba(a,">= 0",Gb,"setTo:w"),0>b&&Ba(b,">= 0",Gb,"setTo:h"),this.na());this.ga=a;this.ea=b;return this};Gb.prototype.set=function(a){G&&(x(a,Gb,Gb,"set:s"),this.na());this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.copy=function(){var a=new Gb;a.ga=this.ga;a.ea=this.ea;return a};t=Gb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; @@ -136,38 +136,38 @@ function hc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1; t.Zv=function(a,b,c,d){G?(D(a,M,"union:x"),D(b,M,"union:y"),void 0===c?c=0:D(c,M,"union:w"),void 0===d?d=0:D(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.na()):(void 0===c&&(c=0),void 0===d&&(d=0));return ic(this,a,b,c,d)};function ic(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.ea,c+e);a.J=f;a.K=g;a.ga=b-f;a.ea=c-g;return a} t.Li=function(a,b,c){G&&(D(a,M,"setSpot:x"),D(b,M,"setSpot:y"),x(c,Hb,M,"setSpot:spot"),this.na());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.ea;return this}; function jc(a,b,c,d,e,f,g,h){G?(D(a,M,"contains:rx"),D(b,M,"contains:ry"),D(c,M,"contains:rw"),D(d,M,"contains:rh"),D(e,M,"contains:x"),D(f,M,"contains:y"),void 0===g?g=0:D(g,M,"contains:w"),void 0===h?h=0:D(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function mc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; -M.alloc=function(){var a=nc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=nc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){nc.push(a)}; +function lc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; +M.alloc=function(){var a=mc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=mc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){mc.push(a)}; oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"x"),this.na(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"y"),this.na(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(B(a,"number",M,"width"),this.na(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.ea}, set:function(a){G&&(B(a,"number",M,"height"),this.na(a));0>a&&Ba(a,">= 0",M,"height");this.ea=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"left"),this.na(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"top"),this.na(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(D(a,M,"right"),this.na(a));this.J+=a-(this.J+this.ga)}}, bottom:{configurable:!0,get:function(){return this.K+this.ea},set:function(a){G&&(D(a,M,"top"),this.na(a));this.K+=a-(this.K+this.ea)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(x(a,K,M,"position"),this.na(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Gb(this.ga,this.ea)},set:function(a){G&&(x(a,Gb,M,"size"),this.na(a));this.ga=a.width;this.ea=a.height}},center:{configurable:!0, enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.ea/2)},set:function(a){G&&(x(a,K,M,"center"),this.na(a));this.J=a.x-this.ga/2;this.K=a.y-this.ea/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(D(a,M,"centerX"),this.na(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.ea/2},set:function(a){G&&(D(a,M,"centerY"),this.na(a));this.K=a-this.ea/2}}});M.prototype.isEmpty=M.prototype.fA; M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersectsLineSegment:x"),D(b,M,"intersectsLineSegment:y"),D(c,M,"intersectsLineSegment:w"),D(d,M,"intersectsLineSegment:h"),D(e,M,"intersectsLineSegment:p1x"),D(f,M,"intersectsLineSegment:p1y"),D(g,M,"intersectsLineSegment:p2x"),D(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Wx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Li; M.prototype.union=M.prototype.Zv;M.prototype.unionRect=M.prototype.ld;M.prototype.unionPoint=M.prototype.lf;M.prototype.intersects=M.prototype.kv;M.prototype.intersectsRect=M.prototype.dd;M.prototype.intersect=M.prototype.jv;M.prototype.intersectRect=M.prototype.Vx;M.prototype.grow=M.prototype.aA;M.prototype.subtractMargin=M.prototype.Uv;M.prototype.addMargin=M.prototype.Oo;M.prototype.inflate=M.prototype.Hc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var oc=null,pc=null,nc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;M.ZeroRect=oc=(new M(0,0,0,0)).pa();M.NoRect=pc=(new M(NaN,NaN,NaN,NaN)).pa(); -M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; +M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var nc=null,oc=null,mc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;M.ZeroRect=nc=(new M(0,0,0,0)).pa();M.NoRect=oc=(new M(NaN,NaN,NaN,NaN)).pa(); +M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; fc.prototype.Eg=function(a,b,c,d){G&&(B(a,"number",fc,"setTo:t"),B(b,"number",fc,"setTo:r"),B(c,"number",fc,"setTo:b"),B(d,"number",fc,"setTo:l"),this.na());this.af=a;this.$e=b;this.Fe=c;this.Qe=d;return this};fc.prototype.set=function(a){G&&(x(a,fc,fc,"assign:m"),this.na());this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this};fc.prototype.copy=function(){var a=new fc;a.af=this.af;a.$e=this.$e;a.Fe=this.Fe;a.Qe=this.Qe;return a};t=fc.prototype; t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function qc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} -function rc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; -t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=sc.pop();return void 0===a?new fc:a};fc.free=function(a){sc.push(a)}; +function pc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} +function qc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; +t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=rc.pop();return void 0===a?new fc:a};fc.free=function(a){rc.push(a)}; oa.Object.defineProperties(fc.prototype,{top:{configurable:!0,get:function(){return this.af},set:function(a){G&&(D(a,fc,"top"),this.na(a));this.af=a}},right:{configurable:!0,get:function(){return this.$e},set:function(a){G&&(D(a,fc,"right"),this.na(a));this.$e=a}},bottom:{configurable:!0,get:function(){return this.Fe},set:function(a){G&&(D(a,fc,"bottom"),this.na(a));this.Fe=a}},left:{configurable:!0,get:function(){return this.Qe},set:function(a){G&& -(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var tc=null,uc=null,sc=[];fc.className="Margin";fc.parse=qc;fc.stringify=rc;fc.ZeroMargin=tc=(new fc(0,0,0,0)).pa();fc.TwoMargin=uc=(new fc(2,2,2,2)).pa();fc.parse=qc;fc.stringify=rc; -function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var zc,Ac,Bc,Cc,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,gd,hd,id,jd,kd,ld,md,nd,od,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; +(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var sc=null,tc=null,rc=[];fc.className="Margin";fc.parse=pc;fc.stringify=qc;fc.ZeroMargin=sc=(new fc(0,0,0,0)).pa();fc.TwoMargin=tc=(new fc(2,2,2,2)).pa();fc.parse=pc;fc.stringify=qc; +function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var xc,yc,zc,Ac,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,hd,id,jd,kd,ld,md,nd,od,pd,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; Hb.prototype.Eg=function(a,b,c,d){G&&(td(a,"setTo:x"),td(b,"setTo:y"),ud(c,"setTo:offx"),ud(d,"setTo:offy"),this.na());this.J=a;this.K=b;this.se=c;this.te=d;return this};Hb.prototype.set=function(a){G&&(x(a,Hb,Hb,"set:s"),this.na());this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this};Hb.prototype.copy=function(){var a=new Hb;a.J=this.J;a.K=this.K;a.se=this.se;a.te=this.te;return a};t=Hb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function vd(a,b){a.J=NaN;a.K=NaN;a.se=b;return a} function td(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Hb,b)}function ud(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Hb,b)} -function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return zc;if("TopLeft"===a)return Ac;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Bc;if("TopRight"===a)return Cc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== -a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return gd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return xc;if("TopLeft"===a)return yc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return zc;if("TopRight"===a)return Ac;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== +a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=b):f===h?(e=a):jc(a,b, (a+=360);360<=a&&(a-=360);return a},zx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?A:new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; +N.parse=function(a,b){function c(){return u>=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new K(A.x,A.y):new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Jd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A= -new K((y===y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A=new K(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Kd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Kd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)z=r=h(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "B":for(;!c();){r=parseFloat(d()); +l.splice(a,1);for(m=0;m=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Gd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A.h((y=== +y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A.h(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Hd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Hd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Id(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)r=h(),z.assign(r),H=f(),Id(a,r.x,r.y,H.x,H.y),z.assign(H);break;case "B":for(;!c();){r=parseFloat(d()); H=parseFloat(d());T=parseFloat(d());var aa=parseFloat(d()),Y=parseFloat(d()),R=Y,O=!1;c()||(R=parseFloat(d()),c()||(O=0!==parseFloat(d())));y===y.toLowerCase()&&(T+=A.x,aa+=A.y);a.arcTo(r,H,T,aa,Y,R,O)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),T=parseFloat(d()),Y=aa=!1,O=R=0,R=d(),1===R.length?(aa=!!parseFloat(R),Y=!!parseFloat(d()),R=parseFloat(d())):2===R.length?(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]),R=parseFloat(d())):(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]), -R=parseFloat(R.slice(2))),O=parseFloat(d()),y===y.toLowerCase()&&(R=A.x+R,O=A.y+O),A.h(R,O),Md(a,r,H,T,aa,Y,R,O);break;case "Z":Nd(a);A.assign(k);break;case "F":r="";for(H=1;l[u+H];)if("0"===l[u+H])p=!0,H++;else if(null!==l[u+H].match(/[Uu]/))H++;else if(null===l[u+H].match(E))H++;else{r=l[u+H];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Zd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case N.j:case N.v:case N.G:var g=this.ud;var h=this.vd;this.ud=g*a+h*c+e;this.vd=g*b+h*d+f;g=this.Jc;h=this.Kc;this.Jc=g*a+h*c+e;this.Kc=g*b+h*d+f;break;case N.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Xd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ha=function(a,b){void 0===b&&(b=0);var c=this.ud,d=this.vd,e=this.Jc,f=this.Kc;switch(this.type){case N.j:return L.dc(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ha(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return be(this,a,b,!0,!1);default:return!1}}; -function be(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return $d(this,a,b,!0,!1);default:return!1}}; +function $d(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.Nx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.fv=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -236,237 +236,237 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.Ox=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.Bh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,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.s,d=c.length,e=0;ea&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,je,"x1"),this.hi=Math.max(d,0),G&&D(e,je,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&D(d,je,"x1"),this.Ye=d,G&&D(e,je,"y1"),this.gi=e,G&&D(f,je,"x2"),a===Td&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Td&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}je.prototype.copy=function(){var a=new je;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=je.prototype; -t.cb=function(a){if(!(a instanceof je)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Qd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Rd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Sd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Td:return L.C(this.startAngle, -a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Zd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===je?this.type=a:Ea(this,a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Qd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Rd: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 Sd: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 Td: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 Zd: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)+ +t.ha=function(a,b,c){for(var d=this.startX,e=this.startY,f=d,g=e,h=this.segments.s,k=h.length,l=0;la&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,le,"x1"),this.hi=Math.max(d,0),G&&D(e,le,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&D(d,le,"x1"),this.Ye=d,G&&D(e,le,"y1"),this.gi=e,G&&D(f,le,"x2"),a===Qd&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Qd&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}le.prototype.copy=function(){var a=new le;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=le.prototype; +t.cb=function(a){if(!(a instanceof le)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Nd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Od:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Pd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Qd:return L.C(this.startAngle, +a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Xd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===le?this.type=a:Ea(this,a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Nd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Od: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 Pd: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 Qd: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 Xd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function $d(a,b){if(null!==a.ge&&!1===b._isInvalidBounds)return a.ge;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ge=[],a.ge;b=a.Ye;var e=a.gi,f=L.zx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=L.zx(0,0,b>f?b:f,m,m+g,!0);f=Ib.alloc();f.reset();f.translate(c,d);f.rotate(a.Ye,0,0);f.scale(k,q);N.Na(b,f); Ib.free(f);a.ge=b;return a.ge} -oa.Object.defineProperties(je.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.ta},set:function(a){G&&$a(a,je,je,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Ye},set:function(a){G&&D(a,je,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,je,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.$g},set:function(a){G&&D(a,je,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.hi},set:function(a){G&&D(a,je,"radiusX");0>a&&Ba(a,">= zero",je,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,je,"radiusY");0>a&&Ba(a,">= zero",je,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});je.prototype.equalsApprox=je.prototype.cb; -var Qd=new F(je,"Move",0),Cd=new F(je,"Line",1),Rd=new F(je,"Bezier",2),Sd=new F(je,"QuadraticBezier",3),Td=new F(je,"Arc",4),Zd=new F(je,"SvgArc",4);je.className="PathSegment";je.Move=Qd;je.Line=Cd;je.Bezier=Rd;je.QuadraticBezier=Sd;je.Arc=Td;je.SvgArc=Zd;function le(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} -le.prototype.copy=function(){var a=new le;return this.clone(a)};le.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; -le.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};le.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);return b}; -le.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);b.assign(c.bt(b));return b}; -oa.Object.defineProperties(le.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,le,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,le,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= +oa.Object.defineProperties(le.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.ta},set:function(a){G&&$a(a,le,le,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Ye},set:function(a){G&&D(a,le,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,le,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.$g},set:function(a){G&&D(a,le,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.hi},set:function(a){G&&D(a,le,"radiusX");0>a&&Ba(a,">= zero",le,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,le,"radiusY");0>a&&Ba(a,">= zero",le,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});le.prototype.equalsApprox=le.prototype.cb; +var Nd=new F(le,"Move",0),Cd=new F(le,"Line",1),Od=new F(le,"Bezier",2),Pd=new F(le,"QuadraticBezier",3),Qd=new F(le,"Arc",4),Xd=new F(le,"SvgArc",4);le.className="PathSegment";le.Move=Nd;le.Line=Cd;le.Bezier=Od;le.QuadraticBezier=Pd;le.Arc=Qd;le.SvgArc=Xd;function ne(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} +ne.prototype.copy=function(){var a=new ne;return this.clone(a)};ne.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; +ne.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};ne.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);return b}; +ne.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);b.assign(c.bt(b));return b}; +oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,ne,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,ne,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= a}},button:{configurable:!0,get:function(){return this.Op},set:function(a){this.Op=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.Pp},set:function(a){this.Pp=a}},key:{configurable:!0,get:function(){return this.Kq},set:function(a){this.Kq=a}},down:{configurable:!0,get:function(){return this.gq},set:function(a){this.gq=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.ks=a}},clickCount:{configurable:!0,get:function(){return this.Rp},set:function(a){this.Rp=a}},delta:{configurable:!0,get:function(){return this.eq},set:function(a){this.eq=a}},isMultiTouch:{configurable:!0,get:function(){return this.Gq},set:function(a){this.Gq=a}},handled:{configurable:!0,get:function(){return this.Aq},set:function(a){this.Aq=a}},bubbles:{configurable:!0, get:function(){return this.Jg},set:function(a){this.Jg=a}},event:{configurable:!0,get:function(){return this.mq},set:function(a){this.mq=a}},isTouchEvent:{configurable:!0,get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{configurable:!0,get:function(){return this.es},set:function(a){this.es=a}},targetDiagram:{configurable:!0,get:function(){return this.$r},set:function(a){this.$r=a}}, targetObject:{configurable:!0,get:function(){return this.Dd},set:function(a){this.Dd=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}}});le.prototype.getMultiTouchDocumentPoint=le.prototype.Vz;le.prototype.getMultiTouchViewPoint=le.prototype.ep;le.className="InputEvent";function ne(){this.H=null;this.Ea="";this.nr=this.Yr=null}ne.prototype.copy=function(){var a=new ne;a.H=this.H;a.Ea=this.Ea;a.Yr=this.Yr;a.nr=this.nr;return a};ne.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},subject:{configurable:!0,get:function(){return this.Yr},set:function(a){this.Yr=a}},parameter:{configurable:!0,get:function(){return this.nr},set:function(a){this.nr=a}}});ne.className="DiagramEvent"; -function oe(){this.Sm=pe;this.Df=this.cr="";this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}oe.prototype.clear=function(){this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}; -oe.prototype.copy=function(){var a=new oe;a.Sm=this.Sm;a.cr=this.cr;a.Df=this.Df;a.ic=this.ic;a.H=this.H;a.bo=this.bo;var b=this.eo;a.eo=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.co;a.co=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Yn;a.Yn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Xn;a.Xn=Ga(b)&&"function"===typeof b.M?b.M():b;return a};oe.prototype.wb=function(a){a.classType===oe?this.change=a:Ea(this,a)}; -oe.prototype.toString=function(){var a="";a=this.change===qe?a+"* ":this.change===pe?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===qe?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};oe.prototype.L=function(a){return a?this.oldValue:this.newValue};oe.prototype.Xz=function(a){return a?this.oldParam:this.newParam};oe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; -oe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};oe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};oe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -oa.Object.defineProperties(oe.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Sm},set:function(a){G&&$a(a,oe,oe,"change");this.Sm=a}},modelChange:{configurable:!0,get:function(){return this.cr},set:function(a){G&&B(a,"string",oe,"modelChange");this.cr=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.Df},set:function(a){G&&"string"!==typeof a&&B(a,"function",oe,"propertyName");this.Df=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Sm===qe&&("CommittedTransaction"===this.Df||"FinishedUndo"===this.Df||"FinishedRedo"===this.Df)}},object:{configurable:!0,get:function(){return this.bo},set:function(a){this.bo=a}},oldValue:{configurable:!0,get:function(){return this.eo},set:function(a){this.eo= -a}},oldParam:{configurable:!0,get:function(){return this.co},set:function(a){this.co=a}},newValue:{configurable:!0,get:function(){return this.Yn},set:function(a){this.Yn=a}},newParam:{configurable:!0,get:function(){return this.Xn},set:function(a){this.Xn=a}}});oe.prototype.redo=oe.prototype.redo;oe.prototype.canRedo=oe.prototype.canRedo;oe.prototype.undo=oe.prototype.undo;oe.prototype.canUndo=oe.prototype.canUndo;oe.prototype.getParam=oe.prototype.Xz; -oe.prototype.getValue=oe.prototype.L;oe.prototype.clear=oe.prototype.clear;var qe=new F(oe,"Transaction",-1),pe=new F(oe,"Property",0),re=new F(oe,"Insert",1),se=new F(oe,"Remove",2);oe.className="ChangedEvent";oe.Transaction=qe;oe.Property=pe;oe.Insert=re;oe.Remove=se;function te(){this.o=(new I).freeze();this.Ea="";this.j=!1} -te.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(te.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});te.prototype.optimize=te.prototype.lk;te.prototype.redo=te.prototype.redo;te.prototype.canRedo=te.prototype.canRedo;te.prototype.undo=te.prototype.undo;te.prototype.canUndo=te.prototype.canUndo; -te.prototype.clear=te.prototype.clear;te.className="Transaction";function ue(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} -ue.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +oa.Object.defineProperties(ve.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ve.prototype.optimize=ve.prototype.lk;ve.prototype.redo=ve.prototype.redo;ve.prototype.canRedo=ve.prototype.canRedo;ve.prototype.undo=ve.prototype.undo;ve.prototype.canUndo=ve.prototype.canUndo; +ve.prototype.clear=ve.prototype.clear;ve.className="Transaction";function we(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} +we.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&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.P(0),null!==f&&f.clear(),b.sb(0),a.Me--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Me++),b.freeze()),a.isInternalTransaction||a.Ub("CommittedTransaction",c,e);else{a.Pe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Ub("RolledBackTransaction",c,e),a.Pe=!1}null!== e&&e.clear()}a.$p=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.P(e),null!==b&&b.undo(),c.qa(),c.sb(e);c.freeze()}return!1}t.Bx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.qa();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.P(b);null!==c&&c.clear();a.sb(b);this.Eq=!0}a.freeze()}}; -ue.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; -ue.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -oa.Object.defineProperties(ue.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndex=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; +we.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +oa.Object.defineProperties(we.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(we.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",we,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",we,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", -we,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",we,"transactionResult");this.Jm=a}}});we.prototype.startTransaction=we.prototype.Ka;we.className="Tool";function Ua(){we.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ae;this.v=Ce;this.Zp=this.j=null;this.Mj=-1}na(Ua,we);Ua.prototype.initializeStandardTools=function(){}; -Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Be&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Ie&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Je){b.bubbles=!0;return}if(this.gestureBehavior===Ie)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; -for(var d=0;de||Math.abs(b.y-a.y)>d}; +oa.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",ye,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",ye,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", +ye,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",ye,"transactionResult");this.Jm=a}}});ye.prototype.startTransaction=ye.prototype.Ka;ye.className="Tool";function Ua(){ye.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ce;this.v=Ee;this.Zp=this.j=null;this.Mj=-1}na(Ua,ye);Ua.prototype.initializeStandardTools=function(){}; +Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof De&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Le&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Me){b.bubbles=!0;return}if(this.gestureBehavior===Le)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; +for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Gf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Gf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Hf(e,g,f,k,h):Hf(e,null,null,null,null)}}}}Ne.prototype.doDragOver=function(){}; -function If(a,b){var c=a.diagram;a.dragsLink&&uf(a,!0);Xe(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Jf(a,e,f);f=Ff(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Qe){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Qe){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&Kf(c,d,a);M.free(a)}}}function Jf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Df||(c=a.mouseDrop,null!==c&&c(b))}function Kf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} -Ne.prototype.doDropOnto=function(){};Ne.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(pf(this,!1),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts)):this.mayMove()?(kf(this),rf(this,this.draggedParts,!0)):this.mayDragOut()?(pf(this,!1),rf(this,this.copiedParts,!1)):kf(this),tf(this,a.lastInput.documentPoint))}}; -Ne.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(kf(this),pf(this,!0),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,kf(this),this.mayMove()&&(rf(this,this.draggedParts, -!0),tf(this,a.lastInput.documentPoint)));this.ln=!0;If(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Lf(this);a.eb();hf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; -Ne.prototype.simulatedMouseMove=function(a,b,c){if(null===Qe)return!1;var d=Qe.diagram;c instanceof Q||(c=null);var e=Ue;c!==e&&(null!==e&&e!==d&&(e.Gg(),Qe.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ue=c,null!==c&&c!==d&&(nf(),e=c.toolManager.findTool("Dragging"),null!==e&&(Pe.contains(e)||Pe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +var Ce=new F(Ua,"WheelScroll",0),Be=new F(Ua,"WheelZoom",1),Pe=new F(Ua,"WheelNone",2),Ee=new F(Ua,"GestureZoom",3),Le=new F(Ua,"GestureCancel",4),Me=new F(Ua,"GestureNone",5);Ua.className="ToolManager";Ua.WheelScroll=Ce;Ua.WheelZoom=Be;Ua.WheelNone=Pe;Ua.GestureZoom=Ee;Ua.GestureCancel=Le;Ua.GestureNone=Me; +function Qe(){ye.call(this);0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Ff(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Ff(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Gf(e,g,f,k,h):Gf(e,null,null,null,null)}}}}Qe.prototype.doDragOver=function(){}; +function Hf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);$e(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;If(a,e,f);f=Ef(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Te){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Te){a=M.alloc();for(b= +c.selection.iterator;b.next();)d=b.value,d instanceof V&&Jf(c,d,a);M.free(a)}}}function If(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Cf||(c=a.mouseDrop,null!==c&&c(b))}function Jf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} +Qe.prototype.doDropOnto=function(){};Qe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; +Qe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, +!0),uf(this,a.lastInput.documentPoint)));this.ln=!0;Hf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Kf(this);a.eb();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; +Qe.prototype.simulatedMouseMove=function(a,b,c){if(null===Te)return!1;var d=Te.diagram;c instanceof Q||(c=null);var e=Xe;c!==e&&(null!==e&&e!==d&&(e.Gg(),Te.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Xe=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Se.contains(e)||Se.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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;M.free(f); -f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,qf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Re(a,g.Xf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,qf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ne.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Ne.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; -oa.Object.defineProperties(Ne.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Ne,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Ne,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Oe,Ne,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Ne,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Ne,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Ne,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= -a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Ne,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Ne,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Ne,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Ne,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Ne,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Ne,"currentPart");this.Z=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Ne,"draggedLink");this.diagram.draggedLink=a}}, -isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Ne,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Ne,"delay");this.Uk=a}}});Ne.prototype.getDraggingSource=Ne.prototype.Uz;var Qe=null,Ue=null;Ne.className="DraggingTool";Pe=new I; -Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Qe&&Qe.doCancel();we.prototype.doCancel.call(this)}; -function Of(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kg&&(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;M.free(f); +f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Ue(a,g.Xf());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/ +2)));a.doUpdateCursor(null)}}}Qe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Qe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; +oa.Object.defineProperties(Qe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Qe,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Qe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Re,Qe,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Qe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Qe,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Qe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= +a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Qe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Qe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Qe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Qe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Qe,"dragsTree"); +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Qe,"currentPart");this.Z=a}},copiedParts:{configurable:!0, +get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Qe,"draggedLink");this.diagram.draggedLink=a}}, +isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Qe,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Qe,"delay");this.Uk=a}}});Qe.prototype.getDraggingSource=Qe.prototype.Uz;var Te=null,Xe=null;Qe.className="DraggingTool";Se=new I; +Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Te&&Te.doCancel();ye.prototype.doCancel.call(this)}; +function Nf(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; -Of.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; -Of.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Of.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; -Of.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, -c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Of.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Qf(this,c,b,d)}; -function Qf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Qf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Qf(a,b.labeledLink,c,d))?!0:!1} -Of.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Rf){if(d===Sf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Tf(this,a,b,c,!0)}if(d===Uf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== -a)return!1;return!Tf(this,a,b,c,!0)}if(d===Vf)return a===b?a=!0:(d=new J,d.add(b),a=Wf(this,d,a,b,c)),!a;if(d===Xf)return!Tf(this,a,b,c,!1);if(d===Yf)return a===b?a=!0:(d=new J,d.add(b),a=Zf(this,d,a,b,c)),!a}return!0};function Tf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Tf(a,g,c,d,e)))return!0}return!1} -function Wf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Wf(a,b,g,d,e)))return!0}return!1}function Zf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Zf(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Of.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Of,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Of,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, -set:function(a){x(a,S,Of,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Of,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Of,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, -set:function(a){x(a,V,Of,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Of,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Of,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, -set:function(a){null!==a&&x(a,V,Of,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Of,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Of,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Of,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Of,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Of,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Of,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, -get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Of,"portTargeted");this.$f=a}}});Of.className="LinkingBaseTool";function $f(){0c){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; +Nf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; +Nf.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Nf.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; +Nf.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, +c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Nf.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Pf(this,c,b,d)}; +function Pf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Pf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Pf(a,b.labeledLink,c,d))?!0:!1} +Nf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Qf){if(d===Rf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Sf(this,a,b,c,!0)}if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== +a)return!1;return!Sf(this,a,b,c,!0)}if(d===Uf)return a===b?a=!0:(d=new J,d.add(b),a=Vf(this,d,a,b,c)),!a;if(d===Wf)return!Sf(this,a,b,c,!1);if(d===Xf)return a===b?a=!0:(d=new J,d.add(b),a=Yf(this,d,a,b,c)),!a}return!0};function Sf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Sf(a,g,c,d,e)))return!0}return!1} +function Vf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Vf(a,b,g,d,e)))return!0}return!1}function Yf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Yf(a,b,h,d,e))return!0}}return!1} +oa.Object.defineProperties(Nf.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Nf,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Nf,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, +set:function(a){x(a,S,Nf,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Nf,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Nf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, +set:function(a){x(a,V,Nf,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Nf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Nf,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, +set:function(a){null!==a&&x(a,V,Nf,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Nf,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Nf,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Nf,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Nf,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Nf,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Nf,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, +get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Nf,"portTargeted");this.$f=a}}});Nf.className="LinkingBaseTool";function Zf(){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)};tg.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}; tg.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.Ic(),this.Ka(this.name),this.jr.set(this.adornedObject.la(this.handle.alignment.vv())),this.fo.set(this.adornedObject.part.location),this.Sw.set(this.adornedObject.desiredSize),this.Ct=this.computeCellSize(),this.Et= -this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; +this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; tg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};tg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();K.free(e)}}; tg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.eb();this.transactionResult=this.name;a.V("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Df){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Oe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; +tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Cf){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Re;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; tg.prototype.computeResize=function(a,b,c,d,e,f){b.pc()&&(b=Ic);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Zo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), -a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Pf&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; +a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Of&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; tg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};tg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Ag.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Ag.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.eb();this.transactionResult=this.name;a.V("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Ag.prototype.rotate=function(a){G&&D(a,Ag,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.$a();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Dg(d))c=this.fo.copy(),b.location=c.ze(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; Ag.prototype.computeRotate=function(a){a=this.rotationPoint.gb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.yi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof Be)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, -Ag,"handle"),a.part instanceof Be))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, +oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof De)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, +Ag,"handle"),a.part instanceof De))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, get:function(){return this.yr},set:function(a){this.yr=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"number",Ag,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){B(a,"number",Ag,"handleDistance");this.G=a}}});Ag.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); -function Bg(){we.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};ah.prototype.doStart=function(){kh=this;null!==this.textBlock&&this.doActivate()}; -ah.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof bh&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=hh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(Ac),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};ah.prototype.doCancel=function(){this.stopTool()}; -ah.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};ah.prototype.doMouseDown=function(){this.isActive&&this.acceptText(lh)};ah.prototype.acceptText=function(a){switch(a){case lh:if(this.wa===nh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this);break;case qh:case fh:case gh:if(fh!==a||!0!==this.textBlock.isMultiline)if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this)}}; -function ph(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.Ka(a.name),a.wa=nh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=jh,a.doError(e,f))}} -ah.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)};ah.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};ah.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=dh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};ah.prototype.doStop=function(){kh=null}; -ah.prototype.isValidText=function(a,b,c){x(a,bh,ah,"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};ah.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; -oa.Object.defineProperties(ah.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,bh,ah,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Le||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.Z},set:function(a){$a(a,ah,ah,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",ah,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",ah,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", -ah,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,ah,ah,"starting"),this.wa=a)}}});ah.prototype.measureTemporaryTextBlock=ah.prototype.by; -var qh=new F(ah,"LostFocus",0),lh=new F(ah,"MouseDown",1),gh=new F(ah,"Tab",2),fh=new F(ah,"Enter",3),rh=new F(ah,"SingleClick",0),ch=new F(ah,"SingleClickSelected",1),mh=new F(ah,"DoubleClick",2),dh=new F(ah,"StateNone",0),hh=new F(ah,"StateActive",1),ih=new F(ah,"StateEditing",2),oh=new F(ah,"StateValidating",3),jh=new F(ah,"StateInvalid",4),nh=new F(ah,"StateValidated",5),kh=null;ah.className="TextEditingTool";ah.LostFocus=qh;ah.MouseDown=lh;ah.Tab=gh;ah.Enter=fh;ah.SingleClick=rh; -ah.SingleClickSelected=ch;ah.DoubleClick=mh;ah.StateNone=dh;ah.StateActive=hh;ah.StateEditing=ih;ah.StateValidating=oh;ah.StateInvalid=jh;ah.StateValidated=nh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function sh(a){th||(uh(),th=!0);this.H=xe;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=vh;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new wh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}sh.prototype.kf=function(a){this.H=a};sh.prototype.canStart=function(){return!0};function xh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),yh(a.H),a.Fb=!0)} -function zh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===vh?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===Ah&&b.Bc.clear(),a.hx=a.al===Bh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ch(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Dh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Se(c),Eh(c),a.Fb=!1,b.start(),b.hc&&(Fh(a),c.eb(),Gh(b,0),Mf(c,!0),Hh(a),c.V("AnimationStarting",a)))}))}}function Ih(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Jh(a,b,c,d){a.isTicking||Ih(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=sh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; -function Kh(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 uh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga.lastInput.clickCount?!1:!0};Zg.prototype.doStart=function(){ih=this;null!==this.textBlock&&this.doActivate()}; +Zg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof $g&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=fh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(yc),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Zg.prototype.doCancel=function(){this.stopTool()}; +Zg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Zg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(jh)};Zg.prototype.acceptText=function(a){switch(a){case jh:if(this.wa===lh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this);break;case oh:case dh:case eh:if(dh!==a||!0!==this.textBlock.isMultiline)if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this)}}; +function nh(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.Ka(a.name),a.wa=lh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=hh,a.doError(e,f))}} +Zg.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)};Zg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Zg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=bh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Zg.prototype.doStop=function(){ih=null}; +Zg.prototype.isValidText=function(a,b,c){x(a,$g,Zg,"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};Zg.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; +oa.Object.defineProperties(Zg.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,$g,Zg,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Oe||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.Z},set:function(a){$a(a,Zg,Zg,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",Zg,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",Zg,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", +Zg,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,Zg,Zg,"starting"),this.wa=a)}}});Zg.prototype.measureTemporaryTextBlock=Zg.prototype.by; +var oh=new F(Zg,"LostFocus",0),jh=new F(Zg,"MouseDown",1),eh=new F(Zg,"Tab",2),dh=new F(Zg,"Enter",3),ph=new F(Zg,"SingleClick",0),ah=new F(Zg,"SingleClickSelected",1),kh=new F(Zg,"DoubleClick",2),bh=new F(Zg,"StateNone",0),fh=new F(Zg,"StateActive",1),gh=new F(Zg,"StateEditing",2),mh=new F(Zg,"StateValidating",3),hh=new F(Zg,"StateInvalid",4),lh=new F(Zg,"StateValidated",5),ih=null;Zg.className="TextEditingTool";Zg.LostFocus=oh;Zg.MouseDown=jh;Zg.Tab=eh;Zg.Enter=dh;Zg.SingleClick=ph; +Zg.SingleClickSelected=ah;Zg.DoubleClick=kh;Zg.StateNone=bh;Zg.StateActive=fh;Zg.StateEditing=gh;Zg.StateValidating=mh;Zg.StateInvalid=hh;Zg.StateValidated=lh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); +function qh(a){rh||(sh(),rh=!0);this.H=ze;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=th;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new uh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}qh.prototype.kf=function(a){this.H=a};qh.prototype.canStart=function(){return!0};function vh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),wh(a.H),a.Fb=!0)} +function xh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===th?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===yh&&b.Bc.clear(),a.hx=a.al===zh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ah(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Bh&&null!==d&&(delete d.start.scale,delete d.end.scale), +sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Ve(c),Ch(c),a.Fb=!1,b.start(),b.hc&&(Dh(a),c.eb(),Eh(b,0),Lf(c,!0),Fh(a),c.V("AnimationStarting",a)))}))}}function Gh(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Hh(a,b,c,d){a.isTicking||Gh(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=qh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; +function Ih(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 sh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",sh,"duration");this.Pg=a}},isAnimating:{configurable:!0, -enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",sh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& -$a(a,sh,sh,"initialAnimationStyle");this.al=a}}});sh.prototype.stopAnimation=sh.prototype.Ic;var bi=null,th=!1,vh=new F(sh,"Default",1),Bh=new F(sh,"AnimateLocations",2),Ah=new F(sh,"None",3);sh.className="AnimationManager";sh.defineAnimationEffect=function(a,b){th||(uh(),th=!0);bi.add(a,b)};sh.Default=vh;sh.AnimateLocations=Bh;sh.None=Ah; -function wh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=yb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}wh.prototype.suspend=function(){this.il=!0};wh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Lh(this,!0);Fh(this.de);Mf(this.H);Hh(this.de);this.H.redraw()}; -function Ch(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a&&Ba(a,">= 1",qh,"duration");this.Pg=a}},isAnimating:{configurable:!0, +enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",qh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& +$a(a,qh,qh,"initialAnimationStyle");this.al=a}}});qh.prototype.stopAnimation=qh.prototype.Ic;var bi=null,rh=!1,th=new F(qh,"Default",1),zh=new F(qh,"AnimateLocations",2),yh=new F(qh,"None",3);qh.className="AnimationManager";qh.defineAnimationEffect=function(a,b){rh||(sh(),rh=!0);bi.add(a,b)};qh.Default=th;qh.AnimateLocations=zh;qh.None=yh; +function uh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=xb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}uh.prototype.suspend=function(){this.il=!0};uh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Jh(this,!0);Dh(this.de);Lf(this.H);Fh(this.de);this.H.redraw()}; +function Ah(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} -function Gh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; -t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Fh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();lf(b,!1);b.eb();b.R();Mf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Mf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Hh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ch(this,null),c.$l(this),b.fc())}}; -t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Df&&(d=b.placeholder);null!==d?(c=d.la(Ac),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; -t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Df&&(c=b.placeholder);if(null!==c){var d=c.la(Ac);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; -oa.Object.defineProperties(wh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",wh,"duration");1>a&&Ba(a,">= 1",wh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}wh.className="Animation";wh.EaseLinear=function(a,b,c,d){return c*a/d+b};wh.EaseInOutQuad=ci;wh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};wh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};wh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};wh.EaseOutExpo=ei; +function Jh(a,b){if(!a.il||b){var c=a.de;if(!1!==a.hc){var d=+new Date,e=d>a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} +function Eh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; +t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Dh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();mf(b,!1);b.eb();b.R();Lf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Lf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Fh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ah(this,null),c.$l(this),b.fc())}}; +t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Cf&&(d=b.placeholder);null!==d?(c=d.la(yc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; +t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Cf&&(c=b.placeholder);if(null!==c){var d=c.la(yc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; +oa.Object.defineProperties(uh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",uh,"duration");1>a&&Ba(a,">= 1",uh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}uh.className="Animation";uh.EaseLinear=function(a,b,c,d){return c*a/d+b};uh.EaseInOutQuad=ci;uh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};uh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};uh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};uh.EaseOutExpo=ei; function ki(a,b,c){this.start=a;this.end=b;this.$u={};this.Vu=c;this.Cv=!1}ki.className="AnimationState";function li(a,b,c){this.Dd=null;this.Df=a;this.Eo=c||mi;this.Gk=null;void 0!==b&&(this.Gk=b,void 0===c&&(this.Eo=ni))}li.prototype.copy=function(){var a=new li(this.Df);a.Eo=this.Eo;var b=this.Gk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.Gk=c}return a}; function oi(a,b){a=a.Gk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.Df},set:function(a){this.Df=a}},animationSettings:{configurable:!0,get:function(){return this.Gk},set:function(a){this.Gk=a}},startCondition:{configurable:!0,get:function(){return this.Eo},set:function(a){G&&$a(a,li,li,"startCondition");this.Eo=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Ya(this);this.H=null;this.Ua=new I;this.Ea="";this.vb=1;this.o=!1;this.j=this.fi=this.v=this.aj=this.$i=this.Zi=this.Yi=this.Wi=this.Xi=this.Vi=this.cj=this.Ui=this.bj=this.Ti=this.Si=!0;this.lr=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){for(var a=this.Ua,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Df?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Be?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Cf?e++:k instanceof V?d++:k instanceof S?f++:k instanceof De?g++:c++}h="";0c.ar||h.height*e>c.ar?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&&(wi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(wi(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),wi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ks()||(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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(pe,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; +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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(re,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; t.wc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.wc(a,b,c);var d=this.Ua;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.P(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.ip(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.wc(b));b.Ug=null;ri(b);return a}; -function xi(a,b,c){b=yi(a,b,c);if(c instanceof Df&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ua.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&dd&&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.P(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.sb(b);a.Mb(f,c);return f}for(g=NaN;0<=--f&&(g=a.P(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Mb(h,c);return h}for(k=NaN;++h< e&&(k=a.P(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ua.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ua.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",qi,"name");var b=this.Ea;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= @@ -637,137 +637,137 @@ set:function(a){var b=this.cj;b!==a&&(B(a,"boolean",qi,"allowUngroup"),this.cj=a get:function(){return this.Wi},set:function(a){var b=this.Wi;b!==a&&(B(a,"boolean",qi,"allowMove"),this.Wi=a,this.g("allowMove",b,a))}},allowReshape:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(B(a,"boolean",qi,"allowReshape"),this.Yi=a,this.g("allowReshape",b,a))}},allowResize:{configurable:!0,get:function(){return this.Zi},set:function(a){var b=this.Zi;b!==a&&(B(a,"boolean",qi,"allowResize"),this.Zi=a,this.g("allowResize",b,a))}}, allowRotate:{configurable:!0,get:function(){return this.$i},set:function(a){var b=this.$i;b!==a&&(B(a,"boolean",qi,"allowRotate"),this.$i=a,this.g("allowRotate",b,a))}},allowSelect:{configurable:!0,get:function(){return this.aj},set:function(a){var b=this.aj;b!==a&&(B(a,"boolean",qi,"allowSelect"),this.aj=a,this.g("allowSelect",b,a))}}});qi.prototype.findObjectsNear=qi.prototype.Ag;qi.prototype.findObjectsIn=qi.prototype.Of;qi.prototype.findObjectsAt=qi.prototype.wi; qi.prototype.findObjectAt=qi.prototype.oc;qi.className="Layer"; -function Q(a,b){zi||(Ai(),zi=!0);Ya(this);xe=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if($g){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===pe&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,xe; -function Di(a){a.de=new sh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Dh;a.Lk=gd;a.Rg=Dh;a.Cq=gd;a.Lt=Ac;a.Ot=Ac;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= -!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new le;a.pq.diagram=a;a.ah=new le;a.ah.diagram=a;a.pj=new le;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Rf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; +function Q(a,b){zi||(Ai(),zi=!0);Ya(this);ze=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if(Yg){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===re&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,ze; +function Di(a){a.de=new qh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Bh;a.Lk=hd;a.Rg=Bh;a.Cq=hd;a.Lt=yc;a.Ot=yc;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= +!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new ne;a.pq.diagram=a;a.ah=new ne;a.ah.diagram=a;a.pj=new ne;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Qf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; a.ko=new I;a.Sg=!1;a.Pd=!0;a.gt=!0;a.Si=!0;a.Ti=!0;a.ht=!1;a.it=!0;a.bj=!0;a.Ui=!0;a.cj=!0;a.kt=!0;a.Vi=!0;a.Xi=!0;a.Wi=!0;a.Yi=!0;a.Zi=!0;a.$i=!0;a.aj=!0;a.lt=!0;a.nt=!0;a.Fw=!1;a.gl=!1;a.yn=!0;a.zn=!0;a.jt=!0;a.mt=!0;a.vu=16;a.zu=16;a.Dr=!1;a.tu=!1;a.yu=0;a.wu=0;a.Eb=(new fc(5)).freeze();a.Ww=(new J).freeze();a.$t=999999999;a.Cw=(new J).freeze();a.lj=!0;a.Oe=!0;a.Bd=!0;a.Le=!1;a.uf=!1;a.Ih=!0;a.vf=!1;a.Jy=new J;a.Dw=new J;a.ii=null;a.pw=new Gb(8,8);a.qw=999;a.Qw=1;a.Yw=0;a.lc={scale:1,position:new K, -bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new bh;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new bh;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Pf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Df;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new bh;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Pf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Pf;c.isPanelMain=!0;b.add(c);c=new Pf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Pf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new Be;b.type=W.Auto;c=new Pf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new Be;b.type=W.Link;c=new Pf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= -new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Oe;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; +bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new $g;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new $g;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Of;c.figure="Ellipse";c.fill="black";c.stroke= +null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Cf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new $g;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Of;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Of;c.isPanelMain=!0;b.add(c);c=new Of;c.toArrow= +"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Of;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new De;b.type=W.Auto;c=new Of;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new De;b.type=W.Link;c=new Of;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= +new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Re;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; function Qi(a,b){a.animationManager.Ic(!0);a.Ww=(new J).freeze();a.Cw=(new J).freeze();var c=a.skipsUndoManager,d=null!==a.ic&&void 0!==a.ic;d&&(a.skipsUndoManager=!0);var e=null;null!==a.le&&(e=a.le.part,null!==e&&a.remove(e));var f=[],g=a.ab.length;if(b){for(b=0;b=a)return b;for(var c=this.ab.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function Ii(a,b){if($g){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); -a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new cj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", -e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);dj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new cj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if($g){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; -f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=ej;e.addEventListener("pointerdown",fj);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Eh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=gj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():hj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=ij(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;jj(a,f,c);c.targetObject=null;a.doMouseMove();hj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=ij(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&jj(e.H,b,d);null===e&&(e=b.target);jj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=kj(b,e);d.targetObject=null;a.doMouseUp();hj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; -c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+lj[1]+lj[2]+"wI"+mj.slice(1,5)]["b"+nj.slice(1,b)](d.ba,oj,b,b);d.ad(!0);pj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), +function Ii(a,b){if(Yg){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); +a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new fj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", +e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);gj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new fj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if(Yg){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; +f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=hj;e.addEventListener("pointerdown",ij);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Ch(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=jj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():kj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=lj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;mj(a,f,c);c.targetObject=null;a.doMouseMove();kj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=lj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&mj(e.H,b,d);null===e&&(e=b.target);mj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=nj(b,e);d.targetObject=null;a.doMouseUp();kj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; +c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+oj[1]+oj[2]+"wI"+pj.slice(1,5)]["b"+qj.slice(1,b)](d.ba,rj,b,b);d.ad(!0);sj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), a.pb=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function pj(a){var b=a.Aa.Ta;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.Hi,!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,"pointercancel",a.nk,!1);a.addEventListener(b,"pointerenter",a.uz,!1);a.addEventListener(b,"pointerleave",a.vz,!1);a.addEventListener(b,"wheel",a.kk,!1);a.addEventListener(b,"keydown",a.jA,!1);a.addEventListener(b,"keyup",a.kA,!1);a.addEventListener(b, -"blur",a.ez,!1);a.addEventListener(b,"focus",a.fz,!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(sa,"resize",a.cw,!1)}function Se(a){30r&&(this.position=y.h(-(b.scrollWidth-this.Ga)+w-this.Ga/e+m,this.position.y))),a.My&&this.allowVerticalScroll&&(hu&&(this.position= -y.h(this.position.x,-(b.scrollHeight-this.Fa)+a.scrollTop-this.Fa/e+f))),K.free(y),this.Bd=!0,this.Oe=this.Dr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);yh(this);return sj(this,a)}; -function sj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);wh(this);return vj(this,a)}; +function vj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===xj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=uj(this,wj);a!==di&&(tj(this,!1),vj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; -t.VA=function(a,b){void 0===b&&(b=wj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===wj||b===xj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===xj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(Ac,b));K.free(b)}else this.rq=null,this.sq=Cb}; -function vj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(Ac,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=zc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Aj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=xj(this,zj);a!==di&&(wj(this,!1),yj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; +t.VA=function(a,b){void 0===b&&(b=zj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===zj||b===Aj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===Aj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(yc,b));K.free(b)}else this.rq=null,this.sq=Cb}; +function yj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(yc,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=xc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Df&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} -t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Df||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Df&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Be&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; -function Hj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Df?(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;eb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Cf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Cf||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Cf&&c.isVisible()&&Kj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof De&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function Kj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Cf?(Lj(f)||Mj(f)||Nj(f))&&Kj(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;eE&&(w=T.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Jb(m,u);Jb(q,u);d.push(new M(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Rj(this.jg,this)&&(e=0E&&(w=T.left, z=T.right),y.height>H&&(A=T.top,C=T.bottom)):(w=T.left,z=T.right,A=T.top,C=T.bottom);var aa=y.width+w+z,Y=y.height+A+C;T=a.scale;var R=aa>k/T,O=Y>l/T;if(!(f||a.uf||a.Le||R||O))return!0;w=y.x-w;k=m.x;z=y.right+z;l=m.right+g;A=y.y-A;var la=m.y;y=y.bottom+C;m=m.bottom+h;var ha="1px";C="1px";a.scrollMode===di&&(R||O)&&(R&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(R=1,w+1l+1&&(R=Math.max((z-l)*T+a.Ga,R)),E+g+1m+1&&(R=Math.max((y-m)*T+a.Fa,R)),H+h+1l+1&&(g=Math.max((z-l)*T+a.Ga,g)),E+1m+1&&(h=Math.max((y-m)*T+g,h)),H+1l+1&&(b=a.position.x*T));if(a.Fn)switch(a.ou){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(H+1< Y?r.scrollTop=(a.position.y-A)*T:A+1m+1&&(r.scrollTop=a.position.y*T));k=a.Ga;l=a.Fa;r.style.width=k+(a.uf?a.Jb:0)+"px";r.style.height=l+(a.Le?a.Jb:0)+"px";return c!==k||d!==l||a.animationManager.Fb?(c=M.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,T,f),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){x(a,U,Q,"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.bk(a.layerName),null===b&&(b=this.bk("")),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.Bi(99999999,a,a.diagram===this);0<=c&&this.jb(re,"parts",b,null,a,null,c);b.isTemporary||this.eb();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.Bi=function(a){this.partManager.Bi(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Be||a instanceof Df&&null!==a.placeholder)&&a.w();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Ne.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()}; -t.wc=function(a){a.Qj();this.partManager.wc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Ne.remove(a);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()};t.remove=function(a){x(a,U,Q,"remove:part");bk(this,a,!0)}; -function bk(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Xj(),c=d.wc(-1,b,!1),0<=c&&a.jb(se,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.eb();return this}; -t.Ty=function(a,b){hk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(se,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; -t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(se,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +k=k.y;isNaN(k)&&(k=f?Math.round(1E3*a.location.y)/1E3:a.location.y);d.h(Math.max(h,Math.min(c.x,l)),Math.max(g,Math.min(c.y,k)));e!==b&&K.free(e);return d};function fk(a){var b=a.toolManager.findTool("Dragging");return null!==b?b.dragOptions:a.jn} +function Eg(a,b,c,d,e){void 0===e&&(e=fk(a));d.assign(c);if(null!==b){var f=a.grid;b=e.gridSnapCellSize;a=b.width;b=b.height;var g=e.gridSnapOrigin,h=g.x;g=g.y;e=e.gridSnapCellSpot;if(null!==f){var k=f.gridCellSize;isNaN(a)&&(a=k.width);isNaN(b)&&(b=k.height);f=f.gridOrigin;isNaN(h)&&(h=f.x);isNaN(g)&&(g=f.y)}f=K.allocAt(0,0);f.Li(0,0,a,b,e);L.Zo(c.x,c.y,h+f.x,g+f.y,a,b,d);K.free(f)}}function We(a,b){if(null!==b)for(a.Zr=!0,a=b.iterator;a.next();)b=a.key,b instanceof S&&(b.suspendsRouting=!0)} +function jf(a,b){if(null!==b){for(b=b.iterator;b.next();){var c=b.key;c instanceof S&&(c.suspendsRouting=!1,jk(c)&&c.ib())}a.Zr=!1}}function hk(a,b,c){b=b.containingGroup;if(null!==b){a=hk(a,b,c);if(null!==a)return a;a=c.L(b);if(null!==a)return a}return null}t=Q.prototype;t.Vd=function(a,b,c){if(void 0===c)return new Ze(xb);var d=a.isGridSnapEnabled;a.groupsSnapMembers||null===b.containingGroup||(d=!1);return d?new Ze(new K(Math.round(1E3*c.x)/1E3,Math.round(1E3*c.y)/1E3)):new Ze(c.copy())}; +function kk(a,b,c){x(b,qi,Q,"addLayer:layer");null!==b.diagram&&b.diagram!==a&&v("Cannot share a Layer with another Diagram: "+b+" of "+b.diagram);null===c?null!==b.diagram&&v("Cannot add an existing Layer to this Diagram again: "+b):(x(c,qi,Q,"addLayer:existingLayer"),c.diagram!==a&&v("Existing Layer must be in this Diagram: "+c+" not in "+c.diagram),b===c&&v("Cannot move a Layer before or after itself: "+b));if(b.diagram!==a){b=b.name;a=a.ab;c=a.count;for(var d=0;dd&&this.eb();return this}; +t.Ty=function(a,b){kk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(ue,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; +t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(ue,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.px=function(a){B(a,"function",Q,"addModelChangedListener:listener");null===this.Bf&&(this.Bf=new I);this.Bf.add(a);this.model.bf(a);return this};t.GA=function(a){B(a,"function",Q,"removeModelChangedListener:listener");null!==this.Bf&&(this.Bf.remove(a),0===this.Bf.count&&(this.Bf=null));this.model.uk(a)};t.bf=function(a){B(a,"function",Q,"addChangedListener:listener");null===this.Lg&&(this.Lg=new I);this.Lg.add(a);return this}; -t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==qe&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==qe&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==se&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==se&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ka=function(a){return this.undoManager.Ka(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Wf=function(){return this.undoManager.Wf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ka(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Wf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Fp=function(){this.partManager.Fp()}; -function mk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= -a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);tj(a,!1);a=a.Ia;d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Dh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ke(e,this));this.Bb||this.invalidateViewport(a,b);Ej(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= +function pk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= +a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);wj(a,!1);a=a.Ia;d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Bh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ne(e,this));this.Bb||this.invalidateViewport(a,b);Hj(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= Math.round(a.width*c);this.lc.canvasSize.height=Math.round(a.height*c);this.lc.newCanvasSize.width=this.Ga;this.lc.newCanvasSize.height=this.Fa;this.lc.isScroll=d;this.V("ViewportBoundsChanged",this.lc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.dd(b)&&a.ib()})}}; -function Ej(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(nk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, +function Hj(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(qk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, d.height,b);b.offset(-d.width,-d.height);Gb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.V("ChangingSelection",b);for(var c=b.La(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||xh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)vk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),yh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||zh(f),a.da=c}}}function vk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)vk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Hj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; +function Vj(a,b){a.lj=!1;var c=a.fq;c.D(b)||(c=c.copy(),a.fq.assign(b),wj(a,!1),a.V("DocumentBoundsChanged",void 0,c),a.Oe=!0,a.R())}t.$a=function(){if(this.lj){var a=M.alloc();Vj(this,this.computeBounds(a));M.free(a)}};t.Mz=function(){for(var a=new J,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&a.add(c)}for(b=this.links;b.next();)c=b.value,c.isTopLevel&&a.add(c);return a.iterator};t.Lz=function(){return this.mi.iterator}; +t.nA=function(a){wh(this);a&&wk(this,!0);this.rd?Ij(this,!1):(this.Vk=!0,Lf(this))};function wk(a,b){for(var c=a.mi.iterator;c.next();)xk(a,c.value,b);a.layout&&(b?a.layout.isValidLayout=!1:a.layout.F())}function xk(a,b,c){if(null!==b){for(var d=b.sl.iterator;d.next();)xk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.F())}} +function Ij(a,b){if(a.Ih&&!a.yt){var c=a.da;a.da=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ka("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||vh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)yk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),wh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||xh(f),a.da=c}}}function yk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)yk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Kj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; function Ki(a){function b(a){var b=a.toLowerCase(),e=new I;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new vb,d=new vb;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.xw=c;a.ww=d} -function Rj(a,b){var c=a.ww.L(b);return null!==c?c:a.ww.L(b.toLowerCase())}function wk(a,b){var c=a.xw.L(b);if(null!==c)return c;c=a.xw.L(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.Oj=function(a,b){B(a,"string",Q,"addDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.add(b);return this};t.om=function(a,b){B(a,"string",Q,"removeDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.remove(b)}; -t.V=function(a,b,c){G&&B(a,"string",Q,"raiseDiagramEvent:name");var d=wk(this,a),e=new ne;e.diagram=this;a=Rj(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.P(0)(e);else if(0!==b)for(d=d.La(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, -1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(yb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Df&&(a.nq=null)})}; -function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!$g)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; -t.$x=function(a){void 0===a&&(a={});return Hk(this,this.qA,a)}; -t.qA=function(a,b,c){var d=Qk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case mj+"data":e=d.getImageData(0,0,c.width,c.height);break;case mj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(xb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); +M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Cf&&(a.nq=null)})}; +function Kk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!Yg)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; +t.$x=function(a){void 0===a&&(a={});return Kk(this,this.qA,a)}; +t.qA=function(a,b,c){var d=Sk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case pj+"data":e=d.getImageData(0,0,c.width,c.height);break;case pj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Qk(a,b,c,d){a.animationManager.Ic();a.hd();if(null===a.Aa)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Gb(Infinity,Infinity):new Gb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var q=b.document||document,r=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new fc(m):m instanceof fc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.pb.ad(!0);p=new cj(null,q,void 0,!0);var y=p.context;if(!(f||g||l||k)){p.width=a.Ga+Math.ceil(m.left+m.right);p.height=a.Fa+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== -d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=q;d.vs=r;Pj(a,d.context,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);return d.context}a.kn=!1;Pj(a,y,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);a.kn=!0;return p.context}var w=a.bq,z=a.documentBounds.copy();z.Uv(a.Eb);if(u)for(var A=a.ab.s,C=A.length,E=0;Ew?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Uk&&G&&(f>w|| -z>h)&&(Fa("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."),Uk=!0),isNaN(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Pj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); -return d.context}a.kn=!1;Pj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Vk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Tj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, -0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Tj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, +null!==g?("NaN"===g&&(g=w),f.u()?(f=H,z=E):isNaN(E)?(f=H,z=z.height*g):(f=z.width*g,z=E)):null!==f?f.u()?(g=Math.min(H/z.width,E/z.height),f=H,z=E):isNaN(E)?(g=H/z.width,f=H,z=z.height*g):(g=E/z.height,f=z.width*g,z=E):null!==g?"NaN"===g&&h.u()?(g=Math.min((h.width-k)/z.width,(h.height-C)/z.height),g>w?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Wk&&G&&(f>w|| +z>h)&&(Fa("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(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Sj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); +return d.context}a.kn=!1;Sj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} +oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Xk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Wj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, +0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Wj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, "pointermove",this.pk,!1),this.removeEventListener(b,"pointerdown",this.Hi,!1),this.removeEventListener(b,"pointerup",this.rk,!1),this.removeEventListener(b,"pointerout",this.qk,!1),this.removeEventListener(b,"pointercancel",this.nk,!1),this.Aa.Cx()),this.Bl&&(this.Bl.disconnect(),this.Bl=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.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),xe===this&&(xe=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= +this.currentTool.doCancel(),this.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),ze===this&&(ze=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= a,null!==a&&(this.hu=a.fromPort,this.iu=a.toPort))}},ey:{configurable:!0,get:function(){return this.hu},set:function(a){this.hu=a}},gy:{configurable:!0,get:function(){return this.iu},set:function(a){this.iu=a}},animationManager:{configurable:!0,get:function(){return this.de}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.hh},set:function(a){B(a, "boolean",Q,"skipsUndoManager");this.hh=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.yt},set:function(a){this.yt=a}},opacity:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;b!==a&&(B(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", -b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,le,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,le, -Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,le,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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-"+ +this.zn=a,this.Oe=!0,this.R(),this.g("hasVerticalScrollbar",b,a),wj(this,!1))}},hasHorizontalScrollbar:{configurable:!0,get:function(){return this.yn},set:function(a){var b=this.yn;b!==a&&(B(a,"boolean",Q,"hasHorizontalScrollbar"),this.yn=a,this.Oe=!0,this.R(),this.g("hasHorizontalScrollbar",b,a),wj(this,!1))}},allowHorizontalScroll:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt;b!==a&&(B(a,"boolean",Q,"allowHorizontalScroll"),this.jt=a,this.g("allowHorizontalScroll", +b,a),wj(this,!1))}},allowVerticalScroll:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(B(a,"boolean",Q,"allowVerticalScroll"),this.mt=a,this.g("allowVerticalScroll",b,a),wj(this,!1))}},scrollHorizontalLineChange:{configurable:!0,get:function(){return this.vu},set:function(a){var b=this.vu;b!==a&&(B(a,"number",Q,"scrollHorizontalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", +b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,ne,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,ne, +Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,ne,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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.aq},set:function(a){""===a&&(a="auto");var b=this.aq;b!==a&&(B(a,"string",Q,"defaultCursor"),this.aq=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.Kh},set:function(a){var b=this.Kh;b!==a&&(null!==a&&B(a,"function",Q,"click"),this.Kh=a,this.g("click", b,a))}},doubleClick:{configurable:!0,get:function(){return this.Qh},set:function(a){var b=this.Qh;b!==a&&(null!==a&&B(a,"function",Q,"doubleClick"),this.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.Mh},set:function(a){var b=this.Mh;b!==a&&(null!==a&&B(a,"function",Q,"contextClick"),this.Mh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.bi},set:function(a){var b=this.bi;b!== a&&(null!==a&&B(a,"function",Q,"mouseOver"),this.bi=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.$h},set:function(a){var b=this.$h;b!==a&&(null!==a&&B(a,"function",Q,"mouseHover"),this.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Zh},set:function(a){var b=this.Zh;b!==a&&(null!==a&&B(a,"function",Q,"mouseHold"),this.Zh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0, get:function(){return this.cu},set:function(a){var b=this.cu;b!==a&&(null!==a&&B(a,"function",Q,"mouseDragOver"),this.cu=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Xh},set:function(a){var b=this.Xh;b!==a&&(G&&null!==a&&B(a,"function",Q,"mouseDrop"),this.Xh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(B(a,"boolean",Q,"handlesDragDropForTopLevelParts"), this.Kt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(null!==a&&B(a,"function",Q,"mouseEnter"),this.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return this.ai},set:function(a){var b=this.ai;b!==a&&(null!==a&&B(a,"function",Q,"mouseLeave"),this.ai=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.li}, -set:function(a){var b=this.li;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Nh},set:function(a){var b=this.Nh;b!==a&&(!G||a instanceof Be||a instanceof Le||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Nh=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.tb}, -set:function(a){this.tb!==a&&(this.tb=a,a.kf(this))}},toolManager:{configurable:!0,get:function(){return this.Be},set:function(a){this.Be!==a&&(x(a,Ua,Q,"toolManager"),this.Be=a,a.diagram=this)}},defaultTool:{configurable:!0,get:function(){return this.ub},set:function(a){var b=this.ub;b!==a&&(x(a,we,Q,"defaultTool"),this.ub=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.ob},set:function(a){var b= -this.ob;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(x(a,we,Q,"currentTool"),this.ob=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.Ww}},maxSelectionCount:{configurable:!0,get:function(){return this.$t},set:function(a){var b=this.$t;if(b!==a)if(B(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.$t=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&& -(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,Be,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,Be,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,Be,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, -enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;xh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;e= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,De,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,De,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,De,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, +enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||rk(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& +v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;vh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=sk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Zt}, -set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),tj(this,!1))}}, +set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),wj(this,!1))}}, initialContentAlignment:{configurable:!0,get:function(){return this.Cq},set:function(a){var b=this.Cq;b.D(a)||(x(a,Hb,Q,"initialContentAlignment"),this.Cq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.eb(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Vc}, set:function(a){var b=this.Vc;b!==a&&(x(a,Ci,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.kf(null),this.Vc=a,a.kf(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.Yc}, -set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Wk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, -set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Xk&&a!==Yk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= +set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Yk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, +set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Zk&&a!==$k&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.Ip},set:function(a){var b=this.Ip;D(a,Q,"scale");b!==a&&(this.Ip=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Kp},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"autoScrollRegion");var b=this.Kp;b.D(a)||(this.Kp=a=a.M(),this.eb(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Zk.qc()},set:function(a){Zk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return $k}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; +oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return al.qc()},set:function(a){al.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return bl}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; Q.prototype.doAutoScroll=Q.prototype.us;Q.prototype.isUnoccupied=Q.prototype.ik;Q.prototype.raiseDiagramEvent=Q.prototype.V;Q.prototype.removeDiagramListener=Q.prototype.om;Q.prototype.addDiagramListener=Q.prototype.Oj;Q.prototype.findTreeRoots=Q.prototype.Sz;Q.prototype.layoutDiagram=Q.prototype.nA;Q.prototype.findTopLevelGroups=Q.prototype.Lz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.Mz;Q.prototype.ensureBounds=Q.prototype.$a;Q.prototype.findLinksByExample=Q.prototype.ys; Q.prototype.findNodesByExample=Q.prototype.zs;Q.prototype.findLinkForData=Q.prototype.Rc;Q.prototype.findNodeForData=Q.prototype.vi;Q.prototype.findPartForData=Q.prototype.Sc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.bc;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.be;Q.prototype.transformViewToDoc=Q.prototype.bt;Q.prototype.transformRectDocToView=Q.prototype.TA;Q.prototype.transformDocToView=Q.prototype.Cp; Q.prototype.centerRect=Q.prototype.ss;Q.prototype.scrollToRect=Q.prototype.Iv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.cA;Q.prototype.highlight=Q.prototype.bA;Q.prototype.selectCollection=Q.prototype.LA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Fp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Wf; @@ -873,95 +873,95 @@ Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.nx;Q.prototype.addLayer=Q.prototype.Nl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Wj;Q.prototype.removeParts=Q.prototype.Vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ux;Q.prototype.setProperties=Q.prototype.Bm;Q.prototype.attach=Q.prototype.Ru;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.ly;Q.prototype.setInputOption=Q.prototype.MA; Q.prototype.getInputOption=Q.prototype.dm;Q.prototype.resetRenderingHints=Q.prototype.my;Q.prototype.setRenderingHint=Q.prototype.qy;Q.prototype.getRenderingHint=Q.prototype.Sf;Q.prototype.maybeUpdate=Q.prototype.hd;Q.prototype.requestUpdate=Q.prototype.fc;Q.prototype.delayInitialization=Q.prototype.oz;Q.prototype.isUpdateRequested=Q.prototype.iA;Q.prototype.invalidateDocumentBounds=Q.prototype.eb;Q.prototype.findObjectsNear=Q.prototype.Ag;Q.prototype.findPartsNear=Q.prototype.Hz; Q.prototype.findObjectsIn=Q.prototype.Of;Q.prototype.findPartsIn=Q.prototype.Lx;Q.prototype.findObjectsAt=Q.prototype.wi;Q.prototype.findPartsAt=Q.prototype.Gz;Q.prototype.findObjectAt=Q.prototype.oc;Q.prototype.findPartAt=Q.prototype.bm;Q.prototype.focusObject=Q.prototype.Tz;Q.prototype.alignDocument=Q.prototype.$y;Q.prototype.zoomToRect=Q.prototype.VA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Ax;Q.prototype.focus=Q.prototype.focus; -var Bi=new vb,Ti=null,$g=void 0!==sa.document,Oi=null,Pi="",Dh=new F(Q,"None",0),wj=new F(Q,"Uniform",1),xj=new F(Q,"UniformToFill",2),Rf=new F(Q,"CycleAll",10),Vf=new F(Q,"CycleNotDirected",11),Xf=new F(Q,"CycleNotDirectedFast",12),Yf=new F(Q,"CycleNotUndirected",13),Sf=new F(Q,"CycleDestinationTree",14),Uf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Xk=new F(Q,"AllParentsCollapsed",22),Yk=new F(Q,"AnyParentsCollapsed", -23),Zk=new I,$k="2.3.12",mj="image",Uk=!1,oj=null,zi=!1; -function Ai(){if($g){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; -oj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){$g=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return $g};Q.None=Dh;Q.Uniform=wj;Q.UniformToFill=xj;Q.CycleAll=Rf;Q.CycleNotDirected=Vf;Q.CycleNotDirectedFast=Xf;Q.CycleNotUndirected=Yf;Q.CycleDestinationTree=Sf;Q.CycleSourceTree=Uf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Xk;Q.AnyParentsCollapsed=Yk;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} -function Oj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if($g){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Zk.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +var Bi=new vb,Ti=null,Yg=void 0!==sa.document,Oi=null,Pi="",Bh=new F(Q,"None",0),zj=new F(Q,"Uniform",1),Aj=new F(Q,"UniformToFill",2),Qf=new F(Q,"CycleAll",10),Uf=new F(Q,"CycleNotDirected",11),Wf=new F(Q,"CycleNotDirectedFast",12),Xf=new F(Q,"CycleNotUndirected",13),Rf=new F(Q,"CycleDestinationTree",14),Tf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Zk=new F(Q,"AllParentsCollapsed",22),$k=new F(Q,"AnyParentsCollapsed", +23),al=new I,bl="2.3.13",pj="image",Wk=!1,rj=null,zi=!1; +function Ai(){if(Yg){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; +rj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Yg=a?void 0!==sa.document:!1}; +Q.isUsingDOM=function(){return Yg};Q.None=Bh;Q.Uniform=zj;Q.UniformToFill=Aj;Q.CycleAll=Qf;Q.CycleNotDirected=Uf;Q.CycleNotDirectedFast=Wf;Q.CycleNotUndirected=Xf;Q.CycleDestinationTree=Rf;Q.CycleSourceTree=Tf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Zk;Q.AnyParentsCollapsed=$k;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} +function Rj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if(Yg){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=al.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("2bfa41fdb3784bca12")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.Xc=!(0<=g&&gh),!a.Xc))break;if("#"===f[0]){g=sa.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g);k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Xc=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.$f=function(){null!==d.observed&&el(d)};c.autoScale=wj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Vk,Q);Vk.prototype.computePixelRatio=function(){return 1}; -Vk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Lj(this);if(null===this.Dl){var c=new cj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),fl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; -Vk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Tj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Lj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?fl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Xc&&a!==a.Ny?!0:!1}Hi.className="DiagramHelper";function Ze(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Ze.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var oj="DraggingInfo";Ze.className="DraggingInfo";function ik(a,b,c){this.node=a;this.info=b;this.hv=c}ik.className="DraggingNodeInfoPair"; +function Re(){this.reset()}Re.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Gb(NaN,NaN)).freeze();this.gridSnapCellSpot=yc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Re.className="DraggingOptions"; +function cl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;dl(c);b&&c.Bm(b);return c}na(cl,Q);function dl(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=zc;a.layout=new el}cl.prototype.reset=function(){Q.prototype.reset.call(this);dl(this)};cl.className="Palette"; +function Xk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.Z=null;c.yn=!1;c.zn=!1;c.G=!0;c.v=!0;c.oa=0;c.o=!1;c.Dl=null;c.qy("drawShadows",!1);a=new U;var e=new Of;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new fc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new fl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.ag=function(){d.eb();gl(d)};c.ce=function(){null!==d.observed&&(d.eb(),d.R())};c.Na=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.$f=function(){null!==d.observed&&gl(d)};c.autoScale=zj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Xk,Q);Xk.prototype.computePixelRatio=function(){return 1}; +Xk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Oj(this);if(null===this.Dl){var c=new fj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),hl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; +Xk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Wj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Oj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?hl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,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.Sb,this.Sb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.Ec());b=this.ab.s;for(var c=b.length,d=0;da&&(a=0);this.oa!==a&&(this.oa=a)}}});Vk.className="Overview";function dl(){Ne.call(this);this.j=null}na(dl,Ne); -dl.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.timestampa&&(a=0);this.oa!==a&&(this.oa=a)}}});Xk.className="Overview";function fl(){Qe.call(this);this.j=null}na(fl,Qe); +fl.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))}; -gl.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,gl,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Dh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -gl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; -gl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -gl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;xh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=oc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());zh(b)};gl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -gl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,gl,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0b.maxScale||(b.scale=a))}; +il.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,il,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"increaseZoom:factor");var b=this.diagram;b.autoScale===Bh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +il.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +il.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +il.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;vh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=nc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());xh(b)};il.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +il.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,il,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0a&&(a+=360));return a}; t.Pf=function(){if(0!==(this.l&4096)===!1)return this.Wk;var a=this.Ia;return null!==this.panel?a*this.panel.Pf():a};t.Ds=function(a,b){void 0===b&&(b=new K);b.assign(a);this.we.Jd(b);return b};t.Es=function(a,b,c){return this.dk(a.x,a.y,b.x,b.y,c)}; t.dk=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Rf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Rf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -P.prototype.measure=function(a,b,c,d){if(!1!==Ij(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(yl(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case kl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case ll: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.Ib> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Al(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; -function Bl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=yl(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Dj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Dj(a,!0);a.measure(d,e,0,0);break;case kl:Dj(a,!0);a.measure(d,f,0,0);break;case ll:Dj(a,!0),a.measure(c,e,0,0)}}} -t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Cl(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(Cl(a,!0),a instanceof V&&Dl(a,this))}; -t.mc=function(a,b){if(!El(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&zl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Fl&&l.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, -a,m,!0,!1,k,h),m instanceof Fl&&m.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Hl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= +P.prototype.measure=function(a,b,c,d){if(!1!==Lj(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(Al(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case ml:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case nl: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.Ib> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Cl(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; +function Dl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Al(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Gj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Gj(a,!0);a.measure(d,e,0,0);break;case ml:Gj(a,!0);a.measure(d,f,0,0);break;case nl:Gj(a,!0),a.measure(c,e,0,0)}}} +t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||El(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(El(a,!0),a instanceof V&&Fl(a,this))}; +t.mc=function(a,b){if(!Gl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&Bl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Hl&&l.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, +a,m,!0,!1,k,h),m instanceof Hl&&m.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Jl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= p.m11,u=p.m21,y=p.dx,w=p.m12,z=p.m22,A=p.dy,C,E=C=0;p=C*r+E*u+y;var H=C*w+E*z+A;C=q.width+n;E=0;var T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);var aa=Math.min(H,C);var Y=Math.max(p+0,T)-E;var R=Math.max(H+0,C)-aa;p=E;H=aa;C=q.width+n;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;C=0;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;n=b.viewportBounds;q=n.x;r= -n.y;p=!(p>n.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof bh&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== -c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Il(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Il(a):k&&!1===this.shadowVisible&&Jl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Kl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Ll(this,h)&&null===this.shadowVisible&&Jl(a);null!==this.Ra&&(a.Ec(),Ml(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== -this.Ra||null!==this.areaBackground||Ll(this,h))?(Nl(this,!0),null===this.shadowVisible&&Jl(a)):Nl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Il(a);m&&k&&Jl(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; -function Ll(a,b){if(null===b)return!1;zl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Kl(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Fl&&a.areaBackground.type===Gl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} -function Ml(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Fl&&a.Ra.type===Gl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} -function Ol(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;gn.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof $g&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== +c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Kl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Kl(a):k&&!1===this.shadowVisible&&Ll(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Ml(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Nl(this,h)&&null===this.shadowVisible&&Ll(a);null!==this.Ra&&(a.Ec(),Ol(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== +this.Ra||null!==this.areaBackground||Nl(this,h))?(Pl(this,!0),null===this.shadowVisible&&Ll(a)):Pl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Kl(a);m&&k&&Ll(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; +function Nl(a,b){if(null===b)return!1;Bl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Ml(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Hl&&a.areaBackground.type===Il?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} +function Ol(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Hl&&a.Ra.type===Il?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} +function Ql(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;ge)&&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 bb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Qj(a,e)}else Qj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function om(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);km.add(a,b)} -function pm(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} -oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new sl),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new sl),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),rl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), -rl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new qm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); -a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new qm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1e)&&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 cb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Tj(a,e)}else Tj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function qm(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);mm.add(a,b)} +function rm(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} +oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new ul),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new ul),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== +a&&(null===this.B&&(this.B=new ul),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),tl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), +tl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new sm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); +a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new sm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ia=a,this.w(), -this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,gm(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Pf&& -this.xc(),this.g("desiredSize",d,a),ul(this)&&(a=this.part,null!==a&&(vl(this,a,"width"),vl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, -set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -rl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),rl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, -margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Hl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Hl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? -this.B.ob:null},set:function(a){this.animationTriggers!==a&&(rl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(rl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= -a.M(),bm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), -rl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), -rl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),rl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| -v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&sm(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,tm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, -get:function(){return null!==this.fa?this.fa.Lj:zc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),fm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),fm(this))}},toShortLength:{configurable:!0, -enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),fm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== -this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:zc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),fm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? -this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),fm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),fm(this))}},fromLinkable:{configurable:!0, +this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,im(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Of&& +this.xc(),this.g("desiredSize",d,a),wl(this)&&(a=this.part,null!==a&&(xl(this,a,"width"),xl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, +set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), +tl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),tl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, +margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Jl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Jl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? +this.B.ob:null},set:function(a){this.animationTriggers!==a&&(tl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(tl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= +a.M(),dm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), +tl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), +tl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),tl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| +v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&um(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,vm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, +get:function(){return null!==this.fa?this.fa.Lj:xc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),hm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),hm(this))}},toShortLength:{configurable:!0, +enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),hm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== +this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:xc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),hm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? +this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),hm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),hm(this))}},fromLinkable:{configurable:!0, enumerable:!0,get:function(){return null!==this.fa?this.fa.uq:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"fromLinkable"),this.cd(),this.fa.uq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.fa?this.fa.vq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(G&&B(a,"number",P,"fromMaxLinks"),0>a&&Ba(a,">= 0",P,"fromMaxLinks"),this.cd(),this.fa.vq=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),rl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),rl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= -this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),rl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),rl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== -a&&B(a,"function",P,"mouseEnter"),rl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),rl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),rl(this),this.B.bi= -a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),rl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),rl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),rl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),rl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, -get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),rl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),rl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: -null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),rl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),rl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== -a&&(null!==a&&B(a,"function",P,"actionCancel"),rl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),rl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= -this.contextMenu;b!==a&&(!G||a instanceof Be||a instanceof Le||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),rl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; +enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),tl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),tl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= +this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),tl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),tl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== +a&&B(a,"function",P,"mouseEnter"),tl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),tl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),tl(this),this.B.bi= +a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),tl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),tl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, +enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),tl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),tl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, +get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),tl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),tl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: +null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),tl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),tl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== +a&&(null!==a&&B(a,"function",P,"actionCancel"),tl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof De||a instanceof Oe||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),tl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= +this.contextMenu;b!==a&&(!G||a instanceof De||a instanceof Oe||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),tl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; P.prototype.isVisibleObject=P.prototype.Ld;P.prototype.isContainedBy=P.prototype.Dg;P.prototype.getNearestIntersectionPoint=P.prototype.Es;P.prototype.getLocalPoint=P.prototype.Ds;P.prototype.getDocumentScale=P.prototype.Pf;P.prototype.getDocumentAngle=P.prototype.yi;P.prototype.getDocumentBounds=P.prototype.zi;P.prototype.getDocumentPoint=P.prototype.la;P.prototype.intersectsRect=P.prototype.dd;P.prototype.containedInRect=P.prototype.qh;P.prototype.containsRect=P.prototype.df; -P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var km=null;P.className="GraphObject";km=new vb; -om("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=jm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},jm(Pf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Pf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Pf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var mm=null;P.className="GraphObject";mm=new vb; +qm("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=lm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},lm(Of,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Of){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Of))){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}); -om("TreeExpanderButton",function(){var a=jm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +qm("TreeExpanderButton",function(){var a=lm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof De&&(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}); -om("SubGraphExpanderButton",function(){var a=jm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof Df){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});om("ToolTip",function(){return jm(Be,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},jm(Pf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); -om("ContextMenu",function(){return jm(Be,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});om("ContextMenuButton",function(){var a=jm("Button");a.stretch=kl;var b=a.lb("ButtonBorder");b instanceof Pf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); -om("PanelExpanderButton",function(a){var b=pm(a,"COLLAPSIBLE"),c=jm("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},jm(Pf,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); -a=c.lb("ButtonBorder");a instanceof Pf&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -om("CheckBoxButton",function(a){var b=pm(a);a=jm("Button",{desiredSize:new Gb(14,14)},jm(Pf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +qm("SubGraphExpanderButton",function(){var a=lm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof De&&(c=c.adornedPart);if(c instanceof Cf){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});qm("ToolTip",function(){return lm(De,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},lm(Of,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); +qm("ContextMenu",function(){return lm(De,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});qm("ContextMenuButton",function(){var a=lm("Button");a.stretch=ml;var b=a.lb("ButtonBorder");b instanceof Of&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); +qm("PanelExpanderButton",function(a){var b=rm(a,"COLLAPSIBLE"),c=lm("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},lm(Of,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); +a=c.lb("ButtonBorder");a instanceof Of&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); +qm("CheckBoxButton",function(a){var b=rm(a);a=lm("Button",{desiredSize:new Gb(14,14)},lm(Of,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); -om("CheckBox",function(a){a=pm(a);a=jm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=jm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ml=new F(P,"Default",0);P.Vertical=ll=new F(P,"Vertical",4);P.Horizontal=kl=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); -P.UniformToFill=nl=new F(P,"UniformToFill",2);P.FlipVertical=ol=new F(P,"FlipVertical",1);P.FlipHorizontal=pl=new F(P,"FlipHorizontal",2);P.FlipBoth=ql=new F(P,"FlipBoth",3);P.make=jm;P.getBuilders=function(){var a=new vb,b;for(b in km)if(b!==b.toLowerCase()){var c=km.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=om; -P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};um.className="STransform"; -function vm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}vm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};vm.className="SGradient"; -function Tj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, -c)}Tj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Tj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Tj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Tj.prototype.focus=function(){this.Ta.focus()};Tj.prototype.Cx=function(){this.ownerDocument=null}; -oa.Object.defineProperties(Tj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Tj.className="SVGSurface"; +qm("CheckBox",function(a){a=rm(a);a=lm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=lm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ol=new F(P,"Default",0);P.Vertical=nl=new F(P,"Vertical",4);P.Horizontal=ml=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); +P.UniformToFill=pl=new F(P,"UniformToFill",2);P.FlipVertical=ql=new F(P,"FlipVertical",1);P.FlipHorizontal=rl=new F(P,"FlipHorizontal",2);P.FlipBoth=sl=new F(P,"FlipBoth",3);P.make=lm;P.getBuilders=function(){var a=new vb,b;for(b in mm)if(b!==b.toLowerCase()){var c=mm.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=qm; +P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};wm.className="STransform"; +function xm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}xm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};xm.className="SGradient"; +function Wj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, +c)}Wj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Wj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Wj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Wj.prototype.focus=function(){this.Ta.focus()};Wj.prototype.Cx=function(){this.ownerDocument=null}; +oa.Object.defineProperties(Wj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Wj.className="SVGSurface"; function vi(a,b){this.Vv=a;this.svg=a.Ta;this.stack=[];this.yh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Wl=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.gh=this.Or=this.Nr=0;this.Ed=this.gd=null;this.path=[];this.lm={};this.Pt=!1; -this.jh=null;this.Hj=0;this.xb=new um;this.j=Sl(this);this.Zj=Sl(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} -function Mj(a,b,c,d,e,f,g){void 0===a.Zj?Ql(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; +this.jh=null;this.Hj=0;this.xb=new wm;this.j=Ul(this);this.Zj=Ul(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} +function Pj(a,b,c,d,e,f,g){void 0===a.Zj?Sl(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.lm={stroke:"none",fill:"none"}};t.ef=function(a){this.addPath(this.path,this.xb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new vm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(mj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new vm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Tl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Tl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";wm(this,mj,f,this.xb);this.addElement(mj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");xm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};wm(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};wm(this,"fill",a,this.xb);xm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};wm(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new xm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(pj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new xm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Vl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Vl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";ym(this,pj,f,this.xb);this.addElement(pj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");zm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};ym(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};ym(this,"fill",a,this.xb);zm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};ym(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.xb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.mk= a.mk}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,mk:this.mk});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; -t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Bm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; -oa.Object.defineProperties(Xl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, +t.zg=function(a,b){if(a instanceof Hl&&a.type===Il){var c=a.Kk;a=a.st;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; +t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Dm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; +oa.Object.defineProperties(Zl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.rt!==a&&(this.rt=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},filter:{configurable:!0,get:function(){return this.ba.filter}, -set:function(a){this.ba.filter=""===a?"none":a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Um},set:function(a){this.Um=a}}});var Bm=Object.freeze([]);Xl.className="CanvasSurfaceContext";function Cm(){this.G=this.o=this.v=this.j=0}Cm.className="ColorNumbers"; -function Fl(a,b){Dm||(Em(),Dm=!0);Ya(this);this._isFrozen=!1;void 0===a?(this.ta=Wl,this.Jk="black"):"string"===typeof a?(this.ta=Wl,G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.Jk=a):(G&&$a(a,Fl,Fl,"constructor:type"),this.ta=a,this.Jk="black");a=this.ta;a===Zl?(this.Wd=Bc,this.Xk=Mc):this.Xk=a===Gl?this.Wd=Ic:this.Wd=zc;this.Tr=0;this.kq=NaN;this.He=this.qr=this.Ge=null;this.st=this.Kk=0;b&&Object.assign(this,b)} -Fl.prototype.copy=function(){var a=new Fl;a.ta=this.ta;a.Jk=this.Jk;a.Wd=this.Wd.M();a.Xk=this.Xk.M();a.Tr=this.Tr;a.kq=this.kq;null!==this.Ge&&(a.Ge=this.Ge.copy());a.qr=this.qr;return a};t=Fl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.Ge&&this.Ge.freeze();return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.Ge&&this.Ge.qa();return this};t.wb=function(a){a.classType===Fl?this.type=a:Ea(this,a)}; -t.toString=function(){var a="Brush(";if(this.type===Wl)a+=this.color;else if(a=this.type===Zl?a+"Linear ":this.type===Gl?a+"Radial ":this.type===Yl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Fl,"addColorStop:loc");B(b,"string",Fl,"addColorStop:color");G&&!Fm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Wl&&(this.type=Zl);this.He=null;return this}; -function Fm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Fl,"isValidColor");Dm||(Em(),Dm=!0);var b=Gm;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(a,b));return this};function Jm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(b,c)} -t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(-a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(-a,b));return this};function Km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(-b,c)} -function Lm(a,b,c){gi(a);a=Mm.j;var d=Mm.v,e=Mm.o,f=Mm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Mm.j-a)*c+a)+", "+Math.round((Mm.v-d)*c+d)+", "+Math.round((Mm.o-e)*c+e)+", "+Math.round((Mm.G-f)*c+f)+")"} -t.Xx=function(){if(this.type===Wl)return Nm(this.color);if((this.type===Zl||this.type===Gl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Gl)return Nm(a.first().value);if(null!==a.get(.5))return Nm(a.get(.5));if(2===a.count)return a=a.La(),Nm(Lm(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 Nm(Lm(a.get(c),a.get(d),1-f/e))}return!1}; -function Nm(a){if(!a)return!1;if(a instanceof Fl)return a.Xx();gi(a);return 128>(299*Mm.j+587*Mm.v+114*Mm.o)/1E3} -function Im(a,b){switch(b){case Hm:b=100*Om(Mm.j);var c=100*Om(Mm.v),d=100*Om(Mm.o);Pm.j=.4124564*b+.3575761*c+.1804375*d;Pm.v=.2126729*b+.7151522*c+.072175*d;Pm.o=.0193339*b+.119192*c+.9503041*d;Pm.G=Mm.G;b=Qm(Pm.j/Rm[0]);c=Qm(Pm.v/Rm[1]);d=Qm(Pm.o/Rm[2]);Sm.j=116*c-16;Sm.v=500*(b-c);Sm.o=200*(c-d);Sm.G=Pm.G;Sm.j=Math.min(100,Math.max(0,Sm.j+100*a));a=(Sm.j+16)/116;b=a-Sm.o/200;Pm.j=Rm[0]*Tm(Sm.v/500+a);Pm.v=Rm[1]*(Sm.j>Um*Vm?Math.pow(a,3):Sm.j/Um);Pm.o=Rm[2]*Tm(b);Pm.G=Sm.G;a=-.969266*Pm.j+1.8760108* -Pm.v+.041556*Pm.o;b=.0556434*Pm.j+-.2040259*Pm.v+1.0572252*Pm.o;Mm.j=255*Wm((3.2404542*Pm.j+-1.5371385*Pm.v+-.4985314*Pm.o)/100);Mm.v=255*Wm(a/100);Mm.o=255*Wm(b/100);Mm.G=Pm.G;Mm.j=Math.round(Mm.j);255Mm.j&&(Mm.j=0);Mm.v=Math.round(Mm.v);255Mm.v&&(Mm.v=0);Mm.o=Math.round(Mm.o);255Mm.o&&(Mm.o=0);return"rgba("+Mm.j+", "+Mm.v+", "+Mm.o+", "+Mm.G+")";case Xm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Dm||(Em(),Dm=!0);var b=Gm;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,Mm.j=a[0],Mm.v=a[1],Mm.o=a[2],Mm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Mm.j=0,Mm.v=0,Mm.o=0,Mm.G=1)}} -function hi(){var a=Mm.j/255,b=Mm.v/255,c=Mm.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Mm.G}function Om(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Wm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function Qm(a){return a>Vm?Math.pow(a,1/3):(Um*a+16)/116}function Tm(a){var b=a*a*a;return b>Vm?b:(116*a-16)/Um}function rm(a,b){"string"===typeof a?G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Fl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Em(){Gm=$g?(new cj(null,void 0,{willReadFrequently:!0})).context:null} -oa.Object.defineProperties(Fl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Fl,Fl,"type");this.ta=a;this.start.pc()&&(a===Zl?this.start=Bc:a===Gl&&(this.start=Ic));this.end.pc()&&(a===Zl?this.end=Mc:a===Gl&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"startRadius");0>a&&Ba(a,">= zero",Fl, -"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"endRadius");0>a&&Ba(a,">= zero",Fl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Fl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& -xa(this,a);this.qr=a;this.He=null}}});Fl.prototype.isDark=Fl.prototype.Xx;Fl.prototype.darkenBy=Fl.prototype.nz;Fl.prototype.lightenBy=Fl.prototype.oA;Fl.prototype.addColorStop=Fl.prototype.addColorStop;var Vm=216/24389,Um=24389/27,Rm=[95.047,100,108.883],Gm=null,Mm=new Cm,ii=new Cm,Pm=new Cm,Sm=new Cm,Dm=!1;Fl.className="Brush";var Wl;Fl.Solid=Wl=new F(Fl,"Solid",0);var Zl;Fl.Linear=Zl=new F(Fl,"Linear",1);var Gl;Fl.Radial=Gl=new F(Fl,"Radial",2);var Yl;Fl.Pattern=Yl=new F(Fl,"Pattern",4);var Hm; -Fl.Lab=Hm=new F(Fl,"Lab",5);var Xm;Fl.HSL=Xm=new F(Fl,"HSL",6); -Fl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Fl,"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};Fl.isValidColor=Fm;Fl.lighten=function(a){return Jm(a)};Fl.lightenBy=Jm;Fl.darken=function(a){return Km(a)};Fl.darkenBy=Km;Fl.mix=Lm;Fl.isDark=Nm;function nm(){this.Ea="Base"}nm.prototype.measure=function(){};nm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};nm.prototype.arrange=function(){};nm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};nm.prototype.CA=function(a){a.fk()};nm.prototype.mc=function(){}; -oa.Object.defineProperties(nm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});nm.prototype.remeasureObject=nm.prototype.CA;nm.prototype.arrangeElement=nm.prototype.bz;nm.prototype.measureElement=nm.prototype.rA;nm.className="PanelLayout";function Ym(){this.Ea="Base"}na(Ym,nm); -Ym.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Zm(a);for(var k=0;ka)&&Ba(a,"0 <= loc <= 1",Hl,"addColorStop:loc");B(b,"string",Hl,"addColorStop:color");G&&!Hm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Yl&&(this.type=am);this.He=null;return this}; +function Hm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Hl,"isValidColor");Fm||(Gm(),Fm=!0);var b=Im;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(a,b));return this};function Lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(b,c)} +t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(-a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(-a,b));return this};function Mm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(-b,c)} +function Nm(a,b,c){gi(a);a=Om.j;var d=Om.v,e=Om.o,f=Om.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Om.j-a)*c+a)+", "+Math.round((Om.v-d)*c+d)+", "+Math.round((Om.o-e)*c+e)+", "+Math.round((Om.G-f)*c+f)+")"} +t.Xx=function(){if(this.type===Yl)return Pm(this.color);if((this.type===am||this.type===Il)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Il)return Pm(a.first().value);if(null!==a.get(.5))return Pm(a.get(.5));if(2===a.count)return a=a.La(),Pm(Nm(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 Pm(Nm(a.get(c),a.get(d),1-f/e))}return!1}; +function Pm(a){if(!a)return!1;if(a instanceof Hl)return a.Xx();gi(a);return 128>(299*Om.j+587*Om.v+114*Om.o)/1E3} +function Km(a,b){switch(b){case Jm:b=100*Qm(Om.j);var c=100*Qm(Om.v),d=100*Qm(Om.o);Rm.j=.4124564*b+.3575761*c+.1804375*d;Rm.v=.2126729*b+.7151522*c+.072175*d;Rm.o=.0193339*b+.119192*c+.9503041*d;Rm.G=Om.G;b=Sm(Rm.j/Tm[0]);c=Sm(Rm.v/Tm[1]);d=Sm(Rm.o/Tm[2]);Um.j=116*c-16;Um.v=500*(b-c);Um.o=200*(c-d);Um.G=Rm.G;Um.j=Math.min(100,Math.max(0,Um.j+100*a));a=(Um.j+16)/116;b=a-Um.o/200;Rm.j=Tm[0]*Vm(Um.v/500+a);Rm.v=Tm[1]*(Um.j>Wm*Xm?Math.pow(a,3):Um.j/Wm);Rm.o=Tm[2]*Vm(b);Rm.G=Um.G;a=-.969266*Rm.j+1.8760108* +Rm.v+.041556*Rm.o;b=.0556434*Rm.j+-.2040259*Rm.v+1.0572252*Rm.o;Om.j=255*Ym((3.2404542*Rm.j+-1.5371385*Rm.v+-.4985314*Rm.o)/100);Om.v=255*Ym(a/100);Om.o=255*Ym(b/100);Om.G=Rm.G;Om.j=Math.round(Om.j);255Om.j&&(Om.j=0);Om.v=Math.round(Om.v);255Om.v&&(Om.v=0);Om.o=Math.round(Om.o);255Om.o&&(Om.o=0);return"rgba("+Om.j+", "+Om.v+", "+Om.o+", "+Om.G+")";case Zm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Fm||(Gm(),Fm=!0);var b=Im;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,Om.j=a[0],Om.v=a[1],Om.o=a[2],Om.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Om.j=0,Om.v=0,Om.o=0,Om.G=1)}} +function hi(){var a=Om.j/255,b=Om.v/255,c=Om.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Om.G}function Qm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Ym(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Sm(a){return a>Xm?Math.pow(a,1/3):(Wm*a+16)/116}function Vm(a){var b=a*a*a;return b>Xm?b:(116*a-16)/Wm}function tm(a,b){"string"===typeof a?G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Hl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Gm(){Im=Yg?(new fj(null,void 0,{willReadFrequently:!0})).context:null} +oa.Object.defineProperties(Hl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Hl,Hl,"type");this.ta=a;this.start.pc()&&(a===am?this.start=zc:a===Il&&(this.start=Ic));this.end.pc()&&(a===am?this.end=Mc:a===Il&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"startRadius");0>a&&Ba(a,">= zero",Hl, +"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"endRadius");0>a&&Ba(a,">= zero",Hl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Hl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& +xa(this,a);this.qr=a;this.He=null}}});Hl.prototype.isDark=Hl.prototype.Xx;Hl.prototype.darkenBy=Hl.prototype.nz;Hl.prototype.lightenBy=Hl.prototype.oA;Hl.prototype.addColorStop=Hl.prototype.addColorStop;var Xm=216/24389,Wm=24389/27,Tm=[95.047,100,108.883],Im=null,Om=new Em,ii=new Em,Rm=new Em,Um=new Em,Fm=!1;Hl.className="Brush";var Yl;Hl.Solid=Yl=new F(Hl,"Solid",0);var am;Hl.Linear=am=new F(Hl,"Linear",1);var Il;Hl.Radial=Il=new F(Hl,"Radial",2);var $l;Hl.Pattern=$l=new F(Hl,"Pattern",4);var Jm; +Hl.Lab=Jm=new F(Hl,"Lab",5);var Zm;Hl.HSL=Zm=new F(Hl,"HSL",6); +Hl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Hl,"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};Hl.isValidColor=Hm;Hl.lighten=function(a){return Lm(a)};Hl.lightenBy=Lm;Hl.darken=function(a){return Mm(a)};Hl.darkenBy=Mm;Hl.mix=Nm;Hl.isDark=Pm;function pm(){this.Ea="Base"}pm.prototype.measure=function(){};pm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};pm.prototype.arrange=function(){};pm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};pm.prototype.CA=function(a){a.fk()};pm.prototype.mc=function(){}; +oa.Object.defineProperties(pm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});pm.prototype.remeasureObject=pm.prototype.CA;pm.prototype.arrangeElement=pm.prototype.bz;pm.prototype.measureElement=pm.prototype.rA;pm.className="PanelLayout";function $m(){this.Ea="Base"}na($m,pm); +$m.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=an(a);for(var k=0;kaa&&(tb=Math.max(aa-wf,0));var Ik=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(Ik?wf:0)),0)}if(1===vc.columnSpan&&(Yb===xg||Yb===ll)){O=a.Kb(Xb);var Vi=O.bd();tb=Math.max(ag-O.actual,0);tb+Vi>T&&(tb=Math.max(T-Vi,0));var ko=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(ko?Vi:0)),0)}vf&&vc.fk()}}}}}Pa(z);var ge=0,De=0;f=a.columnCount;for(var Kg=0;Kg=a.rowCount);bf++)O=a.Lb(db.row+bf),tb=0,tb=Yb===Ad||Yb===ll?Math.max(O.minimum,0===Hd[db.row+bf]?O.maximum:Math.min(Hd[db.row+bf],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc, -O.maximum)),Xd.height+=tb,Gc+=O.minimum;for(var fd=1;fd=a.columnCount);fd++)O=a.Kb(db.column+fd),tb=0,tb=Yb===Ad||Yb===kl?Math.max(O.minimum,0===Sc[db.column+fd]?O.maximum:Math.min(Sc[db.column+fd],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Xd.width+=tb,Mk+=O.minimum;xb.width+=Xd.width;xb.height+=Xd.height;var Wh=db.margin,Bf=Wh.right+Wh.left,Xi=Wh.top+Wh.bottom;db.measure(xb.width,xb.height,Mk,Gc);for(var Xh=db.measuredBounds,Yd= -Math.max(Xh.width+Bf,0),eg=Math.max(Xh.height+Xi,0),Cf=0,Yh=0;Yh=a.rowCount);Yh++)O=a.Lb(db.row+Yh),Cf+=O.total||0;if(Cf=cf)&&!(db.row+Ge>=a.rowCount);Ge++){O=a.Lb(db.row+Ge);var ef=O.ua||0,ff=df(db,O,ie);G&&"number"!==typeof ff&&v(db+" spanAllocation does not return a number: "+ff);O.actual=Math.min(O.maximum,ef+ff);O.ua!==ef&&(cf-=O.ua-ef)}for(;0Id&&(O.actual=Math.min(O.maximum,Id+cf),O.ua!==Id&&(cf-=O.ua-Id));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var Ng=0,gf=0;gf=a.columnCount);gf++)O=a.Kb(db.column+gf),Ng+=O.total||0;if(Ng=Og)&&!(db.column+fg>=a.columnCount);fg++){O=a.Kb(db.column+fg);var Yi=O.ua||0,Zi=He(db,O,mo);G&&"number"!==typeof Zi&&v(db+" spanAllocation does not return a number: "+ -Zi);O.actual=Math.min(O.maximum,Yi+Zi);O.ua!==Yi&&(Og-=O.ua-Yi)}for(;0Nk&&(O.actual=Math.min(O.maximum,Nk+Og),O.ua!==Nk&&(Og-=O.ua-Nk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Xd);Gb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Sc&&Pa(Sc);var Pg=0,Qg=0,Ok=a.desiredSize,Vr=a.maxSize;Yb=yl(a,!0);var $i=De=ge=0,aj=0;f=a.columnCount;for(var Pk=0;Pk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= -1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,Ye=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Wb()){jb=a.defaultAlignment;jb.mb()||(jb=Ic);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,Ze=Kc.offsetX);dd.mb()&&(Xb=dd.y,jb=dd.offsetY)}else Ed=jb.x,Xb=jb.y, -Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Kc=R.width;dd=R.height;var Dc=Y.margin,vc=Dc.left+Dc.right,vf=Dc.top+Dc.bottom,Fd=cm(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==kl||(Kc=Math.max(ha-vc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==ll||(dd=Math.max(ya-vf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+vf;O+=La*Ed-(Kc+vc)*Ed+Ze+Dc.left;la+=sb*Xb-ha*Xb+jb+Dc.top;Y.visible&& -(jc(wb,Wb,tb,Ye,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,Ye)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=nk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= +function en(a,b,c){var d=null;a instanceof W&&""!==a.mf&&(d=a.lb(a.mf),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.Dp(b),d=d.panel}function fn(){this.Ea="Base"}na(fn,pm); +fn.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Vb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Of&&(u=k,r=u.strokeWidth*u.scale);var y=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var w=gn(k),z=w.x*y+w.offsetX;w=w.y*l+w.offsetY;var A=hn(k),C=A.x*y+A.offsetX;A=A.y*l+A.offsetY;isFinite(b)&&(m=Math.max(Math.abs(z-C)-r,0));isFinite(c)&&(n=Math.max(Math.abs(w-A)-r,0));r=Gb.alloc();r.h(0,0);a=an(a);for(A=0;A< +h;A++)w=d[A],w===k||!w.visible&&w!==a||(l=w.margin,y=l.right+l.left,z=l.top+l.bottom,w.measure(m,n,0,0),l=w.measuredBounds,y=Math.max(l.width+y,0),l=Math.max(l.height+z,0),r.h(Math.max(y,r.width),Math.max(l,r.height)));if(1===h)e.width=y,e.height=l,Gb.free(r);else{w=gn(k);A=hn(k);h=d=0;A.x!==w.x&&A.y!==w.y&&(d=r.width/Math.abs(A.x-w.x),h=r.height/Math.abs(A.y-w.y));Gb.free(r);r=0;null!==u&&(r=u.strokeWidth*u.scale,yg(u)===zg&&(d=h=Math.max(d,h)));d+=Math.abs(w.offsetX)+Math.abs(A.offsetX)+r;h+=Math.abs(w.offsetY)+ +Math.abs(A.offsetY)+r;u=k.stretch;u===ol&&(u=Al(k,!1));switch(u){case xg:g=f=0;break;case Ad:isFinite(b)&&(d=b);isFinite(c)&&(h=c);break;case ml:isFinite(b)&&(d=b);g=0;break;case nl:f=0,isFinite(c)&&(h=c)}k.fk();k.measure(d,h,f,g);e.width=k.measuredBounds.width+p;e.height=k.measuredBounds.height+q}}; +fn.prototype.arrange=function(a,b){var c=b.length,d=a.Vb(),e=d.measuredBounds,f=M.alloc();f.h(0,0,1,1);var g=d.margin,h=g.left;g=g.top;var k=a.padding,l=k.left;k=k.top;d.arrange(l+h,k+g,e.width,e.height);var m=gn(d),n=hn(d),p=m.y*e.height+m.offsetY,q=n.x*e.width+n.offsetX;n=n.y*e.height+n.offsetY;f.x=m.x*e.width+m.offsetX;f.y=p;ic(f,q,n,0,0);f.x+=h+l;f.y+=g+k;for(e=0;eaa&&(tb=Math.max(aa-Nh,0));var mo=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(mo?Nh:0)),0)}if(1===uc.columnSpan&&(Yb===xg||Yb===nl)){O=a.Kb(Xb);var Ui=O.bd();tb=Math.max(Ec-O.actual,0);tb+Ui>T&&(tb=Math.max(T-Ui,0));var Mk=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(Mk?Ui:0)),0)}(cf||Fd)&&uc.fk()}}}}}Pa(z);var Fe=0,Sd=0;f=a.columnCount;for(var Oh= +0;Oh=a.rowCount);fd++)O=a.Lb(ab.row+fd),tb=0,tb=Yb===Ad||Yb===nl?Math.max(O.minimum,0===Sc[ab.row+fd]?O.maximum:Math.min(Sc[ab.row+fd],O.maximum)):Math.max(O.minimum, +isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.height+=tb,Vh+=O.minimum;for(var cg=1;cg=a.columnCount);cg++)O=a.Kb(ab.column+cg),tb=0,tb=Yb===Ad||Yb===ml?Math.max(O.minimum,0===Ie[ab.column+cg]?O.maximum:Math.min(Ie[ab.column+cg],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.width+=tb,Gc+=O.minimum;Ab.width+=Vd.width;Ab.height+=Vd.height;var je=ab.margin,Zi=je.right+je.left,$i=je.top+je.bottom;ab.measure(Ab.width,Ab.height,Gc, +Vh);for(var ke=ab.measuredBounds,dg=Math.max(ke.width+Zi,0),eg=Math.max(ke.height+$i,0),Wh=0,Bf=0;Bf=a.rowCount);Bf++)O=a.Lb(ab.row+Bf),Wh+=O.total||0;if(Wh=gd)&&!(ab.row+Je>=a.rowCount);Je++){O=a.Lb(ab.row+Je);var gf=O.ua||0,Wd=fg(ab,O,ff);G&&"number"!==typeof Wd&&v(ab+" spanAllocation does not return a number: "+Wd);O.actual=Math.min(O.maximum,gf+Wd);O.ua!==gf&&(gd-= +O.ua-gf)}for(;0Lg&&(O.actual=Math.min(O.maximum,Lg+gd),O.ua!==Lg&&(gd-=O.ua-Lg));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var hf=0,Xh=0;Xh=a.columnCount);Xh++)O=a.Kb(ab.column+Xh),hf+=O.total||0;if(hf=Mg)&&!(ab.column+Yh>=a.columnCount);Yh++){O=a.Kb(ab.column+Yh);var bj=O.ua||0,no=aj(ab,O,Ke);G&&"number"!== +typeof no&&v(ab+" spanAllocation does not return a number: "+no);O.actual=Math.min(O.maximum,bj+no);O.ua!==bj&&(Mg-=O.ua-bj)}for(;0Pk&&(O.actual=Math.min(O.maximum,Pk+Mg),O.ua!==Pk&&(Mg-=O.ua-Pk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Vd);Gb.free(Ab);void 0!==Sc&&Pa(Sc);void 0!==Ie&&Pa(Ie);var Ng=0,Og=0,Qk=a.desiredSize,Wr=a.maxSize;Yb=Al(a,!0);var cj=Sd=Fe=0,dj=0;f=a.columnCount;for(var Rk=0;Rk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= +1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,af=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(af=Math.max(c.height-k,0));var kb=Y.alignment;if(kb.Wb()){kb=a.defaultAlignment;kb.mb()||(kb=Ic);var Ed=kb.x;var Xb=kb.y;var bf=kb.offsetX;kb=kb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,bf=Kc.offsetX);dd.mb()&&(Xb=dd.y,kb=dd.offsetY)}else Ed=kb.x,Xb=kb.y, +bf=kb.offsetX,kb=kb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,kb=bf=0;Kc=R.width;dd=R.height;var Bc=Y.margin,uc=Bc.left+Bc.right,cf=Bc.top+Bc.bottom,Fd=em(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==ml||(Kc=Math.max(ha-uc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==nl||(dd=Math.max(ya-cf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+cf;O+=La*Ed-(Kc+uc)*Ed+bf+Bc.left;la+=sb*Xb-ha*Xb+kb+Bc.top;Y.visible&& +(jc(wb,Wb,tb,af,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,af)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=qk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= a.S.s;u=r.length;for(y=0;ye*w*c))){A=H.segmentIndex;if(!isFinite(A)||isNaN(A))A=0;0>A&&(A=w-Math.min(-A,w));A=Math.round(A%w);w=H.opacity;C=1;if(1!==w){if(0===w)continue;C=b.globalAlpha;b.globalAlpha=C*w}E=q[y];var T=!1,aa=H.strokeDashArray;null!==aa&&(T=!0,b.ws(aa,H.strokeDashOffset));if("LineV"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== +e)/e);aa<=H+l;aa++){var Y=aa*e+p;0<=Y&&Y<=h&&qn(aa,z,A,E)&&(b.moveTo(Y,0),b.lineTo(Y,k))}b.stroke();b.ef()}else if("LineH"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== N.j?R.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&R.offset(-Y.startX,-Y.startY));Y=A[2];if(T!==lg){var O=k.computeAngle(z,T,Y);z.Qb=O}O=R.x-b.x;var la=R.y-b.y;K.free(R);Pa(A)}else if(C<-n||C>=n)A=K.alloc(),k.Hg(),k.computeMidPoint(A),Y=k.midAngle,T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O),O=A.x-b.x,la=A.y-b.y,K.free(A);else{O=0;0<=C?(la=m.P(C),A=Cha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Pf&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==rn&&T!==sn||r.rotate(90, -ha/2,La/2);T!==tn&&T!==un||r.rotate(-90,ha/2,La/2);T===vn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), +2):A);R=Y.Nf(la);var ha=A.Nf(O);Y=R>ha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Of&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==tn&&T!==un||r.rotate(90, +ha/2,La/2);T!==vn&&T!==wn||r.rotate(-90,ha/2,La/2);T===xn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), y.rotate(Y))}else y.rotate(Y);O+=y.x;la+=y.y;R.set(A);R.h(O+H,la+z,A.width,A.height);q.push(R);c.ld(R)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.vg=c;a.position.h(b.x+c.x,b.y+c.y);ac(e,c.width||0,c.height||0);Ib.free(r);K.free(u);K.free(y)}}}}; -pn.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Be||a instanceof S){var d=a,e=null;a instanceof Be&&(e=a,d=e.adornedPart);var f=a instanceof Be?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=K.alloc(),q=n,y=r,q.Hg(),q.computeMidPoint(y),q=n.midAngle,l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,y=r.y, K.free(r);else{u=0;0<=h?(r=b.s[h],y=hz+10?0<=h?q.gb(r):r.gb(q):z>w+10?0<=h?y.gb(u):u.gb(y):0<=h?q.gb(u):u.gb(q)}else q=0<=h?r.gb(y):y.gb(r);l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(y.x-r.x)*k;y=r.y+(y.y-r.y)*k}if(p.kp())g.location=new K(n,y);else{p.pc()&&(p=Ic);r=Ib.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var A=g.naturalBounds;u=M.allocAt(0,0,A.width,A.height);w=K.alloc();w.Ki(u,p);r.Ma(w);p=-w.x;z=-w.y;var C=A.width,E=A.height;A=K.alloc();A.assign(m);var H=isNaN(m.x),T=isNaN(m.y);if(H||T){C=C/2+3;E=E/2+3;var aa=45<=q&&135>=q,Y=225<=q&&315>=q;l===lg&&(aa||Y)?(A.x=T?C:m.y,A.y=H?E:m.x,aa?0<=h||isNaN(h)&&.5>k||!H||(A.y=-E):Y&&((0<=h||isNaN(h)&&.5>k)&&H&&(A.y=-E),T&&(A.x=-C))):(H&&(A.x=0<=h||isNaN(h)&&.5>k?C:-C),T&&(A.y=-E),A.rotate(q))}else A.rotate(q);n+=A.x;y+=A.y;r.Dp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ -p,y+z);g.move(h);K.free(h);K.free(A);K.free(w);M.free(u);Ib.free(r)}}null!==e?e.hm(!1):d.hm(!1);d=wn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);K.free(d)}}; -function qn(a,b,c,d){if(!1!==Ij(d)){var e=d.strokeWidth;0===e&&a instanceof Be&&a.type===W.Link&&a.adornedObject instanceof Pf&&(e=a.adornedObject.strokeWidth);e*=d.Ia;a instanceof S&&null!==a.Ba?(a=a.geometry.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Be&&null!==a.adornedPart.Ba?(a=a.adornedPart.Ba.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Re(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.Ba?d.jc.h(0,0,e.width,e.height):d.jc.assign(d.Ba.bounds);Dj(d,!1)}} -function xn(){this.Ea="Base"}na(xn,nm); -xn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,y=q.flattenedLengths,w=q.flattenedTotalLength,z=u.length,A=0,C=0,E=Na(),H=0;Hha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var Ze=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Dc=0,vc=0,vf=w;a.graduatedMarks= -[];for(var Fd,Ph=0;PhUi*Yb*w/a.graduatedRange&&null===Ec.graduatedSkip)){var Jg=y[0][0],Ud=0,wc=0;vc=w*Ec.graduatedStart-1E-4;vf=w*Ec.graduatedEnd+1E-4;var ag=Ui*Yb,Fc=a.graduatedTickBase;if(Fca.graduatedMin+ag&&(Fc-=Math.floor((Fc-a.graduatedMin)/ag)*ag);for(var Ik=Ze[Ph],Vi=Fc,ko=1E-6*a.graduatedMax, -ge=1;Fc<=a.graduatedMax+ko;ge++){a:{for(var De=Ik.length,Kg=0;Kg-Qh){var yf=!1;break a}}yf=!0}if(yf&&(Fc>a.graduatedMax&&(Fc=a.graduatedMax),null===Ec.graduatedSkip||Ec instanceof bh&&!Ec.graduatedSkip(Fc,Ec)||Ec instanceof Pf&&!Ec.graduatedSkip(Fc,Ec))&&(Dc=(Fc-a.graduatedMin)*w/a.graduatedRange,Dc>w&&(Dc=w),vc<=Dc&&Dc<=vf)){for(var he=E[Ud][wc],$e=y[Ud][wc];UdJg&&wc< -y[Ud].length-1;)wc++,he=E[Ud][wc],$e=y[Ud][wc],Jg+=$e;if(Dc<=Jg)break;Ud++;wc=0;he=E[Ud][wc];$e=y[Ud][wc];Jg+=$e}var xc=u[Ud],Vd=xc[2*wc],Jk=xc[2*wc+1],Ee=(Dc-(Jg-$e))/$e,Rh=new K(Vd+(xc[2*wc+2]-Vd)*Ee+r/2-q.bounds.x,Jk+(xc[2*wc+3]-Jk)*Ee+r/2-q.bounds.y);Rh.scale(h.scale,h.scale);a:{var Gd=he,bg=E[Ud];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Lg){var Sh=1-Math.abs(.5-Ee);he=(Gd*Sh+Wd*(1-Sh))%360;break a}}}he=Gd}if(Ec instanceof bh){var pd="";null!==Ec.graduatedFunction?(pd=Ec.graduatedFunction(Fc,Ec),pd=null!==pd&&void 0!==pd?pd.toString():""):pd=(+Fc.toFixed(2)).toString();""!==pd&&Fd.push({nm:Rh,angle:he,text:pd})}else Fd.push({nm:Rh,angle:he})}Fc=Vi+ge*ag}}}a.graduatedMarks.push(Fd)}Pa(E); -var xb=a.graduatedMarks;if(null!==xb)for(var Wi=d.length,kc=0;kcqd;qd++){switch(qd){case 0:yc.h(Xd,Hd);break;case 1:yc.h(Xd+Th,Hd);break;case 2:yc.h(Xd,Hd+dg);break;case 3:yc.h(Xd+Th,Hd+dg)}yc.rotate(db+kb.angle);yc.offset(Lk,Vh);0===Uh&&0===qd?Sc.h(yc.x,yc.y,0,0):Sc.lf(yc);yc.offset(-Lk,-Vh);yc.rotate(-db-kb.angle)}K.free(yc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Sc);ic(af,Sc.x,Sc.y,Sc.width,Sc.height)}else if(kb instanceof bh){var ed=a,Mk=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new bh);var Gc=ed.temporaryTextBlock;yn(Gc,kb); -var bf=kb.alignmentFocus;bf.pc()&&(bf=Bc);for(var fd=kb.segmentOrientation,Wh=kb.segmentOffset,Bf=new M,Xi=0,Xh=0,Yd=0,eg=0,Cf=0,Yh=lc.length,cf=0;cfYd||225Yd)&&Id.rotate(-Yd,ef/2,ff/2);var Ng=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ki(Ng,bf);Id.Ma(gf);var Og=-gf.x,mo=-gf.y,He=K.alloc();He.assign(Wh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Yd);Xi+=He.x+Og;Xh+=He.y+mo;var fg=new M(Xi,Xh,df.width,df.height),Yi=new M(df.x,df.y,df.width,df.height),Zi=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ie.lA=eg;ie.lineCount=Gc.lineCount;ie.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];ie.actualBounds=fg;ie.measuredBounds=Yi;ie.naturalBounds=Zi;0===cf?Bf.assign(fg):Bf.ld(fg);K.free(He);K.free(gf);M.free(Ng);Ib.free(Id)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(Bf);ic(Mk,Bf.x,Bf.y,Bf.width,Bf.height)}Dj(kb,!1)}}}; -xn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=Bc);for(var z=0;zha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbaf))for(var kb=0;kbaf&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var bf=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Bc=0,uc=0,cf=w;a.graduatedMarks= +[];for(var Fd,wf=0;wfYb*Lk*w/a.graduatedRange&&null===Cc.graduatedSkip)){var $f=y[0][0],Rd=0,Dc=0;uc=w*Cc.graduatedStart-1E-4;cf=w*Cc.graduatedEnd+1E-4;var xf=Yb*Lk,Ec=a.graduatedTickBase;if(Eca.graduatedMin+xf&&(Ec-=Math.floor((Ec-a.graduatedMin)/xf)*xf);for(var Nh=bf[wf],mo=Ec,Ui=1E-6*a.graduatedMax, +Mk=1;Ec<=a.graduatedMax+Ui;Mk++){a:{for(var Fe=Nh.length,Sd=0;Sd-yf){var Ph=!1;break a}}Ph=!0}if(Ph&&(Ec>a.graduatedMax&&(Ec=a.graduatedMax),null===Cc.graduatedSkip||Cc instanceof $g&&!Cc.graduatedSkip(Ec,Cc)||Cc instanceof Of&&!Cc.graduatedSkip(Ec,Cc))&&(Bc=(Ec-a.graduatedMin)*w/a.graduatedRange,Bc>w&&(Bc=w),uc<=Bc&&Bc<=cf)){for(var qd=E[Rd][Dc],df=y[Rd][Dc];Rd$f&&Dc< +y[Rd].length-1;)Dc++,qd=E[Rd][Dc],df=y[Rd][Dc],$f+=df;if(Bc<=$f)break;Rd++;Dc=0;qd=E[Rd][Dc];df=y[Rd][Dc];$f+=df}var vc=u[Rd],Qh=vc[2*Dc],Td=vc[2*Dc+1],Ge=(Bc-($f-df))/df,Vi=new K(Qh+(vc[2*Dc+2]-Qh)*Ge+r/2-q.bounds.x,Td+(vc[2*Dc+3]-Td)*Ge+r/2-q.bounds.y);Vi.scale(h.scale,h.scale);a:{var ee=qd,He=E[Rd];if(!(.5005>Ge&&.4995Ge?0Ge||.9995Wi){var Rh=1-Math.abs(.5-Ge);qd=(ee*Rh+Ud*(1-Rh))%360;break a}}}qd=ee}if(Cc instanceof $g){var fe="";null!==Cc.graduatedFunction?(fe=Cc.graduatedFunction(Ec,Cc),fe=null!==fe&&void 0!==fe?fe.toString():""):fe=(+Ec.toFixed(2)).toString();""!==fe&&Fd.push({nm:Vi,angle:qd,text:fe})}else Fd.push({nm:Vi,angle:qd})}Ec=mo+Mk*xf}}}a.graduatedMarks.push(Fd)}Pa(E); +var zf=a.graduatedMarks;if(null!==zf)for(var Ab=d.length,ag=0;agab;ab++){switch(ab){case 0:wc.h(Af,Vd);break;case 1:wc.h(Af+Xi,Vd);break;case 2:wc.h(Af,Vd+Th);break;case 3:wc.h(Af+Xi,Vd+Th)}wc.rotate(Uh+gb.angle);wc.offset(bg,Ok);0===he&&0===ab?Sc.h(wc.x,wc.y,0,0):Sc.lf(wc);wc.offset(-bg,-Ok);wc.rotate(-Uh-gb.angle)}K.free(wc);null!==Fc.graduatedBounds&&Fc.graduatedBounds.push(Sc);ic(ef,Sc.x,Sc.y,Sc.width,Sc.height)}else if(gb instanceof $g){var ed=a,ie=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new $g);var Gc=ed.temporaryTextBlock;An(Gc,gb); +var Vh=gb.alignmentFocus;Vh.pc()&&(Vh=zc);for(var fd=gb.segmentOrientation,cg=gb.segmentOffset,je=new M,Zi=0,$i=0,ke=0,dg=0,eg=0,Wh=kc.length,Bf=0;Bfke||225ke)&&Wd.rotate(-ke,Je/2,gf/2);var Lg=M.allocAt(0,0,Je,gf),hf=K.alloc();hf.Ki(Lg,Vh);Wd.Ma(hf);var Xh=-hf.x,Mg=-hf.y,Ke=K.alloc();Ke.assign(cg);isNaN(Ke.x)&&(Ke.x=Je/2+3);isNaN(Ke.y)&&(Ke.y=-(gf/2+3));Ke.rotate(ke);Zi+=Ke.x+Xh;$i+=Ke.y+Mg;var aj=new M(Zi,$i,ff.width,ff.height),Yh=new M(ff.x,ff.y,ff.width,ff.height),bj=new M(fg.x,fg.y,fg.width,fg.height); +gd.lA=dg;gd.lineCount=Gc.lineCount;gd.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];gd.actualBounds=aj;gd.measuredBounds=Yh;gd.naturalBounds=bj;0===Bf?je.assign(aj):je.ld(aj);K.free(Ke);K.free(hf);M.free(Lg);Ib.free(Wd)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(je);ic(ie,je.x,je.y,je.width,je.height)}Gj(gb,!1)}}}; +zn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=zc);for(var z=0;zg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +W.prototype.Mf=function(a){P.prototype.Mf.call(this,a);a.S=this.S;for(var b=a.S.s,c=b.length,d=0;dg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.ws(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.Eb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.ef();n&&b.ts()}}}} -function Cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=En(a,!0),l=En(a,!1),m=0;mp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function En(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function Gn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),K.free(r));K.free(m);f&&e.transform(g);return l}; -t.Sj=function(){for(var a=this.S.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case kl:this.w(!0);this.measure(c+h,f+g,0,0);break;case ll:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; -t.rh=function(a){var b=this.naturalBounds,c=Zm(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case ml:this.w(!0);this.measure(c+h,f+g,0,0);break;case nl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; +t.rh=function(a){var b=this.naturalBounds,c=an(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); -if(null!==m?m.Of(a,b,c,d,e,p):xl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Ln(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Ln(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Of=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Ib.alloc(),g.reset());g.multiply(this.transform);if(this.qh(a,g))return Nn(this,b,c,e),void 0===f&&Ib.free(g),!0;if(this.dd(a,g)){if(!this.isAtomic)for(var h=an(this),k=this.S.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); +if(null!==m?m.Of(a,b,c,d,e,p):zl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Nn(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Nn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.Ag=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.Ae(),k=h?a:Jb(K.allocAt(a.x,a.y),this.transform),l=h?b:Jb(K.allocAt(b.x,b.y),this.transform),m=k.Nf(l),n=0y.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; -function en(a){var b=null;a instanceof Pf&&(b=a.spot1,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Ac);return b}function fn(a){var b=null;a instanceof Pf&&(b=a.spot2,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;cy.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +function gn(a){var b=null;a instanceof Of&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=yc);return b}function hn(a){var b=null;a instanceof Of&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Ij(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||Mn(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.jb(se,"elements",this,b,null,d,null),c.jb(re,"elements",this,null,b,null,a)))};function Nn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(re,"rowdefs",this,null,c,null,a)}return b[a]}; -t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"rowdefs",this,c,null,a,null);this.w()}}};function kk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(re,"coldefs",this,null,c,null,a)}return b[a]}; -t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"coldefs",this,c,null,a,null);this.w()}}};function lk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&mm(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&mm(a,new jk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&mm(a,new jk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Lj(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||On(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.jb(ue,"elements",this,b,null,d,null),c.jb(te,"elements",this,null,b,null,a)))};function Pn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(te,"rowdefs",this,null,c,null,a)}return b[a]}; +t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"rowdefs",this,c,null,a,null);this.w()}}};function nk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(te,"coldefs",this,null,c,null,a)}return b[a]}; +t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"coldefs",this,c,null,a,null);this.w()}}};function ok(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&om(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&om(a,new mk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&om(a,new mk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Pn=!0)}}))} -t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();Gn(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; +t.$z=function(a){if(this.type!==W.Graduated)return NaN;var b=this.Vb();b.transform.Jd(a);return b.geometry.Ox(a)*this.graduatedRange+this.graduatedMin};function jm(a){a=a.allBindings;return null!==a&&a._isFrozen} +function wg(a){var b=a.allBindings;if(null===b)null!==a.data&&v("Template cannot have .data be non-null: "+a),a.allBindings=b=new I;else if(b._isFrozen)return;var c=new I;Pn(a,!1);a.yk(a,function(a,d){d.Eh();var e=d.localBindings;if(null!==e)for(gm(d,!1),e=e.iterator;e.next();){var f=e.value;f.mode===Qn&&gm(d,!0);var g=f.sourceName;null!==g&&("/"===g&&Pn(a,!0),g=yl(f,a,d),null!==g&&(c.add(g),null===g.srcBindings&&(g.srcBindings=new I),g.srcBindings.add(f)));b.add(f)}if(d instanceof W&&d.type===W.Table){if(0< +d.rowCount)for(a=d.rowDefs,e=a.length,f=0;f=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Rn=!0)}}))} +t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();In(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; t.Qa=function(a){var b=this.allBindings;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.lb(e),null===d){G&&Fa("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.Ni;if(-1!==g){if(f=this.xs(g),null===f)continue}else null!==c.Dd&&(f=c.Dd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.Fo;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.Kb(c.Jl):2===e&&(f=f.Lb(c.Jl))}void 0!==f&&c.aw(f,d)}}};t.Jx=function(a){if(void 0===a||null===a||null===this.me)return null;B(a,"object",W,"findItemPanelForData");return this.me.L(a)}; -function Qn(a,b){a=a.S.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.wc(this.S.length-1,!1);Rn(this,this.itemArray)}; -function Rn(a,b){var c=Jn(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Tn(a,b);e=Un(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Nn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Jn(a);a.Mb(f,e);d&&(e.zb=b,Vn(a,f,c),e.zb=null);e.data=b}}} -function Vn(a,b,c){for(a=a.S;ba;)this.wc(this.S.length-1,!1);Tn(this,this.itemArray)}; +function Tn(a,b){var c=Ln(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Vn(a,b);e=Wn(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Pn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Ln(a);a.Mb(f,e);d&&(e.zb=b,Xn(a,f,c),e.zb=null);e.data=b}}} +function Xn(a,b,c){for(a=a.S;ba&&Ba(a,">= 0",W,"padding"), a=new fc(a)):(x(a,fc,W,"padding"),0>a.left&&Ba(a.left,">= 0",W,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",W,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.fn},set:function(a){var b=this.fn;b.D(a)||(G&&x(a,Hb,W,"defaultAlignment"),this.fn=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:tc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new $n),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", -b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Fl)&&(a instanceof Fl&&a.freeze(),null===this.Y&&(this.Y=new $n),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new $n),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof Be);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:sc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new bo),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Hl)&&(a instanceof Hl&&a.freeze(),null===this.Y&&(this.Y=new bo),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; +b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new bo),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof De);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, this)):this instanceof U&&(null!==b&&c.qf.remove(b),null!==a&&c.qf.add(a,this))):(c=this.panel,null!==c&&null!==c.me&&(null!==b&&c.me.remove(b),null!==a&&c.me.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Qa()}}},itemIndex:{configurable:!0,get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.tb:null},set:function(a){this.localBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Qn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Rn(this,a)}}},itemTemplate:{configurable:!0, +a&&(null===this.B&&(this.B=new ul),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Sn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&dk(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&ak(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Tn(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new vb}var b=this.itemTemplateMap.L("");b!==a&&(x(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Bv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}rl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),rl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Df||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Df&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&Mn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), +enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}tl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),tl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Cf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Cf&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&On(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), this.mf=a,this.w(),this.g("alignmentFocusName",b,a))}}}); -oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return lm.L("Position")}},Horizontal:{configurable:!0,get:function(){return lm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return lm.L("Vertical")}},Spot:{configurable:!0,get:function(){return lm.L("Spot")}},Auto:{configurable:!0,get:function(){return lm.L("Auto")}},Table:{configurable:!0,get:function(){return lm.L("Table")}},Viewbox:{configurable:!0, -enumerable:!0,get:function(){return lm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return lm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return lm.L("TableColumn")}},Link:{configurable:!0,get:function(){return lm.L("Link")}},Grid:{configurable:!0,get:function(){return lm.L("Grid")}},Graduated:{configurable:!0,get:function(){return lm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; +oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return nm.L("Position")}},Horizontal:{configurable:!0,get:function(){return nm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return nm.L("Vertical")}},Spot:{configurable:!0,get:function(){return nm.L("Spot")}},Auto:{configurable:!0,get:function(){return nm.L("Auto")}},Table:{configurable:!0,get:function(){return nm.L("Table")}},Viewbox:{configurable:!0, +enumerable:!0,get:function(){return nm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return nm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return nm.L("TableColumn")}},Link:{configurable:!0,get:function(){return nm.L("Link")}},Grid:{configurable:!0,get:function(){return nm.L("Grid")}},Graduated:{configurable:!0,get:function(){return nm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; W.prototype.findItemPanelForData=W.prototype.Jx;W.prototype.updateTargetBindings=W.prototype.Qa;W.prototype.copyTemplate=W.prototype.lz;W.prototype.graduatedValueForPoint=W.prototype.$z;W.prototype.graduatedPointForValue=W.prototype.Zz;W.prototype.findColumnForLocalX=W.prototype.Az;W.prototype.findRowForLocalY=W.prototype.Iz;W.prototype.addColumnDefinition=W.prototype.Sy;W.prototype.addRowDefinition=W.prototype.Yy;W.prototype.addRowColumnDefinition=W.prototype.Xy; W.prototype.removeColumnDefinition=W.prototype.DA;W.prototype.getColumnDefinition=W.prototype.Kb;W.prototype.removeRowDefinition=W.prototype.IA;W.prototype.getRowDefinition=W.prototype.Lb;W.prototype.removeAt=W.prototype.sb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Mb;W.prototype.elt=W.prototype.P;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.lb;W.prototype.findInVisualTree=W.prototype.am;W.prototype.walkVisualTreeFrom=W.prototype.yk; -W.prototype.findMainElement=W.prototype.Vb;var Pn=!1,Xn=!1,Yn=null,lm=new vb;W.className="Panel";W.definePanelLayout=Zn;Zn("Position",new Ym);Zn("Vertical",new an);Zn("Auto",new dn);Zn("Link",new pn);function ao(){this.yq=0;this.G=100;this.oa=10;this.Z=0;this.ki=this.o=this.j=this.v=null}ao.prototype.copy=function(){var a=new ao;a.yq=this.yq;a.G=this.G;a.oa=this.oa;a.Z=this.Z;a.v=this.v;a.j=this.j;a.o=this.o;a.ki=this.ki;return a};ao.className="GradPanelSettings"; -function $n(){this.Vc=[];this.Uc=[];this.j=this.ub=bo;this.ob=this.Nb=0;this.cq=tc;this.Na=1;this.Z=this.oa=null;this.G=1;this.tb=this.o=this.v=null} -$n.prototype.copy=function(a){for(var b=new $n,c=this.Vc,d=c.length,e=b.Vc,f=0;fa&&Ba(a,">= 0",jk,"height"),this.Oc=a,this.actual=this.ua,null!== -this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",jk,"width"),0>a&&Ba(a,">= 0",jk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",jk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",jk,"minimum"),this.wj=a,this.actual= -this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",jk,"maximum"),0>a&&Ba(a,">= 0",jk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,jk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), -this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,jk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,jk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), -this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&rm(a,"RowColumnDefinition.separatorStroke"),a instanceof Fl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", -b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",jk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); +b)d=b.defaultSeparatorPadding;else return a;return a+(this.isRow?d.top+d.bottom:d.left+d.right)};t.Ub=function(a,b,c){var d=this.Xe;if(null!==d&&(d.jb(re,a,this,b,c,void 0,void 0),null!==this.he&&(b=d.diagram,null!==b&&!b.skipsModelSourceBindings&&(d=d.th(),null!==d&&(b=d.data,null!==b)))))for(c=this.he.iterator;c.next();)c.value.Gp(this,b,a,d)};function kn(a){if(a.sizing===fo){var b=a.Xe;return a.isRow?b.rowSizing:b.columnSizing}return a.sizing} +t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Mi(a,b,c,d):e=a;e.Dd=this;a=this.panel;null!==a&&(b=a.th(),null!==b&&jm(b)&&v("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+e+" on "+a));null===this.he&&(this.he=new I);this.he.add(e);return this}; +oa.Object.defineProperties(mk.prototype,{panel:{configurable:!0,get:function(){return this.Xe}},isRow:{configurable:!0,get:function(){return this.Hq},set:function(a){this.Hq=a}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb=a}},height:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"height"),0>a&&Ba(a,">= 0",mk,"height"),this.Oc=a,this.actual=this.ua,null!== +this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"width"),0>a&&Ba(a,">= 0",mk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",mk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",mk,"minimum"),this.wj=a,this.actual= +this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",mk,"maximum"),0>a&&Ba(a,">= 0",mk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,mk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), +this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,mk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,mk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), +this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&tm(a,"RowColumnDefinition.separatorStroke"),a instanceof Hl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", +b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",mk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[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){Pa(y);return}e>r?(z=e-r,e=r):z=0;var A=Math.sqrt(e*e/(1+p*p));0>n&&(A=-A);h+=A;k+=p*A;a.translate(h,k);a.rotate(q);a.translate(-(g/2),-(f/2));0===z&&d.sh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==z){w++;if(w===y.length){Pa(y);return}r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];e=z}}Pa(y)}} -t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof Be&&"Selection"===h.category&&h.adornedObject instanceof Pf&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof De&&"Selection"===h.category&&h.adornedObject instanceof Of&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Sf("drawShadows")&&(f=h.isShadowed);!1===a.Wl&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.ws(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.vk(),a.ef();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.zg(d);null!==c&&(h&&f&&Jl(a),a.vk(),h&&f&&Il(a));a.ef()}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.Ig*e,k-p,l+e,k-L.Ig*p,l+e,k),a.bezierCurveTo(l+e,k+L.Ig*p,l+L.Ig*e,k+p,l,k+p),a.bezierCurveTo(l-L.Ig*e,k+p,l-e,k+L.Ig*p,l-e,k),a.bezierCurveTo(l-e,k-L.Ig*p,l-L.Ig*e,k-p,l,k-p),a.closePath(),null!==d&&a.zg(d),null!==c&& -(h&&f&&Jl(a),a.vk(),h&&f&&Il(a)),a.ef();else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=$d(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;wu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Yd(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;w(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.dc(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Hc(-d,-d);if(f.ha(a))return M.free(f),!1;f.Hc(d,d)}null!==this.stroke&&f.Hc(e,e);a=f.ha(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?de(c,a.x,a.y,e):be(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?be(c,a.x,a.y,e):$d(c,a,e,1=this.strokeWidth)m=L.hf(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Na();a=new K;L.hf(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),w-=r,z-= -u;q.contains(w,z);)w-=r,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.xc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} +d;g.y=f;g.transform(c);b=!1;ro(this,g,h,k)?b=!0:(g.x=e,g.y=a,g.transform(c),ro(this,g,h,k)?b=!0:(h.x=d,h.y=a,h.transform(c),ro(this,g,h,k)?b=!0:(g.x=d,g.y=f,g.transform(c),ro(this,g,h,k)&&(b=!0))));K.free(g);Ib.free(c);K.free(h);K.free(k);return b};function ro(a,b,c,d){if(!a.Es(b,c,d))return!1;a=b.x;b=b.y;var e=c.x,f=c.y;c=d.x;d=d.y;if(a===e)return b=a&&d<=b;a=d&&c<=a} t.Kx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.rh(a,!0))return!0;var e=a.Nf(b),f=e;1.5=e||Lb(b,f,0,-n)>= -e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?de(b,a.x,a.y,f):be(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Rd:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Sd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Td:case Zd:p=n.type===Td?$d(n,f):ae(n,f,g,m);var q=p.length;if(0===q){g=n.type===Td?n.centerX:n.endX;m=n.type===Td?n.centerY:n.endY;if(a.Fd(g,m)> +e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?be(b,a.x,a.y,f):$d(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Od:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Pd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Qd:case Xd:p=n.type===Qd?Yd(n,f):Zd(n,f,g,m);var q=p.length;if(0===q){g=n.type===Qd?n.centerX:n.endX;m=n.type===Qd?n.centerY:n.endY;if(a.Fd(g,m)> e)return!1;break}n=null;for(var r=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); -return d};function to(a){var b=so[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=so[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),so[d]=a,c!==d&&(so[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Pf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Pf,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);ul(this)&&(a=this.part,null!==a&&vl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Pf,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Pf,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= -this.gj;b!==a&&(null!==a&&rm(a,"Shape.fill"),a instanceof Fl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"Shape.stroke"),a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Pf,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; -null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Pf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Pf,"strokeCap"):(eo(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Pf,"strokeJoin"):(eo(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Pf,"strokeMiterLimit"),1<=a){eo(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", -b,a)}else G&&Ba(a,"value >= 1",Pf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Pf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& -(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case pl:a.translate(e,0);a.scale(-1,1);break;case ol:a.translate(0,f);a.scale(1,-1);break;case ql:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case pl:a.scale(-1,1);a.translate(-e,0);break;case ol:a.scale(1,-1);a.translate(0,-f);break;case ql:a.scale(-1,-1),a.translate(-e,-f)}}}; -t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Bo?Bo(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);if(l){h=null!==Co?Co(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= +function so(a){var b=a.diagram;null!==b&&b.undoManager.isUndoingRedoing||(a.segmentOrientation=Bn,"None"!==a.toArrow?(a.segmentIndex=-1,a.alignmentFocus=od):"None"!==a.fromArrow&&(a.segmentIndex=0,a.alignmentFocus=new Hb(1-od.x,od.y)))} +Of.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=to[a.toArrow];else"None"!==a.fromArrow?d=to[a.fromArrow]:(d=L.Ce[a.figure],"string"===typeof d&&(d=L.Ce[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.dl=b,d.cl=c);if(null===d){var e=L.Ce.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +return d};function uo(a){var b=to[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=to[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),to[d]=a,c!==d&&(to[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} +oa.Object.defineProperties(Of.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Of,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);wl(this)&&(a=this.part,null!==a&&xl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Of,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Of,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= +this.gj;b!==a&&(null!==a&&tm(a,"Shape.fill"),a instanceof Hl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"Shape.stroke"),a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Of,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; +null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Of,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Of,"strokeCap"):(go(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Of,"strokeJoin"):(go(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Of,"strokeMiterLimit"),1<=a){go(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", +b,a)}else G&&Ba(a,"value >= 1",Of,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Of,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& +(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case rl:a.translate(e,0);a.scale(-1,1);break;case ql:a.translate(0,f);a.scale(1,-1);break;case sl:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case rl:a.scale(-1,1);a.translate(-e,0);break;case ql:a.scale(1,-1);a.translate(0,-f);break;case sl:a.scale(-1,-1),a.translate(-e,-f)}}}; +t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Co?Co(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);if(l){h=null!==Do?Do(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.ef(),b instanceof vi&&b.gd.classList.add("gojs-td"))}}; -t.wk=function(a,b,c){if(!P.prototype.wk.call(this,a,b,c))return!1;wi(this,a,this.Dc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Xb.length))){this.l|=16777216; -l=this.Xb[k];for(b=Math.max(1,a-b);Fo(l)>b&&1a.maxLines&&(a.l|=16777216)}} -function Mo(a,b,c,d){var e=a.formatting===Eo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Ao(a)+h);var k=a.overflow===Ho?Io(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===No){a.We=1;var l=Fo(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Lo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Oo(a,g);g=g.substr(f.length);b=Oo(a,g);for(l=Fo(f+b);0 -c&&1c;){var n=1;l=Fo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Fo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Lo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Oo(a,g);for(l=Fo(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} -function Oo(a,b){if(a.wrap===Po)return b.substr(0,1);for(var c=b.length,d=0,e=Qo;d=b.length?b:b.substr(0,d)}function Fo(a){return null===wo?8*a.length:wo.measureText(a).width}function Ao(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===wo){var c=16;return a.rf=c}void 0!==So[b]&&5E3>To?c=So[b]:(c=1.3*wo.measureText("M").width,So[b]=c,To++);return a.rf=c} -function Io(a){if(null===wo)return 6;if(void 0!==Uo[a]&&5E3>Vo)var b=Uo[a];else b=wo.measureText(Jo).width,Uo[a]=b,Vo++;return b} -function Go(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Ao(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==No){a.We=0;var k=Gb.alloc();Mo(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else Mo(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} -oa.Object.defineProperties(bh.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",bh,"font"),zo(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, -get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",bh,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(xo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',bh,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,bh,"flip"),xo(this),this.ia.ig=a,this.R(), -this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:jd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,bh,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),xo(this),this.ia.ms=a,bm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();Mo(this,this.kc,999999,a);var b=a.width; -Gb.free(a);a=Go(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",bh,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& -(G&&B(a,"boolean",bh,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",bh,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Wo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,bh,bh,"wrap"), -xo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Xo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,bh,bh,"overflow"),xo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"TextBlock.stroke"), -a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Ao(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",bh,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? -this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Le||v("TextBlock.textEditor must be an HTMLInfo."),xo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",bh,"errorFunction"),xo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? -this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,bh,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new uo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,bh,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",bh,"maxLines"),xo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, -choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",bh,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); -var Bo=null,Co=null,No=new F(bh,"None",0),Ko=new F(bh,"WrapFit",1),Wo=new F(bh,"WrapDesiredSize",2),Po=new F(bh,"WrapBreakAll",3),Xo=new F(bh,"OverflowClip",0),Ho=new F(bh,"OverflowEllipsis",1),Eo=new F(bh,"FormatTrim",0),Ro=new F(bh,"FormatNone",0),Qo=/[ \u200b\u00ad]/,So=new bb,To=0,Uo=new bb,Vo=0,Jo="...",Do="",wo=null,vo=!1;bh.className="TextBlock"; -function yo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Eo;this.Wq=Infinity;this.mr=Xo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=jd;this.os=Wo}yo.prototype.copy=function(){var a=new yo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};bh.getEllipsis=function(){return Jo};bh.setEllipsis=function(a){Jo=a;Uo=new bb;Vo=0};bh.getBaseline=function(){return Bo}; -bh.setBaseline=function(a){Bo=a};bh.getUnderline=function(){return Co};bh.setUnderline=function(a){Co=a};bh.isValidFont=zo;bh.FormatNone=Ro;bh.FormatTrim=Eo;bh.None=No;bh.OverflowClip=Xo;bh.OverflowEllipsis=Ho;bh.WrapBreakAll=Po;bh.WrapDesiredSize=Wo;bh.WrapFit=Ko;function uo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}uo.prototype.copy=function(){var a=new uo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};uo.className="GradElementSettings"; -function rk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=pc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Yo;na(rk,P); -rk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};rk.prototype.wb=function(a){a===xg||a===zg||a===nl?this.imageStretch=a:P.prototype.wb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ib(this)}; -function Ri(a){void 0===a&&(a="");B(a,"string",rk,"clearCache:url");""!==a?Yo[a]&&(delete Yo[a],Zo--):(Yo=new bb,Zo=0)} -function $o(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case nl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===nl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=ap;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(bp(w,4,l,m,c),bp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;m=this.Xb.length))){this.l|=16777216; +l=this.Xb[k];for(b=Math.max(1,a-b);Go(l)>b&&1a.maxLines&&(a.l|=16777216)}} +function No(a,b,c,d){var e=a.formatting===Fo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Bo(a)+h);var k=a.overflow===Io?Jo(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===Oo){a.We=1;var l=Go(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Mo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Po(a,g);g=g.substr(f.length);b=Po(a,g);for(l=Go(f+b);0 +c&&1c;){var n=1;l=Go(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Go(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Mo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Po(a,g);for(l=Go(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} +function Po(a,b){if(a.wrap===Qo)return b.substr(0,1);for(var c=b.length,d=0,e=Ro;d=b.length?b:b.substr(0,d)}function Go(a){return null===xo?8*a.length:xo.measureText(a).width}function Bo(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===xo){var c=16;return a.rf=c}void 0!==To[b]&&5E3>Uo?c=To[b]:(c=1.3*xo.measureText("M").width,To[b]=c,Uo++);return a.rf=c} +function Jo(a){if(null===xo)return 6;if(void 0!==Vo[a]&&5E3>Wo)var b=Vo[a];else b=xo.measureText(Ko).width,Vo[a]=b,Wo++;return b} +function Ho(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Bo(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==Oo){a.We=0;var k=Gb.alloc();No(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else No(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} +oa.Object.defineProperties($g.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",$g,"font"),Ao(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, +get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",$g,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(yo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',$g,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,$g,"flip"),yo(this),this.ia.ig=a,this.R(), +this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,$g,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),yo(this),this.ia.ms=a,dm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();No(this,this.kc,999999,a);var b=a.width; +Gb.free(a);a=Ho(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",$g,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& +(G&&B(a,"boolean",$g,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",$g,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Xo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,$g,$g,"wrap"), +yo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Yo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,$g,$g,"overflow"),yo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"TextBlock.stroke"), +a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Bo(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",$g,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? +this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Oe||v("TextBlock.textEditor must be an HTMLInfo."),yo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",$g,"errorFunction"),yo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? +this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,$g,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new vo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,$g,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",$g,"maxLines"),yo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, +choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",$g,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); +var Co=null,Do=null,Oo=new F($g,"None",0),Lo=new F($g,"WrapFit",1),Xo=new F($g,"WrapDesiredSize",2),Qo=new F($g,"WrapBreakAll",3),Yo=new F($g,"OverflowClip",0),Io=new F($g,"OverflowEllipsis",1),Fo=new F($g,"FormatTrim",0),So=new F($g,"FormatNone",0),Ro=/[ \u200b\u00ad]/,To=new cb,Uo=0,Vo=new cb,Wo=0,Ko="...",Eo="",xo=null,wo=!1;$g.className="TextBlock"; +function zo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Fo;this.Wq=Infinity;this.mr=Yo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=kd;this.os=Xo}zo.prototype.copy=function(){var a=new zo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};$g.getEllipsis=function(){return Ko};$g.setEllipsis=function(a){Ko=a;Vo=new cb;Wo=0};$g.getBaseline=function(){return Co}; +$g.setBaseline=function(a){Co=a};$g.getUnderline=function(){return Do};$g.setUnderline=function(a){Do=a};$g.isValidFont=Ao;$g.FormatNone=So;$g.FormatTrim=Fo;$g.None=Oo;$g.OverflowClip=Yo;$g.OverflowEllipsis=Io;$g.WrapBreakAll=Qo;$g.WrapDesiredSize=Xo;$g.WrapFit=Lo;function vo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}vo.prototype.copy=function(){var a=new vo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};vo.className="GradElementSettings"; +function uk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=oc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Zo;na(uk,P); +uk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};uk.prototype.wb=function(a){a===xg||a===zg||a===pl?this.imageStretch=a:P.prototype.wb.call(this,a)};uk.prototype.toString=function(){return"Picture("+this.source+")#"+jb(this)}; +function Ri(a){void 0===a&&(a="");B(a,"string",uk,"clearCache:url");""!==a?Zo[a]&&(delete Zo[a],$o--):(Zo=new cb,$o=0)} +function ap(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case pl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===pl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=bp;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(cp(w,4,l,m,c),cp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new fe(a,0,!0)).add(new je(Cd,b-a,0)).add(new je(Rd,b,a,b-f,0,b,f)).add(new je(Cd,b,c-a)).add(new je(Rd,b-a,c,b,c-f,b-f,c)).add(new je(Cd,a,c)).add(new je(Rd,0,c-a,f,c,0,c-f)).add(new je(Cd,0,a)).add((new je(Rd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new de(a,0,!0)).add(new le(Cd,b-a,0)).add(new le(Od,b,a,b-f,0,b,f)).add(new le(Cd,b,c-a)).add(new le(Od,b-a,c,b,c-f,b-f,c)).add(new le(Cd,a,c)).add(new le(Od,0,c-a,f,c,0,c-f)).add(new le(Cd,0,a)).add((new le(Od,a,0,0,f,f,0)).close()));1e.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.I^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.qa();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.cc();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.fc(),c.skipsUndoManager=d)}}}},isHighlighted:{configurable:!0,get:function(){return 0!==(this.I& 524288)},set:function(a){var b=0!==(this.I&524288);if(b!==a){G&&B(a,"boolean",U,"isHighlighted");this.I^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.qa(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.R();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{configurable:!0,get:function(){return 0!==(this.I&8192)},set:function(a){var b=0!==(this.I&8192);b!==a&&(G&&B(a,"boolean",U,"isShadowed"),this.I^=8192,this.$c=!0,this.g("isShadowed",b, -a),this.R())}},isAnimated:{configurable:!0,get:function(){return 0!==(this.I&262144)},set:function(a){var b=0!==(this.I&262144);b!==a&&(G&&B(a,"boolean",U,"isAnimated"),this.I^=262144,this.g("isAnimated",b,a))}},highlightedChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Bq:null},set:function(a){var b=this.highlightedChanged;b!==a&&(null!==a&&B(a,"function",U,"highlightedChanged"),hp(this),this.T.Bq=a,this.g("highlightedChanged",b,a))}},selectionObjectName:{configurable:!0, -enumerable:!0,get:function(){return null!==this.T?this.T.Ir:""},set:function(a){var b=this.selectionObjectName;b!==a&&(G&&B(a,"string",U,"selectionObjectName"),hp(this),this.T.Ir=a,this.fh=null,this.g("selectionObjectName",b,a))}},selectionAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.Gr:null},set:function(a){var b=this.selectionAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"selectionAdornmentTemplate"),hp(this),this.T.Gr=a,this.g("selectionAdornmentTemplate", -b,a))}},selectionObject:{configurable:!0,get:function(){if(null===this.fh){var a=this.selectionObjectName;null!==a&&""!==a?(a=this.lb(a),null!==a?this.fh=a:this.fh=this):this instanceof S?(a=this.path,null!==a?this.fh=a:this.fh=this):this.fh=this}return this.fh}},selectionChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Hr:null},set:function(a){var b=this.selectionChanged;b!==a&&(null!==a&&B(a,"function",U,"selectionChanged"),hp(this),this.T.Hr=a,this.g("selectionChanged", -b,a))}},resizeAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.tr:null},set:function(a){var b=this.resizeAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"resizeAdornmentTemplate"),hp(this),this.T.tr=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.vr:""},set:function(a){var b=this.resizeObjectName;b!==a&&(G&&B(a,"string",U,"resizeObjectName"),hp(this),this.T.vr=a,this.g("resizeObjectName", -b,a))}},resizeObject:{configurable:!0,get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.lb(a),null!==a)?a:this}},resizeCellSize:{configurable:!0,get:function(){return null!==this.T?this.T.ur:Ub},set:function(a){var b=this.resizeCellSize;b.D(a)||(G&&x(a,Gb,U,"resizeCellSize"),a=a.M(),hp(this),this.T.ur=a,this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.wr:null},set:function(a){var b= -this.rotateAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"rotateAdornmentTemplate"),hp(this),this.T.wr=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.xr:""},set:function(a){var b=this.rotateObjectName;b!==a&&(G&&B(a,"string",U,"rotateObjectName"),hp(this),this.T.xr=a,this.g("rotateObjectName",b,a))}},rotateObject:{configurable:!0,get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.lb(a),null!== -a)?a:this}},rotationSpot:{configurable:!0,get:function(){return null!==this.T?this.T.zr:gd},set:function(a){var b=this.rotationSpot;b.D(a)||(G&&(x(a,Hb,U,"rotationSpot"),a===gd||a.mb()||v("Part.rotationSpot must be a specific Spot value or Spot.Default, not: "+a)),a=a.M(),hp(this),this.T.zr=a,this.g("rotationSpot",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(G&&B(a,"string",U,"text"),this.kc=a,this.g("text",b,a))}}, -containingGroup:{configurable:!0,get:function(){return this.Lh},set:function(a){if(this.ed()){var b=this.Lh;if(b!==a){G&&null!==a&&x(a,Df,U,"containingGroup");null===a||this!==a&&!a.Zd(this)||(this===a&&v("Cannot make a Group a member of itself: "+this.toString()),v("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.F(2);var c=this.diagram;null!==b?vp(b,this):this instanceof Df&&null!==c&&c.mi.remove(this);this.Lh=a;null!==a?up(a, -this):this instanceof Df&&null!==c&&c.mi.add(this);this.F(1);if(null!==c&&c.da){var d=this.data,e=c.model;if(null!==d&&e.Ci()){var f=e.Da(null!==a?a.data:null);e.Ap(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.da,c.da=!0),d(this,b,a),null!==c&&(c.da=e));if(this instanceof Df)for(c=new J,hl(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof V)for(d=d.linksConnected;d.next();)Ap(d.value);if(this instanceof V){for(c=this.linksConnected;c.next();)Ap(c.value);c=this.labeledLink; -null!==c&&Ap(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&xi(b,-1,a))}}else v("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Xp:null},set:function(a){var b=this.containingGroupChanged;b!==a&&(null!==a&&B(a,"function",U,"containingGroupChanged"),hp(this),this.T.Xp=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{configurable:!0,get:function(){return null!== -this.containingGroup||this instanceof V&&null!==this.labeledLink?!1:!0}},layoutConditions:{configurable:!0,get:function(){return null!==this.T?this.T.Pq:127},set:function(a){var b=this.layoutConditions;b!==a&&(G&&B(a,"number",U,"layoutConditions"),hp(this),this.T.Pq=a,this.g("layoutConditions",b,a))}},dragComputation:{configurable:!0,get:function(){return null!==this.T?this.T.hq:null},set:function(a){var b=this.dragComputation;b!==a&&(null!==a&&B(a,"function",U,"dragComputation"), -hp(this),this.T.hq=a,this.g("dragComputation",b,a))}},shadowOffset:{configurable:!0,get:function(){return null!==this.T?this.T.Mr:Bb},set:function(a){var b=this.shadowOffset;b.D(a)||(G&&x(a,K,U,"shadowOffset"),a=a.M(),hp(this),this.T.Mr=a,this.R(),this.g("shadowOffset",b,a))}},shadowColor:{configurable:!0,get:function(){return null!==this.T?this.T.Lr:"gray"},set:function(a){var b=this.shadowColor;b!==a&&(G&&B(a,"string",U,"shadowColor"),hp(this),this.T.Lr=a,this.R(),this.g("shadowColor", -b,a))}},shadowBlur:{configurable:!0,get:function(){return null!==this.T?this.T.gh:4},set:function(a){var b=this.shadowBlur;b!==a&&(G&&B(a,"number",U,"shadowBlur"),hp(this),this.T.gh=a,this.R(),this.g("shadowBlur",b,a))}}});U.prototype.invalidateLayout=U.prototype.F;U.prototype.findCommonContainingGroup=U.prototype.Hx;U.prototype.isMemberOf=U.prototype.Zd;U.prototype.findTopLevelPart=U.prototype.Nz;U.prototype.findSubGraphLevel=U.prototype.Jz;U.prototype.ensureBounds=U.prototype.$a; -U.prototype.getDocumentBounds=U.prototype.zi;U.prototype.findObject=U.prototype.lb;U.prototype.moveTo=U.prototype.moveTo;U.prototype.invalidateAdornments=U.prototype.cc;U.prototype.clearAdornments=U.prototype.Qj;U.prototype.removeAdornment=U.prototype.Vf;U.prototype.addAdornment=U.prototype.nh;U.prototype.findAdornment=U.prototype.ak;U.prototype.updateTargetBindings=U.prototype.Qa;var sp=!1;U.className="Part";U.LayoutNone=0;U.LayoutAdded=1;U.LayoutRemoved=2;U.LayoutShown=4;U.LayoutHidden=8; -U.LayoutNodeSized=16;U.LayoutGroupLayout=32;U.LayoutNodeReplaced=64;U.LayoutStandard=127;U.LayoutAll=16777215;function Be(a,b){void 0===a||a instanceof nm||"string"===typeof a?U.call(this,a):(U.call(this),a&&(b=a));this.I&=-257;this.Vg="Adornment";this.De=null;this.Pw=0;this.lx=!1;this.j=this.bb=null;b&&Object.assign(this,b)}na(Be,U);Be.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Be.prototype.updateRelationshipsFromData=function(){}; -Be.prototype.hm=function(a){var b=this.adornedObject,c=null===b||void 0===b?void 0:b.part;if(c instanceof S&&b instanceof Pf){b=c.path;c.hm(a);a=b.geometry;c=this.S.s;b=c.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Np(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Np(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Pp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Pp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(2a&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Op(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Op(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Qp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Qp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(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, +vg.prototype.computeBorder=function(a){var b=this.part,c=b.diagram,d=null===c||!c.animationManager.isAnimating;if(null!==c&&b instanceof Cf&&!b.layer.isTemporary&&b.computesBoundsAfterDrag&&this.wo.u()){var e=c.toolManager.findTool("Dragging");if(e===c.currentTool&&(c=e.computeBorder(b,this.wo,a),null!==c))return c}c=M.alloc();e=this.computeMemberBounds(c);var f=this.Eb;b instanceof Cf&&!b.isSubGraphExpanded?a.h(e.x-f.left,e.y-f.top,0,0):a.h(e.x-f.left,e.y-f.top,Math.max(e.width+f.left+f.right,0), +Math.max(e.height+f.top+f.bottom,0));M.free(c);d&&b instanceof Cf&&b.computesBoundsIncludingLocation&&b.location.u()&&a.lf(b.location);return a}; +vg.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Cf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof S){if(!b.computesBoundsIncludingLinks)continue;if(Lj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};oa.Object.defineProperties(vg.prototype,{padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,vg,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.g("padding",b,a),this.w())}}});vg.className="Placeholder"; -function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Up;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); -S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Gp(b);a=a.toPort;null!==a&&Gp(a)}; -t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Vp||a===Wp||a===Xp?this.adjusting=a:a!==Up&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new tl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Jj(a)||Kj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Jj(a)||Kj(a))?!1:!0};t.Ov=function(){return!1}; -t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case zn:a=b;break;case rn:a=b+90;break;case tn:a=b-90;break;case Yp:a=b+180;break;case An:a=L.pp(b);90a&&(a-=180);break;case sn:a=L.pp(b+90);90a&&(a-=180);break;case un:a=L.pp(b-90);90a&&(a-=180);break;case vn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; -function Ap(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&vp(c,a);a.Lh=b;null!==b&&up(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Kp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} -t.hp=function(a){U.prototype.hp.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Ip(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Ip(c,this,d)}$p(this)}};t.ip=function(a){U.prototype.ip.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}}; +function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Vp;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); +S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Hp(b);a=a.toPort;null!==a&&Hp(a)}; +t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Wp||a===Xp||a===Yp?this.adjusting=a:a!==Vp&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new vl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Mj(a)||Nj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Mj(a)||Nj(a))?!1:!0};t.Ov=function(){return!1}; +t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case Bn:a=b;break;case tn:a=b+90;break;case vn:a=b-90;break;case Zp:a=b+180;break;case Cn:a=L.pp(b);90a&&(a-=180);break;case un:a=L.pp(b+90);90a&&(a-=180);break;case wn:a=L.pp(b-90);90a&&(a-=180);break;case xn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; +function Bp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&wp(c,a);a.Lh=b;null!==b&&vp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; +t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Lp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} +t.hp=function(a){U.prototype.hp.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}};t.ip=function(a){U.prototype.ip.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Kp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Kp(c,this,d)}bq(this)}}; t.Xj=function(){this.md=!0;if(null!==this.Cd){var a=this.diagram;if(null!==a)for(var b=this.Cd.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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.free(a));qf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.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)}; S.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};S.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; S.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Cb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===og))return this.Ba.ev(.5,a),a.add(this.i(0)),c=this.Ba.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===og){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);L.tx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);L.tx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1659,41 +1660,41 @@ t.kd=function(a,b){G&&(x(b,K,S,"setPoint"),b.u()||v("Link.setPoint called with a t.dA=function(a,b){G&&(x(b,K,S,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,b)};t.m=function(a,b,c){G&&(D(b,S,"insertPointAt:x"),D(c,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,new K(b,c))}; t.ve=function(a){G&&(x(a,K,S,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(a)};t.Kf=function(a,b){G&&(D(a,S,"insertPointAt:x"),D(b,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(new K(a,b))}; t.Ev=function(a){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.sb(a)};t.Rj=function(){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.clear()}; -function qf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),bm(a));d?bq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),dm(a));d?cq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Fb&&$h(g.animationManager,a,e);a.g("points",f,e)}}t.Fh=function(){null===this.Zc&&(this.Zc=this.Tb,this.Tb=this.Tb.copy())}; -t.Lf=function(){if(null!==this.Zc){for(var a=this.Zc,b=this.Tb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+q,y=m*(u-q)+r);q=f.x+2*h/3;r=f.y+2*k/3;var w=q,z=r;L.C(k,0)?z=0k?-1:1)*n+q,z=m*(w-q)+r);this.Rj();this.ve(f);this.Kf(u,y);this.Kf(w,z);this.ve(p);this.kd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.kd(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.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(gq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(gq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= +p+1)),0>g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(hq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(hq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(q-=m?90:30,0>A&&(q-=180)),0>q?q+=360:360<=q&&(q-=360),l&&(y+=Math.abs(A)*(m?1:2)),0===q?r=y:90===q?u=y:180===q?r=-y:270===q?u=-y:(r=y*Math.cos(q*Math.PI/180),u=y*Math.sin(q*Math.PI/180)),g.pc()&&l&&(y=b.la(Ic,K.alloc()),w=K.allocAt(y.x+1E3*r,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,w,!0,n),K.free(y),K.free(w));y=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=w=0;if(m||!k||l){var E=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>A&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(E+=Math.abs(A)*(m?1:2));0===C?w=E:90===C?z=E:180===C?w=-E:270===C?z=-E:(w=E*Math.cos(C*Math.PI/180),z=E*Math.sin(C*Math.PI/180));c.pc()&&l&&(c=e.la(Ic,K.alloc()),g=K.allocAt(c.x+1E3*w,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+r,n.y+u);g=y;if(m||!k||l)g=new K(y.x+w,y.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +n,f-2,g)?this.kd(f-1,y):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} S.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.Ae()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.we;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.dk(e,d,g,c,f);null!== -a&&f.transform(a);return f};function iq(a,b){var c=b.mo;null===c&&(c=new jq,c.port=b,c.node=b.part,b.mo=c);return kq(c,a)} -S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!fq(c))return b.la(c,h),h;if(c.fd()){var k=iq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===lq){var l=iq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= -b.la(gq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=hq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(gq(k),f),e&&(g=hq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?hq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(fq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=iq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; -S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===gd?zc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===gd?zc:b));return a};function fq(a){return a===zc||.5===a.x&&.5===a.y}function gq(a){return.5===a.x&&.5===a.y?a:Ic} -S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); -if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Pf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;qo(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),qo(m,y,w,z)?r=!0:(w.x= -h,w.y=q,w.transform(A),qo(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),qo(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=xl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; +a&&f.transform(a);return f};function jq(a,b){var c=b.mo;null===c&&(c=new kq,c.port=b,c.node=b.part,b.mo=c);return lq(c,a)} +S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!gq(c))return b.la(c,h),h;if(c.fd()){var k=jq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===mq){var l=jq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +b.la(hq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=iq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(hq(k),f),e&&(g=iq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; +S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?iq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(gq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=jq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===hd?xc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===hd?xc:b));return a};function gq(a){return a===xc||.5===a.x&&.5===a.y}function hq(a){return.5===a.x&&.5===a.y?a:Ic} +S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); +if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Of)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;ro(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),ro(m,y,w,z)?r=!0:(w.x= +h,w.y=q,w.transform(A),ro(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),ro(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=zl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; S.prototype.computeCurve=function(){if(null===this.hg){var a=this.fromPort,b=this.isOrthogonal;this.hg=null!==a&&a===this.toPort&&!b}return this.hg?og:this.curve};S.prototype.computeCorner=function(){if(this.curve===og)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; S.prototype.findMidLabel=function(){for(var a=this.path,b=this.S.s,c=b.length,d=0;dk?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Xp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(oq,oq);k.Hc(oq,oq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this.isOrthogonal){if(e===Xp)return!1;e===Yp&&(e=Wp)}switch(e){case Xp:var f=this.i(a),g=this.i(c);if(!f.cb(b)||!g.cb(d)){e=f.x;f=f.y;var h=g.x-e,k=g.y-f,l=Math.sqrt(h*h+k*k);if(!L.ca(l,0)){if(L.ca(h,0))var m=0>k?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Yp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(pq,pq);k.Hc(pq,pq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.ha(a)||h.ha(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(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,m.x=l.x, @@ -1703,697 +1704,697 @@ c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ha(a)||h.ha(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=rq&&(Ck(q),h.Hc(q.To*q.Yx,q.So*q.Zx),pq(q,a,b,n,d,h,!1),k=qq(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=sq&&(Fk(q),h.Hc(q.To*q.Yx,q.So*q.Zx),qq(q,a,b,n,d,h,!1),k=rq(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.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)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=q.To/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!==r&&(0===d||180===d?this.Kf(f.x,r.y):this.Kf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ve(l.copy()),this.ve(m.copy()));K.free(l);K.free(m)}}; S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).fd()||this.computeSpot(!1,this.toPort).fd()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function gk(a){if(null===a.diagram||!a.isAvoiding||!xk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=yk(a.diagram,!0,a.containingGroup,null);for(var d=1;dtq&&qq(b,m,n)!==l-1&&(qq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):qq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):qq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):qq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>tq&&qq(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>tq)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>tq&&(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),qq(b,g,m)===l-1?sq(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),qq(b,g,m)===l-1&&sq(a,b,g,m,f,!1,f)));a.Kf(c,d)} +function jk(a){if(null===a.diagram||!a.isAvoiding||!Ak(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=Bk(a.diagram,!0,a.containingGroup,null);for(var d=1;duq&&rq(b,m,n)!==l-1&&(rq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):rq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):rq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):rq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>uq&&rq(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>uq)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>uq&&(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),rq(b,g,m)===l-1?tq(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),rq(b,g,m)===l-1&&tq(a,b,g,m,f,!1,f)));a.Kf(c,d)} S.prototype.zz=function(a){G&&x(a,K,S,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Kb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;kthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;ky?r>q?(f.x=w-A,f.y=q-A,e.x=w+u,e.y=q+u):(f.x=w-A,f.y=q+A,e.x=w+u,e.y=q-u):r>q?(f.x=w+A,f.y=q-A,e.x=w-u,e.y=q+u):(f.x=w+A,f.y=q+A,e.x=w-u,e.y=q-u));L.ca(y,w)&&L.ca(q,r)&&(q>p?(z>w?(f.x=w-A,f.y=q-A,e.x=w+u):(f.x=w+A,f.y=q-A,e.x=w-u),e.y=q+u):(z>w?(f.x=w-A,f.y=q+A,e.x=w+u):(f.x=w+A,f.y=q+A,e.x=w-u),e.y=q-u));if(L.ca(y,w)&&L.ca(w,z)||L.ca(p,q)&&L.ca(q,r))y=.5*(y+z),p=.5*(p+r),f.x=y,f.y=p,e.x=y,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ca(g.x,this.i(0).x)&& -L.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));Kd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb));l=.5*(l+m.x);g=.5*(g+m.y);Kd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}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=uq(this,g.copy(),!1,yb)),Kd(h,f.x-d,f.y-k,e.x-d, -e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb)),xq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);xq(this,h,n,y,f,w,u);K.free(w);Ld(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(xq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),xq(this,h,n,y,f,w,u),K.free(w),Ld(h,p.x+n,p.y+y,q+n,z+y),f.h(q, -z))):(xq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Od=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=uq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=uq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; -function wq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} -function uq(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=wq(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=wq(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 vq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 xq(a,b,c,d,e,f,g){if(!g&&Zp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=yq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Jd(b,n,q,!1):Kd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Jd(b,q,m,!1):Kd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} -function yq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& -L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function Zp(a){a=a.curve;return a===jg||a===kg}function cq(a,b){if(b||Zp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} -S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;h=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=vq(this,g.copy(),!1,xb)),Hd(h,f.x-d,f.y-k,e.x-d, +e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=vq(this,m.copy(),!1,xb)),yq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);yq(this,h,n,y,f,w,u);K.free(w);Id(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(yq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),yq(this,h,n,y,f,w,u),K.free(w),Id(h,p.x+n,p.y+y,q+n,z+y),f.h(q, +z))):(yq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Ld=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=vq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=vq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; +function xq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} +function vq(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=xq(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=xq(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 wq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 yq(a,b,c,d,e,f,g){if(!g&&$p(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=zq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Gd(b,n,q,!1):Hd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Gd(b,q,m,!1):Hd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function zq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& +L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function $p(a){a=a.curve;return a===jg||a===kg}function dq(a,b){if(b||$p(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} +S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",S,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),this.ib())}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",S,"fromShortLength"), -this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:gd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Gp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, +this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Hp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, "number",S,"toEndSegmentLength"),0>a&&Ba(a,">= 0",S,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),this.ib())}},toShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Kj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",S,"toShortLength"),this.cd(),this.fa.Kj=a,this.xc(),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.Cd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.lf(f),e=2;ed&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); +a.x,c-a.y)}return a}},midPoint:{configurable:!0,get:function(){this.Hg();return this.computeMidPoint(new K)}},midAngle:{configurable:!0,get:function(){this.Hg();return this.computeMidAngle()}},flattenedLengths:{configurable:!0,get:function(){if(null===this.qq){this.md||cq(this);for(var a=this.qq=[],b=this.pointsCount,c=0;cd&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); a.push(d)}}return this.qq}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.It;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;dthis.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!fq(this.computeSpot(!0))?1:0}}, -lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!fq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Vp&&a!==Wp&&a!==Xp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, -set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),cq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, -set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Up&&a!==Cq&&a!==Dq&&a!==lq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),cq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +enumerable:!0,get:function(){return 4===(this.Dj.value&4)}},xk:{configurable:!0,get:function(){return 0!==(this.Va&128)},set:function(a){0!==(this.Va&128)!==a&&(this.Va^=128)}},geometry:{configurable:!0,get:function(){if(!this.xk){this.Hg();if(2>this.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!gq(this.computeSpot(!0))?1:0}}, +lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!gq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Wp&&a!==Xp&&a!==Yp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, +set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),dq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, +set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Vp&&a!==Dq&&a!==Eq&&a!==mq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),dq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, get:function(){return this.Bo},set:function(a){var b=this.Bo;b!==a&&(G&&B(a,"number",S,"smoothness"),this.Bo=a,this.xc(),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.Ei())return a.model.Gc(this.data)}}});S.prototype.invalidateOtherJumpOvers=S.prototype.jp;S.prototype.findClosestSegment=S.prototype.zz;S.prototype.updateRoute=S.prototype.Hg;S.prototype.invalidateRoute=S.prototype.ib;S.prototype.rollbackRoute=S.prototype.Gv; S.prototype.commitRoute=S.prototype.Lf;S.prototype.startRoute=S.prototype.Fh;S.prototype.clearPoints=S.prototype.Rj;S.prototype.removePoint=S.prototype.Ev;S.prototype.addPointAt=S.prototype.Kf;S.prototype.addPoint=S.prototype.ve;S.prototype.insertPointAt=S.prototype.m;S.prototype.insertPoint=S.prototype.dA;S.prototype.setPointAt=S.prototype.O;S.prototype.setPoint=S.prototype.kd;S.prototype.getPoint=S.prototype.i;S.prototype.getOtherPort=S.prototype.Wz;S.prototype.getOtherNode=S.prototype.fp; -var dq=null,eq=null,Up=new F(S,"Normal",1),Cq=new F(S,"Orthogonal",2),Dq=new F(S,"AvoidsNodes",6),lq=new F(S,"AvoidsNodesStraight",7),lg=new F(S,"None",0),og=new F(S,"Bezier",9),kg=new F(S,"JumpGap",10),jg=new F(S,"JumpOver",11),Vp=new F(S,"End",17),Wp=new F(S,"Scale",18),Xp=new F(S,"Stretch",19),zn=new F(S,"OrientAlong",21),rn=new F(S,"OrientPlus90",22),tn=new F(S,"OrientMinus90",23),Yp=new F(S,"OrientOpposite",24),An=new F(S,"OrientUpright",25),sn=new F(S,"OrientPlus90Upright",26),un=new F(S,"OrientMinus90Upright", -27),vn=new F(S,"OrientUpright45",28),nq=16,mq=14,oq=8;S.className="Link";S.Normal=Up;S.Orthogonal=Cq;S.AvoidsNodes=Dq;S.AvoidsNodesStraight=lq;S.None=lg;S.Bezier=og;S.JumpGap=kg;S.JumpOver=jg;S.End=Vp;S.Scale=Wp;S.Stretch=Xp;S.OrientAlong=zn;S.OrientPlus90=rn;S.OrientMinus90=tn;S.OrientOpposite=Yp;S.OrientUpright=An;S.OrientPlus90Upright=sn;S.OrientMinus90Upright=un;S.OrientUpright45=vn;S.EndSegmentStep=8;S.CurvinessStart=nq;S.SpacingMin=mq;S.OrthoShortCut=oq; -function Bq(a,b,c,d){Ya(this);this.Pe=this.Dq=!1;this.Qs=a;this.hy=b;this.rv=c;this.iy=d;this.links=[]}Bq.prototype.fm=function(){if(!this.Dq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=tq&&(c[d]=Eq)} -zk.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; -function Fq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=tq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h, -k)}}function Gq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=tq;for(a.gc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(Gq(a,h,k,q,c,f,b,n,p),Gq(a,h,k,1,!c,f,b,n,p),Gq(a,h,k,-1,!c,f,b,n,p)):Gq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(Hq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Hq(a,l,m,1,!(90===e||270===e),f,b,n,p),Hq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Hq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Iq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=tq;e=c[c.length-2];g=c[c.length-1];d[e][g]= -a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Jq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Jq){g.push(k);g.push(l);if(Iq(a,k,l, -m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Jq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -oa.Object.defineProperties(zk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}jq.prototype.fm=function(){this.xe.length=0}; -function kq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Df?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(Ac,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Kq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Lq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= -n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(jq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;f=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=uq&&(c[d]=Fq)} +Ck.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Hk)return!1}return!0}; +function Gq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=uq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h, +k)}}function Hq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Hk,m=uq;for(a.gc[b][c]=m;l===Hk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Hk?(Hq(a,h,k,q,c,f,b,n,p),Hq(a,h,k,1,!c,f,b,n,p),Hq(a,h,k,-1,!c,f,b,n,p)):Hq(a,h,k,q,c,h,k,h,k);d[l][m]===Hk?(Iq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Iq(a,l,m,1,!(90===e||270===e),f,b,n,p),Iq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Iq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Jq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=uq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Kq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Kq){g.push(k);g.push(l);if(Jq(a,k,l, +m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Kq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} +oa.Object.defineProperties(Ck.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}kq.prototype.fm=function(){this.xe.length=0}; +function lq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Cf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(yc,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Lq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Mq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= +n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(kq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:q>Math.abs(A)?(z=Math.abs(A)/q,q=Math.abs(A)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(A)?(z=Math.abs(A)/ -m,m=Math.abs(A)):z=1}w=0}var H=C.mp;if(d===Rp){C=C.link.computeThickness();C*=z;H.set(E);switch(r){case 8:H.x=E.x+u/2+p/2-w-C/2;break;case 2:H.y=E.y+A/2+q/2-w-C/2;break;case 1:H.x=E.x+u/2-n/2+w+C/2;break;default:case 4:H.y=E.y+A/2-m/2+w+C/2}w+=C}else{var T=.5;d===Cp&&(T=(C.gp+1)/(C.Ul+1));H.x=E.x+u*T;H.y=E.y+A*T}}}K.free(h);K.free(k);K.free(g);K.free(l);E=a.xe;for(f=0;fb.Tc?1:a.angleb.angle?1:0}; -jq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,zc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.yb.Tc?1:a.angleb.angle?1:0}; +kq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,xc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Gi.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)&&(Oq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Df&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Df&&a.Ch?!0:!1};function Nq(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 Df?null===k.layout?Nq(a,b,k.memberParts,!1,e,f,g,h):(Oq(k),b.add(k)):(Oq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Oq(k),b.add(k)))}} -function Oq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Nq(this,b,a.nodes,!0,null,!0,!0,!0),Nq(this,b,a.links,!0,null,!0,!0,!0),Nq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Df?Nq(this,b,a.memberParts,!1,null,!0,!0,!0):Nq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Gi.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.la(Ac),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; -oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Df,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, +Gi.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,this.Ch,!0,!1,!0),Oq(this,b,a.parts,!0,this.Ch,!0,!1,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,this.Ch,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Gi.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)&&(Pq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Cf&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Cf&&a.Ch?!0:!1};function Oq(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 Cf?null===k.layout?Oq(a,b,k.memberParts,!1,e,f,g,h):(Pq(k),b.add(k)):(Pq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Pq(k),b.add(k)))}} +function Pq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,null,!0,!0,!0),Oq(this,b,a.links,!0,null,!0,!0,!0),Oq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,null,!0,!0,!0):Oq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Gi.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.la(yc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; +oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Cf,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",Gi,"isInitial");this.Sh=a;a||(this.Jn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn!==a&&(B(a,"boolean",Gi,"isViewportSized"),(this.Kn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.Hn},set:function(a){this.Hn!==a&&(B(a,"boolean",Gi,"isRouting"),this.Hn=a)}},isRealtime:{configurable:!0,get:function(){return this.Gn}, -set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Mq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, +set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Nq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, set:function(a){this.Rm!==a&&(null!==a&&B(a,"function",Gi,"boundsComputation"),this.Rm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.Nm},set:function(a){x(a,K,Gi,"arrangementOrigin");this.Nm.D(a)||(this.Nm.assign(a),this.F())}}});Gi.prototype.collectParts=Gi.prototype.vx;Gi.prototype.getLayoutBounds=Gi.prototype.Ai;Gi.prototype.invalidateLayout=Gi.prototype.F;Gi.className="Layout"; -function Mq(a){Ya(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Yc=a;this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}Mq.prototype.clear=function(){if(this.If)for(var a=this.If.iterator;a.next();)a.value.clear();if(this.Ie)for(a=this.Ie.iterator;a.next();)a.value.clear();this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}; -Mq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Pq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, -set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Pq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Df)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Pq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Pq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Pq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Pq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, +Nq.prototype.findGroupVertex=function(a){if(null===a)return null;var b=a.findVisibleNode();if(null===b)return null;a=this.xi(b);if(null!==a)return a;for(b=b.containingGroup;null!==b;){a=this.xi(b);if(null!==a)return a;b=b.containingGroup}return null};t=Nq.prototype;t.oh=function(a){if(null!==a){G&&x(a,Qq,Nq,"addVertex:vertex");this.If.add(a);var b=a.node;null!==b&&this.Rs.add(b,a);a.network=this}}; +t.Ol=function(a){if(null===a)return null;G&&x(a,V,Nq,"addNode:node");var b=this.xi(a);null===b&&(b=this.createVertex(),b.node=a,this.oh(b));return b};t.Wu=function(a){if(null!==a&&(G&&x(a,Qq,Nq,"deleteVertex:vertex"),Sq(this,a))){for(var b=a.Fg,c=b.count-1;0<=c;c--){var d=b.P(c);this.Yj(d)}b=a.yg;for(a=b.count-1;0<=a;a--)c=b.P(a),this.Yj(c)}};function Sq(a,b){if(null===b)return!1;var c=a.If.remove(b);c&&(b=b.node,null!==b&&a.Rs.remove(b));return c} +t.qz=function(a){null!==a&&(G&&x(a,V,Nq,"deleteNode:node"),a=this.xi(a),null!==a&&this.Wu(a))};t.xi=function(a){if(null===a)return null;G&&x(a,V,Nq,"findVertex:node");return this.Rs.L(a)};t.No=function(a){if(null!==a){G&&x(a,Rq,Nq,"addEdge:edge");Tq(this,a);var b=a.toVertex;null!==b&&b.Pl(a);b=a.fromVertex;null!==b&&b.Ml(a)}};function Tq(a,b){if(null!==b){a.Ie.add(b);var c=b.link;null!==c&&null===a.Xo(c)&&a.Ms.add(c,b);b.network=a}} +t.Uy=function(a){if(null===a)return null;G&&x(a,S,Nq,"addLink:link");var b=a.fromNode,c=a.toNode,d=this.Xo(a);null===d?(d=this.createEdge(),d.link=a,null!==b&&(d.fromVertex=this.Ol(b)),null!==c&&(d.toVertex=this.Ol(c)),this.No(d)):(null!==b?d.fromVertex=this.Ol(b):d.fromVertex=null,null!==c?d.toVertex=this.Ol(c):d.toVertex=null);return d};t.Yj=function(a){if(null!==a){G&&x(a,Rq,Nq,"deleteEdge:edge");var b=a.toVertex;null!==b&&b.Yl(a);b=a.fromVertex;null!==b&&b.Xl(a);Uq(this,a)}}; +function Uq(a,b){null!==b&&a.Ie.remove(b)&&(b=b.link,null!==b&&a.Ms.remove(b))}t.pz=function(a){null!==a&&(G&&x(a,S,Nq,"deleteLink:link"),a=this.Xo(a),null!==a&&this.Yj(a))};t.Xo=function(a){if(null===a)return null;G&&x(a,S,Nq,"findEdge:link");return this.Ms.L(a)}; +t.jk=function(a,b,c){if(null===a||null===b)return null;G&&(x(a,Qq,Nq,"linkVertexes:fromVertex"),x(b,Qq,Nq,"linkVertexes:toVertex"),null!==c&&x(c,S,Nq,"linkVertexes:link"));if(a.network===this&&b.network===this){var d=this.createEdge();d.link=c;d.fromVertex=a;d.toVertex=b;this.No(d);return d}return null};t.um=function(a){if(null!==a){G&&x(a,Rq,Nq,"reverseEdge:edge");var b=a.fromVertex,c=a.toVertex;null!==b&&null!==c&&(b.Xl(a),c.Yl(a),a.um(),b.Pl(a),c.Ml(a))}}; +t.Wo=function(){for(var a=Na(),b=this.Ie.iterator;b.next();){var c=b.value;c.fromVertex===c.toVertex&&a.push(c)}b=a.length;for(c=0;cb?1:0):1:null!==b?-1:0} +oa.Object.defineProperties(Qq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, +set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Qq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Cf)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Qq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Qq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Qq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Qq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},width:{configurable:!0, -enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Mq,Pq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); +enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Nq,Qq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Fg.iterator}},destinationEdges:{configurable:!0, -enumerable:!0,get:function(){return this.yg.iterator}},edges:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Fg.count+this.yg.count}}});Pq.prototype.deleteDestinationEdge=Pq.prototype.Xl;Pq.prototype.addDestinationEdge=Pq.prototype.Ml;Pq.prototype.deleteSourceEdge=Pq.prototype.Yl; -Pq.prototype.addSourceEdge=Pq.prototype.Pl;Pq.className="LayoutVertex";Pq.standardComparer=Wq; -Pq.smartComparer=function(a,b){G&&x(a,Pq,Pq,"smartComparer:m");G&&x(b,Pq,Pq,"smartComparer:n");if(null!==a){if(null!==b){a=a.di;var c=b.di;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ka("Layout");d=[];switch(this.alignment){case er:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= -m=0;nf-1|| -0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case dr:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case dr:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Xq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(cl.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",cl,"wrappingWidth"),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.Ka("Layout");d=[];switch(this.alignment){case fr:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +m=0;nf-1|| +0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case er:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case er:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Yq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} +oa.Object.defineProperties(el.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",el,"wrappingWidth"),0n)){var u=n+Jn(r);r.wc(u,!0);Vn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; -Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;dn)){var u=n+Ln(r);r.wc(u,!0);Xn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; +Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new ab;e.add("[");c&&1d)return;Ma(a.Nc,d)}Rr(a,"nodeDataArray",se,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;c=d)return"[]";var e=new bb;e.add("[");c&&1d)return;Ma(a.Nc,d)}Sr(a,"nodeDataArray",ue,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Rr(this,"",re,"",a,null,c,null,b)}; -t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Rr(this,"",se,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Wn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; -t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Wn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Rr(this,"nodeCategory",pe,c,a,d,b))}else ik(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} -function Mr(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 Mr(a,b.constructor);return typeof b}function Pr(a){return Wr[a]?Wr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Wn(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){G&&Fa("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){G&&Fa("property set error: "+d.toString())}} +X.prototype.setDataProperty=function(a,b,c){G&&(B(a,"object",X,"setDataProperty:data"),B(b,"string",X,"setDataProperty:propname"),""===b&&v("Model.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.hb(a)){if(b===this.nodeKeyProperty){this.ym(a,c);return}if(b===this.nodeCategoryProperty){this.xm(a,c);return}}else!Vr&&a instanceof P&&(Vr=!0,Fa('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Fa(" Is that really your intent?"));var d= +Yn(a,b);d!==c&&(lk(a,b,c),this.Ss(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.Po=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.Ry=function(a,b){this.Gs(a,-1,b)}; +t.Gs=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),D(b,X,"insertArrayItem:idx"),a===this.Nc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Sr(this,"",te,"",a,null,c,null,b)}; +t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Sr(this,"",ue,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Yn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Yn(a,c);void 0===d&&(d="");d!==b&&(lk(a,c,b),Sr(this,"nodeCategory",re,c,a,d,b))}else lk(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} +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 Qr(a){return Xr[a]?Xr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Yn(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){G&&Fa("property get error: "+d.toString())}return c} +function lk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;b!==a&&(B(a,"string",X,"name"),this.Ea=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.en},set:function(a){var b=this.en;b!==a&&(B(a,"string",X,"dataFormat"),this.en=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Sg},set:function(a){var b=this.Sg;b!==a&&(B(a,"boolean", -X,"isReadOnly"),this.Sg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(B(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Qa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(x(a,ue,X,"undoManager"),null!==b&&b.ky(this),this.o=a,null!==a&&a.ox(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.hh}, -set:function(a){B(a,"boolean",X,"skipsUndoManager");this.hh=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(Sr(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===se){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== -a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Yr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; -t.Px=function(a){return sr(this,a,!0)};t.Lv=function(a,b){Ar(this,a,b,!0)};t.Sx=function(a){return sr(this,a,!1)};t.Qv=function(a,b){Ar(this,a,b,!1)};function sr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Wn(b,a),void 0!==a))){if(ur(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function Ar(a,b,c,d){null===c&&(c=void 0);void 0===c||ur(c)||Aa(c,"number or string",Yr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Wn(b,e);f!==c&&(yr(a,f,b),ik(b,e,c),null===a.nc(c)&&zr(a,c,b),Rr(a,d?"linkFromKey":"linkToKey",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}}t.Qx=function(a){return rr(this,a,!0)};t.Mv=function(a,b){Br(this,a,b,!0)};t.Tx=function(a){return rr(this,a,!1)}; -t.Rv=function(a,b){Br(this,a,b,!1)};function rr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Wn(b,a);return void 0===b?"":b}function Br(a,b,c,d){B(c,"string",Yr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Wn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Rr(a,d?"linkFromPortId":"linkToPortId",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}} -t.Qf=function(a){if(null===a)return as;var b=this.pe;if(""===b)return as;a=Wn(a,b);return void 0===a?as:a};t.Ys=function(a,b){Ia(b,Yr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);void 0===d&&(d=as);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(yr(this,b,a),Rr(this,"linkLabelKeys",se,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Wn(a,b),void 0!==b)){if(ur(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&ur(b)||Aa(b,"number or string",Yr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);d!==b&&null===this.uh(b)&&(ik(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Rr(this,"linkKey",pe,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else ik(a,c,b)}}; -t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&ur(a)?this.Cb.L(a):null}; -t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;ik(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||wr(this,a,!0))};function wr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Rr(a,"linkDataArray",re,"linkDataArray",a,null,b,null,d);bs(a,b)} -t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Rr(a,"linkDataArray",se,"linkDataArray",a,b,null,d,null);c=sr(a,b,!0);yr(a,c,b);c=sr(a,b,!1);yr(a,c,b);d=a.Qf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ue){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== +a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Zr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),lk(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; +t.Px=function(a){return tr(this,a,!0)};t.Lv=function(a,b){Br(this,a,b,!0)};t.Sx=function(a){return tr(this,a,!1)};t.Qv=function(a,b){Br(this,a,b,!1)};function tr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Yn(b,a),void 0!==a))){if(vr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function Br(a,b,c,d){null===c&&(c=void 0);void 0===c||vr(c)||Aa(c,"number or string",Zr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Yn(b,e);f!==c&&(zr(a,f,b),lk(b,e,c),null===a.nc(c)&&Ar(a,c,b),Sr(a,d?"linkFromKey":"linkToKey",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}}t.Qx=function(a){return sr(this,a,!0)};t.Mv=function(a,b){Cr(this,a,b,!0)};t.Tx=function(a){return sr(this,a,!1)}; +t.Rv=function(a,b){Cr(this,a,b,!1)};function sr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Yn(b,a);return void 0===b?"":b}function Cr(a,b,c,d){B(c,"string",Zr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Yn(b,e);void 0===f&&(f="");f!==c&&(lk(b,e,c),Sr(a,d?"linkFromPortId":"linkToPortId",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}} +t.Qf=function(a){if(null===a)return bs;var b=this.pe;if(""===b)return bs;a=Yn(a,b);return void 0===a?bs:a};t.Ys=function(a,b){Ia(b,Zr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);void 0===d&&(d=bs);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(zr(this,b,a),Sr(this,"linkLabelKeys",ue,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Yn(a,b),void 0!==b)){if(vr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&vr(b)||Aa(b,"number or string",Zr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);d!==b&&null===this.uh(b)&&(lk(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Sr(this,"linkKey",re,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else lk(a,c,b)}}; +t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&vr(a)?this.Cb.L(a):null}; +t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){lk(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;lk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;lk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; +t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||xr(this,a,!0))};function xr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Sr(a,"linkDataArray",te,"linkDataArray",a,null,b,null,d);cs(a,b)} +t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Sr(a,"linkDataArray",ue,"linkDataArray",a,b,null,d,null);c=tr(a,b,!0);zr(a,c,b);c=tr(a,b,!1);zr(a,c,b);d=a.Qf(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 I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ss&&k===ts?h=es:h===ss&&k!==ts&&(h=this.arrangement);if((this.direction===ns||this.direction===os)&&this.sorting!==hs){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===ns?(this.arrangement===ss&&a.reverse(),d=new I,d.addAll(a), -d.addAll(c)):(this.arrangement===ss&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ss){isNaN(b)&&(b=6);if(h!==es&&h!==ss){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==ns&&this.direction!==os||d!==ss)if(this.direction===ns||this.direction===os){g=0;switch(d){case rs:g=180*ys(this,h,p,l,k)/Math.PI;break;case es:k=b=0;g=a.first();null!==g&&(b=vs(g,Math.PI/2));g=c.first(); -null!==g&&(k=vs(g,Math.PI/2));g=180*ys(this,h,p,l,n+(b+k)/2)/Math.PI;break;case qs:g=m/b.length}if(this.direction===ns){switch(d){case rs:zs(this,a,l,ps);break;case es:As(this,a,l,ps);break;case qs:Bs(this,a,m/2,l,ps)}switch(d){case rs:zs(this,c,l+g,gs);break;case es:As(this,c,l+g,gs);break;case qs:Bs(this,c,m/2,l+g,gs)}}else{switch(d){case rs:zs(this,c,l,ps);break;case es:As(this,c,l,ps);break;case qs:Bs(this,c,m/2,l,ps)}switch(d){case rs:zs(this,a,l+g,gs);break;case es:As(this,a,l+g,gs);break;case qs:Bs(this, -a,m/2,l+g,gs)}}}else switch(d){case rs:zs(this,b,l,this.direction);break;case es:As(this,b,l,this.direction);break;case qs:Bs(this,b,m,l,this.direction);break;case ss:Cs(this,b,m,l,this.direction)}else Cs(this,b,m,l-m/2,gs)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function Bs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===gs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Fs(a,k,l,m,n,e,f)||Gs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Fs(a,k,l,n,p,e,m)||Gs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function Gs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===gs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}ds.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -ds.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; -ds.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function xs(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} -function ws(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?xs(a,1,c,d,e):xs(a,1,c))}function ys(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} -ds.prototype.sort=function(a){switch(this.sorting){case ls:break;case ms:a.reverse();break;case js:a.sort(this.comparer);break;case ks:a.sort(this.comparer);a.reverse();break;case hs:return this.lk(Hs(a));default:v("Invalid sorting type.")}return a}; -function Hs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} -ds.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ts&&k===us?h=fs:h===ts&&k!==us&&(h=this.arrangement);if((this.direction===os||this.direction===ps)&&this.sorting!==is){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===os?(this.arrangement===ts&&a.reverse(),d=new I,d.addAll(a), +d.addAll(c)):(this.arrangement===ts&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ts){isNaN(b)&&(b=6);if(h!==fs&&h!==ts){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==os&&this.direction!==ps||d!==ts)if(this.direction===os||this.direction===ps){g=0;switch(d){case ss:g=180*zs(this,h,p,l,k)/Math.PI;break;case fs:k=b=0;g=a.first();null!==g&&(b=ws(g,Math.PI/2));g=c.first(); +null!==g&&(k=ws(g,Math.PI/2));g=180*zs(this,h,p,l,n+(b+k)/2)/Math.PI;break;case rs:g=m/b.length}if(this.direction===os){switch(d){case ss:As(this,a,l,qs);break;case fs:Bs(this,a,l,qs);break;case rs:Cs(this,a,m/2,l,qs)}switch(d){case ss:As(this,c,l+g,hs);break;case fs:Bs(this,c,l+g,hs);break;case rs:Cs(this,c,m/2,l+g,hs)}}else{switch(d){case ss:As(this,c,l,qs);break;case fs:Bs(this,c,l,qs);break;case rs:Cs(this,c,m/2,l,qs)}switch(d){case ss:As(this,a,l+g,hs);break;case fs:Bs(this,a,l+g,hs);break;case rs:Cs(this, +a,m/2,l+g,hs)}}}else switch(d){case ss:As(this,b,l,this.direction);break;case fs:Bs(this,b,l,this.direction);break;case rs:Cs(this,b,m,l,this.direction);break;case ts:Ds(this,b,m,l,this.direction)}else Ds(this,b,m,l-m/2,hs)}this.updateParts();this.network=null;this.isValidLayout=!0}; +function Cs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===hs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Gs(a,k,l,m,n,e,f)||Hs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Gs(a,k,l,n,p,e,m)||Hs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function Hs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===hs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}es.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +es.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; +es.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function ys(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +function xs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?ys(a,1,c,d,e):ys(a,1,c))}function zs(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +es.prototype.sort=function(a){switch(this.sorting){case ms:break;case ns:a.reverse();break;case ks:a.sort(this.comparer);break;case ls:a.sort(this.comparer);a.reverse();break;case is:return this.lk(Is(a));default:v("Invalid sorting type.")}return a}; +function Is(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} +es.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;cb[c[r]].indexOf(c[r===c.length-1?0:r+1])&&q.push(r===c.length-1?0:r+1);if(0===q.length)for(r=0;rc.indexOf(H)||Ec.indexOf(H)||E=u?E+1:E)),w+=E=u&&E++,A>=u&&A++,E>A&&(C=A,A=E,E=C),A-E<(c.length+2)/2===(Eq||q===m||(r=q>m?q-m:m-q,n+=qg-r?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.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,ds,ds,"arrangement"),a===ss||a===es||a===rs||a===qs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,ds,ds,"direction"), -a===gs||a===ps||a===ns||a===os)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,ds,ds,"sorting"),a===ls||a===ms||a===js||ks||a===hs)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",ds,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", -ds,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,ds,ds,"nodeDiameterFormula"),a===is||a===ts)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); -var es=new F(ds,"ConstantSpacing",0),rs=new F(ds,"ConstantDistance",1),qs=new F(ds,"ConstantAngle",2),ss=new F(ds,"Packed",3),gs=new F(ds,"Clockwise",4),ps=new F(ds,"Counterclockwise",5),ns=new F(ds,"BidirectionalLeft",6),os=new F(ds,"BidirectionalRight",7),ls=new F(ds,"Forwards",8),ms=new F(ds,"Reverse",9),js=new F(ds,"Ascending",10),ks=new F(ds,"Descending",11),hs=new F(ds,"Optimized",12),is=new F(ds,"Pythagorean",13),ts=new F(ds,"Circular",14);ds.className="CircularLayout";ds.ConstantSpacing=es; -ds.ConstantDistance=rs;ds.ConstantAngle=qs;ds.Packed=ss;ds.Clockwise=gs;ds.Counterclockwise=ps;ds.BidirectionalLeft=ns;ds.BidirectionalRight=os;ds.Forwards=ls;ds.Reverse=ms;ds.Ascending=js;ds.Descending=ks;ds.Optimized=hs;ds.Pythagorean=is;ds.Circular=ts;function fs(){this.cm=-Infinity;this.Gm=this.zk=null} -fs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Ns(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=a?this.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,es,es,"arrangement"),a===ts||a===fs||a===ss||a===rs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,es,es,"direction"), +a===hs||a===qs||a===os||a===ps)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,es,es,"sorting"),a===ms||a===ns||a===ks||ls||a===is)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",es,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", +es,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,es,es,"nodeDiameterFormula"),a===js||a===us)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); +var fs=new F(es,"ConstantSpacing",0),ss=new F(es,"ConstantDistance",1),rs=new F(es,"ConstantAngle",2),ts=new F(es,"Packed",3),hs=new F(es,"Clockwise",4),qs=new F(es,"Counterclockwise",5),os=new F(es,"BidirectionalLeft",6),ps=new F(es,"BidirectionalRight",7),ms=new F(es,"Forwards",8),ns=new F(es,"Reverse",9),ks=new F(es,"Ascending",10),ls=new F(es,"Descending",11),is=new F(es,"Optimized",12),js=new F(es,"Pythagorean",13),us=new F(es,"Circular",14);es.className="CircularLayout";es.ConstantSpacing=fs; +es.ConstantDistance=ss;es.ConstantAngle=rs;es.Packed=ts;es.Clockwise=hs;es.Counterclockwise=qs;es.BidirectionalLeft=os;es.BidirectionalRight=ps;es.Forwards=ms;es.Reverse=ns;es.Ascending=ks;es.Descending=ls;es.Optimized=is;es.Pythagorean=js;es.Circular=us;function gs(){this.cm=-Infinity;this.Gm=this.zk=null} +gs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ +p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Os(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mq&&(q=1);h=L.sqrt((h+q+l*l*4/(g*g))/q);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ss(a,b,c){G&&(x(b,Ls,Ks,"popNetwork:oldnet"),D(c,Ks,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.jf){var e=d.jf.P(d.Hv);d.ae=e.dt;var f=e.gw,g=e.hw;d.bounds=new M(d.centerX-f,d.centerY-g,e.et,e.ct);d.focus=new K(f,g);d.Hv--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ts(a,b,c){G&&(x(b,Vs,Ks,"surroundNode:oldnet"),D(c,Ks,"surroundNode:level"));var d=b.Tj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.jf&&0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} -function Ns(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= -0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Ws(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ys),r=d.random(), +function Os(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= +0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Xs(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Zs),r=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*r):kq?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ks.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ks.prototype.moveFixedVertex=function(){};Ks.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; -Ks.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=gd,b.toSpot=gd)}};Ks.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; -Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ks.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ks.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ks.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ks.prototype.electricalFieldX=function(){return 0};Ks.prototype.electricalFieldY=function(){return 0}; -Ks.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ks.prototype.gravitationalFieldX=function(){return 0};Ks.prototype.gravitationalFieldY=function(){return 0};Ks.prototype.isFixed=function(a){return a.isFixed}; -oa.Object.defineProperties(Ks.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ks,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ks,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, -get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ks,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ks,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ks,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, -set:function(a){this.nn!==a&&(B(a,"number",Ks,"epsilonDistance"),0n?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Zs),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ls.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ls.prototype.moveFixedVertex=function(){};Ls.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; +Ls.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=hd,b.toSpot=hd)}};Ls.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; +Ls.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ls.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ls.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ls.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ls.prototype.electricalFieldX=function(){return 0};Ls.prototype.electricalFieldY=function(){return 0}; +Ls.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ls.prototype.gravitationalFieldX=function(){return 0};Ls.prototype.gravitationalFieldY=function(){return 0};Ls.prototype.isFixed=function(a){return a.isFixed}; +oa.Object.defineProperties(Ls.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ls,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ls,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, +get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ls,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ls,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ls,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, +set:function(a){this.nn!==a&&(B(a,"number",Ls,"epsilonDistance"),0w&&0w&&0a[this.Sd]&&(this.Vq=a[c]-1,this.Sd=c),a[c]u||l===u&&p>r)&&h++;yl||u===l&&r>p)&&h++}}}}}if(0>=c)for(n=d[g].destinationEdgesArrayAccess,k=0;ku||l===u&&q>y)&&h++,rl||u===l&&y>q)&&h++);f[g*e+g]=h;for(h= g+1;h=c)for(n=d[g].destinationEdgesArrayAccess,A=d[h].destinationEdgesArrayAccess,k=0;k=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}kt(a,b,d);return f} -function st(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&st(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&st(a,k,c,d,e,f)}} -function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)tt(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)tt(a,b.value.fromVertex,c,d,e,f)}} -$s.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case ut:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==vt(a);){for(e=wt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=wt(a);for(e=xt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=xt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case at:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -yt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&yt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&st(a,h,0,-1,!0,!1)}for(st(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; -e=p.length;for(var q=0;q=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}lt(a,b,d);return f} +function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&tt(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&tt(a,k,c,d,e,f)}} +function ut(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)ut(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)ut(a,b.value.fromVertex,c,d,e,f)}} +at.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case vt:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==wt(a);){for(e=xt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=xt(a);for(e=yt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=yt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& +k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case bt:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +zt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&zt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&tt(a,h,0,-1,!0,!1)}for(tt(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; +e=p.length;for(var q=0;qf)&&!m&&(h=g,f=l)}if(0>d){for(c.reset();c.next();)d=c.value,1===d.component&&(d.layer-=e);b.component=0}else h.component=0}}} -function ht(a,b,c){return 90===a.N?c&&!b.rev||!c&&b.rev?270:90:180===a.N?c&&!b.rev||!c&&b.rev?0:180:270===a.N?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}function it(a,b,c){for(var d=c[c.length-1].sourceEdges.iterator;d.next();){var e=d.value;if(!e.rev&&e.valid){e=e.fromVertex;c.push(e);if(e===b||it(a,b,c))return!0;c.pop()}}return!1} -$s.prototype.initializeIndices=function(){switch(this.bl){default:case Ft:Gt(this);break;case ct:var a=null,b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();){var c=b.value;if(c.near&&(null===a&&(a=new vb),c.layer===c.near.layer)){var d=a.get(c.near)||[];d.push(c);a.set(c.near,d)}}for(c=this.Oa;0<=c;c--)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Ht(this,d,a);break;case It:a=null;b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();)c=b.value,c.near&& -(null===a&&(a=new vb),c.layer===c.near.layer&&(d=a.get(c.near)||[],d.push(c),a.set(c.near,d)));for(c=0;c<=this.Oa;c++)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Jt(this,d,a)}}; -function Gt(a){var b=null,c=a.network.vertexes.iterator;if(a._experimental){for(;c.next();){var d=c.value;if(d.near&&(null===b&&(b=new vb),d.layer===d.near.layer)){var e=b.get(d.near)||[];e.push(d);b.set(d.near,e)}}c.reset()}for(d={};c.next();)e=c.value,b&&e.near||(d.layer=e.layer,e.index=a.Ab[d.layer],a.Ab[d.layer]++,b&&(e=b.get(e),Array.isArray(e)&&e.forEach(function(b){return function(c){c.index=a.Ab[b.layer];a.Ab[b.layer]++}}(d)))),d={layer:d.layer}} -function Ht(a,b,c){if(!c||!b.near){var d=b.layer;b.index=a.Ab[d];a.Ab[d]++;if(c){var e=c.get(b);Array.isArray(e)&&e.forEach(function(b){b.index=a.Ab[d];a.Ab[d]++})}b=b.destinationEdgesArrayAccess;for(e=!0;e;){e=!1;for(var f=0;fh.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= -Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}break;default:case dt:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b): -(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}}nt(this,b)}; -function Kt(a,b,c){G&&(D(b,$s,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,$s,"medianBarycenterCrossingReduction:direction"));var d=jt(a,b),e=a.Ab[b],f=rt(a,b,c),g=qt(a,b,c);for(c=0;ch.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= +Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}break;default:case et:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b): +(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}}ot(this,b)}; +function Lt(a,b,c){G&&(D(b,at,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,at,"medianBarycenterCrossingReduction:direction"));var d=kt(a,b),e=a.Ab[b],f=st(a,b,c),g=rt(a,b,c);for(c=0;cf+1&&(p+=4*(z-f),q+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;zf+1&&(p+=4*(z-(f+1)),q+= 4*(z-f))}C=d[f+1].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;z>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= -0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=lt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=lt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ -C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}kt(a,b, -d);a.normalize()}function Ut(a,b){G&&(D(b,$s,"packAux:column"),D(1,$s,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} -function Vt(a,b){G&&(D(b,$s,"tightPackAux:column"),D(1,$s,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} -function Rt(a,b){G&&D(b,$s,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Ut(a,c););a.normalize();for(c=0;cf?nt(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=mt(a),f=pt(a),d=f+1;ff?nt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(tt(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;f>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= +0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=mt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=mt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ +C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}lt(a,b, +d);a.normalize()}function Vt(a,b){G&&(D(b,at,"packAux:column"),D(1,at,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} +function Wt(a,b){G&&(D(b,at,"tightPackAux:column"),D(1,at,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} +function St(a,b){G&&D(b,at,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Vt(a,c););a.normalize();for(c=0;cf?ot(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=nt(a),f=qt(a),d=f+1;ff?ot(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(ut(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;fc)for(g=a.Wa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -function St(a){for(var b=Na(),c=a.rl.length,d=0;d<=c;d++)b[d]=[];for(d=a.network.vertexes.iterator;d.next();){var e=d.value;b[c-e.layer][e.index]=e}c=new J;Xt(b,c);var f=null,g=null,h=null,k=null,l=0!==(a.Ee&1),m=0!==(a.Ee&2),n=0!==(a.Ee&4),p=0!==(a.Ee&8);l&&(a.verticalAlignment(b,c,!0),f=Yt(a,b,!0,!1));b.reverse();n&&(a.verticalAlignment(b,c,!1),h=Yt(a,b,!1,!1));d=ca(b);for(e=d.next();!e.done;e=d.next())e.value.reverse();p&&(a.verticalAlignment(b,c,!1),k=Yt(a,b,!1,!0));b.reverse();m&&(a.verticalAlignment(b, -c,!0),g=Yt(a,b,!0,!0));Pa(b);a.v(f,g,h,k);a.network.vertexes.each(function(a){var b=Na();l&&b.push(f.get(a));m&&b.push(g.get(a));n&&b.push(h.get(a));p&&b.push(k.get(a));b.sort(function(a,b){return a-b});var c=b.length;c=(b[Math.floor((c-1)/2)]+b[Math.ceil((c-1)/2)])/2;Pa(b);a.Fc=c})} -function Xt(a,b){for(var c=a.length,d=1;dm)&&b.add(n);f++}e= -m}}}$s.prototype.verticalAlignment=function(a,b,c){$t(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?Zt(f):au(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} -$s.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=eu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; -function eu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}$s.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=gt(this,!0),b=gt(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; -function gt(a,b){return 270===a.N?b?ld:od:90===a.N?b?od:ld:180===a.N?b?md:nd:b?nd:md} -$s.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0m)&&b.add(n);f++}e= +m}}}at.prototype.verticalAlignment=function(a,b,c){au(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?$t(f):bu(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} +at.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=fu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; +function fu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}at.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=ht(this,!0),b=ht(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; +function ht(a,b){return 270===a.N?b?md:pd:90===a.N?b?pd:md:180===a.N?b?nd:od:b?od:nd} +at.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+ n.bounds.height,b.m(u++,C,n+H),b.m(u++,C,n),b.m(u++,C,n-A)):(b.m(u++,C,E+H),b.m(u++,C,E),b.m(u++,C,E-A)):270===this.N?E<=n.bounds.y?(n=n.bounds.y,b.m(u++,C,n-A),b.m(u++,C,n),b.m(u++,C,n+H)):(b.m(u++,C,E-A),b.m(u++,C,E),b.m(u++,C,E+H)):0===this.N&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(u++,n+H,E),b.m(u++,n,E),b.m(u++,n-A,E)):(b.m(u++,C+H,E),b.m(u++,C,E),b.m(u++,C-A,E)));else{b.m(u++,w,z);var T=0;if(180===this.N||0===this.N){if(180===this.N?C>=n.bounds.right:C<=n.bounds.x)T=(0===this.N? -A:H)/2;b.m(u++,w+T,E)}else{if(270===this.N?E>=n.bounds.bottom:E<=n.bounds.y)T=(90===this.N?-A:H)/2;b.m(u++,C,z+T)}b.m(u++,C,E)}}else A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):90===this.N?(b.m(u++,C,E+H+r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):270===this.N?(b.m(u++,C,E-A- -r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):b.m(u++,C,E)}n=y}if(null===h||l!==zc||q)if(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,q)r=this.Rd[m.layer],180===this.N||0===this.N?(q=z,q>=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.x&&q<=m.bounds.right&&(270===this.N?E>=m.bounds.y:E<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-r:r),q=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(u- 2,n,z),b.O(u-1,n+H,z)):90===this.N&&E<=m.bounds.bottom?(n=m.bounds.y,b.O(u-2,w,n),b.O(u-1,w,n-A)):270===this.N&&E>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(u-2,w,n),b.O(u-1,w,n+H)):0===this.N&&C<=m.bounds.right&&(n=m.bounds.x,b.O(u-2,n,z),b.O(u-1,n-A,z));else{A=Math.max(10,this.ne[m.layer]);H=Math.max(10,this.Rd[m.layer]);q=0;if(180===this.N||0===this.N){if(180===this.N?C<=m.bounds.x:C>=m.bounds.right)q=(0===this.N?H:-A)/2;b.m(u++,C+q,z)}else{if(270===this.N?E<=m.bounds.y:E>=m.bounds.bottom)q= (90===this.N?H:-A)/2;b.m(u++,w,E+q)}b.m(u++,C,E)}}else{for(;null!==m&&m!==n;){A=y=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(y=w.toVertex,A=w.fromVertex,null!==A.node&&(A=null),null!==y.node)););if(null===y)break;y!==n&&(w=b.i(u-1).x,z=b.i(u-1).y,C=y.centerX,E=y.centerY,q?180===this.N||0===this.N?(null!==A?A.centerY:z)!==E&&(A=this.Ya[y.layer]+this.cg.x,u===b.firstPickIndex+1&&(A=0===this.N?Math.max(A,w):Math.min(A,w)),b.m(u++,A,z),b.m(u++,A,E)):(null!==A?A.centerX: w)!==C&&(A=this.Ya[y.layer]+this.cg.y,u===b.firstPickIndex+1&&(A=90===this.N?Math.max(A,z):Math.min(A,z)),b.m(u++,w,A),b.m(u++,C,A)):(A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):90===this.N?(b.m(u++,C,E-A-r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):270===this.N?(b.m(u++,C,E+H+ r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):180===this.N?(b.m(u++,C+H,E),b.m(u++,C-A,E)):90===this.N?(b.m(u++,C,E-A),b.m(u++,C,E+H)):270===this.N?(b.m(u++,C,E+H),b.m(u++,C,E-A)):(b.m(u++,C-A,E),b.m(u++,C+H,E))));m=y}q&&(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,180===this.N||0===this.N?z!==E&&(A=0===this.N? -Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===zc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===zc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), -b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===zc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===zc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), +Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===xc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===xc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), +b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===xc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===xc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), b.O(b.pointsCount-1,e.x,e.y)));b.Lf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -$s.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new I,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=this.linkSpacing)){for(var a=new I,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.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; -t.Ws=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,$s,"isApprox:a"),D(b,$s,"isApprox:b"));a-=b;return-1a}; +f.x+r,f.y),q.O(p.index+1,g.x+r,g.y),q.Lf()}f=e}a=d}}}};t=at.prototype;t.oy=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.layerb.layer?1:a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; +t.Ws=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,at,"isApprox:a"),D(b,at,"isApprox:b"));a-=b;return-1a}; t.Mi=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.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",$s,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== -a&&(B(a,"boolean",$s,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",$s,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, -maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var at=new F($s,"CycleDepthFirst",0),ut=new F($s,"CycleGreedy",1),ft=new F($s,"CycleFromLayers",2),bt=new F($s,"LayerOptimalLinkLength",0),zt=new F($s,"LayerLongestPathSink",1),Bt=new F($s,"LayerLongestPathSource",2),ct=new F($s,"InitDepthFirstOut",0),It=new F($s,"InitDepthFirstIn",1),Ft=new F($s,"InitNaive",2),Mt=new F($s,"AggressiveNone",0),dt=new F($s,"AggressiveLess",1),Nt=new F($s,"AggressiveMore",2),Ot=8; -$s.className="LayeredDigraphLayout";$s.CycleDepthFirst=at;$s.CycleGreedy=ut;$s.CycleFromLayers=ft;$s.LayerOptimalLinkLength=bt;$s.LayerLongestPathSink=zt;$s.LayerLongestPathSource=Bt;$s.InitDepthFirstOut=ct;$s.InitDepthFirstIn=It;$s.InitNaive=Ft;$s.AggressiveNone=Mt;$s.AggressiveLess=dt;$s.AggressiveMore=Nt;$s.PackNone=0;$s.PackExpand=1;$s.PackStraighten=2;$s.PackMedian=4;$s.PackAll=15;$s.AlignNone=0;$s.AlignUpperLeft=1;$s.AlignUpperRight=2;$s.AlignLowerLeft=4;$s.AlignLowerRight=8;$s.AlignAll=15; -function fu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}fu.className="SegInfo";function et(a){Mq.call(this,a)}na(et,Mq);et.prototype.createVertex=function(){return new gu(this)};et.prototype.createEdge=function(){return new hu(this)};et.className="LayeredDigraphNetwork";function gu(a){Pq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} -na(gu,Pq);function iu(a,b){return a.index-b.index}function bu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} -function Zt(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(iu);a.qo=b}return a.qo}function au(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(iu);a.oo=b}return a.oo}gu.prototype.Pl=function(a){Pq.prototype.Pl.call(this,a);this.po=this.qo=null}; -gu.prototype.Yl=function(a){Pq.prototype.Yl.call(this,a);this.po=this.qo=null};gu.prototype.Ml=function(a){Pq.prototype.Ml.call(this,a);this.no=this.oo=null};gu.prototype.Xl=function(a){Pq.prototype.Xl.call(this,a);this.no=this.oo=null}; -oa.Object.defineProperties(gu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",gu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",gu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",gu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(B(a,"number",gu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,gu,gu,"near"),this.G=a)}}});gu.prototype.deleteDestinationEdge=gu.prototype.Xl;gu.prototype.addDestinationEdge=gu.prototype.Ml;gu.prototype.deleteSourceEdge=gu.prototype.Yl;gu.prototype.addSourceEdge=gu.prototype.Pl;gu.className="LayeredDigraphVertex"; -function hu(a){Qq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(hu,Qq); -oa.Object.defineProperties(hu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,gu,hu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,gu,hu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",hu,"valid"),this.Na=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",hu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",hu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",hu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", -hu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",hu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",hu,"portToColOffset"),this.G=a)}}});hu.className="LayeredDigraphEdge"; -function Z(a){Gi.call(this);this.ac=new J;this.jo=ju;this.Ad=ku;this.Ho=lu;this.Oq=mu;this.ow=[];this.zd=!0;this.Yb=nu;this.fe=(new Gb(10,10)).freeze();var b=new ou(this);this.$=new pu(b);this.aa=new pu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; -Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new ou(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Df?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==qu&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ju&&null!==b?this.Ad=b.isTreePathToChildren?ku:ru:this.Ad=this.path===ju?ku:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} -Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,pu,Z,"removeChild:p");G&&x(b,pu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Yu(this,a,g,ha,w,z):Zu(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Mu:for(C=0;Cn&&(aawb&&(dv(a,-wb,0,la,ya-1),ev(C,-wb,0),ev(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(dv(a,0,-wb,la,ya-1),ev(C,0,-wb),ev(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Pu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=jv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=hv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=jv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=iv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< -R)e=$u(this,4),R=$u(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=$u(this,C.length+2);R=$u(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ +function kt(a,b){var c=a.Ab[b];if(c>=a.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",at,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== +a&&(B(a,"boolean",at,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",at,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, +maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var bt=new F(at,"CycleDepthFirst",0),vt=new F(at,"CycleGreedy",1),gt=new F(at,"CycleFromLayers",2),ct=new F(at,"LayerOptimalLinkLength",0),At=new F(at,"LayerLongestPathSink",1),Ct=new F(at,"LayerLongestPathSource",2),dt=new F(at,"InitDepthFirstOut",0),Jt=new F(at,"InitDepthFirstIn",1),Gt=new F(at,"InitNaive",2),Nt=new F(at,"AggressiveNone",0),et=new F(at,"AggressiveLess",1),Ot=new F(at,"AggressiveMore",2),Pt=8; +at.className="LayeredDigraphLayout";at.CycleDepthFirst=bt;at.CycleGreedy=vt;at.CycleFromLayers=gt;at.LayerOptimalLinkLength=ct;at.LayerLongestPathSink=At;at.LayerLongestPathSource=Ct;at.InitDepthFirstOut=dt;at.InitDepthFirstIn=Jt;at.InitNaive=Gt;at.AggressiveNone=Nt;at.AggressiveLess=et;at.AggressiveMore=Ot;at.PackNone=0;at.PackExpand=1;at.PackStraighten=2;at.PackMedian=4;at.PackAll=15;at.AlignNone=0;at.AlignUpperLeft=1;at.AlignUpperRight=2;at.AlignLowerLeft=4;at.AlignLowerRight=8;at.AlignAll=15; +function gu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}gu.className="SegInfo";function ft(a){Nq.call(this,a)}na(ft,Nq);ft.prototype.createVertex=function(){return new hu(this)};ft.prototype.createEdge=function(){return new iu(this)};ft.className="LayeredDigraphNetwork";function hu(a){Qq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} +na(hu,Qq);function ju(a,b){return a.index-b.index}function cu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} +function $t(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(ju);a.qo=b}return a.qo}function bu(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(ju);a.oo=b}return a.oo}hu.prototype.Pl=function(a){Qq.prototype.Pl.call(this,a);this.po=this.qo=null}; +hu.prototype.Yl=function(a){Qq.prototype.Yl.call(this,a);this.po=this.qo=null};hu.prototype.Ml=function(a){Qq.prototype.Ml.call(this,a);this.no=this.oo=null};hu.prototype.Xl=function(a){Qq.prototype.Xl.call(this,a);this.no=this.oo=null}; +oa.Object.defineProperties(hu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",hu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",hu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",hu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(B(a,"number",hu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,hu,hu,"near"),this.G=a)}}});hu.prototype.deleteDestinationEdge=hu.prototype.Xl;hu.prototype.addDestinationEdge=hu.prototype.Ml;hu.prototype.deleteSourceEdge=hu.prototype.Yl;hu.prototype.addSourceEdge=hu.prototype.Pl;hu.className="LayeredDigraphVertex"; +function iu(a){Rq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(iu,Rq); +oa.Object.defineProperties(iu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,hu,iu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,hu,iu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",iu,"valid"),this.Na=a)}},rev:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",iu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",iu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",iu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", +iu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",iu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",iu,"portToColOffset"),this.G=a)}}});iu.className="LayeredDigraphEdge"; +function Z(a){Gi.call(this);this.ac=new J;this.jo=ku;this.Ad=lu;this.Ho=mu;this.Oq=nu;this.ow=[];this.zd=!0;this.Yb=ou;this.fe=(new Gb(10,10)).freeze();var b=new pu(this);this.$=new qu(b);this.aa=new qu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; +Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new pu(this)}; +Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Cf?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; +Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==ru&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ku&&null!==b?this.Ad=b.isTreePathToChildren?lu:su:this.Ad=this.path===ku?lu:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} +Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,qu,Z,"removeChild:p");G&&x(b,qu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Zu(this,a,g,ha,w,z):$u(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Nu:for(C=0;Cn&&(aawb&&(ev(a,-wb,0,la,ya-1),fv(C,-wb,0),fv(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(ev(a,0,-wb,la,ya-1),fv(C,0,-wb),fv(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Qu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=kv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=iv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=kv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=jv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< +R)e=av(this,4),R=av(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=av(this,C.length+2);R=av(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ d,0),R[1].h(R[0].x,y),R[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])),R[0].h(0,u+y),R[1].h(d,R[0].y),R[2].xd?Yu(a,b,e,O,A,C):Zu(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Mu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Yu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Vu(b),m=0,n=0,p=0,q=0;qd?Zu(a,b,e,O,A,C):$u(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Nu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Zu(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Wu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=lv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=lv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} -function Zu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Vu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=mv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=mv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} +function $u(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Wu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=lv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=lv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Wu:return a.width>b?a.width:b;case Xu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Lu:case Bu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Mu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Pu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function iv(a,b,c){G&&x(a,pu,Z,"calculateSubheight:v");switch(a.alignment){case gv:case fv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Wu:return a.height>b?a.height:b;case Xu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Lu:case Bu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Mu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Pu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function jv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case fv:b/=2;c/=2;break;case gv:b/=2;c/=2;break;case Wu:c=b=0;break;case Xu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function av(a,b,c,d,e,f){G&&x(a,pu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=jv(b,c,d);dv(a,b.x,b.y,e,f)}function dv(a,b,c,d,e){G&&x(a,pu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} -function bv(a,b,c,d){G&&(x(b,pu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case ku:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case ru:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function ev(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= -0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, -k.y);f=$u(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length); -for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=$u(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=mv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=mv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Xu:return a.width>b?a.width:b;case Yu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Mu:case Cu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Nu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Qu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function jv(a,b,c){G&&x(a,qu,Z,"calculateSubheight:v");switch(a.alignment){case hv:case gv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Xu:return a.height>b?a.height:b;case Yu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Mu:case Cu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Nu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Qu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function kv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case gv:b/=2;c/=2;break;case hv:b/=2;c/=2;break;case Xu:c=b=0;break;case Yu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function bv(a,b,c,d,e,f){G&&x(a,qu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=kv(b,c,d);ev(a,b.x,b.y,e,f)}function ev(a,b,c,d,e){G&&x(a,qu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} +function cv(a,b,c,d){G&&(x(b,qu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case lu:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case su:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function fv(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= +0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, +k.y);f=av(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length); +for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=av(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,pu,Z,"computeLayerSpacing:v");var b=Vu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,qu,Z,"computeLayerSpacing:v");var b=Wu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.$.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(B(a,"number",Z,"nodeSpacing"),this.$.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(B(a,"number",Z,"layerSpacing"),this.$.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, -enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Su||a===Uu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, +enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Tu||a===Vu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, set:function(a){this.$.breadthLimit!==a&&(B(a,"number",Z,"breadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing},set:function(a){this.$.rowSpacing!==a&&(B(a,"number",Z,"rowSpacing"),this.$.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(B(a,"number",Z,"rowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(B(a,"number",Z,"commentSpacing"),this.$.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(B(a,"number",Z,"commentMargin"),this.$.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(B(a, "boolean",Z,"setsPortSpot"),this.$.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.$.portSpot},set:function(a){x(a,Hb,Z,"portSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(B(a,"boolean",Z,"setsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot}, -set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Gu||a===Hu||a===Iu||Ju)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= +set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Hu||a===Iu||a===Ju||Ku)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(B(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&($a(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, set:function(a){this.aa.nodeIndent!==a&&(B(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(B(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== a&&(B(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(B(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"alternateLayerSpacingParentOverlap"), -0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Su||a===Uu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Tu||a===Vu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(B(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(B(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, set:function(a){this.aa.commentSpacing!==a&&(B(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(B(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsPortSpot"), this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){x(a,Hb,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){x(a,Hb,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); -var ju=new F(Z,"PathDefault",-1),ku=new F(Z,"PathDestination",0),ru=new F(Z,"PathSource",1),Gu=new F(Z,"SortingForwards",10),Hu=new F(Z,"SortingReverse",11),Iu=new F(Z,"SortingAscending",12),Ju=new F(Z,"SortingDescending",13),fv=new F(Z,"AlignmentCenterSubtrees",20),gv=new F(Z,"AlignmentCenterChildren",21),Wu=new F(Z,"AlignmentStart",22),Xu=new F(Z,"AlignmentEnd",23),Lu=new F(Z,"AlignmentBus",24),Bu=new F(Z,"AlignmentBusBranching",25),Mu=new F(Z,"AlignmentTopLeftBus",26),Pu=new F(Z,"AlignmentBottomRightBus", -27),Su=new F(Z,"CompactionNone",30),Uu=new F(Z,"CompactionBlock",31),lu=new F(Z,"StyleLayered",40),Fu=new F(Z,"StyleLastParents",41),Eu=new F(Z,"StyleAlternating",42),Du=new F(Z,"StyleRootOnly",43),nu=new F(Z,"ArrangementVertical",50),nv=new F(Z,"ArrangementHorizontal",51),qu=new F(Z,"ArrangementFixedRoots",52),mu=new F(Z,"LayerIndividual",60),zu=new F(Z,"LayerSiblings",61),yu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=ju;Z.PathDestination=ku;Z.PathSource=ru; -Z.SortingForwards=Gu;Z.SortingReverse=Hu;Z.SortingAscending=Iu;Z.SortingDescending=Ju;Z.AlignmentCenterSubtrees=fv;Z.AlignmentCenterChildren=gv;Z.AlignmentStart=Wu;Z.AlignmentEnd=Xu;Z.AlignmentBus=Lu;Z.AlignmentBusBranching=Bu;Z.AlignmentTopLeftBus=Mu;Z.AlignmentBottomRightBus=Pu;Z.CompactionNone=Su;Z.CompactionBlock=Uu;Z.StyleLayered=lu;Z.StyleLastParents=Fu;Z.StyleAlternating=Eu;Z.StyleRootOnly=Du;Z.ArrangementVertical=nu;Z.ArrangementHorizontal=nv;Z.ArrangementFixedRoots=qu;Z.LayerIndividual=mu; -Z.LayerSiblings=zu;Z.LayerUniform=yu;function ou(a){Mq.call(this,a)}na(ou,Mq);ou.prototype.createVertex=function(){return new pu(this)};ou.prototype.createEdge=function(){return new pv(this)};ou.className="TreeNetwork"; -function pu(a){Pq.call(this,a);this.Z=!1;this.ob=null;this.v=[];this.tb=this.Na=this.G=this.oa=0;this.zd=null;this.W=new K(0,0);this.Ja=new Gb(0,0);this.ra=new K(0,0);this.wm=this.vm=this.KA=!1;this.yp=this.lp=null;this.td=Gu;this.od=Wq;this.Qb=0;this.Pb=gv;this.hr=this.gr=0;this.ir=20;this.oe=50;this.Nq=0;this.Up=Uu;this.Np=0;this.Br=25;this.Tp=this.Ar=10;this.Sp=20;this.Kr=!0;this.rr=gd;this.Jr=!0;this.Qp=gd}na(pu,Pq); -pu.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.td=a.sorting,this.od=a.comparer,this.Qb=a.angle,this.Pb=a.alignment,this.gr=a.nodeIndent,this.hr=a.nodeIndentPastParent,this.ir=a.nodeSpacing,this.oe=a.layerSpacing,this.Nq=a.layerSpacingParentOverlap,this.Up=a.compaction,this.Np=a.breadthLimit,this.Br=a.rowSpacing,this.Ar=a.rowIndent,this.Tp=a.commentSpacing,this.Sp=a.commentMargin,this.Kr=a.setsPortSpot,this.rr=a.portSpot,this.Jr=a.setsChildPortSpot,this.Qp=a.childPortSpot)}; -oa.Object.defineProperties(pu.prototype,{initialized:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"boolean",pu,"initialized"),this.Z=a)}},parent:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(G&&null!==a&&x(a,pu,pu,"parent"),this.ob=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",pu,"children:value");if(null!== -a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go-debug.js b/release/go-debug.js index e9b74b7e1..782ef13d3 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,8 +1,8 @@ /* - * GoJS v2.3.12 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.3.13 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-2023 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.12/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.13/license.html. * DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE. */ (function() { var t;function ba(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;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};hb.prototype.Gd=function(){return this.next()}; -hb.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};hb.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};hb.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -hb.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};hb.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; -hb.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};hb.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};hb.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; -oa.Object.defineProperties(hb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});hb.prototype.first=hb.prototype.first;hb.prototype.hasNext=hb.prototype.Gd;hb.prototype.next=hb.prototype.next;hb.prototype.reset=hb.prototype.reset;hb.className="ListIteratorBackwards"; -function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};ib.prototype.Gd=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};ib.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Gd;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; +function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",I,"elt:i");return b[a]};t.get=function(a){return this.P(a)};t.jd=function(a,b){G&&D(a,I,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",I,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.jd(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; t.qc=function(){var a=this.s,b=a.length;return 0a||a>=b.length)&&Ba(a,"0 I.prototype.copy=function(){var a=new I,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",I,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new gb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new hb(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; +oa.Object.defineProperties(I.prototype,{_dataArray:{configurable:!0,get:function(){return this.s}},count:{configurable:!0,get:function(){return this.s.length}},size:{configurable:!0,get:function(){return this.s.length}},length:{configurable:!0,get:function(){return this.s.length}},iterator:{configurable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, +enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new ib(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; I.prototype.pop=I.prototype.pop;I.prototype.last=I.prototype.qc;I.prototype.first=I.prototype.first;I.prototype.set=I.prototype.set;I.prototype.setElt=I.prototype.jd;I.prototype.get=I.prototype.get;I.prototype.elt=I.prototype.P;I.prototype.indexOf=I.prototype.indexOf;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.clear=I.prototype.clear;I.prototype.addAll=I.prototype.addAll;I.prototype.push=I.prototype.push;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.qa; I.prototype.freeze=I.prototype.freeze;I.className="List";function lb(a){this.qg=a;a.Xa=null;this.wa=a.A;this.ya=null}lb.prototype.reset=function(){var a=this.qg;a.Xa=null;this.wa=a.A;this.ya=null};lb.prototype.next=function(){var a=this.qg;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=b.value,this.key=b.key,!0;this.je();return!1};lb.prototype.Gd=function(){return this.next()}; lb.prototype.first=function(){var a=this.qg;this.wa=a.A;a=a.ja;if(null!==a){this.ya=a;var b=a.value;this.key=a.key;return this.value=b}return null};lb.prototype.any=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};lb.prototype.all=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; lb.prototype.each=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Ca;return this};lb.prototype.map=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Ca;return c.iterator};lb.prototype.filter=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Ca}return c.iterator}; lb.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.qg.Xa=this};lb.prototype.toString=function(){return null!==this.ya?"SetIterator@"+this.ya.value:"SetIterator"};oa.Object.defineProperties(lb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.qg.Zb}}});lb.prototype.first=lb.prototype.first;lb.prototype.hasNext=lb.prototype.Gd;lb.prototype.next=lb.prototype.next;lb.prototype.reset=lb.prototype.reset; lb.className="SetIterator";function J(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=J.prototype;t.Db=function(){var a=this.A;a++;999999999=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; +function mb(a){var b=a.__gohashid;void 0===b&&(b=ob++,a.__gohashid=b);return b}function jb(a){return a.__gohashid}oa.Object.defineProperties(J.prototype,{count:{configurable:!0,get:function(){return this.Zb}},size:{configurable:!0,get:function(){return this.Zb}},iterator:{configurable:!0,get:function(){if(0>=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; J.prototype.clear=J.prototype.clear;J.prototype.retainAll=J.prototype.JA;J.prototype.removeAll=J.prototype.vp;J.prototype["delete"]=J.prototype.delete;J.prototype.remove=J.prototype.remove;J.prototype.first=J.prototype.first;J.prototype.containsAny=J.prototype.kz;J.prototype.containsAll=J.prototype.jz;J.prototype.has=J.prototype.has;J.prototype.contains=J.prototype.contains;J.prototype.addAll=J.prototype.addAll;J.prototype.add=J.prototype.add;J.prototype.thaw=J.prototype.qa;J.prototype.freeze=J.prototype.freeze; -var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=ib;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; +var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=jb;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; pb.prototype.first=function(){var a=this.sa;this.wa=a.A;a=a.ja;return null!==a?(this.ya=a,this.value=this.key=a=a.key):null};pb.prototype.any=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.key))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};pb.prototype.all=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.key))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; pb.prototype.each=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.key),b.A!==c&&Da(b),d=d.Ca;return this};pb.prototype.map=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e.key)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};pb.prototype.filter=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;){var f=e.key;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Ca}return d.iterator}; pb.prototype.je=function(){this.value=this.key=null;this.wa=-1};pb.prototype.toString=function(){return null!==this.ya?"MapKeySetIterator@"+this.ya.value:"MapKeySetIterator"};oa.Object.defineProperties(pb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});pb.prototype.first=pb.prototype.first;pb.prototype.hasNext=pb.prototype.Gd;pb.prototype.next=pb.prototype.next;pb.prototype.reset=pb.prototype.reset; @@ -85,16 +85,16 @@ ub.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key) ub.prototype.any=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};ub.prototype.all=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Ca}return!0};ub.prototype.each=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Ca;return this}; ub.prototype.map=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.filter=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.sa.Xa=this};ub.prototype.toString=function(){return null!==this.ya?"MapIterator@"+this.ya:"MapIterator"}; oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Gd;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapIterator"; -function vb(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.wf=this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=vb.prototype;t.Db=function(){var a=this.A;a++;999999999=this.count)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new ub(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?eb:new pb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return eb; var a=this.wf;return null!==a?(a.reset(),a):new rb(this)}}});vb.prototype.toKeySet=vb.prototype.Xf;vb.prototype.toArray=vb.prototype.La;vb.prototype.clear=vb.prototype.clear;vb.prototype["delete"]=vb.prototype.delete;vb.prototype.remove=vb.prototype.remove;vb.prototype.get=vb.prototype.get;vb.prototype.getValue=vb.prototype.L;vb.prototype.has=vb.prototype.has;vb.prototype.contains=vb.prototype.contains;vb.prototype.first=vb.prototype.first;vb.prototype.addAll=vb.prototype.addAll; -vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var yb,zb,Ab,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; +vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var xb,yb,zb,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; K.prototype.Eg=function(a,b){G&&(B(a,"number",K,"setTo:x"),B(b,"number",K,"setTo:y"),this.na());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(x(a,K,K,"set:p"),this.na());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Db(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 K(c,e)}return new K} function Eb(a){G&&x(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ui=function(a,b){return this.J===a&&this.K===b};t.cb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(x(a,K,K,"add:p"),this.na());this.J+=a.x;this.K+=a.y;return this};t.ze=function(a){G&&(x(a,K,K,"subtract:p"),this.na());this.J-=a.x;this.K-=a.y;return this}; @@ -112,7 +112,7 @@ oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return K.prototype.projectOntoLineSegmentPoint=K.prototype.AA;K.prototype.projectOntoLineSegment=K.prototype.zA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(D(a,K,"intersectingLineSegments:a1x"),D(b,K,"intersectingLineSegments:a1y"),D(c,K,"intersectingLineSegments:a2x"),D(d,K,"intersectingLineSegments:a2y"),D(e,K,"intersectingLineSegments:b1x"),D(f,K,"intersectingLineSegments:b1y"),D(g,K,"intersectingLineSegments:b2x"),D(h,K,"intersectingLineSegments:b2y"));return L.em(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.iz;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(D(a,K,"compareWithLineSegment:a1x"),D(b,K,"compareWithLineSegment:a1y"),D(c,K,"compareWithLineSegment:a2x"),D(d,K,"compareWithLineSegment:a2y"),D(e,K,"compareWithLineSegment:b1x"),D(f,K,"compareWithLineSegment:b1y"));return L.Tl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.gb;K.prototype.normalize=K.prototype.normalize; K.prototype.distanceSquared=K.prototype.Fd;K.prototype.distanceSquaredPoint=K.prototype.Nf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.ze;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.cb;K.prototype.equalTo=K.prototype.ui;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.Eg;var Nb=[];K.className="Point";K.parse=Db;K.stringify=Eb; -K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=yb=(new K(0,0)).pa();K.InfiniteTopLeft=zb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=Ab=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; +K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=xb=(new K(0,0)).pa();K.InfiniteTopLeft=yb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=zb=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; function Gb(a,b){void 0===a?this.ea=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.ea=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Ob,Pb,Qb,Rb,Sb,Tb,Ub;Gb.prototype.assign=function(a){this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.h=function(a,b){this.ga=a;this.ea=b;return this}; Gb.prototype.Eg=function(a,b){G&&(B(a,"number",Gb,"setTo:w"),B(b,"number",Gb,"setTo:h"),0>a&&Ba(a,">= 0",Gb,"setTo:w"),0>b&&Ba(b,">= 0",Gb,"setTo:h"),this.na());this.ga=a;this.ea=b;return this};Gb.prototype.set=function(a){G&&(x(a,Gb,Gb,"set:s"),this.na());this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.copy=function(){var a=new Gb;a.ga=this.ga;a.ea=this.ea;return a};t=Gb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; @@ -136,38 +136,38 @@ function hc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1; t.Zv=function(a,b,c,d){G?(D(a,M,"union:x"),D(b,M,"union:y"),void 0===c?c=0:D(c,M,"union:w"),void 0===d?d=0:D(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.na()):(void 0===c&&(c=0),void 0===d&&(d=0));return ic(this,a,b,c,d)};function ic(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.ea,c+e);a.J=f;a.K=g;a.ga=b-f;a.ea=c-g;return a} t.Li=function(a,b,c){G&&(D(a,M,"setSpot:x"),D(b,M,"setSpot:y"),x(c,Hb,M,"setSpot:spot"),this.na());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.ea;return this}; function jc(a,b,c,d,e,f,g,h){G?(D(a,M,"contains:rx"),D(b,M,"contains:ry"),D(c,M,"contains:rw"),D(d,M,"contains:rh"),D(e,M,"contains:x"),D(f,M,"contains:y"),void 0===g?g=0:D(g,M,"contains:w"),void 0===h?h=0:D(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function mc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; -M.alloc=function(){var a=nc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=nc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){nc.push(a)}; +function lc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; +M.alloc=function(){var a=mc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=mc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){mc.push(a)}; oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"x"),this.na(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"y"),this.na(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(B(a,"number",M,"width"),this.na(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.ea}, set:function(a){G&&(B(a,"number",M,"height"),this.na(a));0>a&&Ba(a,">= 0",M,"height");this.ea=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"left"),this.na(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"top"),this.na(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(D(a,M,"right"),this.na(a));this.J+=a-(this.J+this.ga)}}, bottom:{configurable:!0,get:function(){return this.K+this.ea},set:function(a){G&&(D(a,M,"top"),this.na(a));this.K+=a-(this.K+this.ea)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(x(a,K,M,"position"),this.na(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Gb(this.ga,this.ea)},set:function(a){G&&(x(a,Gb,M,"size"),this.na(a));this.ga=a.width;this.ea=a.height}},center:{configurable:!0, enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.ea/2)},set:function(a){G&&(x(a,K,M,"center"),this.na(a));this.J=a.x-this.ga/2;this.K=a.y-this.ea/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(D(a,M,"centerX"),this.na(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.ea/2},set:function(a){G&&(D(a,M,"centerY"),this.na(a));this.K=a-this.ea/2}}});M.prototype.isEmpty=M.prototype.fA; M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersectsLineSegment:x"),D(b,M,"intersectsLineSegment:y"),D(c,M,"intersectsLineSegment:w"),D(d,M,"intersectsLineSegment:h"),D(e,M,"intersectsLineSegment:p1x"),D(f,M,"intersectsLineSegment:p1y"),D(g,M,"intersectsLineSegment:p2x"),D(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Wx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Li; M.prototype.union=M.prototype.Zv;M.prototype.unionRect=M.prototype.ld;M.prototype.unionPoint=M.prototype.lf;M.prototype.intersects=M.prototype.kv;M.prototype.intersectsRect=M.prototype.dd;M.prototype.intersect=M.prototype.jv;M.prototype.intersectRect=M.prototype.Vx;M.prototype.grow=M.prototype.aA;M.prototype.subtractMargin=M.prototype.Uv;M.prototype.addMargin=M.prototype.Oo;M.prototype.inflate=M.prototype.Hc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var oc=null,pc=null,nc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;M.ZeroRect=oc=(new M(0,0,0,0)).pa();M.NoRect=pc=(new M(NaN,NaN,NaN,NaN)).pa(); -M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; +M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var nc=null,oc=null,mc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;M.ZeroRect=nc=(new M(0,0,0,0)).pa();M.NoRect=oc=(new M(NaN,NaN,NaN,NaN)).pa(); +M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; fc.prototype.Eg=function(a,b,c,d){G&&(B(a,"number",fc,"setTo:t"),B(b,"number",fc,"setTo:r"),B(c,"number",fc,"setTo:b"),B(d,"number",fc,"setTo:l"),this.na());this.af=a;this.$e=b;this.Fe=c;this.Qe=d;return this};fc.prototype.set=function(a){G&&(x(a,fc,fc,"assign:m"),this.na());this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this};fc.prototype.copy=function(){var a=new fc;a.af=this.af;a.$e=this.$e;a.Fe=this.Fe;a.Qe=this.Qe;return a};t=fc.prototype; t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function qc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} -function rc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; -t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=sc.pop();return void 0===a?new fc:a};fc.free=function(a){sc.push(a)}; +function pc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} +function qc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; +t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=rc.pop();return void 0===a?new fc:a};fc.free=function(a){rc.push(a)}; oa.Object.defineProperties(fc.prototype,{top:{configurable:!0,get:function(){return this.af},set:function(a){G&&(D(a,fc,"top"),this.na(a));this.af=a}},right:{configurable:!0,get:function(){return this.$e},set:function(a){G&&(D(a,fc,"right"),this.na(a));this.$e=a}},bottom:{configurable:!0,get:function(){return this.Fe},set:function(a){G&&(D(a,fc,"bottom"),this.na(a));this.Fe=a}},left:{configurable:!0,get:function(){return this.Qe},set:function(a){G&& -(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var tc=null,uc=null,sc=[];fc.className="Margin";fc.parse=qc;fc.stringify=rc;fc.ZeroMargin=tc=(new fc(0,0,0,0)).pa();fc.TwoMargin=uc=(new fc(2,2,2,2)).pa();fc.parse=qc;fc.stringify=rc; -function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var zc,Ac,Bc,Cc,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,gd,hd,id,jd,kd,ld,md,nd,od,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; +(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var sc=null,tc=null,rc=[];fc.className="Margin";fc.parse=pc;fc.stringify=qc;fc.ZeroMargin=sc=(new fc(0,0,0,0)).pa();fc.TwoMargin=tc=(new fc(2,2,2,2)).pa();fc.parse=pc;fc.stringify=qc; +function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var xc,yc,zc,Ac,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,hd,id,jd,kd,ld,md,nd,od,pd,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; Hb.prototype.Eg=function(a,b,c,d){G&&(td(a,"setTo:x"),td(b,"setTo:y"),ud(c,"setTo:offx"),ud(d,"setTo:offy"),this.na());this.J=a;this.K=b;this.se=c;this.te=d;return this};Hb.prototype.set=function(a){G&&(x(a,Hb,Hb,"set:s"),this.na());this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this};Hb.prototype.copy=function(){var a=new Hb;a.J=this.J;a.K=this.K;a.se=this.se;a.te=this.te;return a};t=Hb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function vd(a,b){a.J=NaN;a.K=NaN;a.se=b;return a} function td(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Hb,b)}function ud(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Hb,b)} -function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return zc;if("TopLeft"===a)return Ac;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Bc;if("TopRight"===a)return Cc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== -a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return gd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return xc;if("TopLeft"===a)return yc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return zc;if("TopRight"===a)return Ac;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== +a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=b):f===h?(e=a):jc(a,b, (a+=360);360<=a&&(a-=360);return a},zx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?A:new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; +N.parse=function(a,b){function c(){return u>=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new K(A.x,A.y):new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Jd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A= -new K((y===y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A=new K(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Kd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Kd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)z=r=h(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "B":for(;!c();){r=parseFloat(d()); +l.splice(a,1);for(m=0;m=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Gd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A.h((y=== +y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A.h(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Hd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Hd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Id(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)r=h(),z.assign(r),H=f(),Id(a,r.x,r.y,H.x,H.y),z.assign(H);break;case "B":for(;!c();){r=parseFloat(d()); H=parseFloat(d());T=parseFloat(d());var aa=parseFloat(d()),Y=parseFloat(d()),R=Y,O=!1;c()||(R=parseFloat(d()),c()||(O=0!==parseFloat(d())));y===y.toLowerCase()&&(T+=A.x,aa+=A.y);a.arcTo(r,H,T,aa,Y,R,O)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),T=parseFloat(d()),Y=aa=!1,O=R=0,R=d(),1===R.length?(aa=!!parseFloat(R),Y=!!parseFloat(d()),R=parseFloat(d())):2===R.length?(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]),R=parseFloat(d())):(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]), -R=parseFloat(R.slice(2))),O=parseFloat(d()),y===y.toLowerCase()&&(R=A.x+R,O=A.y+O),A.h(R,O),Md(a,r,H,T,aa,Y,R,O);break;case "Z":Nd(a);A.assign(k);break;case "F":r="";for(H=1;l[u+H];)if("0"===l[u+H])p=!0,H++;else if(null!==l[u+H].match(/[Uu]/))H++;else if(null===l[u+H].match(E))H++;else{r=l[u+H];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Zd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case N.j:case N.v:case N.G:var g=this.ud;var h=this.vd;this.ud=g*a+h*c+e;this.vd=g*b+h*d+f;g=this.Jc;h=this.Kc;this.Jc=g*a+h*c+e;this.Kc=g*b+h*d+f;break;case N.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Xd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ha=function(a,b){void 0===b&&(b=0);var c=this.ud,d=this.vd,e=this.Jc,f=this.Kc;switch(this.type){case N.j:return L.dc(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ha(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return be(this,a,b,!0,!1);default:return!1}}; -function be(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return $d(this,a,b,!0,!1);default:return!1}}; +function $d(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.Nx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.fv=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -236,237 +236,237 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.Ox=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.Bh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,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.s,d=c.length,e=0;ea&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,je,"x1"),this.hi=Math.max(d,0),G&&D(e,je,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&D(d,je,"x1"),this.Ye=d,G&&D(e,je,"y1"),this.gi=e,G&&D(f,je,"x2"),a===Td&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Td&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}je.prototype.copy=function(){var a=new je;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=je.prototype; -t.cb=function(a){if(!(a instanceof je)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Qd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Rd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Sd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Td:return L.C(this.startAngle, -a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Zd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===je?this.type=a:Ea(this,a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Qd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Rd: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 Sd: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 Td: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 Zd: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)+ +t.ha=function(a,b,c){for(var d=this.startX,e=this.startY,f=d,g=e,h=this.segments.s,k=h.length,l=0;la&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,le,"x1"),this.hi=Math.max(d,0),G&&D(e,le,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&D(d,le,"x1"),this.Ye=d,G&&D(e,le,"y1"),this.gi=e,G&&D(f,le,"x2"),a===Qd&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Qd&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}le.prototype.copy=function(){var a=new le;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=le.prototype; +t.cb=function(a){if(!(a instanceof le)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Nd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Od:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Pd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Qd:return L.C(this.startAngle, +a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Xd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===le?this.type=a:Ea(this,a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Nd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Od: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 Pd: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 Qd: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 Xd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function $d(a,b){if(null!==a.ge&&!1===b._isInvalidBounds)return a.ge;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ge=[],a.ge;b=a.Ye;var e=a.gi,f=L.zx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=L.zx(0,0,b>f?b:f,m,m+g,!0);f=Ib.alloc();f.reset();f.translate(c,d);f.rotate(a.Ye,0,0);f.scale(k,q);N.Na(b,f); Ib.free(f);a.ge=b;return a.ge} -oa.Object.defineProperties(je.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.ta},set:function(a){G&&$a(a,je,je,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Ye},set:function(a){G&&D(a,je,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,je,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.$g},set:function(a){G&&D(a,je,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.hi},set:function(a){G&&D(a,je,"radiusX");0>a&&Ba(a,">= zero",je,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,je,"radiusY");0>a&&Ba(a,">= zero",je,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});je.prototype.equalsApprox=je.prototype.cb; -var Qd=new F(je,"Move",0),Cd=new F(je,"Line",1),Rd=new F(je,"Bezier",2),Sd=new F(je,"QuadraticBezier",3),Td=new F(je,"Arc",4),Zd=new F(je,"SvgArc",4);je.className="PathSegment";je.Move=Qd;je.Line=Cd;je.Bezier=Rd;je.QuadraticBezier=Sd;je.Arc=Td;je.SvgArc=Zd;function le(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} -le.prototype.copy=function(){var a=new le;return this.clone(a)};le.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; -le.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};le.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);return b}; -le.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);b.assign(c.bt(b));return b}; -oa.Object.defineProperties(le.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,le,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,le,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= +oa.Object.defineProperties(le.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.ta},set:function(a){G&&$a(a,le,le,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Ye},set:function(a){G&&D(a,le,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,le,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.$g},set:function(a){G&&D(a,le,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.hi},set:function(a){G&&D(a,le,"radiusX");0>a&&Ba(a,">= zero",le,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,le,"radiusY");0>a&&Ba(a,">= zero",le,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});le.prototype.equalsApprox=le.prototype.cb; +var Nd=new F(le,"Move",0),Cd=new F(le,"Line",1),Od=new F(le,"Bezier",2),Pd=new F(le,"QuadraticBezier",3),Qd=new F(le,"Arc",4),Xd=new F(le,"SvgArc",4);le.className="PathSegment";le.Move=Nd;le.Line=Cd;le.Bezier=Od;le.QuadraticBezier=Pd;le.Arc=Qd;le.SvgArc=Xd;function ne(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} +ne.prototype.copy=function(){var a=new ne;return this.clone(a)};ne.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; +ne.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};ne.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);return b}; +ne.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);b.assign(c.bt(b));return b}; +oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,ne,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,ne,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= a}},button:{configurable:!0,get:function(){return this.Op},set:function(a){this.Op=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.Pp},set:function(a){this.Pp=a}},key:{configurable:!0,get:function(){return this.Kq},set:function(a){this.Kq=a}},down:{configurable:!0,get:function(){return this.gq},set:function(a){this.gq=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.ks=a}},clickCount:{configurable:!0,get:function(){return this.Rp},set:function(a){this.Rp=a}},delta:{configurable:!0,get:function(){return this.eq},set:function(a){this.eq=a}},isMultiTouch:{configurable:!0,get:function(){return this.Gq},set:function(a){this.Gq=a}},handled:{configurable:!0,get:function(){return this.Aq},set:function(a){this.Aq=a}},bubbles:{configurable:!0, get:function(){return this.Jg},set:function(a){this.Jg=a}},event:{configurable:!0,get:function(){return this.mq},set:function(a){this.mq=a}},isTouchEvent:{configurable:!0,get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{configurable:!0,get:function(){return this.es},set:function(a){this.es=a}},targetDiagram:{configurable:!0,get:function(){return this.$r},set:function(a){this.$r=a}}, targetObject:{configurable:!0,get:function(){return this.Dd},set:function(a){this.Dd=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}}});le.prototype.getMultiTouchDocumentPoint=le.prototype.Vz;le.prototype.getMultiTouchViewPoint=le.prototype.ep;le.className="InputEvent";function ne(){this.H=null;this.Ea="";this.nr=this.Yr=null}ne.prototype.copy=function(){var a=new ne;a.H=this.H;a.Ea=this.Ea;a.Yr=this.Yr;a.nr=this.nr;return a};ne.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},subject:{configurable:!0,get:function(){return this.Yr},set:function(a){this.Yr=a}},parameter:{configurable:!0,get:function(){return this.nr},set:function(a){this.nr=a}}});ne.className="DiagramEvent"; -function oe(){this.Sm=pe;this.Df=this.cr="";this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}oe.prototype.clear=function(){this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}; -oe.prototype.copy=function(){var a=new oe;a.Sm=this.Sm;a.cr=this.cr;a.Df=this.Df;a.ic=this.ic;a.H=this.H;a.bo=this.bo;var b=this.eo;a.eo=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.co;a.co=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Yn;a.Yn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Xn;a.Xn=Ga(b)&&"function"===typeof b.M?b.M():b;return a};oe.prototype.wb=function(a){a.classType===oe?this.change=a:Ea(this,a)}; -oe.prototype.toString=function(){var a="";a=this.change===qe?a+"* ":this.change===pe?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===qe?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};oe.prototype.L=function(a){return a?this.oldValue:this.newValue};oe.prototype.Xz=function(a){return a?this.oldParam:this.newParam};oe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; -oe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};oe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};oe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -oa.Object.defineProperties(oe.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Sm},set:function(a){G&&$a(a,oe,oe,"change");this.Sm=a}},modelChange:{configurable:!0,get:function(){return this.cr},set:function(a){G&&B(a,"string",oe,"modelChange");this.cr=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.Df},set:function(a){G&&"string"!==typeof a&&B(a,"function",oe,"propertyName");this.Df=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Sm===qe&&("CommittedTransaction"===this.Df||"FinishedUndo"===this.Df||"FinishedRedo"===this.Df)}},object:{configurable:!0,get:function(){return this.bo},set:function(a){this.bo=a}},oldValue:{configurable:!0,get:function(){return this.eo},set:function(a){this.eo= -a}},oldParam:{configurable:!0,get:function(){return this.co},set:function(a){this.co=a}},newValue:{configurable:!0,get:function(){return this.Yn},set:function(a){this.Yn=a}},newParam:{configurable:!0,get:function(){return this.Xn},set:function(a){this.Xn=a}}});oe.prototype.redo=oe.prototype.redo;oe.prototype.canRedo=oe.prototype.canRedo;oe.prototype.undo=oe.prototype.undo;oe.prototype.canUndo=oe.prototype.canUndo;oe.prototype.getParam=oe.prototype.Xz; -oe.prototype.getValue=oe.prototype.L;oe.prototype.clear=oe.prototype.clear;var qe=new F(oe,"Transaction",-1),pe=new F(oe,"Property",0),re=new F(oe,"Insert",1),se=new F(oe,"Remove",2);oe.className="ChangedEvent";oe.Transaction=qe;oe.Property=pe;oe.Insert=re;oe.Remove=se;function te(){this.o=(new I).freeze();this.Ea="";this.j=!1} -te.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(te.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});te.prototype.optimize=te.prototype.lk;te.prototype.redo=te.prototype.redo;te.prototype.canRedo=te.prototype.canRedo;te.prototype.undo=te.prototype.undo;te.prototype.canUndo=te.prototype.canUndo; -te.prototype.clear=te.prototype.clear;te.className="Transaction";function ue(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} -ue.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +oa.Object.defineProperties(ve.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ve.prototype.optimize=ve.prototype.lk;ve.prototype.redo=ve.prototype.redo;ve.prototype.canRedo=ve.prototype.canRedo;ve.prototype.undo=ve.prototype.undo;ve.prototype.canUndo=ve.prototype.canUndo; +ve.prototype.clear=ve.prototype.clear;ve.className="Transaction";function we(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} +we.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&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.P(0),null!==f&&f.clear(),b.sb(0),a.Me--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Me++),b.freeze()),a.isInternalTransaction||a.Ub("CommittedTransaction",c,e);else{a.Pe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Ub("RolledBackTransaction",c,e),a.Pe=!1}null!== e&&e.clear()}a.$p=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.P(e),null!==b&&b.undo(),c.qa(),c.sb(e);c.freeze()}return!1}t.Bx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.qa();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.P(b);null!==c&&c.clear();a.sb(b);this.Eq=!0}a.freeze()}}; -ue.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; -ue.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -oa.Object.defineProperties(ue.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndex=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; +we.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +oa.Object.defineProperties(we.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(we.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",we,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",we,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", -we,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",we,"transactionResult");this.Jm=a}}});we.prototype.startTransaction=we.prototype.Ka;we.className="Tool";function Ua(){we.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ae;this.v=Ce;this.Zp=this.j=null;this.Mj=-1}na(Ua,we);Ua.prototype.initializeStandardTools=function(){}; -Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Be&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Ie&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Je){b.bubbles=!0;return}if(this.gestureBehavior===Ie)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; -for(var d=0;de||Math.abs(b.y-a.y)>d}; +oa.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",ye,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",ye,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", +ye,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",ye,"transactionResult");this.Jm=a}}});ye.prototype.startTransaction=ye.prototype.Ka;ye.className="Tool";function Ua(){ye.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ce;this.v=Ee;this.Zp=this.j=null;this.Mj=-1}na(Ua,ye);Ua.prototype.initializeStandardTools=function(){}; +Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof De&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Le&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Me){b.bubbles=!0;return}if(this.gestureBehavior===Le)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; +for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Gf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Gf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Hf(e,g,f,k,h):Hf(e,null,null,null,null)}}}}Ne.prototype.doDragOver=function(){}; -function If(a,b){var c=a.diagram;a.dragsLink&&uf(a,!0);Xe(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Jf(a,e,f);f=Ff(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Qe){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Qe){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&Kf(c,d,a);M.free(a)}}}function Jf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Df||(c=a.mouseDrop,null!==c&&c(b))}function Kf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} -Ne.prototype.doDropOnto=function(){};Ne.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(pf(this,!1),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts)):this.mayMove()?(kf(this),rf(this,this.draggedParts,!0)):this.mayDragOut()?(pf(this,!1),rf(this,this.copiedParts,!1)):kf(this),tf(this,a.lastInput.documentPoint))}}; -Ne.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(kf(this),pf(this,!0),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,kf(this),this.mayMove()&&(rf(this,this.draggedParts, -!0),tf(this,a.lastInput.documentPoint)));this.ln=!0;If(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Lf(this);a.eb();hf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; -Ne.prototype.simulatedMouseMove=function(a,b,c){if(null===Qe)return!1;var d=Qe.diagram;c instanceof Q||(c=null);var e=Ue;c!==e&&(null!==e&&e!==d&&(e.Gg(),Qe.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ue=c,null!==c&&c!==d&&(nf(),e=c.toolManager.findTool("Dragging"),null!==e&&(Pe.contains(e)||Pe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +var Ce=new F(Ua,"WheelScroll",0),Be=new F(Ua,"WheelZoom",1),Pe=new F(Ua,"WheelNone",2),Ee=new F(Ua,"GestureZoom",3),Le=new F(Ua,"GestureCancel",4),Me=new F(Ua,"GestureNone",5);Ua.className="ToolManager";Ua.WheelScroll=Ce;Ua.WheelZoom=Be;Ua.WheelNone=Pe;Ua.GestureZoom=Ee;Ua.GestureCancel=Le;Ua.GestureNone=Me; +function Qe(){ye.call(this);0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Ff(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Ff(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Gf(e,g,f,k,h):Gf(e,null,null,null,null)}}}}Qe.prototype.doDragOver=function(){}; +function Hf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);$e(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;If(a,e,f);f=Ef(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Te){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Te){a=M.alloc();for(b= +c.selection.iterator;b.next();)d=b.value,d instanceof V&&Jf(c,d,a);M.free(a)}}}function If(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Cf||(c=a.mouseDrop,null!==c&&c(b))}function Jf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} +Qe.prototype.doDropOnto=function(){};Qe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; +Qe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, +!0),uf(this,a.lastInput.documentPoint)));this.ln=!0;Hf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Kf(this);a.eb();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; +Qe.prototype.simulatedMouseMove=function(a,b,c){if(null===Te)return!1;var d=Te.diagram;c instanceof Q||(c=null);var e=Xe;c!==e&&(null!==e&&e!==d&&(e.Gg(),Te.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Xe=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Se.contains(e)||Se.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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;M.free(f); -f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,qf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Re(a,g.Xf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,qf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ne.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Ne.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; -oa.Object.defineProperties(Ne.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Ne,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Ne,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Oe,Ne,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Ne,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Ne,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Ne,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= -a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Ne,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Ne,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Ne,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Ne,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Ne,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Ne,"currentPart");this.Z=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Ne,"draggedLink");this.diagram.draggedLink=a}}, -isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Ne,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Ne,"delay");this.Uk=a}}});Ne.prototype.getDraggingSource=Ne.prototype.Uz;var Qe=null,Ue=null;Ne.className="DraggingTool";Pe=new I; -Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Qe&&Qe.doCancel();we.prototype.doCancel.call(this)}; -function Of(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kg&&(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;M.free(f); +f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Ue(a,g.Xf());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/ +2)));a.doUpdateCursor(null)}}}Qe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Qe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; +oa.Object.defineProperties(Qe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Qe,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Qe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Re,Qe,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Qe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Qe,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Qe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= +a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Qe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Qe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Qe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Qe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Qe,"dragsTree"); +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Qe,"currentPart");this.Z=a}},copiedParts:{configurable:!0, +get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Qe,"draggedLink");this.diagram.draggedLink=a}}, +isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Qe,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Qe,"delay");this.Uk=a}}});Qe.prototype.getDraggingSource=Qe.prototype.Uz;var Te=null,Xe=null;Qe.className="DraggingTool";Se=new I; +Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Te&&Te.doCancel();ye.prototype.doCancel.call(this)}; +function Nf(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; -Of.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; -Of.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Of.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; -Of.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, -c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Of.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Qf(this,c,b,d)}; -function Qf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Qf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Qf(a,b.labeledLink,c,d))?!0:!1} -Of.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Rf){if(d===Sf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Tf(this,a,b,c,!0)}if(d===Uf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== -a)return!1;return!Tf(this,a,b,c,!0)}if(d===Vf)return a===b?a=!0:(d=new J,d.add(b),a=Wf(this,d,a,b,c)),!a;if(d===Xf)return!Tf(this,a,b,c,!1);if(d===Yf)return a===b?a=!0:(d=new J,d.add(b),a=Zf(this,d,a,b,c)),!a}return!0};function Tf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Tf(a,g,c,d,e)))return!0}return!1} -function Wf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Wf(a,b,g,d,e)))return!0}return!1}function Zf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Zf(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Of.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Of,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Of,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, -set:function(a){x(a,S,Of,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Of,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Of,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, -set:function(a){x(a,V,Of,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Of,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Of,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, -set:function(a){null!==a&&x(a,V,Of,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Of,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Of,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Of,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Of,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Of,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Of,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, -get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Of,"portTargeted");this.$f=a}}});Of.className="LinkingBaseTool";function $f(){0c){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; +Nf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; +Nf.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Nf.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; +Nf.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, +c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Nf.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Pf(this,c,b,d)}; +function Pf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Pf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Pf(a,b.labeledLink,c,d))?!0:!1} +Nf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Qf){if(d===Rf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Sf(this,a,b,c,!0)}if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== +a)return!1;return!Sf(this,a,b,c,!0)}if(d===Uf)return a===b?a=!0:(d=new J,d.add(b),a=Vf(this,d,a,b,c)),!a;if(d===Wf)return!Sf(this,a,b,c,!1);if(d===Xf)return a===b?a=!0:(d=new J,d.add(b),a=Yf(this,d,a,b,c)),!a}return!0};function Sf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Sf(a,g,c,d,e)))return!0}return!1} +function Vf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Vf(a,b,g,d,e)))return!0}return!1}function Yf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Yf(a,b,h,d,e))return!0}}return!1} +oa.Object.defineProperties(Nf.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Nf,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Nf,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, +set:function(a){x(a,S,Nf,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Nf,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Nf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, +set:function(a){x(a,V,Nf,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Nf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Nf,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, +set:function(a){null!==a&&x(a,V,Nf,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Nf,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Nf,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Nf,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Nf,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Nf,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Nf,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, +get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Nf,"portTargeted");this.$f=a}}});Nf.className="LinkingBaseTool";function Zf(){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)};tg.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}; tg.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.Ic(),this.Ka(this.name),this.jr.set(this.adornedObject.la(this.handle.alignment.vv())),this.fo.set(this.adornedObject.part.location),this.Sw.set(this.adornedObject.desiredSize),this.Ct=this.computeCellSize(),this.Et= -this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; +this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; tg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};tg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();K.free(e)}}; tg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.eb();this.transactionResult=this.name;a.V("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Df){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Oe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; +tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Cf){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Re;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; tg.prototype.computeResize=function(a,b,c,d,e,f){b.pc()&&(b=Ic);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Zo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), -a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Pf&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; +a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Of&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; tg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};tg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Ag.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Ag.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.eb();this.transactionResult=this.name;a.V("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Ag.prototype.rotate=function(a){G&&D(a,Ag,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.$a();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Dg(d))c=this.fo.copy(),b.location=c.ze(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; Ag.prototype.computeRotate=function(a){a=this.rotationPoint.gb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.yi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof Be)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, -Ag,"handle"),a.part instanceof Be))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, +oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof De)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, +Ag,"handle"),a.part instanceof De))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, get:function(){return this.yr},set:function(a){this.yr=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"number",Ag,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){B(a,"number",Ag,"handleDistance");this.G=a}}});Ag.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); -function Bg(){we.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};ah.prototype.doStart=function(){kh=this;null!==this.textBlock&&this.doActivate()}; -ah.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof bh&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=hh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(Ac),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};ah.prototype.doCancel=function(){this.stopTool()}; -ah.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};ah.prototype.doMouseDown=function(){this.isActive&&this.acceptText(lh)};ah.prototype.acceptText=function(a){switch(a){case lh:if(this.wa===nh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this);break;case qh:case fh:case gh:if(fh!==a||!0!==this.textBlock.isMultiline)if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this)}}; -function ph(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.Ka(a.name),a.wa=nh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=jh,a.doError(e,f))}} -ah.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)};ah.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};ah.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=dh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};ah.prototype.doStop=function(){kh=null}; -ah.prototype.isValidText=function(a,b,c){x(a,bh,ah,"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};ah.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; -oa.Object.defineProperties(ah.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,bh,ah,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Le||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.Z},set:function(a){$a(a,ah,ah,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",ah,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",ah,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", -ah,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,ah,ah,"starting"),this.wa=a)}}});ah.prototype.measureTemporaryTextBlock=ah.prototype.by; -var qh=new F(ah,"LostFocus",0),lh=new F(ah,"MouseDown",1),gh=new F(ah,"Tab",2),fh=new F(ah,"Enter",3),rh=new F(ah,"SingleClick",0),ch=new F(ah,"SingleClickSelected",1),mh=new F(ah,"DoubleClick",2),dh=new F(ah,"StateNone",0),hh=new F(ah,"StateActive",1),ih=new F(ah,"StateEditing",2),oh=new F(ah,"StateValidating",3),jh=new F(ah,"StateInvalid",4),nh=new F(ah,"StateValidated",5),kh=null;ah.className="TextEditingTool";ah.LostFocus=qh;ah.MouseDown=lh;ah.Tab=gh;ah.Enter=fh;ah.SingleClick=rh; -ah.SingleClickSelected=ch;ah.DoubleClick=mh;ah.StateNone=dh;ah.StateActive=hh;ah.StateEditing=ih;ah.StateValidating=oh;ah.StateInvalid=jh;ah.StateValidated=nh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function sh(a){th||(uh(),th=!0);this.H=xe;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=vh;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new wh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}sh.prototype.kf=function(a){this.H=a};sh.prototype.canStart=function(){return!0};function xh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),yh(a.H),a.Fb=!0)} -function zh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===vh?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===Ah&&b.Bc.clear(),a.hx=a.al===Bh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ch(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Dh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Se(c),Eh(c),a.Fb=!1,b.start(),b.hc&&(Fh(a),c.eb(),Gh(b,0),Mf(c,!0),Hh(a),c.V("AnimationStarting",a)))}))}}function Ih(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Jh(a,b,c,d){a.isTicking||Ih(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=sh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; -function Kh(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 uh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga.lastInput.clickCount?!1:!0};Zg.prototype.doStart=function(){ih=this;null!==this.textBlock&&this.doActivate()}; +Zg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof $g&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=fh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(yc),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Zg.prototype.doCancel=function(){this.stopTool()}; +Zg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Zg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(jh)};Zg.prototype.acceptText=function(a){switch(a){case jh:if(this.wa===lh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this);break;case oh:case dh:case eh:if(dh!==a||!0!==this.textBlock.isMultiline)if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this)}}; +function nh(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.Ka(a.name),a.wa=lh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=hh,a.doError(e,f))}} +Zg.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)};Zg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Zg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=bh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Zg.prototype.doStop=function(){ih=null}; +Zg.prototype.isValidText=function(a,b,c){x(a,$g,Zg,"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};Zg.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; +oa.Object.defineProperties(Zg.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,$g,Zg,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Oe||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.Z},set:function(a){$a(a,Zg,Zg,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",Zg,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",Zg,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", +Zg,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,Zg,Zg,"starting"),this.wa=a)}}});Zg.prototype.measureTemporaryTextBlock=Zg.prototype.by; +var oh=new F(Zg,"LostFocus",0),jh=new F(Zg,"MouseDown",1),eh=new F(Zg,"Tab",2),dh=new F(Zg,"Enter",3),ph=new F(Zg,"SingleClick",0),ah=new F(Zg,"SingleClickSelected",1),kh=new F(Zg,"DoubleClick",2),bh=new F(Zg,"StateNone",0),fh=new F(Zg,"StateActive",1),gh=new F(Zg,"StateEditing",2),mh=new F(Zg,"StateValidating",3),hh=new F(Zg,"StateInvalid",4),lh=new F(Zg,"StateValidated",5),ih=null;Zg.className="TextEditingTool";Zg.LostFocus=oh;Zg.MouseDown=jh;Zg.Tab=eh;Zg.Enter=dh;Zg.SingleClick=ph; +Zg.SingleClickSelected=ah;Zg.DoubleClick=kh;Zg.StateNone=bh;Zg.StateActive=fh;Zg.StateEditing=gh;Zg.StateValidating=mh;Zg.StateInvalid=hh;Zg.StateValidated=lh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); +function qh(a){rh||(sh(),rh=!0);this.H=ze;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=th;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new uh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}qh.prototype.kf=function(a){this.H=a};qh.prototype.canStart=function(){return!0};function vh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),wh(a.H),a.Fb=!0)} +function xh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===th?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===yh&&b.Bc.clear(),a.hx=a.al===zh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ah(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Bh&&null!==d&&(delete d.start.scale,delete d.end.scale), +sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Ve(c),Ch(c),a.Fb=!1,b.start(),b.hc&&(Dh(a),c.eb(),Eh(b,0),Lf(c,!0),Fh(a),c.V("AnimationStarting",a)))}))}}function Gh(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Hh(a,b,c,d){a.isTicking||Gh(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=qh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; +function Ih(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 sh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",sh,"duration");this.Pg=a}},isAnimating:{configurable:!0, -enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",sh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& -$a(a,sh,sh,"initialAnimationStyle");this.al=a}}});sh.prototype.stopAnimation=sh.prototype.Ic;var bi=null,th=!1,vh=new F(sh,"Default",1),Bh=new F(sh,"AnimateLocations",2),Ah=new F(sh,"None",3);sh.className="AnimationManager";sh.defineAnimationEffect=function(a,b){th||(uh(),th=!0);bi.add(a,b)};sh.Default=vh;sh.AnimateLocations=Bh;sh.None=Ah; -function wh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=yb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}wh.prototype.suspend=function(){this.il=!0};wh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Lh(this,!0);Fh(this.de);Mf(this.H);Hh(this.de);this.H.redraw()}; -function Ch(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a&&Ba(a,">= 1",qh,"duration");this.Pg=a}},isAnimating:{configurable:!0, +enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",qh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& +$a(a,qh,qh,"initialAnimationStyle");this.al=a}}});qh.prototype.stopAnimation=qh.prototype.Ic;var bi=null,rh=!1,th=new F(qh,"Default",1),zh=new F(qh,"AnimateLocations",2),yh=new F(qh,"None",3);qh.className="AnimationManager";qh.defineAnimationEffect=function(a,b){rh||(sh(),rh=!0);bi.add(a,b)};qh.Default=th;qh.AnimateLocations=zh;qh.None=yh; +function uh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=xb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}uh.prototype.suspend=function(){this.il=!0};uh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Jh(this,!0);Dh(this.de);Lf(this.H);Fh(this.de);this.H.redraw()}; +function Ah(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} -function Gh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; -t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Fh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();lf(b,!1);b.eb();b.R();Mf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Mf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Hh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ch(this,null),c.$l(this),b.fc())}}; -t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Df&&(d=b.placeholder);null!==d?(c=d.la(Ac),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; -t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Df&&(c=b.placeholder);if(null!==c){var d=c.la(Ac);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; -oa.Object.defineProperties(wh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",wh,"duration");1>a&&Ba(a,">= 1",wh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}wh.className="Animation";wh.EaseLinear=function(a,b,c,d){return c*a/d+b};wh.EaseInOutQuad=ci;wh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};wh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};wh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};wh.EaseOutExpo=ei; +function Jh(a,b){if(!a.il||b){var c=a.de;if(!1!==a.hc){var d=+new Date,e=d>a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} +function Eh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; +t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Dh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();mf(b,!1);b.eb();b.R();Lf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Lf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Fh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ah(this,null),c.$l(this),b.fc())}}; +t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Cf&&(d=b.placeholder);null!==d?(c=d.la(yc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; +t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Cf&&(c=b.placeholder);if(null!==c){var d=c.la(yc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; +oa.Object.defineProperties(uh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",uh,"duration");1>a&&Ba(a,">= 1",uh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}uh.className="Animation";uh.EaseLinear=function(a,b,c,d){return c*a/d+b};uh.EaseInOutQuad=ci;uh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};uh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};uh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};uh.EaseOutExpo=ei; function ki(a,b,c){this.start=a;this.end=b;this.$u={};this.Vu=c;this.Cv=!1}ki.className="AnimationState";function li(a,b,c){this.Dd=null;this.Df=a;this.Eo=c||mi;this.Gk=null;void 0!==b&&(this.Gk=b,void 0===c&&(this.Eo=ni))}li.prototype.copy=function(){var a=new li(this.Df);a.Eo=this.Eo;var b=this.Gk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.Gk=c}return a}; function oi(a,b){a=a.Gk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.Df},set:function(a){this.Df=a}},animationSettings:{configurable:!0,get:function(){return this.Gk},set:function(a){this.Gk=a}},startCondition:{configurable:!0,get:function(){return this.Eo},set:function(a){G&&$a(a,li,li,"startCondition");this.Eo=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Ya(this);this.H=null;this.Ua=new I;this.Ea="";this.vb=1;this.o=!1;this.j=this.fi=this.v=this.aj=this.$i=this.Zi=this.Yi=this.Wi=this.Xi=this.Vi=this.cj=this.Ui=this.bj=this.Ti=this.Si=!0;this.lr=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){for(var a=this.Ua,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Df?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Be?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Cf?e++:k instanceof V?d++:k instanceof S?f++:k instanceof De?g++:c++}h="";0c.ar||h.height*e>c.ar?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&&(wi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(wi(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),wi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ks()||(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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(pe,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; +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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(re,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; t.wc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.wc(a,b,c);var d=this.Ua;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.P(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.ip(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.wc(b));b.Ug=null;ri(b);return a}; -function xi(a,b,c){b=yi(a,b,c);if(c instanceof Df&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ua.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&dd&&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.P(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.sb(b);a.Mb(f,c);return f}for(g=NaN;0<=--f&&(g=a.P(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Mb(h,c);return h}for(k=NaN;++h< e&&(k=a.P(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ua.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ua.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",qi,"name");var b=this.Ea;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= @@ -637,137 +637,137 @@ set:function(a){var b=this.cj;b!==a&&(B(a,"boolean",qi,"allowUngroup"),this.cj=a get:function(){return this.Wi},set:function(a){var b=this.Wi;b!==a&&(B(a,"boolean",qi,"allowMove"),this.Wi=a,this.g("allowMove",b,a))}},allowReshape:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(B(a,"boolean",qi,"allowReshape"),this.Yi=a,this.g("allowReshape",b,a))}},allowResize:{configurable:!0,get:function(){return this.Zi},set:function(a){var b=this.Zi;b!==a&&(B(a,"boolean",qi,"allowResize"),this.Zi=a,this.g("allowResize",b,a))}}, allowRotate:{configurable:!0,get:function(){return this.$i},set:function(a){var b=this.$i;b!==a&&(B(a,"boolean",qi,"allowRotate"),this.$i=a,this.g("allowRotate",b,a))}},allowSelect:{configurable:!0,get:function(){return this.aj},set:function(a){var b=this.aj;b!==a&&(B(a,"boolean",qi,"allowSelect"),this.aj=a,this.g("allowSelect",b,a))}}});qi.prototype.findObjectsNear=qi.prototype.Ag;qi.prototype.findObjectsIn=qi.prototype.Of;qi.prototype.findObjectsAt=qi.prototype.wi; qi.prototype.findObjectAt=qi.prototype.oc;qi.className="Layer"; -function Q(a,b){zi||(Ai(),zi=!0);Ya(this);xe=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if($g){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===pe&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,xe; -function Di(a){a.de=new sh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Dh;a.Lk=gd;a.Rg=Dh;a.Cq=gd;a.Lt=Ac;a.Ot=Ac;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= -!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new le;a.pq.diagram=a;a.ah=new le;a.ah.diagram=a;a.pj=new le;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Rf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; +function Q(a,b){zi||(Ai(),zi=!0);Ya(this);ze=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if(Yg){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===re&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,ze; +function Di(a){a.de=new qh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Bh;a.Lk=hd;a.Rg=Bh;a.Cq=hd;a.Lt=yc;a.Ot=yc;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= +!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new ne;a.pq.diagram=a;a.ah=new ne;a.ah.diagram=a;a.pj=new ne;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Qf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; a.ko=new I;a.Sg=!1;a.Pd=!0;a.gt=!0;a.Si=!0;a.Ti=!0;a.ht=!1;a.it=!0;a.bj=!0;a.Ui=!0;a.cj=!0;a.kt=!0;a.Vi=!0;a.Xi=!0;a.Wi=!0;a.Yi=!0;a.Zi=!0;a.$i=!0;a.aj=!0;a.lt=!0;a.nt=!0;a.Fw=!1;a.gl=!1;a.yn=!0;a.zn=!0;a.jt=!0;a.mt=!0;a.vu=16;a.zu=16;a.Dr=!1;a.tu=!1;a.yu=0;a.wu=0;a.Eb=(new fc(5)).freeze();a.Ww=(new J).freeze();a.$t=999999999;a.Cw=(new J).freeze();a.lj=!0;a.Oe=!0;a.Bd=!0;a.Le=!1;a.uf=!1;a.Ih=!0;a.vf=!1;a.Jy=new J;a.Dw=new J;a.ii=null;a.pw=new Gb(8,8);a.qw=999;a.Qw=1;a.Yw=0;a.lc={scale:1,position:new K, -bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new bh;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new bh;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Pf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Df;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new bh;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Pf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Pf;c.isPanelMain=!0;b.add(c);c=new Pf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Pf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new Be;b.type=W.Auto;c=new Pf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new Be;b.type=W.Link;c=new Pf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= -new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Oe;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; +bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new $g;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new $g;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Of;c.figure="Ellipse";c.fill="black";c.stroke= +null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Cf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new $g;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Of;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Of;c.isPanelMain=!0;b.add(c);c=new Of;c.toArrow= +"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Of;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new De;b.type=W.Auto;c=new Of;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new De;b.type=W.Link;c=new Of;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= +new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Re;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; function Qi(a,b){a.animationManager.Ic(!0);a.Ww=(new J).freeze();a.Cw=(new J).freeze();var c=a.skipsUndoManager,d=null!==a.ic&&void 0!==a.ic;d&&(a.skipsUndoManager=!0);var e=null;null!==a.le&&(e=a.le.part,null!==e&&a.remove(e));var f=[],g=a.ab.length;if(b){for(b=0;b=a)return b;for(var c=this.ab.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function Ii(a,b){if($g){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); -a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new cj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", -e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);dj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new cj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if($g){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; -f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=ej;e.addEventListener("pointerdown",fj);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Eh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=gj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():hj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=ij(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;jj(a,f,c);c.targetObject=null;a.doMouseMove();hj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=ij(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&jj(e.H,b,d);null===e&&(e=b.target);jj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=kj(b,e);d.targetObject=null;a.doMouseUp();hj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; -c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+lj[1]+lj[2]+"wI"+mj.slice(1,5)]["b"+nj.slice(1,b)](d.ba,oj,b,b);d.ad(!0);pj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), +function Ii(a,b){if(Yg){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); +a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new fj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", +e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);gj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new fj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if(Yg){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; +f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=hj;e.addEventListener("pointerdown",ij);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Ch(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=jj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():kj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=lj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;mj(a,f,c);c.targetObject=null;a.doMouseMove();kj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=lj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&mj(e.H,b,d);null===e&&(e=b.target);mj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=nj(b,e);d.targetObject=null;a.doMouseUp();kj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; +c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+oj[1]+oj[2]+"wI"+pj.slice(1,5)]["b"+qj.slice(1,b)](d.ba,rj,b,b);d.ad(!0);sj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), a.pb=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function pj(a){var b=a.Aa.Ta;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.Hi,!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,"pointercancel",a.nk,!1);a.addEventListener(b,"pointerenter",a.uz,!1);a.addEventListener(b,"pointerleave",a.vz,!1);a.addEventListener(b,"wheel",a.kk,!1);a.addEventListener(b,"keydown",a.jA,!1);a.addEventListener(b,"keyup",a.kA,!1);a.addEventListener(b, -"blur",a.ez,!1);a.addEventListener(b,"focus",a.fz,!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(sa,"resize",a.cw,!1)}function Se(a){30r&&(this.position=y.h(-(b.scrollWidth-this.Ga)+w-this.Ga/e+m,this.position.y))),a.My&&this.allowVerticalScroll&&(hu&&(this.position= -y.h(this.position.x,-(b.scrollHeight-this.Fa)+a.scrollTop-this.Fa/e+f))),K.free(y),this.Bd=!0,this.Oe=this.Dr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);yh(this);return sj(this,a)}; -function sj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);wh(this);return vj(this,a)}; +function vj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===xj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=uj(this,wj);a!==di&&(tj(this,!1),vj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; -t.VA=function(a,b){void 0===b&&(b=wj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===wj||b===xj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===xj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(Ac,b));K.free(b)}else this.rq=null,this.sq=Cb}; -function vj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(Ac,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=zc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Aj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=xj(this,zj);a!==di&&(wj(this,!1),yj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; +t.VA=function(a,b){void 0===b&&(b=zj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===zj||b===Aj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===Aj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(yc,b));K.free(b)}else this.rq=null,this.sq=Cb}; +function yj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(yc,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=xc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Df&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} -t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Df||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Df&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Be&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; -function Hj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Df?(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;eb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Cf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Cf||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Cf&&c.isVisible()&&Kj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof De&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function Kj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Cf?(Lj(f)||Mj(f)||Nj(f))&&Kj(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;eE&&(w=T.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Jb(m,u);Jb(q,u);d.push(new M(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Rj(this.jg,this)&&(e=0E&&(w=T.left, z=T.right),y.height>H&&(A=T.top,C=T.bottom)):(w=T.left,z=T.right,A=T.top,C=T.bottom);var aa=y.width+w+z,Y=y.height+A+C;T=a.scale;var R=aa>k/T,O=Y>l/T;if(!(f||a.uf||a.Le||R||O))return!0;w=y.x-w;k=m.x;z=y.right+z;l=m.right+g;A=y.y-A;var la=m.y;y=y.bottom+C;m=m.bottom+h;var ha="1px";C="1px";a.scrollMode===di&&(R||O)&&(R&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(R=1,w+1l+1&&(R=Math.max((z-l)*T+a.Ga,R)),E+g+1m+1&&(R=Math.max((y-m)*T+a.Fa,R)),H+h+1l+1&&(g=Math.max((z-l)*T+a.Ga,g)),E+1m+1&&(h=Math.max((y-m)*T+g,h)),H+1l+1&&(b=a.position.x*T));if(a.Fn)switch(a.ou){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(H+1< Y?r.scrollTop=(a.position.y-A)*T:A+1m+1&&(r.scrollTop=a.position.y*T));k=a.Ga;l=a.Fa;r.style.width=k+(a.uf?a.Jb:0)+"px";r.style.height=l+(a.Le?a.Jb:0)+"px";return c!==k||d!==l||a.animationManager.Fb?(c=M.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,T,f),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){x(a,U,Q,"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.bk(a.layerName),null===b&&(b=this.bk("")),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.Bi(99999999,a,a.diagram===this);0<=c&&this.jb(re,"parts",b,null,a,null,c);b.isTemporary||this.eb();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.Bi=function(a){this.partManager.Bi(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Be||a instanceof Df&&null!==a.placeholder)&&a.w();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Ne.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()}; -t.wc=function(a){a.Qj();this.partManager.wc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Ne.remove(a);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()};t.remove=function(a){x(a,U,Q,"remove:part");bk(this,a,!0)}; -function bk(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Xj(),c=d.wc(-1,b,!1),0<=c&&a.jb(se,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.eb();return this}; -t.Ty=function(a,b){hk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(se,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; -t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(se,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +k=k.y;isNaN(k)&&(k=f?Math.round(1E3*a.location.y)/1E3:a.location.y);d.h(Math.max(h,Math.min(c.x,l)),Math.max(g,Math.min(c.y,k)));e!==b&&K.free(e);return d};function fk(a){var b=a.toolManager.findTool("Dragging");return null!==b?b.dragOptions:a.jn} +function Eg(a,b,c,d,e){void 0===e&&(e=fk(a));d.assign(c);if(null!==b){var f=a.grid;b=e.gridSnapCellSize;a=b.width;b=b.height;var g=e.gridSnapOrigin,h=g.x;g=g.y;e=e.gridSnapCellSpot;if(null!==f){var k=f.gridCellSize;isNaN(a)&&(a=k.width);isNaN(b)&&(b=k.height);f=f.gridOrigin;isNaN(h)&&(h=f.x);isNaN(g)&&(g=f.y)}f=K.allocAt(0,0);f.Li(0,0,a,b,e);L.Zo(c.x,c.y,h+f.x,g+f.y,a,b,d);K.free(f)}}function We(a,b){if(null!==b)for(a.Zr=!0,a=b.iterator;a.next();)b=a.key,b instanceof S&&(b.suspendsRouting=!0)} +function jf(a,b){if(null!==b){for(b=b.iterator;b.next();){var c=b.key;c instanceof S&&(c.suspendsRouting=!1,jk(c)&&c.ib())}a.Zr=!1}}function hk(a,b,c){b=b.containingGroup;if(null!==b){a=hk(a,b,c);if(null!==a)return a;a=c.L(b);if(null!==a)return a}return null}t=Q.prototype;t.Vd=function(a,b,c){if(void 0===c)return new Ze(xb);var d=a.isGridSnapEnabled;a.groupsSnapMembers||null===b.containingGroup||(d=!1);return d?new Ze(new K(Math.round(1E3*c.x)/1E3,Math.round(1E3*c.y)/1E3)):new Ze(c.copy())}; +function kk(a,b,c){x(b,qi,Q,"addLayer:layer");null!==b.diagram&&b.diagram!==a&&v("Cannot share a Layer with another Diagram: "+b+" of "+b.diagram);null===c?null!==b.diagram&&v("Cannot add an existing Layer to this Diagram again: "+b):(x(c,qi,Q,"addLayer:existingLayer"),c.diagram!==a&&v("Existing Layer must be in this Diagram: "+c+" not in "+c.diagram),b===c&&v("Cannot move a Layer before or after itself: "+b));if(b.diagram!==a){b=b.name;a=a.ab;c=a.count;for(var d=0;dd&&this.eb();return this}; +t.Ty=function(a,b){kk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(ue,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; +t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(ue,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.px=function(a){B(a,"function",Q,"addModelChangedListener:listener");null===this.Bf&&(this.Bf=new I);this.Bf.add(a);this.model.bf(a);return this};t.GA=function(a){B(a,"function",Q,"removeModelChangedListener:listener");null!==this.Bf&&(this.Bf.remove(a),0===this.Bf.count&&(this.Bf=null));this.model.uk(a)};t.bf=function(a){B(a,"function",Q,"addChangedListener:listener");null===this.Lg&&(this.Lg=new I);this.Lg.add(a);return this}; -t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==qe&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==qe&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==se&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==se&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ka=function(a){return this.undoManager.Ka(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Wf=function(){return this.undoManager.Wf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ka(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Wf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Fp=function(){this.partManager.Fp()}; -function mk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= -a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);tj(a,!1);a=a.Ia;d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Dh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ke(e,this));this.Bb||this.invalidateViewport(a,b);Ej(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= +function pk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= +a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);wj(a,!1);a=a.Ia;d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Bh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ne(e,this));this.Bb||this.invalidateViewport(a,b);Hj(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= Math.round(a.width*c);this.lc.canvasSize.height=Math.round(a.height*c);this.lc.newCanvasSize.width=this.Ga;this.lc.newCanvasSize.height=this.Fa;this.lc.isScroll=d;this.V("ViewportBoundsChanged",this.lc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.dd(b)&&a.ib()})}}; -function Ej(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(nk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, +function Hj(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(qk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, d.height,b);b.offset(-d.width,-d.height);Gb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.V("ChangingSelection",b);for(var c=b.La(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||xh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)vk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),yh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||zh(f),a.da=c}}}function vk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)vk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Hj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; +function Vj(a,b){a.lj=!1;var c=a.fq;c.D(b)||(c=c.copy(),a.fq.assign(b),wj(a,!1),a.V("DocumentBoundsChanged",void 0,c),a.Oe=!0,a.R())}t.$a=function(){if(this.lj){var a=M.alloc();Vj(this,this.computeBounds(a));M.free(a)}};t.Mz=function(){for(var a=new J,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&a.add(c)}for(b=this.links;b.next();)c=b.value,c.isTopLevel&&a.add(c);return a.iterator};t.Lz=function(){return this.mi.iterator}; +t.nA=function(a){wh(this);a&&wk(this,!0);this.rd?Ij(this,!1):(this.Vk=!0,Lf(this))};function wk(a,b){for(var c=a.mi.iterator;c.next();)xk(a,c.value,b);a.layout&&(b?a.layout.isValidLayout=!1:a.layout.F())}function xk(a,b,c){if(null!==b){for(var d=b.sl.iterator;d.next();)xk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.F())}} +function Ij(a,b){if(a.Ih&&!a.yt){var c=a.da;a.da=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ka("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||vh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)yk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),wh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||xh(f),a.da=c}}}function yk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)yk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Kj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; function Ki(a){function b(a){var b=a.toLowerCase(),e=new I;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new vb,d=new vb;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.xw=c;a.ww=d} -function Rj(a,b){var c=a.ww.L(b);return null!==c?c:a.ww.L(b.toLowerCase())}function wk(a,b){var c=a.xw.L(b);if(null!==c)return c;c=a.xw.L(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.Oj=function(a,b){B(a,"string",Q,"addDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.add(b);return this};t.om=function(a,b){B(a,"string",Q,"removeDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.remove(b)}; -t.V=function(a,b,c){G&&B(a,"string",Q,"raiseDiagramEvent:name");var d=wk(this,a),e=new ne;e.diagram=this;a=Rj(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.P(0)(e);else if(0!==b)for(d=d.La(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, -1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(yb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Df&&(a.nq=null)})}; -function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!$g)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; -t.$x=function(a){void 0===a&&(a={});return Hk(this,this.qA,a)}; -t.qA=function(a,b,c){var d=Qk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case mj+"data":e=d.getImageData(0,0,c.width,c.height);break;case mj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(xb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); +M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Cf&&(a.nq=null)})}; +function Kk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!Yg)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; +t.$x=function(a){void 0===a&&(a={});return Kk(this,this.qA,a)}; +t.qA=function(a,b,c){var d=Sk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case pj+"data":e=d.getImageData(0,0,c.width,c.height);break;case pj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Qk(a,b,c,d){a.animationManager.Ic();a.hd();if(null===a.Aa)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Gb(Infinity,Infinity):new Gb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var q=b.document||document,r=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new fc(m):m instanceof fc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.pb.ad(!0);p=new cj(null,q,void 0,!0);var y=p.context;if(!(f||g||l||k)){p.width=a.Ga+Math.ceil(m.left+m.right);p.height=a.Fa+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== -d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=q;d.vs=r;Pj(a,d.context,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);return d.context}a.kn=!1;Pj(a,y,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);a.kn=!0;return p.context}var w=a.bq,z=a.documentBounds.copy();z.Uv(a.Eb);if(u)for(var A=a.ab.s,C=A.length,E=0;Ew?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Uk&&G&&(f>w|| -z>h)&&(Fa("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."),Uk=!0),isNaN(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Pj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); -return d.context}a.kn=!1;Pj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Vk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Tj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, -0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Tj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, +null!==g?("NaN"===g&&(g=w),f.u()?(f=H,z=E):isNaN(E)?(f=H,z=z.height*g):(f=z.width*g,z=E)):null!==f?f.u()?(g=Math.min(H/z.width,E/z.height),f=H,z=E):isNaN(E)?(g=H/z.width,f=H,z=z.height*g):(g=E/z.height,f=z.width*g,z=E):null!==g?"NaN"===g&&h.u()?(g=Math.min((h.width-k)/z.width,(h.height-C)/z.height),g>w?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Wk&&G&&(f>w|| +z>h)&&(Fa("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(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Sj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); +return d.context}a.kn=!1;Sj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} +oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Xk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Wj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, +0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Wj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, "pointermove",this.pk,!1),this.removeEventListener(b,"pointerdown",this.Hi,!1),this.removeEventListener(b,"pointerup",this.rk,!1),this.removeEventListener(b,"pointerout",this.qk,!1),this.removeEventListener(b,"pointercancel",this.nk,!1),this.Aa.Cx()),this.Bl&&(this.Bl.disconnect(),this.Bl=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.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),xe===this&&(xe=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= +this.currentTool.doCancel(),this.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),ze===this&&(ze=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= a,null!==a&&(this.hu=a.fromPort,this.iu=a.toPort))}},ey:{configurable:!0,get:function(){return this.hu},set:function(a){this.hu=a}},gy:{configurable:!0,get:function(){return this.iu},set:function(a){this.iu=a}},animationManager:{configurable:!0,get:function(){return this.de}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.hh},set:function(a){B(a, "boolean",Q,"skipsUndoManager");this.hh=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.yt},set:function(a){this.yt=a}},opacity:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;b!==a&&(B(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", -b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,le,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,le, -Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,le,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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-"+ +this.zn=a,this.Oe=!0,this.R(),this.g("hasVerticalScrollbar",b,a),wj(this,!1))}},hasHorizontalScrollbar:{configurable:!0,get:function(){return this.yn},set:function(a){var b=this.yn;b!==a&&(B(a,"boolean",Q,"hasHorizontalScrollbar"),this.yn=a,this.Oe=!0,this.R(),this.g("hasHorizontalScrollbar",b,a),wj(this,!1))}},allowHorizontalScroll:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt;b!==a&&(B(a,"boolean",Q,"allowHorizontalScroll"),this.jt=a,this.g("allowHorizontalScroll", +b,a),wj(this,!1))}},allowVerticalScroll:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(B(a,"boolean",Q,"allowVerticalScroll"),this.mt=a,this.g("allowVerticalScroll",b,a),wj(this,!1))}},scrollHorizontalLineChange:{configurable:!0,get:function(){return this.vu},set:function(a){var b=this.vu;b!==a&&(B(a,"number",Q,"scrollHorizontalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", +b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,ne,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,ne, +Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,ne,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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.aq},set:function(a){""===a&&(a="auto");var b=this.aq;b!==a&&(B(a,"string",Q,"defaultCursor"),this.aq=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.Kh},set:function(a){var b=this.Kh;b!==a&&(null!==a&&B(a,"function",Q,"click"),this.Kh=a,this.g("click", b,a))}},doubleClick:{configurable:!0,get:function(){return this.Qh},set:function(a){var b=this.Qh;b!==a&&(null!==a&&B(a,"function",Q,"doubleClick"),this.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.Mh},set:function(a){var b=this.Mh;b!==a&&(null!==a&&B(a,"function",Q,"contextClick"),this.Mh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.bi},set:function(a){var b=this.bi;b!== a&&(null!==a&&B(a,"function",Q,"mouseOver"),this.bi=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.$h},set:function(a){var b=this.$h;b!==a&&(null!==a&&B(a,"function",Q,"mouseHover"),this.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Zh},set:function(a){var b=this.Zh;b!==a&&(null!==a&&B(a,"function",Q,"mouseHold"),this.Zh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0, get:function(){return this.cu},set:function(a){var b=this.cu;b!==a&&(null!==a&&B(a,"function",Q,"mouseDragOver"),this.cu=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Xh},set:function(a){var b=this.Xh;b!==a&&(G&&null!==a&&B(a,"function",Q,"mouseDrop"),this.Xh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(B(a,"boolean",Q,"handlesDragDropForTopLevelParts"), this.Kt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(null!==a&&B(a,"function",Q,"mouseEnter"),this.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return this.ai},set:function(a){var b=this.ai;b!==a&&(null!==a&&B(a,"function",Q,"mouseLeave"),this.ai=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.li}, -set:function(a){var b=this.li;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Nh},set:function(a){var b=this.Nh;b!==a&&(!G||a instanceof Be||a instanceof Le||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Nh=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.tb}, -set:function(a){this.tb!==a&&(this.tb=a,a.kf(this))}},toolManager:{configurable:!0,get:function(){return this.Be},set:function(a){this.Be!==a&&(x(a,Ua,Q,"toolManager"),this.Be=a,a.diagram=this)}},defaultTool:{configurable:!0,get:function(){return this.ub},set:function(a){var b=this.ub;b!==a&&(x(a,we,Q,"defaultTool"),this.ub=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.ob},set:function(a){var b= -this.ob;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(x(a,we,Q,"currentTool"),this.ob=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.Ww}},maxSelectionCount:{configurable:!0,get:function(){return this.$t},set:function(a){var b=this.$t;if(b!==a)if(B(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.$t=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&& -(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,Be,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,Be,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,Be,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, -enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;xh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;e= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,De,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,De,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,De,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, +enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||rk(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& +v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;vh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=sk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Zt}, -set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),tj(this,!1))}}, +set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),wj(this,!1))}}, initialContentAlignment:{configurable:!0,get:function(){return this.Cq},set:function(a){var b=this.Cq;b.D(a)||(x(a,Hb,Q,"initialContentAlignment"),this.Cq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.eb(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Vc}, set:function(a){var b=this.Vc;b!==a&&(x(a,Ci,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.kf(null),this.Vc=a,a.kf(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.Yc}, -set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Wk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, -set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Xk&&a!==Yk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= +set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Yk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, +set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Zk&&a!==$k&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.Ip},set:function(a){var b=this.Ip;D(a,Q,"scale");b!==a&&(this.Ip=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Kp},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"autoScrollRegion");var b=this.Kp;b.D(a)||(this.Kp=a=a.M(),this.eb(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Zk.qc()},set:function(a){Zk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return $k}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; +oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return al.qc()},set:function(a){al.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return bl}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; Q.prototype.doAutoScroll=Q.prototype.us;Q.prototype.isUnoccupied=Q.prototype.ik;Q.prototype.raiseDiagramEvent=Q.prototype.V;Q.prototype.removeDiagramListener=Q.prototype.om;Q.prototype.addDiagramListener=Q.prototype.Oj;Q.prototype.findTreeRoots=Q.prototype.Sz;Q.prototype.layoutDiagram=Q.prototype.nA;Q.prototype.findTopLevelGroups=Q.prototype.Lz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.Mz;Q.prototype.ensureBounds=Q.prototype.$a;Q.prototype.findLinksByExample=Q.prototype.ys; Q.prototype.findNodesByExample=Q.prototype.zs;Q.prototype.findLinkForData=Q.prototype.Rc;Q.prototype.findNodeForData=Q.prototype.vi;Q.prototype.findPartForData=Q.prototype.Sc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.bc;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.be;Q.prototype.transformViewToDoc=Q.prototype.bt;Q.prototype.transformRectDocToView=Q.prototype.TA;Q.prototype.transformDocToView=Q.prototype.Cp; Q.prototype.centerRect=Q.prototype.ss;Q.prototype.scrollToRect=Q.prototype.Iv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.cA;Q.prototype.highlight=Q.prototype.bA;Q.prototype.selectCollection=Q.prototype.LA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Fp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Wf; @@ -873,95 +873,95 @@ Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.nx;Q.prototype.addLayer=Q.prototype.Nl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Wj;Q.prototype.removeParts=Q.prototype.Vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ux;Q.prototype.setProperties=Q.prototype.Bm;Q.prototype.attach=Q.prototype.Ru;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.ly;Q.prototype.setInputOption=Q.prototype.MA; Q.prototype.getInputOption=Q.prototype.dm;Q.prototype.resetRenderingHints=Q.prototype.my;Q.prototype.setRenderingHint=Q.prototype.qy;Q.prototype.getRenderingHint=Q.prototype.Sf;Q.prototype.maybeUpdate=Q.prototype.hd;Q.prototype.requestUpdate=Q.prototype.fc;Q.prototype.delayInitialization=Q.prototype.oz;Q.prototype.isUpdateRequested=Q.prototype.iA;Q.prototype.invalidateDocumentBounds=Q.prototype.eb;Q.prototype.findObjectsNear=Q.prototype.Ag;Q.prototype.findPartsNear=Q.prototype.Hz; Q.prototype.findObjectsIn=Q.prototype.Of;Q.prototype.findPartsIn=Q.prototype.Lx;Q.prototype.findObjectsAt=Q.prototype.wi;Q.prototype.findPartsAt=Q.prototype.Gz;Q.prototype.findObjectAt=Q.prototype.oc;Q.prototype.findPartAt=Q.prototype.bm;Q.prototype.focusObject=Q.prototype.Tz;Q.prototype.alignDocument=Q.prototype.$y;Q.prototype.zoomToRect=Q.prototype.VA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Ax;Q.prototype.focus=Q.prototype.focus; -var Bi=new vb,Ti=null,$g=void 0!==sa.document,Oi=null,Pi="",Dh=new F(Q,"None",0),wj=new F(Q,"Uniform",1),xj=new F(Q,"UniformToFill",2),Rf=new F(Q,"CycleAll",10),Vf=new F(Q,"CycleNotDirected",11),Xf=new F(Q,"CycleNotDirectedFast",12),Yf=new F(Q,"CycleNotUndirected",13),Sf=new F(Q,"CycleDestinationTree",14),Uf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Xk=new F(Q,"AllParentsCollapsed",22),Yk=new F(Q,"AnyParentsCollapsed", -23),Zk=new I,$k="2.3.12",mj="image",Uk=!1,oj=null,zi=!1; -function Ai(){if($g){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; -oj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){$g=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return $g};Q.None=Dh;Q.Uniform=wj;Q.UniformToFill=xj;Q.CycleAll=Rf;Q.CycleNotDirected=Vf;Q.CycleNotDirectedFast=Xf;Q.CycleNotUndirected=Yf;Q.CycleDestinationTree=Sf;Q.CycleSourceTree=Uf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Xk;Q.AnyParentsCollapsed=Yk;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} -function Oj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if($g){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Zk.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +var Bi=new vb,Ti=null,Yg=void 0!==sa.document,Oi=null,Pi="",Bh=new F(Q,"None",0),zj=new F(Q,"Uniform",1),Aj=new F(Q,"UniformToFill",2),Qf=new F(Q,"CycleAll",10),Uf=new F(Q,"CycleNotDirected",11),Wf=new F(Q,"CycleNotDirectedFast",12),Xf=new F(Q,"CycleNotUndirected",13),Rf=new F(Q,"CycleDestinationTree",14),Tf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Zk=new F(Q,"AllParentsCollapsed",22),$k=new F(Q,"AnyParentsCollapsed", +23),al=new I,bl="2.3.13",pj="image",Wk=!1,rj=null,zi=!1; +function Ai(){if(Yg){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; +rj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Yg=a?void 0!==sa.document:!1}; +Q.isUsingDOM=function(){return Yg};Q.None=Bh;Q.Uniform=zj;Q.UniformToFill=Aj;Q.CycleAll=Qf;Q.CycleNotDirected=Uf;Q.CycleNotDirectedFast=Wf;Q.CycleNotUndirected=Xf;Q.CycleDestinationTree=Rf;Q.CycleSourceTree=Tf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Zk;Q.AnyParentsCollapsed=$k;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} +function Rj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if(Yg){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=al.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("2bfa41fdb3784bca12")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.Xc=!(0<=g&&gh),!a.Xc))break;if("#"===f[0]){g=sa.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g);k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Xc=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.$f=function(){null!==d.observed&&el(d)};c.autoScale=wj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Vk,Q);Vk.prototype.computePixelRatio=function(){return 1}; -Vk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Lj(this);if(null===this.Dl){var c=new cj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),fl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; -Vk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Tj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Lj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?fl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Xc&&a!==a.Ny?!0:!1}Hi.className="DiagramHelper";function Ze(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Ze.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var oj="DraggingInfo";Ze.className="DraggingInfo";function ik(a,b,c){this.node=a;this.info=b;this.hv=c}ik.className="DraggingNodeInfoPair"; +function Re(){this.reset()}Re.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Gb(NaN,NaN)).freeze();this.gridSnapCellSpot=yc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Re.className="DraggingOptions"; +function cl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;dl(c);b&&c.Bm(b);return c}na(cl,Q);function dl(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=zc;a.layout=new el}cl.prototype.reset=function(){Q.prototype.reset.call(this);dl(this)};cl.className="Palette"; +function Xk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.Z=null;c.yn=!1;c.zn=!1;c.G=!0;c.v=!0;c.oa=0;c.o=!1;c.Dl=null;c.qy("drawShadows",!1);a=new U;var e=new Of;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new fc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new fl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.ag=function(){d.eb();gl(d)};c.ce=function(){null!==d.observed&&(d.eb(),d.R())};c.Na=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.$f=function(){null!==d.observed&&gl(d)};c.autoScale=zj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Xk,Q);Xk.prototype.computePixelRatio=function(){return 1}; +Xk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Oj(this);if(null===this.Dl){var c=new fj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),hl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; +Xk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Wj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Oj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?hl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,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.Sb,this.Sb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.Ec());b=this.ab.s;for(var c=b.length,d=0;da&&(a=0);this.oa!==a&&(this.oa=a)}}});Vk.className="Overview";function dl(){Ne.call(this);this.j=null}na(dl,Ne); -dl.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.timestampa&&(a=0);this.oa!==a&&(this.oa=a)}}});Xk.className="Overview";function fl(){Qe.call(this);this.j=null}na(fl,Qe); +fl.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))}; -gl.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,gl,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Dh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -gl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; -gl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -gl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;xh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=oc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());zh(b)};gl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -gl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,gl,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0b.maxScale||(b.scale=a))}; +il.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,il,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"increaseZoom:factor");var b=this.diagram;b.autoScale===Bh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +il.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +il.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +il.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;vh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=nc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());xh(b)};il.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +il.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,il,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0a&&(a+=360));return a}; t.Pf=function(){if(0!==(this.l&4096)===!1)return this.Wk;var a=this.Ia;return null!==this.panel?a*this.panel.Pf():a};t.Ds=function(a,b){void 0===b&&(b=new K);b.assign(a);this.we.Jd(b);return b};t.Es=function(a,b,c){return this.dk(a.x,a.y,b.x,b.y,c)}; t.dk=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Rf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Rf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -P.prototype.measure=function(a,b,c,d){if(!1!==Ij(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(yl(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case kl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case ll: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.Ib> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Al(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; -function Bl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=yl(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Dj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Dj(a,!0);a.measure(d,e,0,0);break;case kl:Dj(a,!0);a.measure(d,f,0,0);break;case ll:Dj(a,!0),a.measure(c,e,0,0)}}} -t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Cl(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(Cl(a,!0),a instanceof V&&Dl(a,this))}; -t.mc=function(a,b){if(!El(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&zl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Fl&&l.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, -a,m,!0,!1,k,h),m instanceof Fl&&m.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Hl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= +P.prototype.measure=function(a,b,c,d){if(!1!==Lj(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(Al(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case ml:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case nl: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.Ib> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Cl(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; +function Dl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Al(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Gj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Gj(a,!0);a.measure(d,e,0,0);break;case ml:Gj(a,!0);a.measure(d,f,0,0);break;case nl:Gj(a,!0),a.measure(c,e,0,0)}}} +t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||El(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(El(a,!0),a instanceof V&&Fl(a,this))}; +t.mc=function(a,b){if(!Gl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&Bl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Hl&&l.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, +a,m,!0,!1,k,h),m instanceof Hl&&m.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Jl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= p.m11,u=p.m21,y=p.dx,w=p.m12,z=p.m22,A=p.dy,C,E=C=0;p=C*r+E*u+y;var H=C*w+E*z+A;C=q.width+n;E=0;var T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);var aa=Math.min(H,C);var Y=Math.max(p+0,T)-E;var R=Math.max(H+0,C)-aa;p=E;H=aa;C=q.width+n;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;C=0;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;n=b.viewportBounds;q=n.x;r= -n.y;p=!(p>n.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof bh&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== -c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Il(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Il(a):k&&!1===this.shadowVisible&&Jl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Kl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Ll(this,h)&&null===this.shadowVisible&&Jl(a);null!==this.Ra&&(a.Ec(),Ml(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== -this.Ra||null!==this.areaBackground||Ll(this,h))?(Nl(this,!0),null===this.shadowVisible&&Jl(a)):Nl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Il(a);m&&k&&Jl(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; -function Ll(a,b){if(null===b)return!1;zl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Kl(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Fl&&a.areaBackground.type===Gl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} -function Ml(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Fl&&a.Ra.type===Gl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} -function Ol(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;gn.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof $g&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== +c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Kl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Kl(a):k&&!1===this.shadowVisible&&Ll(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Ml(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Nl(this,h)&&null===this.shadowVisible&&Ll(a);null!==this.Ra&&(a.Ec(),Ol(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== +this.Ra||null!==this.areaBackground||Nl(this,h))?(Pl(this,!0),null===this.shadowVisible&&Ll(a)):Pl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Kl(a);m&&k&&Ll(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; +function Nl(a,b){if(null===b)return!1;Bl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Ml(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Hl&&a.areaBackground.type===Il?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} +function Ol(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Hl&&a.Ra.type===Il?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} +function Ql(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;ge)&&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 bb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Qj(a,e)}else Qj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function om(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);km.add(a,b)} -function pm(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} -oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new sl),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new sl),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),rl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), -rl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new qm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); -a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new qm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1e)&&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 cb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Tj(a,e)}else Tj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function qm(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);mm.add(a,b)} +function rm(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} +oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new ul),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new ul),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== +a&&(null===this.B&&(this.B=new ul),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),tl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), +tl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new sm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); +a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new sm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ia=a,this.w(), -this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,gm(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Pf&& -this.xc(),this.g("desiredSize",d,a),ul(this)&&(a=this.part,null!==a&&(vl(this,a,"width"),vl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, -set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -rl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),rl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, -margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Hl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Hl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? -this.B.ob:null},set:function(a){this.animationTriggers!==a&&(rl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(rl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= -a.M(),bm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), -rl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), -rl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),rl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| -v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&sm(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,tm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, -get:function(){return null!==this.fa?this.fa.Lj:zc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),fm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),fm(this))}},toShortLength:{configurable:!0, -enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),fm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== -this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:zc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),fm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? -this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),fm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),fm(this))}},fromLinkable:{configurable:!0, +this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,im(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Of&& +this.xc(),this.g("desiredSize",d,a),wl(this)&&(a=this.part,null!==a&&(xl(this,a,"width"),xl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, +set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), +tl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),tl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, +margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Jl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Jl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? +this.B.ob:null},set:function(a){this.animationTriggers!==a&&(tl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(tl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= +a.M(),dm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), +tl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), +tl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),tl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| +v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&um(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,vm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, +get:function(){return null!==this.fa?this.fa.Lj:xc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),hm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),hm(this))}},toShortLength:{configurable:!0, +enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),hm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== +this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:xc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),hm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? +this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),hm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),hm(this))}},fromLinkable:{configurable:!0, enumerable:!0,get:function(){return null!==this.fa?this.fa.uq:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"fromLinkable"),this.cd(),this.fa.uq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.fa?this.fa.vq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(G&&B(a,"number",P,"fromMaxLinks"),0>a&&Ba(a,">= 0",P,"fromMaxLinks"),this.cd(),this.fa.vq=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),rl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),rl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= -this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),rl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),rl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== -a&&B(a,"function",P,"mouseEnter"),rl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),rl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),rl(this),this.B.bi= -a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),rl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),rl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),rl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),rl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, -get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),rl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),rl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: -null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),rl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),rl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== -a&&(null!==a&&B(a,"function",P,"actionCancel"),rl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),rl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= -this.contextMenu;b!==a&&(!G||a instanceof Be||a instanceof Le||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),rl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; +enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),tl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),tl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= +this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),tl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),tl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== +a&&B(a,"function",P,"mouseEnter"),tl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),tl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),tl(this),this.B.bi= +a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),tl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),tl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, +enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),tl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),tl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, +get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),tl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),tl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: +null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),tl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),tl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== +a&&(null!==a&&B(a,"function",P,"actionCancel"),tl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof De||a instanceof Oe||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),tl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= +this.contextMenu;b!==a&&(!G||a instanceof De||a instanceof Oe||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),tl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; P.prototype.isVisibleObject=P.prototype.Ld;P.prototype.isContainedBy=P.prototype.Dg;P.prototype.getNearestIntersectionPoint=P.prototype.Es;P.prototype.getLocalPoint=P.prototype.Ds;P.prototype.getDocumentScale=P.prototype.Pf;P.prototype.getDocumentAngle=P.prototype.yi;P.prototype.getDocumentBounds=P.prototype.zi;P.prototype.getDocumentPoint=P.prototype.la;P.prototype.intersectsRect=P.prototype.dd;P.prototype.containedInRect=P.prototype.qh;P.prototype.containsRect=P.prototype.df; -P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var km=null;P.className="GraphObject";km=new vb; -om("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=jm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},jm(Pf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Pf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Pf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var mm=null;P.className="GraphObject";mm=new vb; +qm("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=lm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},lm(Of,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Of){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Of))){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}); -om("TreeExpanderButton",function(){var a=jm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +qm("TreeExpanderButton",function(){var a=lm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof De&&(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}); -om("SubGraphExpanderButton",function(){var a=jm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof Df){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});om("ToolTip",function(){return jm(Be,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},jm(Pf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); -om("ContextMenu",function(){return jm(Be,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});om("ContextMenuButton",function(){var a=jm("Button");a.stretch=kl;var b=a.lb("ButtonBorder");b instanceof Pf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); -om("PanelExpanderButton",function(a){var b=pm(a,"COLLAPSIBLE"),c=jm("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},jm(Pf,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); -a=c.lb("ButtonBorder");a instanceof Pf&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -om("CheckBoxButton",function(a){var b=pm(a);a=jm("Button",{desiredSize:new Gb(14,14)},jm(Pf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +qm("SubGraphExpanderButton",function(){var a=lm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof De&&(c=c.adornedPart);if(c instanceof Cf){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});qm("ToolTip",function(){return lm(De,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},lm(Of,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); +qm("ContextMenu",function(){return lm(De,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});qm("ContextMenuButton",function(){var a=lm("Button");a.stretch=ml;var b=a.lb("ButtonBorder");b instanceof Of&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); +qm("PanelExpanderButton",function(a){var b=rm(a,"COLLAPSIBLE"),c=lm("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},lm(Of,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); +a=c.lb("ButtonBorder");a instanceof Of&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); +qm("CheckBoxButton",function(a){var b=rm(a);a=lm("Button",{desiredSize:new Gb(14,14)},lm(Of,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); -om("CheckBox",function(a){a=pm(a);a=jm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=jm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ml=new F(P,"Default",0);P.Vertical=ll=new F(P,"Vertical",4);P.Horizontal=kl=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); -P.UniformToFill=nl=new F(P,"UniformToFill",2);P.FlipVertical=ol=new F(P,"FlipVertical",1);P.FlipHorizontal=pl=new F(P,"FlipHorizontal",2);P.FlipBoth=ql=new F(P,"FlipBoth",3);P.make=jm;P.getBuilders=function(){var a=new vb,b;for(b in km)if(b!==b.toLowerCase()){var c=km.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=om; -P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};um.className="STransform"; -function vm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}vm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};vm.className="SGradient"; -function Tj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, -c)}Tj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Tj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Tj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Tj.prototype.focus=function(){this.Ta.focus()};Tj.prototype.Cx=function(){this.ownerDocument=null}; -oa.Object.defineProperties(Tj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Tj.className="SVGSurface"; +qm("CheckBox",function(a){a=rm(a);a=lm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=lm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ol=new F(P,"Default",0);P.Vertical=nl=new F(P,"Vertical",4);P.Horizontal=ml=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); +P.UniformToFill=pl=new F(P,"UniformToFill",2);P.FlipVertical=ql=new F(P,"FlipVertical",1);P.FlipHorizontal=rl=new F(P,"FlipHorizontal",2);P.FlipBoth=sl=new F(P,"FlipBoth",3);P.make=lm;P.getBuilders=function(){var a=new vb,b;for(b in mm)if(b!==b.toLowerCase()){var c=mm.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=qm; +P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};wm.className="STransform"; +function xm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}xm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};xm.className="SGradient"; +function Wj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, +c)}Wj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Wj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Wj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Wj.prototype.focus=function(){this.Ta.focus()};Wj.prototype.Cx=function(){this.ownerDocument=null}; +oa.Object.defineProperties(Wj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Wj.className="SVGSurface"; function vi(a,b){this.Vv=a;this.svg=a.Ta;this.stack=[];this.yh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Wl=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.gh=this.Or=this.Nr=0;this.Ed=this.gd=null;this.path=[];this.lm={};this.Pt=!1; -this.jh=null;this.Hj=0;this.xb=new um;this.j=Sl(this);this.Zj=Sl(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} -function Mj(a,b,c,d,e,f,g){void 0===a.Zj?Ql(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; +this.jh=null;this.Hj=0;this.xb=new wm;this.j=Ul(this);this.Zj=Ul(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} +function Pj(a,b,c,d,e,f,g){void 0===a.Zj?Sl(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.lm={stroke:"none",fill:"none"}};t.ef=function(a){this.addPath(this.path,this.xb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new vm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(mj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new vm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Tl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Tl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";wm(this,mj,f,this.xb);this.addElement(mj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");xm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};wm(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};wm(this,"fill",a,this.xb);xm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};wm(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new xm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(pj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new xm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Vl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Vl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";ym(this,pj,f,this.xb);this.addElement(pj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");zm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};ym(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};ym(this,"fill",a,this.xb);zm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};ym(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.xb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.mk= a.mk}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,mk:this.mk});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; -t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Bm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; -oa.Object.defineProperties(Xl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, +t.zg=function(a,b){if(a instanceof Hl&&a.type===Il){var c=a.Kk;a=a.st;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; +t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Dm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; +oa.Object.defineProperties(Zl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.rt!==a&&(this.rt=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},filter:{configurable:!0,get:function(){return this.ba.filter}, -set:function(a){this.ba.filter=""===a?"none":a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Um},set:function(a){this.Um=a}}});var Bm=Object.freeze([]);Xl.className="CanvasSurfaceContext";function Cm(){this.G=this.o=this.v=this.j=0}Cm.className="ColorNumbers"; -function Fl(a,b){Dm||(Em(),Dm=!0);Ya(this);this._isFrozen=!1;void 0===a?(this.ta=Wl,this.Jk="black"):"string"===typeof a?(this.ta=Wl,G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.Jk=a):(G&&$a(a,Fl,Fl,"constructor:type"),this.ta=a,this.Jk="black");a=this.ta;a===Zl?(this.Wd=Bc,this.Xk=Mc):this.Xk=a===Gl?this.Wd=Ic:this.Wd=zc;this.Tr=0;this.kq=NaN;this.He=this.qr=this.Ge=null;this.st=this.Kk=0;b&&Object.assign(this,b)} -Fl.prototype.copy=function(){var a=new Fl;a.ta=this.ta;a.Jk=this.Jk;a.Wd=this.Wd.M();a.Xk=this.Xk.M();a.Tr=this.Tr;a.kq=this.kq;null!==this.Ge&&(a.Ge=this.Ge.copy());a.qr=this.qr;return a};t=Fl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.Ge&&this.Ge.freeze();return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.Ge&&this.Ge.qa();return this};t.wb=function(a){a.classType===Fl?this.type=a:Ea(this,a)}; -t.toString=function(){var a="Brush(";if(this.type===Wl)a+=this.color;else if(a=this.type===Zl?a+"Linear ":this.type===Gl?a+"Radial ":this.type===Yl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Fl,"addColorStop:loc");B(b,"string",Fl,"addColorStop:color");G&&!Fm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Wl&&(this.type=Zl);this.He=null;return this}; -function Fm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Fl,"isValidColor");Dm||(Em(),Dm=!0);var b=Gm;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(a,b));return this};function Jm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(b,c)} -t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(-a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(-a,b));return this};function Km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(-b,c)} -function Lm(a,b,c){gi(a);a=Mm.j;var d=Mm.v,e=Mm.o,f=Mm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Mm.j-a)*c+a)+", "+Math.round((Mm.v-d)*c+d)+", "+Math.round((Mm.o-e)*c+e)+", "+Math.round((Mm.G-f)*c+f)+")"} -t.Xx=function(){if(this.type===Wl)return Nm(this.color);if((this.type===Zl||this.type===Gl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Gl)return Nm(a.first().value);if(null!==a.get(.5))return Nm(a.get(.5));if(2===a.count)return a=a.La(),Nm(Lm(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 Nm(Lm(a.get(c),a.get(d),1-f/e))}return!1}; -function Nm(a){if(!a)return!1;if(a instanceof Fl)return a.Xx();gi(a);return 128>(299*Mm.j+587*Mm.v+114*Mm.o)/1E3} -function Im(a,b){switch(b){case Hm:b=100*Om(Mm.j);var c=100*Om(Mm.v),d=100*Om(Mm.o);Pm.j=.4124564*b+.3575761*c+.1804375*d;Pm.v=.2126729*b+.7151522*c+.072175*d;Pm.o=.0193339*b+.119192*c+.9503041*d;Pm.G=Mm.G;b=Qm(Pm.j/Rm[0]);c=Qm(Pm.v/Rm[1]);d=Qm(Pm.o/Rm[2]);Sm.j=116*c-16;Sm.v=500*(b-c);Sm.o=200*(c-d);Sm.G=Pm.G;Sm.j=Math.min(100,Math.max(0,Sm.j+100*a));a=(Sm.j+16)/116;b=a-Sm.o/200;Pm.j=Rm[0]*Tm(Sm.v/500+a);Pm.v=Rm[1]*(Sm.j>Um*Vm?Math.pow(a,3):Sm.j/Um);Pm.o=Rm[2]*Tm(b);Pm.G=Sm.G;a=-.969266*Pm.j+1.8760108* -Pm.v+.041556*Pm.o;b=.0556434*Pm.j+-.2040259*Pm.v+1.0572252*Pm.o;Mm.j=255*Wm((3.2404542*Pm.j+-1.5371385*Pm.v+-.4985314*Pm.o)/100);Mm.v=255*Wm(a/100);Mm.o=255*Wm(b/100);Mm.G=Pm.G;Mm.j=Math.round(Mm.j);255Mm.j&&(Mm.j=0);Mm.v=Math.round(Mm.v);255Mm.v&&(Mm.v=0);Mm.o=Math.round(Mm.o);255Mm.o&&(Mm.o=0);return"rgba("+Mm.j+", "+Mm.v+", "+Mm.o+", "+Mm.G+")";case Xm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Dm||(Em(),Dm=!0);var b=Gm;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,Mm.j=a[0],Mm.v=a[1],Mm.o=a[2],Mm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Mm.j=0,Mm.v=0,Mm.o=0,Mm.G=1)}} -function hi(){var a=Mm.j/255,b=Mm.v/255,c=Mm.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Mm.G}function Om(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Wm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function Qm(a){return a>Vm?Math.pow(a,1/3):(Um*a+16)/116}function Tm(a){var b=a*a*a;return b>Vm?b:(116*a-16)/Um}function rm(a,b){"string"===typeof a?G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Fl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Em(){Gm=$g?(new cj(null,void 0,{willReadFrequently:!0})).context:null} -oa.Object.defineProperties(Fl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Fl,Fl,"type");this.ta=a;this.start.pc()&&(a===Zl?this.start=Bc:a===Gl&&(this.start=Ic));this.end.pc()&&(a===Zl?this.end=Mc:a===Gl&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"startRadius");0>a&&Ba(a,">= zero",Fl, -"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"endRadius");0>a&&Ba(a,">= zero",Fl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Fl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& -xa(this,a);this.qr=a;this.He=null}}});Fl.prototype.isDark=Fl.prototype.Xx;Fl.prototype.darkenBy=Fl.prototype.nz;Fl.prototype.lightenBy=Fl.prototype.oA;Fl.prototype.addColorStop=Fl.prototype.addColorStop;var Vm=216/24389,Um=24389/27,Rm=[95.047,100,108.883],Gm=null,Mm=new Cm,ii=new Cm,Pm=new Cm,Sm=new Cm,Dm=!1;Fl.className="Brush";var Wl;Fl.Solid=Wl=new F(Fl,"Solid",0);var Zl;Fl.Linear=Zl=new F(Fl,"Linear",1);var Gl;Fl.Radial=Gl=new F(Fl,"Radial",2);var Yl;Fl.Pattern=Yl=new F(Fl,"Pattern",4);var Hm; -Fl.Lab=Hm=new F(Fl,"Lab",5);var Xm;Fl.HSL=Xm=new F(Fl,"HSL",6); -Fl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Fl,"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};Fl.isValidColor=Fm;Fl.lighten=function(a){return Jm(a)};Fl.lightenBy=Jm;Fl.darken=function(a){return Km(a)};Fl.darkenBy=Km;Fl.mix=Lm;Fl.isDark=Nm;function nm(){this.Ea="Base"}nm.prototype.measure=function(){};nm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};nm.prototype.arrange=function(){};nm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};nm.prototype.CA=function(a){a.fk()};nm.prototype.mc=function(){}; -oa.Object.defineProperties(nm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});nm.prototype.remeasureObject=nm.prototype.CA;nm.prototype.arrangeElement=nm.prototype.bz;nm.prototype.measureElement=nm.prototype.rA;nm.className="PanelLayout";function Ym(){this.Ea="Base"}na(Ym,nm); -Ym.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Zm(a);for(var k=0;ka)&&Ba(a,"0 <= loc <= 1",Hl,"addColorStop:loc");B(b,"string",Hl,"addColorStop:color");G&&!Hm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Yl&&(this.type=am);this.He=null;return this}; +function Hm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Hl,"isValidColor");Fm||(Gm(),Fm=!0);var b=Im;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(a,b));return this};function Lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(b,c)} +t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(-a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(-a,b));return this};function Mm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(-b,c)} +function Nm(a,b,c){gi(a);a=Om.j;var d=Om.v,e=Om.o,f=Om.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Om.j-a)*c+a)+", "+Math.round((Om.v-d)*c+d)+", "+Math.round((Om.o-e)*c+e)+", "+Math.round((Om.G-f)*c+f)+")"} +t.Xx=function(){if(this.type===Yl)return Pm(this.color);if((this.type===am||this.type===Il)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Il)return Pm(a.first().value);if(null!==a.get(.5))return Pm(a.get(.5));if(2===a.count)return a=a.La(),Pm(Nm(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 Pm(Nm(a.get(c),a.get(d),1-f/e))}return!1}; +function Pm(a){if(!a)return!1;if(a instanceof Hl)return a.Xx();gi(a);return 128>(299*Om.j+587*Om.v+114*Om.o)/1E3} +function Km(a,b){switch(b){case Jm:b=100*Qm(Om.j);var c=100*Qm(Om.v),d=100*Qm(Om.o);Rm.j=.4124564*b+.3575761*c+.1804375*d;Rm.v=.2126729*b+.7151522*c+.072175*d;Rm.o=.0193339*b+.119192*c+.9503041*d;Rm.G=Om.G;b=Sm(Rm.j/Tm[0]);c=Sm(Rm.v/Tm[1]);d=Sm(Rm.o/Tm[2]);Um.j=116*c-16;Um.v=500*(b-c);Um.o=200*(c-d);Um.G=Rm.G;Um.j=Math.min(100,Math.max(0,Um.j+100*a));a=(Um.j+16)/116;b=a-Um.o/200;Rm.j=Tm[0]*Vm(Um.v/500+a);Rm.v=Tm[1]*(Um.j>Wm*Xm?Math.pow(a,3):Um.j/Wm);Rm.o=Tm[2]*Vm(b);Rm.G=Um.G;a=-.969266*Rm.j+1.8760108* +Rm.v+.041556*Rm.o;b=.0556434*Rm.j+-.2040259*Rm.v+1.0572252*Rm.o;Om.j=255*Ym((3.2404542*Rm.j+-1.5371385*Rm.v+-.4985314*Rm.o)/100);Om.v=255*Ym(a/100);Om.o=255*Ym(b/100);Om.G=Rm.G;Om.j=Math.round(Om.j);255Om.j&&(Om.j=0);Om.v=Math.round(Om.v);255Om.v&&(Om.v=0);Om.o=Math.round(Om.o);255Om.o&&(Om.o=0);return"rgba("+Om.j+", "+Om.v+", "+Om.o+", "+Om.G+")";case Zm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Fm||(Gm(),Fm=!0);var b=Im;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,Om.j=a[0],Om.v=a[1],Om.o=a[2],Om.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Om.j=0,Om.v=0,Om.o=0,Om.G=1)}} +function hi(){var a=Om.j/255,b=Om.v/255,c=Om.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Om.G}function Qm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Ym(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Sm(a){return a>Xm?Math.pow(a,1/3):(Wm*a+16)/116}function Vm(a){var b=a*a*a;return b>Xm?b:(116*a-16)/Wm}function tm(a,b){"string"===typeof a?G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Hl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Gm(){Im=Yg?(new fj(null,void 0,{willReadFrequently:!0})).context:null} +oa.Object.defineProperties(Hl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Hl,Hl,"type");this.ta=a;this.start.pc()&&(a===am?this.start=zc:a===Il&&(this.start=Ic));this.end.pc()&&(a===am?this.end=Mc:a===Il&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"startRadius");0>a&&Ba(a,">= zero",Hl, +"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"endRadius");0>a&&Ba(a,">= zero",Hl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Hl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& +xa(this,a);this.qr=a;this.He=null}}});Hl.prototype.isDark=Hl.prototype.Xx;Hl.prototype.darkenBy=Hl.prototype.nz;Hl.prototype.lightenBy=Hl.prototype.oA;Hl.prototype.addColorStop=Hl.prototype.addColorStop;var Xm=216/24389,Wm=24389/27,Tm=[95.047,100,108.883],Im=null,Om=new Em,ii=new Em,Rm=new Em,Um=new Em,Fm=!1;Hl.className="Brush";var Yl;Hl.Solid=Yl=new F(Hl,"Solid",0);var am;Hl.Linear=am=new F(Hl,"Linear",1);var Il;Hl.Radial=Il=new F(Hl,"Radial",2);var $l;Hl.Pattern=$l=new F(Hl,"Pattern",4);var Jm; +Hl.Lab=Jm=new F(Hl,"Lab",5);var Zm;Hl.HSL=Zm=new F(Hl,"HSL",6); +Hl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Hl,"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};Hl.isValidColor=Hm;Hl.lighten=function(a){return Lm(a)};Hl.lightenBy=Lm;Hl.darken=function(a){return Mm(a)};Hl.darkenBy=Mm;Hl.mix=Nm;Hl.isDark=Pm;function pm(){this.Ea="Base"}pm.prototype.measure=function(){};pm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};pm.prototype.arrange=function(){};pm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};pm.prototype.CA=function(a){a.fk()};pm.prototype.mc=function(){}; +oa.Object.defineProperties(pm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});pm.prototype.remeasureObject=pm.prototype.CA;pm.prototype.arrangeElement=pm.prototype.bz;pm.prototype.measureElement=pm.prototype.rA;pm.className="PanelLayout";function $m(){this.Ea="Base"}na($m,pm); +$m.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=an(a);for(var k=0;kaa&&(tb=Math.max(aa-wf,0));var Ik=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(Ik?wf:0)),0)}if(1===vc.columnSpan&&(Yb===xg||Yb===ll)){O=a.Kb(Xb);var Vi=O.bd();tb=Math.max(ag-O.actual,0);tb+Vi>T&&(tb=Math.max(T-Vi,0));var ko=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(ko?Vi:0)),0)}vf&&vc.fk()}}}}}Pa(z);var ge=0,De=0;f=a.columnCount;for(var Kg=0;Kg=a.rowCount);bf++)O=a.Lb(db.row+bf),tb=0,tb=Yb===Ad||Yb===ll?Math.max(O.minimum,0===Hd[db.row+bf]?O.maximum:Math.min(Hd[db.row+bf],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc, -O.maximum)),Xd.height+=tb,Gc+=O.minimum;for(var fd=1;fd=a.columnCount);fd++)O=a.Kb(db.column+fd),tb=0,tb=Yb===Ad||Yb===kl?Math.max(O.minimum,0===Sc[db.column+fd]?O.maximum:Math.min(Sc[db.column+fd],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Xd.width+=tb,Mk+=O.minimum;xb.width+=Xd.width;xb.height+=Xd.height;var Wh=db.margin,Bf=Wh.right+Wh.left,Xi=Wh.top+Wh.bottom;db.measure(xb.width,xb.height,Mk,Gc);for(var Xh=db.measuredBounds,Yd= -Math.max(Xh.width+Bf,0),eg=Math.max(Xh.height+Xi,0),Cf=0,Yh=0;Yh=a.rowCount);Yh++)O=a.Lb(db.row+Yh),Cf+=O.total||0;if(Cf=cf)&&!(db.row+Ge>=a.rowCount);Ge++){O=a.Lb(db.row+Ge);var ef=O.ua||0,ff=df(db,O,ie);G&&"number"!==typeof ff&&v(db+" spanAllocation does not return a number: "+ff);O.actual=Math.min(O.maximum,ef+ff);O.ua!==ef&&(cf-=O.ua-ef)}for(;0Id&&(O.actual=Math.min(O.maximum,Id+cf),O.ua!==Id&&(cf-=O.ua-Id));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var Ng=0,gf=0;gf=a.columnCount);gf++)O=a.Kb(db.column+gf),Ng+=O.total||0;if(Ng=Og)&&!(db.column+fg>=a.columnCount);fg++){O=a.Kb(db.column+fg);var Yi=O.ua||0,Zi=He(db,O,mo);G&&"number"!==typeof Zi&&v(db+" spanAllocation does not return a number: "+ -Zi);O.actual=Math.min(O.maximum,Yi+Zi);O.ua!==Yi&&(Og-=O.ua-Yi)}for(;0Nk&&(O.actual=Math.min(O.maximum,Nk+Og),O.ua!==Nk&&(Og-=O.ua-Nk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Xd);Gb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Sc&&Pa(Sc);var Pg=0,Qg=0,Ok=a.desiredSize,Vr=a.maxSize;Yb=yl(a,!0);var $i=De=ge=0,aj=0;f=a.columnCount;for(var Pk=0;Pk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= -1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,Ye=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Wb()){jb=a.defaultAlignment;jb.mb()||(jb=Ic);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,Ze=Kc.offsetX);dd.mb()&&(Xb=dd.y,jb=dd.offsetY)}else Ed=jb.x,Xb=jb.y, -Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Kc=R.width;dd=R.height;var Dc=Y.margin,vc=Dc.left+Dc.right,vf=Dc.top+Dc.bottom,Fd=cm(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==kl||(Kc=Math.max(ha-vc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==ll||(dd=Math.max(ya-vf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+vf;O+=La*Ed-(Kc+vc)*Ed+Ze+Dc.left;la+=sb*Xb-ha*Xb+jb+Dc.top;Y.visible&& -(jc(wb,Wb,tb,Ye,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,Ye)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=nk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= +function en(a,b,c){var d=null;a instanceof W&&""!==a.mf&&(d=a.lb(a.mf),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.Dp(b),d=d.panel}function fn(){this.Ea="Base"}na(fn,pm); +fn.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Vb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Of&&(u=k,r=u.strokeWidth*u.scale);var y=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var w=gn(k),z=w.x*y+w.offsetX;w=w.y*l+w.offsetY;var A=hn(k),C=A.x*y+A.offsetX;A=A.y*l+A.offsetY;isFinite(b)&&(m=Math.max(Math.abs(z-C)-r,0));isFinite(c)&&(n=Math.max(Math.abs(w-A)-r,0));r=Gb.alloc();r.h(0,0);a=an(a);for(A=0;A< +h;A++)w=d[A],w===k||!w.visible&&w!==a||(l=w.margin,y=l.right+l.left,z=l.top+l.bottom,w.measure(m,n,0,0),l=w.measuredBounds,y=Math.max(l.width+y,0),l=Math.max(l.height+z,0),r.h(Math.max(y,r.width),Math.max(l,r.height)));if(1===h)e.width=y,e.height=l,Gb.free(r);else{w=gn(k);A=hn(k);h=d=0;A.x!==w.x&&A.y!==w.y&&(d=r.width/Math.abs(A.x-w.x),h=r.height/Math.abs(A.y-w.y));Gb.free(r);r=0;null!==u&&(r=u.strokeWidth*u.scale,yg(u)===zg&&(d=h=Math.max(d,h)));d+=Math.abs(w.offsetX)+Math.abs(A.offsetX)+r;h+=Math.abs(w.offsetY)+ +Math.abs(A.offsetY)+r;u=k.stretch;u===ol&&(u=Al(k,!1));switch(u){case xg:g=f=0;break;case Ad:isFinite(b)&&(d=b);isFinite(c)&&(h=c);break;case ml:isFinite(b)&&(d=b);g=0;break;case nl:f=0,isFinite(c)&&(h=c)}k.fk();k.measure(d,h,f,g);e.width=k.measuredBounds.width+p;e.height=k.measuredBounds.height+q}}; +fn.prototype.arrange=function(a,b){var c=b.length,d=a.Vb(),e=d.measuredBounds,f=M.alloc();f.h(0,0,1,1);var g=d.margin,h=g.left;g=g.top;var k=a.padding,l=k.left;k=k.top;d.arrange(l+h,k+g,e.width,e.height);var m=gn(d),n=hn(d),p=m.y*e.height+m.offsetY,q=n.x*e.width+n.offsetX;n=n.y*e.height+n.offsetY;f.x=m.x*e.width+m.offsetX;f.y=p;ic(f,q,n,0,0);f.x+=h+l;f.y+=g+k;for(e=0;eaa&&(tb=Math.max(aa-Nh,0));var mo=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(mo?Nh:0)),0)}if(1===uc.columnSpan&&(Yb===xg||Yb===nl)){O=a.Kb(Xb);var Ui=O.bd();tb=Math.max(Ec-O.actual,0);tb+Ui>T&&(tb=Math.max(T-Ui,0));var Mk=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(Mk?Ui:0)),0)}(cf||Fd)&&uc.fk()}}}}}Pa(z);var Fe=0,Sd=0;f=a.columnCount;for(var Oh= +0;Oh=a.rowCount);fd++)O=a.Lb(ab.row+fd),tb=0,tb=Yb===Ad||Yb===nl?Math.max(O.minimum,0===Sc[ab.row+fd]?O.maximum:Math.min(Sc[ab.row+fd],O.maximum)):Math.max(O.minimum, +isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.height+=tb,Vh+=O.minimum;for(var cg=1;cg=a.columnCount);cg++)O=a.Kb(ab.column+cg),tb=0,tb=Yb===Ad||Yb===ml?Math.max(O.minimum,0===Ie[ab.column+cg]?O.maximum:Math.min(Ie[ab.column+cg],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.width+=tb,Gc+=O.minimum;Ab.width+=Vd.width;Ab.height+=Vd.height;var je=ab.margin,Zi=je.right+je.left,$i=je.top+je.bottom;ab.measure(Ab.width,Ab.height,Gc, +Vh);for(var ke=ab.measuredBounds,dg=Math.max(ke.width+Zi,0),eg=Math.max(ke.height+$i,0),Wh=0,Bf=0;Bf=a.rowCount);Bf++)O=a.Lb(ab.row+Bf),Wh+=O.total||0;if(Wh=gd)&&!(ab.row+Je>=a.rowCount);Je++){O=a.Lb(ab.row+Je);var gf=O.ua||0,Wd=fg(ab,O,ff);G&&"number"!==typeof Wd&&v(ab+" spanAllocation does not return a number: "+Wd);O.actual=Math.min(O.maximum,gf+Wd);O.ua!==gf&&(gd-= +O.ua-gf)}for(;0Lg&&(O.actual=Math.min(O.maximum,Lg+gd),O.ua!==Lg&&(gd-=O.ua-Lg));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var hf=0,Xh=0;Xh=a.columnCount);Xh++)O=a.Kb(ab.column+Xh),hf+=O.total||0;if(hf=Mg)&&!(ab.column+Yh>=a.columnCount);Yh++){O=a.Kb(ab.column+Yh);var bj=O.ua||0,no=aj(ab,O,Ke);G&&"number"!== +typeof no&&v(ab+" spanAllocation does not return a number: "+no);O.actual=Math.min(O.maximum,bj+no);O.ua!==bj&&(Mg-=O.ua-bj)}for(;0Pk&&(O.actual=Math.min(O.maximum,Pk+Mg),O.ua!==Pk&&(Mg-=O.ua-Pk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Vd);Gb.free(Ab);void 0!==Sc&&Pa(Sc);void 0!==Ie&&Pa(Ie);var Ng=0,Og=0,Qk=a.desiredSize,Wr=a.maxSize;Yb=Al(a,!0);var cj=Sd=Fe=0,dj=0;f=a.columnCount;for(var Rk=0;Rk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= +1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,af=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(af=Math.max(c.height-k,0));var kb=Y.alignment;if(kb.Wb()){kb=a.defaultAlignment;kb.mb()||(kb=Ic);var Ed=kb.x;var Xb=kb.y;var bf=kb.offsetX;kb=kb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,bf=Kc.offsetX);dd.mb()&&(Xb=dd.y,kb=dd.offsetY)}else Ed=kb.x,Xb=kb.y, +bf=kb.offsetX,kb=kb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,kb=bf=0;Kc=R.width;dd=R.height;var Bc=Y.margin,uc=Bc.left+Bc.right,cf=Bc.top+Bc.bottom,Fd=em(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==ml||(Kc=Math.max(ha-uc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==nl||(dd=Math.max(ya-cf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+cf;O+=La*Ed-(Kc+uc)*Ed+bf+Bc.left;la+=sb*Xb-ha*Xb+kb+Bc.top;Y.visible&& +(jc(wb,Wb,tb,af,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,af)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=qk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= a.S.s;u=r.length;for(y=0;ye*w*c))){A=H.segmentIndex;if(!isFinite(A)||isNaN(A))A=0;0>A&&(A=w-Math.min(-A,w));A=Math.round(A%w);w=H.opacity;C=1;if(1!==w){if(0===w)continue;C=b.globalAlpha;b.globalAlpha=C*w}E=q[y];var T=!1,aa=H.strokeDashArray;null!==aa&&(T=!0,b.ws(aa,H.strokeDashOffset));if("LineV"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== +e)/e);aa<=H+l;aa++){var Y=aa*e+p;0<=Y&&Y<=h&&qn(aa,z,A,E)&&(b.moveTo(Y,0),b.lineTo(Y,k))}b.stroke();b.ef()}else if("LineH"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== N.j?R.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&R.offset(-Y.startX,-Y.startY));Y=A[2];if(T!==lg){var O=k.computeAngle(z,T,Y);z.Qb=O}O=R.x-b.x;var la=R.y-b.y;K.free(R);Pa(A)}else if(C<-n||C>=n)A=K.alloc(),k.Hg(),k.computeMidPoint(A),Y=k.midAngle,T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O),O=A.x-b.x,la=A.y-b.y,K.free(A);else{O=0;0<=C?(la=m.P(C),A=Cha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Pf&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==rn&&T!==sn||r.rotate(90, -ha/2,La/2);T!==tn&&T!==un||r.rotate(-90,ha/2,La/2);T===vn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), +2):A);R=Y.Nf(la);var ha=A.Nf(O);Y=R>ha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Of&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==tn&&T!==un||r.rotate(90, +ha/2,La/2);T!==vn&&T!==wn||r.rotate(-90,ha/2,La/2);T===xn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), y.rotate(Y))}else y.rotate(Y);O+=y.x;la+=y.y;R.set(A);R.h(O+H,la+z,A.width,A.height);q.push(R);c.ld(R)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.vg=c;a.position.h(b.x+c.x,b.y+c.y);ac(e,c.width||0,c.height||0);Ib.free(r);K.free(u);K.free(y)}}}}; -pn.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Be||a instanceof S){var d=a,e=null;a instanceof Be&&(e=a,d=e.adornedPart);var f=a instanceof Be?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=K.alloc(),q=n,y=r,q.Hg(),q.computeMidPoint(y),q=n.midAngle,l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,y=r.y, K.free(r);else{u=0;0<=h?(r=b.s[h],y=hz+10?0<=h?q.gb(r):r.gb(q):z>w+10?0<=h?y.gb(u):u.gb(y):0<=h?q.gb(u):u.gb(q)}else q=0<=h?r.gb(y):y.gb(r);l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(y.x-r.x)*k;y=r.y+(y.y-r.y)*k}if(p.kp())g.location=new K(n,y);else{p.pc()&&(p=Ic);r=Ib.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var A=g.naturalBounds;u=M.allocAt(0,0,A.width,A.height);w=K.alloc();w.Ki(u,p);r.Ma(w);p=-w.x;z=-w.y;var C=A.width,E=A.height;A=K.alloc();A.assign(m);var H=isNaN(m.x),T=isNaN(m.y);if(H||T){C=C/2+3;E=E/2+3;var aa=45<=q&&135>=q,Y=225<=q&&315>=q;l===lg&&(aa||Y)?(A.x=T?C:m.y,A.y=H?E:m.x,aa?0<=h||isNaN(h)&&.5>k||!H||(A.y=-E):Y&&((0<=h||isNaN(h)&&.5>k)&&H&&(A.y=-E),T&&(A.x=-C))):(H&&(A.x=0<=h||isNaN(h)&&.5>k?C:-C),T&&(A.y=-E),A.rotate(q))}else A.rotate(q);n+=A.x;y+=A.y;r.Dp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ -p,y+z);g.move(h);K.free(h);K.free(A);K.free(w);M.free(u);Ib.free(r)}}null!==e?e.hm(!1):d.hm(!1);d=wn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);K.free(d)}}; -function qn(a,b,c,d){if(!1!==Ij(d)){var e=d.strokeWidth;0===e&&a instanceof Be&&a.type===W.Link&&a.adornedObject instanceof Pf&&(e=a.adornedObject.strokeWidth);e*=d.Ia;a instanceof S&&null!==a.Ba?(a=a.geometry.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Be&&null!==a.adornedPart.Ba?(a=a.adornedPart.Ba.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Re(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.Ba?d.jc.h(0,0,e.width,e.height):d.jc.assign(d.Ba.bounds);Dj(d,!1)}} -function xn(){this.Ea="Base"}na(xn,nm); -xn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,y=q.flattenedLengths,w=q.flattenedTotalLength,z=u.length,A=0,C=0,E=Na(),H=0;Hha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var Ze=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Dc=0,vc=0,vf=w;a.graduatedMarks= -[];for(var Fd,Ph=0;PhUi*Yb*w/a.graduatedRange&&null===Ec.graduatedSkip)){var Jg=y[0][0],Ud=0,wc=0;vc=w*Ec.graduatedStart-1E-4;vf=w*Ec.graduatedEnd+1E-4;var ag=Ui*Yb,Fc=a.graduatedTickBase;if(Fca.graduatedMin+ag&&(Fc-=Math.floor((Fc-a.graduatedMin)/ag)*ag);for(var Ik=Ze[Ph],Vi=Fc,ko=1E-6*a.graduatedMax, -ge=1;Fc<=a.graduatedMax+ko;ge++){a:{for(var De=Ik.length,Kg=0;Kg-Qh){var yf=!1;break a}}yf=!0}if(yf&&(Fc>a.graduatedMax&&(Fc=a.graduatedMax),null===Ec.graduatedSkip||Ec instanceof bh&&!Ec.graduatedSkip(Fc,Ec)||Ec instanceof Pf&&!Ec.graduatedSkip(Fc,Ec))&&(Dc=(Fc-a.graduatedMin)*w/a.graduatedRange,Dc>w&&(Dc=w),vc<=Dc&&Dc<=vf)){for(var he=E[Ud][wc],$e=y[Ud][wc];UdJg&&wc< -y[Ud].length-1;)wc++,he=E[Ud][wc],$e=y[Ud][wc],Jg+=$e;if(Dc<=Jg)break;Ud++;wc=0;he=E[Ud][wc];$e=y[Ud][wc];Jg+=$e}var xc=u[Ud],Vd=xc[2*wc],Jk=xc[2*wc+1],Ee=(Dc-(Jg-$e))/$e,Rh=new K(Vd+(xc[2*wc+2]-Vd)*Ee+r/2-q.bounds.x,Jk+(xc[2*wc+3]-Jk)*Ee+r/2-q.bounds.y);Rh.scale(h.scale,h.scale);a:{var Gd=he,bg=E[Ud];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Lg){var Sh=1-Math.abs(.5-Ee);he=(Gd*Sh+Wd*(1-Sh))%360;break a}}}he=Gd}if(Ec instanceof bh){var pd="";null!==Ec.graduatedFunction?(pd=Ec.graduatedFunction(Fc,Ec),pd=null!==pd&&void 0!==pd?pd.toString():""):pd=(+Fc.toFixed(2)).toString();""!==pd&&Fd.push({nm:Rh,angle:he,text:pd})}else Fd.push({nm:Rh,angle:he})}Fc=Vi+ge*ag}}}a.graduatedMarks.push(Fd)}Pa(E); -var xb=a.graduatedMarks;if(null!==xb)for(var Wi=d.length,kc=0;kcqd;qd++){switch(qd){case 0:yc.h(Xd,Hd);break;case 1:yc.h(Xd+Th,Hd);break;case 2:yc.h(Xd,Hd+dg);break;case 3:yc.h(Xd+Th,Hd+dg)}yc.rotate(db+kb.angle);yc.offset(Lk,Vh);0===Uh&&0===qd?Sc.h(yc.x,yc.y,0,0):Sc.lf(yc);yc.offset(-Lk,-Vh);yc.rotate(-db-kb.angle)}K.free(yc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Sc);ic(af,Sc.x,Sc.y,Sc.width,Sc.height)}else if(kb instanceof bh){var ed=a,Mk=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new bh);var Gc=ed.temporaryTextBlock;yn(Gc,kb); -var bf=kb.alignmentFocus;bf.pc()&&(bf=Bc);for(var fd=kb.segmentOrientation,Wh=kb.segmentOffset,Bf=new M,Xi=0,Xh=0,Yd=0,eg=0,Cf=0,Yh=lc.length,cf=0;cfYd||225Yd)&&Id.rotate(-Yd,ef/2,ff/2);var Ng=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ki(Ng,bf);Id.Ma(gf);var Og=-gf.x,mo=-gf.y,He=K.alloc();He.assign(Wh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Yd);Xi+=He.x+Og;Xh+=He.y+mo;var fg=new M(Xi,Xh,df.width,df.height),Yi=new M(df.x,df.y,df.width,df.height),Zi=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ie.lA=eg;ie.lineCount=Gc.lineCount;ie.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];ie.actualBounds=fg;ie.measuredBounds=Yi;ie.naturalBounds=Zi;0===cf?Bf.assign(fg):Bf.ld(fg);K.free(He);K.free(gf);M.free(Ng);Ib.free(Id)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(Bf);ic(Mk,Bf.x,Bf.y,Bf.width,Bf.height)}Dj(kb,!1)}}}; -xn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=Bc);for(var z=0;zha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbaf))for(var kb=0;kbaf&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var bf=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Bc=0,uc=0,cf=w;a.graduatedMarks= +[];for(var Fd,wf=0;wfYb*Lk*w/a.graduatedRange&&null===Cc.graduatedSkip)){var $f=y[0][0],Rd=0,Dc=0;uc=w*Cc.graduatedStart-1E-4;cf=w*Cc.graduatedEnd+1E-4;var xf=Yb*Lk,Ec=a.graduatedTickBase;if(Eca.graduatedMin+xf&&(Ec-=Math.floor((Ec-a.graduatedMin)/xf)*xf);for(var Nh=bf[wf],mo=Ec,Ui=1E-6*a.graduatedMax, +Mk=1;Ec<=a.graduatedMax+Ui;Mk++){a:{for(var Fe=Nh.length,Sd=0;Sd-yf){var Ph=!1;break a}}Ph=!0}if(Ph&&(Ec>a.graduatedMax&&(Ec=a.graduatedMax),null===Cc.graduatedSkip||Cc instanceof $g&&!Cc.graduatedSkip(Ec,Cc)||Cc instanceof Of&&!Cc.graduatedSkip(Ec,Cc))&&(Bc=(Ec-a.graduatedMin)*w/a.graduatedRange,Bc>w&&(Bc=w),uc<=Bc&&Bc<=cf)){for(var qd=E[Rd][Dc],df=y[Rd][Dc];Rd$f&&Dc< +y[Rd].length-1;)Dc++,qd=E[Rd][Dc],df=y[Rd][Dc],$f+=df;if(Bc<=$f)break;Rd++;Dc=0;qd=E[Rd][Dc];df=y[Rd][Dc];$f+=df}var vc=u[Rd],Qh=vc[2*Dc],Td=vc[2*Dc+1],Ge=(Bc-($f-df))/df,Vi=new K(Qh+(vc[2*Dc+2]-Qh)*Ge+r/2-q.bounds.x,Td+(vc[2*Dc+3]-Td)*Ge+r/2-q.bounds.y);Vi.scale(h.scale,h.scale);a:{var ee=qd,He=E[Rd];if(!(.5005>Ge&&.4995Ge?0Ge||.9995Wi){var Rh=1-Math.abs(.5-Ge);qd=(ee*Rh+Ud*(1-Rh))%360;break a}}}qd=ee}if(Cc instanceof $g){var fe="";null!==Cc.graduatedFunction?(fe=Cc.graduatedFunction(Ec,Cc),fe=null!==fe&&void 0!==fe?fe.toString():""):fe=(+Ec.toFixed(2)).toString();""!==fe&&Fd.push({nm:Vi,angle:qd,text:fe})}else Fd.push({nm:Vi,angle:qd})}Ec=mo+Mk*xf}}}a.graduatedMarks.push(Fd)}Pa(E); +var zf=a.graduatedMarks;if(null!==zf)for(var Ab=d.length,ag=0;agab;ab++){switch(ab){case 0:wc.h(Af,Vd);break;case 1:wc.h(Af+Xi,Vd);break;case 2:wc.h(Af,Vd+Th);break;case 3:wc.h(Af+Xi,Vd+Th)}wc.rotate(Uh+gb.angle);wc.offset(bg,Ok);0===he&&0===ab?Sc.h(wc.x,wc.y,0,0):Sc.lf(wc);wc.offset(-bg,-Ok);wc.rotate(-Uh-gb.angle)}K.free(wc);null!==Fc.graduatedBounds&&Fc.graduatedBounds.push(Sc);ic(ef,Sc.x,Sc.y,Sc.width,Sc.height)}else if(gb instanceof $g){var ed=a,ie=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new $g);var Gc=ed.temporaryTextBlock;An(Gc,gb); +var Vh=gb.alignmentFocus;Vh.pc()&&(Vh=zc);for(var fd=gb.segmentOrientation,cg=gb.segmentOffset,je=new M,Zi=0,$i=0,ke=0,dg=0,eg=0,Wh=kc.length,Bf=0;Bfke||225ke)&&Wd.rotate(-ke,Je/2,gf/2);var Lg=M.allocAt(0,0,Je,gf),hf=K.alloc();hf.Ki(Lg,Vh);Wd.Ma(hf);var Xh=-hf.x,Mg=-hf.y,Ke=K.alloc();Ke.assign(cg);isNaN(Ke.x)&&(Ke.x=Je/2+3);isNaN(Ke.y)&&(Ke.y=-(gf/2+3));Ke.rotate(ke);Zi+=Ke.x+Xh;$i+=Ke.y+Mg;var aj=new M(Zi,$i,ff.width,ff.height),Yh=new M(ff.x,ff.y,ff.width,ff.height),bj=new M(fg.x,fg.y,fg.width,fg.height); +gd.lA=dg;gd.lineCount=Gc.lineCount;gd.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];gd.actualBounds=aj;gd.measuredBounds=Yh;gd.naturalBounds=bj;0===Bf?je.assign(aj):je.ld(aj);K.free(Ke);K.free(hf);M.free(Lg);Ib.free(Wd)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(je);ic(ie,je.x,je.y,je.width,je.height)}Gj(gb,!1)}}}; +zn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=zc);for(var z=0;zg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +W.prototype.Mf=function(a){P.prototype.Mf.call(this,a);a.S=this.S;for(var b=a.S.s,c=b.length,d=0;dg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.ws(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.Eb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.ef();n&&b.ts()}}}} -function Cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=En(a,!0),l=En(a,!1),m=0;mp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function En(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function Gn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),K.free(r));K.free(m);f&&e.transform(g);return l}; -t.Sj=function(){for(var a=this.S.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case kl:this.w(!0);this.measure(c+h,f+g,0,0);break;case ll:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; -t.rh=function(a){var b=this.naturalBounds,c=Zm(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case ml:this.w(!0);this.measure(c+h,f+g,0,0);break;case nl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; +t.rh=function(a){var b=this.naturalBounds,c=an(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); -if(null!==m?m.Of(a,b,c,d,e,p):xl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Ln(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Ln(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Of=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Ib.alloc(),g.reset());g.multiply(this.transform);if(this.qh(a,g))return Nn(this,b,c,e),void 0===f&&Ib.free(g),!0;if(this.dd(a,g)){if(!this.isAtomic)for(var h=an(this),k=this.S.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); +if(null!==m?m.Of(a,b,c,d,e,p):zl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Nn(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Nn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.Ag=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.Ae(),k=h?a:Jb(K.allocAt(a.x,a.y),this.transform),l=h?b:Jb(K.allocAt(b.x,b.y),this.transform),m=k.Nf(l),n=0y.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; -function en(a){var b=null;a instanceof Pf&&(b=a.spot1,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Ac);return b}function fn(a){var b=null;a instanceof Pf&&(b=a.spot2,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;cy.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +function gn(a){var b=null;a instanceof Of&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=yc);return b}function hn(a){var b=null;a instanceof Of&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Ij(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||Mn(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.jb(se,"elements",this,b,null,d,null),c.jb(re,"elements",this,null,b,null,a)))};function Nn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(re,"rowdefs",this,null,c,null,a)}return b[a]}; -t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"rowdefs",this,c,null,a,null);this.w()}}};function kk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(re,"coldefs",this,null,c,null,a)}return b[a]}; -t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"coldefs",this,c,null,a,null);this.w()}}};function lk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&mm(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&mm(a,new jk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&mm(a,new jk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Lj(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||On(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.jb(ue,"elements",this,b,null,d,null),c.jb(te,"elements",this,null,b,null,a)))};function Pn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(te,"rowdefs",this,null,c,null,a)}return b[a]}; +t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"rowdefs",this,c,null,a,null);this.w()}}};function nk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(te,"coldefs",this,null,c,null,a)}return b[a]}; +t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"coldefs",this,c,null,a,null);this.w()}}};function ok(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&om(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&om(a,new mk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&om(a,new mk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Pn=!0)}}))} -t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();Gn(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; +t.$z=function(a){if(this.type!==W.Graduated)return NaN;var b=this.Vb();b.transform.Jd(a);return b.geometry.Ox(a)*this.graduatedRange+this.graduatedMin};function jm(a){a=a.allBindings;return null!==a&&a._isFrozen} +function wg(a){var b=a.allBindings;if(null===b)null!==a.data&&v("Template cannot have .data be non-null: "+a),a.allBindings=b=new I;else if(b._isFrozen)return;var c=new I;Pn(a,!1);a.yk(a,function(a,d){d.Eh();var e=d.localBindings;if(null!==e)for(gm(d,!1),e=e.iterator;e.next();){var f=e.value;f.mode===Qn&&gm(d,!0);var g=f.sourceName;null!==g&&("/"===g&&Pn(a,!0),g=yl(f,a,d),null!==g&&(c.add(g),null===g.srcBindings&&(g.srcBindings=new I),g.srcBindings.add(f)));b.add(f)}if(d instanceof W&&d.type===W.Table){if(0< +d.rowCount)for(a=d.rowDefs,e=a.length,f=0;f=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Rn=!0)}}))} +t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();In(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; t.Qa=function(a){var b=this.allBindings;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.lb(e),null===d){G&&Fa("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.Ni;if(-1!==g){if(f=this.xs(g),null===f)continue}else null!==c.Dd&&(f=c.Dd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.Fo;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.Kb(c.Jl):2===e&&(f=f.Lb(c.Jl))}void 0!==f&&c.aw(f,d)}}};t.Jx=function(a){if(void 0===a||null===a||null===this.me)return null;B(a,"object",W,"findItemPanelForData");return this.me.L(a)}; -function Qn(a,b){a=a.S.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.wc(this.S.length-1,!1);Rn(this,this.itemArray)}; -function Rn(a,b){var c=Jn(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Tn(a,b);e=Un(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Nn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Jn(a);a.Mb(f,e);d&&(e.zb=b,Vn(a,f,c),e.zb=null);e.data=b}}} -function Vn(a,b,c){for(a=a.S;ba;)this.wc(this.S.length-1,!1);Tn(this,this.itemArray)}; +function Tn(a,b){var c=Ln(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Vn(a,b);e=Wn(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Pn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Ln(a);a.Mb(f,e);d&&(e.zb=b,Xn(a,f,c),e.zb=null);e.data=b}}} +function Xn(a,b,c){for(a=a.S;ba&&Ba(a,">= 0",W,"padding"), a=new fc(a)):(x(a,fc,W,"padding"),0>a.left&&Ba(a.left,">= 0",W,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",W,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.fn},set:function(a){var b=this.fn;b.D(a)||(G&&x(a,Hb,W,"defaultAlignment"),this.fn=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:tc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new $n),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", -b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Fl)&&(a instanceof Fl&&a.freeze(),null===this.Y&&(this.Y=new $n),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new $n),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof Be);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:sc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new bo),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Hl)&&(a instanceof Hl&&a.freeze(),null===this.Y&&(this.Y=new bo),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; +b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new bo),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof De);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, this)):this instanceof U&&(null!==b&&c.qf.remove(b),null!==a&&c.qf.add(a,this))):(c=this.panel,null!==c&&null!==c.me&&(null!==b&&c.me.remove(b),null!==a&&c.me.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Qa()}}},itemIndex:{configurable:!0,get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.tb:null},set:function(a){this.localBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Qn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Rn(this,a)}}},itemTemplate:{configurable:!0, +a&&(null===this.B&&(this.B=new ul),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Sn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&dk(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&ak(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Tn(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new vb}var b=this.itemTemplateMap.L("");b!==a&&(x(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Bv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}rl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),rl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Df||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Df&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&Mn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), +enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}tl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),tl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Cf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Cf&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&On(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), this.mf=a,this.w(),this.g("alignmentFocusName",b,a))}}}); -oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return lm.L("Position")}},Horizontal:{configurable:!0,get:function(){return lm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return lm.L("Vertical")}},Spot:{configurable:!0,get:function(){return lm.L("Spot")}},Auto:{configurable:!0,get:function(){return lm.L("Auto")}},Table:{configurable:!0,get:function(){return lm.L("Table")}},Viewbox:{configurable:!0, -enumerable:!0,get:function(){return lm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return lm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return lm.L("TableColumn")}},Link:{configurable:!0,get:function(){return lm.L("Link")}},Grid:{configurable:!0,get:function(){return lm.L("Grid")}},Graduated:{configurable:!0,get:function(){return lm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; +oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return nm.L("Position")}},Horizontal:{configurable:!0,get:function(){return nm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return nm.L("Vertical")}},Spot:{configurable:!0,get:function(){return nm.L("Spot")}},Auto:{configurable:!0,get:function(){return nm.L("Auto")}},Table:{configurable:!0,get:function(){return nm.L("Table")}},Viewbox:{configurable:!0, +enumerable:!0,get:function(){return nm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return nm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return nm.L("TableColumn")}},Link:{configurable:!0,get:function(){return nm.L("Link")}},Grid:{configurable:!0,get:function(){return nm.L("Grid")}},Graduated:{configurable:!0,get:function(){return nm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; W.prototype.findItemPanelForData=W.prototype.Jx;W.prototype.updateTargetBindings=W.prototype.Qa;W.prototype.copyTemplate=W.prototype.lz;W.prototype.graduatedValueForPoint=W.prototype.$z;W.prototype.graduatedPointForValue=W.prototype.Zz;W.prototype.findColumnForLocalX=W.prototype.Az;W.prototype.findRowForLocalY=W.prototype.Iz;W.prototype.addColumnDefinition=W.prototype.Sy;W.prototype.addRowDefinition=W.prototype.Yy;W.prototype.addRowColumnDefinition=W.prototype.Xy; W.prototype.removeColumnDefinition=W.prototype.DA;W.prototype.getColumnDefinition=W.prototype.Kb;W.prototype.removeRowDefinition=W.prototype.IA;W.prototype.getRowDefinition=W.prototype.Lb;W.prototype.removeAt=W.prototype.sb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Mb;W.prototype.elt=W.prototype.P;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.lb;W.prototype.findInVisualTree=W.prototype.am;W.prototype.walkVisualTreeFrom=W.prototype.yk; -W.prototype.findMainElement=W.prototype.Vb;var Pn=!1,Xn=!1,Yn=null,lm=new vb;W.className="Panel";W.definePanelLayout=Zn;Zn("Position",new Ym);Zn("Vertical",new an);Zn("Auto",new dn);Zn("Link",new pn);function ao(){this.yq=0;this.G=100;this.oa=10;this.Z=0;this.ki=this.o=this.j=this.v=null}ao.prototype.copy=function(){var a=new ao;a.yq=this.yq;a.G=this.G;a.oa=this.oa;a.Z=this.Z;a.v=this.v;a.j=this.j;a.o=this.o;a.ki=this.ki;return a};ao.className="GradPanelSettings"; -function $n(){this.Vc=[];this.Uc=[];this.j=this.ub=bo;this.ob=this.Nb=0;this.cq=tc;this.Na=1;this.Z=this.oa=null;this.G=1;this.tb=this.o=this.v=null} -$n.prototype.copy=function(a){for(var b=new $n,c=this.Vc,d=c.length,e=b.Vc,f=0;fa&&Ba(a,">= 0",jk,"height"),this.Oc=a,this.actual=this.ua,null!== -this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",jk,"width"),0>a&&Ba(a,">= 0",jk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",jk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",jk,"minimum"),this.wj=a,this.actual= -this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",jk,"maximum"),0>a&&Ba(a,">= 0",jk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,jk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), -this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,jk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,jk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), -this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&rm(a,"RowColumnDefinition.separatorStroke"),a instanceof Fl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", -b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",jk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); +b)d=b.defaultSeparatorPadding;else return a;return a+(this.isRow?d.top+d.bottom:d.left+d.right)};t.Ub=function(a,b,c){var d=this.Xe;if(null!==d&&(d.jb(re,a,this,b,c,void 0,void 0),null!==this.he&&(b=d.diagram,null!==b&&!b.skipsModelSourceBindings&&(d=d.th(),null!==d&&(b=d.data,null!==b)))))for(c=this.he.iterator;c.next();)c.value.Gp(this,b,a,d)};function kn(a){if(a.sizing===fo){var b=a.Xe;return a.isRow?b.rowSizing:b.columnSizing}return a.sizing} +t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Mi(a,b,c,d):e=a;e.Dd=this;a=this.panel;null!==a&&(b=a.th(),null!==b&&jm(b)&&v("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+e+" on "+a));null===this.he&&(this.he=new I);this.he.add(e);return this}; +oa.Object.defineProperties(mk.prototype,{panel:{configurable:!0,get:function(){return this.Xe}},isRow:{configurable:!0,get:function(){return this.Hq},set:function(a){this.Hq=a}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb=a}},height:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"height"),0>a&&Ba(a,">= 0",mk,"height"),this.Oc=a,this.actual=this.ua,null!== +this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"width"),0>a&&Ba(a,">= 0",mk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",mk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",mk,"minimum"),this.wj=a,this.actual= +this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",mk,"maximum"),0>a&&Ba(a,">= 0",mk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,mk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), +this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,mk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,mk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), +this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&tm(a,"RowColumnDefinition.separatorStroke"),a instanceof Hl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", +b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",mk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[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){Pa(y);return}e>r?(z=e-r,e=r):z=0;var A=Math.sqrt(e*e/(1+p*p));0>n&&(A=-A);h+=A;k+=p*A;a.translate(h,k);a.rotate(q);a.translate(-(g/2),-(f/2));0===z&&d.sh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==z){w++;if(w===y.length){Pa(y);return}r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];e=z}}Pa(y)}} -t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof Be&&"Selection"===h.category&&h.adornedObject instanceof Pf&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof De&&"Selection"===h.category&&h.adornedObject instanceof Of&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Sf("drawShadows")&&(f=h.isShadowed);!1===a.Wl&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.ws(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.vk(),a.ef();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.zg(d);null!==c&&(h&&f&&Jl(a),a.vk(),h&&f&&Il(a));a.ef()}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.Ig*e,k-p,l+e,k-L.Ig*p,l+e,k),a.bezierCurveTo(l+e,k+L.Ig*p,l+L.Ig*e,k+p,l,k+p),a.bezierCurveTo(l-L.Ig*e,k+p,l-e,k+L.Ig*p,l-e,k),a.bezierCurveTo(l-e,k-L.Ig*p,l-L.Ig*e,k-p,l,k-p),a.closePath(),null!==d&&a.zg(d),null!==c&& -(h&&f&&Jl(a),a.vk(),h&&f&&Il(a)),a.ef();else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=$d(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;wu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Yd(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;w(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.dc(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Hc(-d,-d);if(f.ha(a))return M.free(f),!1;f.Hc(d,d)}null!==this.stroke&&f.Hc(e,e);a=f.ha(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?de(c,a.x,a.y,e):be(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?be(c,a.x,a.y,e):$d(c,a,e,1=this.strokeWidth)m=L.hf(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Na();a=new K;L.hf(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),w-=r,z-= -u;q.contains(w,z);)w-=r,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.xc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} +d;g.y=f;g.transform(c);b=!1;ro(this,g,h,k)?b=!0:(g.x=e,g.y=a,g.transform(c),ro(this,g,h,k)?b=!0:(h.x=d,h.y=a,h.transform(c),ro(this,g,h,k)?b=!0:(g.x=d,g.y=f,g.transform(c),ro(this,g,h,k)&&(b=!0))));K.free(g);Ib.free(c);K.free(h);K.free(k);return b};function ro(a,b,c,d){if(!a.Es(b,c,d))return!1;a=b.x;b=b.y;var e=c.x,f=c.y;c=d.x;d=d.y;if(a===e)return b=a&&d<=b;a=d&&c<=a} t.Kx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.rh(a,!0))return!0;var e=a.Nf(b),f=e;1.5=e||Lb(b,f,0,-n)>= -e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?de(b,a.x,a.y,f):be(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Rd:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Sd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Td:case Zd:p=n.type===Td?$d(n,f):ae(n,f,g,m);var q=p.length;if(0===q){g=n.type===Td?n.centerX:n.endX;m=n.type===Td?n.centerY:n.endY;if(a.Fd(g,m)> +e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?be(b,a.x,a.y,f):$d(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Od:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Pd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Qd:case Xd:p=n.type===Qd?Yd(n,f):Zd(n,f,g,m);var q=p.length;if(0===q){g=n.type===Qd?n.centerX:n.endX;m=n.type===Qd?n.centerY:n.endY;if(a.Fd(g,m)> e)return!1;break}n=null;for(var r=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); -return d};function to(a){var b=so[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=so[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),so[d]=a,c!==d&&(so[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Pf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Pf,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);ul(this)&&(a=this.part,null!==a&&vl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Pf,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Pf,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= -this.gj;b!==a&&(null!==a&&rm(a,"Shape.fill"),a instanceof Fl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"Shape.stroke"),a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Pf,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; -null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Pf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Pf,"strokeCap"):(eo(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Pf,"strokeJoin"):(eo(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Pf,"strokeMiterLimit"),1<=a){eo(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", -b,a)}else G&&Ba(a,"value >= 1",Pf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Pf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& -(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case pl:a.translate(e,0);a.scale(-1,1);break;case ol:a.translate(0,f);a.scale(1,-1);break;case ql:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case pl:a.scale(-1,1);a.translate(-e,0);break;case ol:a.scale(1,-1);a.translate(0,-f);break;case ql:a.scale(-1,-1),a.translate(-e,-f)}}}; -t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Bo?Bo(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);if(l){h=null!==Co?Co(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= +function so(a){var b=a.diagram;null!==b&&b.undoManager.isUndoingRedoing||(a.segmentOrientation=Bn,"None"!==a.toArrow?(a.segmentIndex=-1,a.alignmentFocus=od):"None"!==a.fromArrow&&(a.segmentIndex=0,a.alignmentFocus=new Hb(1-od.x,od.y)))} +Of.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=to[a.toArrow];else"None"!==a.fromArrow?d=to[a.fromArrow]:(d=L.Ce[a.figure],"string"===typeof d&&(d=L.Ce[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.dl=b,d.cl=c);if(null===d){var e=L.Ce.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +return d};function uo(a){var b=to[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=to[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),to[d]=a,c!==d&&(to[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} +oa.Object.defineProperties(Of.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Of,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);wl(this)&&(a=this.part,null!==a&&xl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Of,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Of,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= +this.gj;b!==a&&(null!==a&&tm(a,"Shape.fill"),a instanceof Hl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"Shape.stroke"),a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Of,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; +null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Of,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Of,"strokeCap"):(go(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Of,"strokeJoin"):(go(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Of,"strokeMiterLimit"),1<=a){go(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", +b,a)}else G&&Ba(a,"value >= 1",Of,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Of,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& +(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case rl:a.translate(e,0);a.scale(-1,1);break;case ql:a.translate(0,f);a.scale(1,-1);break;case sl:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case rl:a.scale(-1,1);a.translate(-e,0);break;case ql:a.scale(1,-1);a.translate(0,-f);break;case sl:a.scale(-1,-1),a.translate(-e,-f)}}}; +t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Co?Co(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);if(l){h=null!==Do?Do(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.ef(),b instanceof vi&&b.gd.classList.add("gojs-td"))}}; -t.wk=function(a,b,c){if(!P.prototype.wk.call(this,a,b,c))return!1;wi(this,a,this.Dc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Xb.length))){this.l|=16777216; -l=this.Xb[k];for(b=Math.max(1,a-b);Fo(l)>b&&1a.maxLines&&(a.l|=16777216)}} -function Mo(a,b,c,d){var e=a.formatting===Eo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Ao(a)+h);var k=a.overflow===Ho?Io(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===No){a.We=1;var l=Fo(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Lo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Oo(a,g);g=g.substr(f.length);b=Oo(a,g);for(l=Fo(f+b);0 -c&&1c;){var n=1;l=Fo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Fo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Lo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Oo(a,g);for(l=Fo(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} -function Oo(a,b){if(a.wrap===Po)return b.substr(0,1);for(var c=b.length,d=0,e=Qo;d=b.length?b:b.substr(0,d)}function Fo(a){return null===wo?8*a.length:wo.measureText(a).width}function Ao(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===wo){var c=16;return a.rf=c}void 0!==So[b]&&5E3>To?c=So[b]:(c=1.3*wo.measureText("M").width,So[b]=c,To++);return a.rf=c} -function Io(a){if(null===wo)return 6;if(void 0!==Uo[a]&&5E3>Vo)var b=Uo[a];else b=wo.measureText(Jo).width,Uo[a]=b,Vo++;return b} -function Go(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Ao(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==No){a.We=0;var k=Gb.alloc();Mo(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else Mo(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} -oa.Object.defineProperties(bh.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",bh,"font"),zo(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, -get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",bh,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(xo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',bh,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,bh,"flip"),xo(this),this.ia.ig=a,this.R(), -this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:jd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,bh,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),xo(this),this.ia.ms=a,bm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();Mo(this,this.kc,999999,a);var b=a.width; -Gb.free(a);a=Go(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",bh,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& -(G&&B(a,"boolean",bh,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",bh,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Wo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,bh,bh,"wrap"), -xo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Xo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,bh,bh,"overflow"),xo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"TextBlock.stroke"), -a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Ao(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",bh,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? -this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Le||v("TextBlock.textEditor must be an HTMLInfo."),xo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",bh,"errorFunction"),xo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? -this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,bh,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new uo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,bh,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",bh,"maxLines"),xo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, -choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",bh,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); -var Bo=null,Co=null,No=new F(bh,"None",0),Ko=new F(bh,"WrapFit",1),Wo=new F(bh,"WrapDesiredSize",2),Po=new F(bh,"WrapBreakAll",3),Xo=new F(bh,"OverflowClip",0),Ho=new F(bh,"OverflowEllipsis",1),Eo=new F(bh,"FormatTrim",0),Ro=new F(bh,"FormatNone",0),Qo=/[ \u200b\u00ad]/,So=new bb,To=0,Uo=new bb,Vo=0,Jo="...",Do="",wo=null,vo=!1;bh.className="TextBlock"; -function yo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Eo;this.Wq=Infinity;this.mr=Xo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=jd;this.os=Wo}yo.prototype.copy=function(){var a=new yo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};bh.getEllipsis=function(){return Jo};bh.setEllipsis=function(a){Jo=a;Uo=new bb;Vo=0};bh.getBaseline=function(){return Bo}; -bh.setBaseline=function(a){Bo=a};bh.getUnderline=function(){return Co};bh.setUnderline=function(a){Co=a};bh.isValidFont=zo;bh.FormatNone=Ro;bh.FormatTrim=Eo;bh.None=No;bh.OverflowClip=Xo;bh.OverflowEllipsis=Ho;bh.WrapBreakAll=Po;bh.WrapDesiredSize=Wo;bh.WrapFit=Ko;function uo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}uo.prototype.copy=function(){var a=new uo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};uo.className="GradElementSettings"; -function rk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=pc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Yo;na(rk,P); -rk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};rk.prototype.wb=function(a){a===xg||a===zg||a===nl?this.imageStretch=a:P.prototype.wb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ib(this)}; -function Ri(a){void 0===a&&(a="");B(a,"string",rk,"clearCache:url");""!==a?Yo[a]&&(delete Yo[a],Zo--):(Yo=new bb,Zo=0)} -function $o(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case nl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===nl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=ap;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(bp(w,4,l,m,c),bp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;m=this.Xb.length))){this.l|=16777216; +l=this.Xb[k];for(b=Math.max(1,a-b);Go(l)>b&&1a.maxLines&&(a.l|=16777216)}} +function No(a,b,c,d){var e=a.formatting===Fo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Bo(a)+h);var k=a.overflow===Io?Jo(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===Oo){a.We=1;var l=Go(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Mo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Po(a,g);g=g.substr(f.length);b=Po(a,g);for(l=Go(f+b);0 +c&&1c;){var n=1;l=Go(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Go(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Mo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Po(a,g);for(l=Go(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} +function Po(a,b){if(a.wrap===Qo)return b.substr(0,1);for(var c=b.length,d=0,e=Ro;d=b.length?b:b.substr(0,d)}function Go(a){return null===xo?8*a.length:xo.measureText(a).width}function Bo(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===xo){var c=16;return a.rf=c}void 0!==To[b]&&5E3>Uo?c=To[b]:(c=1.3*xo.measureText("M").width,To[b]=c,Uo++);return a.rf=c} +function Jo(a){if(null===xo)return 6;if(void 0!==Vo[a]&&5E3>Wo)var b=Vo[a];else b=xo.measureText(Ko).width,Vo[a]=b,Wo++;return b} +function Ho(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Bo(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==Oo){a.We=0;var k=Gb.alloc();No(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else No(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} +oa.Object.defineProperties($g.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",$g,"font"),Ao(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, +get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",$g,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(yo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',$g,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,$g,"flip"),yo(this),this.ia.ig=a,this.R(), +this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,$g,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),yo(this),this.ia.ms=a,dm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();No(this,this.kc,999999,a);var b=a.width; +Gb.free(a);a=Ho(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",$g,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& +(G&&B(a,"boolean",$g,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",$g,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Xo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,$g,$g,"wrap"), +yo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Yo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,$g,$g,"overflow"),yo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"TextBlock.stroke"), +a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Bo(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",$g,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? +this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Oe||v("TextBlock.textEditor must be an HTMLInfo."),yo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",$g,"errorFunction"),yo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? +this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,$g,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new vo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,$g,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",$g,"maxLines"),yo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, +choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",$g,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); +var Co=null,Do=null,Oo=new F($g,"None",0),Lo=new F($g,"WrapFit",1),Xo=new F($g,"WrapDesiredSize",2),Qo=new F($g,"WrapBreakAll",3),Yo=new F($g,"OverflowClip",0),Io=new F($g,"OverflowEllipsis",1),Fo=new F($g,"FormatTrim",0),So=new F($g,"FormatNone",0),Ro=/[ \u200b\u00ad]/,To=new cb,Uo=0,Vo=new cb,Wo=0,Ko="...",Eo="",xo=null,wo=!1;$g.className="TextBlock"; +function zo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Fo;this.Wq=Infinity;this.mr=Yo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=kd;this.os=Xo}zo.prototype.copy=function(){var a=new zo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};$g.getEllipsis=function(){return Ko};$g.setEllipsis=function(a){Ko=a;Vo=new cb;Wo=0};$g.getBaseline=function(){return Co}; +$g.setBaseline=function(a){Co=a};$g.getUnderline=function(){return Do};$g.setUnderline=function(a){Do=a};$g.isValidFont=Ao;$g.FormatNone=So;$g.FormatTrim=Fo;$g.None=Oo;$g.OverflowClip=Yo;$g.OverflowEllipsis=Io;$g.WrapBreakAll=Qo;$g.WrapDesiredSize=Xo;$g.WrapFit=Lo;function vo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}vo.prototype.copy=function(){var a=new vo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};vo.className="GradElementSettings"; +function uk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=oc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Zo;na(uk,P); +uk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};uk.prototype.wb=function(a){a===xg||a===zg||a===pl?this.imageStretch=a:P.prototype.wb.call(this,a)};uk.prototype.toString=function(){return"Picture("+this.source+")#"+jb(this)}; +function Ri(a){void 0===a&&(a="");B(a,"string",uk,"clearCache:url");""!==a?Zo[a]&&(delete Zo[a],$o--):(Zo=new cb,$o=0)} +function ap(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case pl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===pl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=bp;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(cp(w,4,l,m,c),cp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new fe(a,0,!0)).add(new je(Cd,b-a,0)).add(new je(Rd,b,a,b-f,0,b,f)).add(new je(Cd,b,c-a)).add(new je(Rd,b-a,c,b,c-f,b-f,c)).add(new je(Cd,a,c)).add(new je(Rd,0,c-a,f,c,0,c-f)).add(new je(Cd,0,a)).add((new je(Rd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new de(a,0,!0)).add(new le(Cd,b-a,0)).add(new le(Od,b,a,b-f,0,b,f)).add(new le(Cd,b,c-a)).add(new le(Od,b-a,c,b,c-f,b-f,c)).add(new le(Cd,a,c)).add(new le(Od,0,c-a,f,c,0,c-f)).add(new le(Cd,0,a)).add((new le(Od,a,0,0,f,f,0)).close()));1e.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.I^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.qa();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.cc();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.fc(),c.skipsUndoManager=d)}}}},isHighlighted:{configurable:!0,get:function(){return 0!==(this.I& 524288)},set:function(a){var b=0!==(this.I&524288);if(b!==a){G&&B(a,"boolean",U,"isHighlighted");this.I^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.qa(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.R();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{configurable:!0,get:function(){return 0!==(this.I&8192)},set:function(a){var b=0!==(this.I&8192);b!==a&&(G&&B(a,"boolean",U,"isShadowed"),this.I^=8192,this.$c=!0,this.g("isShadowed",b, -a),this.R())}},isAnimated:{configurable:!0,get:function(){return 0!==(this.I&262144)},set:function(a){var b=0!==(this.I&262144);b!==a&&(G&&B(a,"boolean",U,"isAnimated"),this.I^=262144,this.g("isAnimated",b,a))}},highlightedChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Bq:null},set:function(a){var b=this.highlightedChanged;b!==a&&(null!==a&&B(a,"function",U,"highlightedChanged"),hp(this),this.T.Bq=a,this.g("highlightedChanged",b,a))}},selectionObjectName:{configurable:!0, -enumerable:!0,get:function(){return null!==this.T?this.T.Ir:""},set:function(a){var b=this.selectionObjectName;b!==a&&(G&&B(a,"string",U,"selectionObjectName"),hp(this),this.T.Ir=a,this.fh=null,this.g("selectionObjectName",b,a))}},selectionAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.Gr:null},set:function(a){var b=this.selectionAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"selectionAdornmentTemplate"),hp(this),this.T.Gr=a,this.g("selectionAdornmentTemplate", -b,a))}},selectionObject:{configurable:!0,get:function(){if(null===this.fh){var a=this.selectionObjectName;null!==a&&""!==a?(a=this.lb(a),null!==a?this.fh=a:this.fh=this):this instanceof S?(a=this.path,null!==a?this.fh=a:this.fh=this):this.fh=this}return this.fh}},selectionChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Hr:null},set:function(a){var b=this.selectionChanged;b!==a&&(null!==a&&B(a,"function",U,"selectionChanged"),hp(this),this.T.Hr=a,this.g("selectionChanged", -b,a))}},resizeAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.tr:null},set:function(a){var b=this.resizeAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"resizeAdornmentTemplate"),hp(this),this.T.tr=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.vr:""},set:function(a){var b=this.resizeObjectName;b!==a&&(G&&B(a,"string",U,"resizeObjectName"),hp(this),this.T.vr=a,this.g("resizeObjectName", -b,a))}},resizeObject:{configurable:!0,get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.lb(a),null!==a)?a:this}},resizeCellSize:{configurable:!0,get:function(){return null!==this.T?this.T.ur:Ub},set:function(a){var b=this.resizeCellSize;b.D(a)||(G&&x(a,Gb,U,"resizeCellSize"),a=a.M(),hp(this),this.T.ur=a,this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.wr:null},set:function(a){var b= -this.rotateAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"rotateAdornmentTemplate"),hp(this),this.T.wr=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.xr:""},set:function(a){var b=this.rotateObjectName;b!==a&&(G&&B(a,"string",U,"rotateObjectName"),hp(this),this.T.xr=a,this.g("rotateObjectName",b,a))}},rotateObject:{configurable:!0,get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.lb(a),null!== -a)?a:this}},rotationSpot:{configurable:!0,get:function(){return null!==this.T?this.T.zr:gd},set:function(a){var b=this.rotationSpot;b.D(a)||(G&&(x(a,Hb,U,"rotationSpot"),a===gd||a.mb()||v("Part.rotationSpot must be a specific Spot value or Spot.Default, not: "+a)),a=a.M(),hp(this),this.T.zr=a,this.g("rotationSpot",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(G&&B(a,"string",U,"text"),this.kc=a,this.g("text",b,a))}}, -containingGroup:{configurable:!0,get:function(){return this.Lh},set:function(a){if(this.ed()){var b=this.Lh;if(b!==a){G&&null!==a&&x(a,Df,U,"containingGroup");null===a||this!==a&&!a.Zd(this)||(this===a&&v("Cannot make a Group a member of itself: "+this.toString()),v("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.F(2);var c=this.diagram;null!==b?vp(b,this):this instanceof Df&&null!==c&&c.mi.remove(this);this.Lh=a;null!==a?up(a, -this):this instanceof Df&&null!==c&&c.mi.add(this);this.F(1);if(null!==c&&c.da){var d=this.data,e=c.model;if(null!==d&&e.Ci()){var f=e.Da(null!==a?a.data:null);e.Ap(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.da,c.da=!0),d(this,b,a),null!==c&&(c.da=e));if(this instanceof Df)for(c=new J,hl(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof V)for(d=d.linksConnected;d.next();)Ap(d.value);if(this instanceof V){for(c=this.linksConnected;c.next();)Ap(c.value);c=this.labeledLink; -null!==c&&Ap(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&xi(b,-1,a))}}else v("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Xp:null},set:function(a){var b=this.containingGroupChanged;b!==a&&(null!==a&&B(a,"function",U,"containingGroupChanged"),hp(this),this.T.Xp=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{configurable:!0,get:function(){return null!== -this.containingGroup||this instanceof V&&null!==this.labeledLink?!1:!0}},layoutConditions:{configurable:!0,get:function(){return null!==this.T?this.T.Pq:127},set:function(a){var b=this.layoutConditions;b!==a&&(G&&B(a,"number",U,"layoutConditions"),hp(this),this.T.Pq=a,this.g("layoutConditions",b,a))}},dragComputation:{configurable:!0,get:function(){return null!==this.T?this.T.hq:null},set:function(a){var b=this.dragComputation;b!==a&&(null!==a&&B(a,"function",U,"dragComputation"), -hp(this),this.T.hq=a,this.g("dragComputation",b,a))}},shadowOffset:{configurable:!0,get:function(){return null!==this.T?this.T.Mr:Bb},set:function(a){var b=this.shadowOffset;b.D(a)||(G&&x(a,K,U,"shadowOffset"),a=a.M(),hp(this),this.T.Mr=a,this.R(),this.g("shadowOffset",b,a))}},shadowColor:{configurable:!0,get:function(){return null!==this.T?this.T.Lr:"gray"},set:function(a){var b=this.shadowColor;b!==a&&(G&&B(a,"string",U,"shadowColor"),hp(this),this.T.Lr=a,this.R(),this.g("shadowColor", -b,a))}},shadowBlur:{configurable:!0,get:function(){return null!==this.T?this.T.gh:4},set:function(a){var b=this.shadowBlur;b!==a&&(G&&B(a,"number",U,"shadowBlur"),hp(this),this.T.gh=a,this.R(),this.g("shadowBlur",b,a))}}});U.prototype.invalidateLayout=U.prototype.F;U.prototype.findCommonContainingGroup=U.prototype.Hx;U.prototype.isMemberOf=U.prototype.Zd;U.prototype.findTopLevelPart=U.prototype.Nz;U.prototype.findSubGraphLevel=U.prototype.Jz;U.prototype.ensureBounds=U.prototype.$a; -U.prototype.getDocumentBounds=U.prototype.zi;U.prototype.findObject=U.prototype.lb;U.prototype.moveTo=U.prototype.moveTo;U.prototype.invalidateAdornments=U.prototype.cc;U.prototype.clearAdornments=U.prototype.Qj;U.prototype.removeAdornment=U.prototype.Vf;U.prototype.addAdornment=U.prototype.nh;U.prototype.findAdornment=U.prototype.ak;U.prototype.updateTargetBindings=U.prototype.Qa;var sp=!1;U.className="Part";U.LayoutNone=0;U.LayoutAdded=1;U.LayoutRemoved=2;U.LayoutShown=4;U.LayoutHidden=8; -U.LayoutNodeSized=16;U.LayoutGroupLayout=32;U.LayoutNodeReplaced=64;U.LayoutStandard=127;U.LayoutAll=16777215;function Be(a,b){void 0===a||a instanceof nm||"string"===typeof a?U.call(this,a):(U.call(this),a&&(b=a));this.I&=-257;this.Vg="Adornment";this.De=null;this.Pw=0;this.lx=!1;this.j=this.bb=null;b&&Object.assign(this,b)}na(Be,U);Be.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Be.prototype.updateRelationshipsFromData=function(){}; -Be.prototype.hm=function(a){var b=this.adornedObject,c=null===b||void 0===b?void 0:b.part;if(c instanceof S&&b instanceof Pf){b=c.path;c.hm(a);a=b.geometry;c=this.S.s;b=c.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Np(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Np(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Pp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Pp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(2a&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Op(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Op(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Qp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Qp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(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, +vg.prototype.computeBorder=function(a){var b=this.part,c=b.diagram,d=null===c||!c.animationManager.isAnimating;if(null!==c&&b instanceof Cf&&!b.layer.isTemporary&&b.computesBoundsAfterDrag&&this.wo.u()){var e=c.toolManager.findTool("Dragging");if(e===c.currentTool&&(c=e.computeBorder(b,this.wo,a),null!==c))return c}c=M.alloc();e=this.computeMemberBounds(c);var f=this.Eb;b instanceof Cf&&!b.isSubGraphExpanded?a.h(e.x-f.left,e.y-f.top,0,0):a.h(e.x-f.left,e.y-f.top,Math.max(e.width+f.left+f.right,0), +Math.max(e.height+f.top+f.bottom,0));M.free(c);d&&b instanceof Cf&&b.computesBoundsIncludingLocation&&b.location.u()&&a.lf(b.location);return a}; +vg.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Cf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof S){if(!b.computesBoundsIncludingLinks)continue;if(Lj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};oa.Object.defineProperties(vg.prototype,{padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,vg,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.g("padding",b,a),this.w())}}});vg.className="Placeholder"; -function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Up;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); -S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Gp(b);a=a.toPort;null!==a&&Gp(a)}; -t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Vp||a===Wp||a===Xp?this.adjusting=a:a!==Up&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new tl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Jj(a)||Kj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Jj(a)||Kj(a))?!1:!0};t.Ov=function(){return!1}; -t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case zn:a=b;break;case rn:a=b+90;break;case tn:a=b-90;break;case Yp:a=b+180;break;case An:a=L.pp(b);90a&&(a-=180);break;case sn:a=L.pp(b+90);90a&&(a-=180);break;case un:a=L.pp(b-90);90a&&(a-=180);break;case vn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; -function Ap(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&vp(c,a);a.Lh=b;null!==b&&up(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Kp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} -t.hp=function(a){U.prototype.hp.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Ip(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Ip(c,this,d)}$p(this)}};t.ip=function(a){U.prototype.ip.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}}; +function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Vp;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); +S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Hp(b);a=a.toPort;null!==a&&Hp(a)}; +t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Wp||a===Xp||a===Yp?this.adjusting=a:a!==Vp&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new vl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Mj(a)||Nj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Mj(a)||Nj(a))?!1:!0};t.Ov=function(){return!1}; +t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case Bn:a=b;break;case tn:a=b+90;break;case vn:a=b-90;break;case Zp:a=b+180;break;case Cn:a=L.pp(b);90a&&(a-=180);break;case un:a=L.pp(b+90);90a&&(a-=180);break;case wn:a=L.pp(b-90);90a&&(a-=180);break;case xn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; +function Bp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&wp(c,a);a.Lh=b;null!==b&&vp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; +t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Lp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} +t.hp=function(a){U.prototype.hp.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}};t.ip=function(a){U.prototype.ip.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Kp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Kp(c,this,d)}bq(this)}}; t.Xj=function(){this.md=!0;if(null!==this.Cd){var a=this.diagram;if(null!==a)for(var b=this.Cd.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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.free(a));qf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.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)}; S.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};S.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; S.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Cb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===og))return this.Ba.ev(.5,a),a.add(this.i(0)),c=this.Ba.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===og){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);L.tx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);L.tx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1659,41 +1660,41 @@ t.kd=function(a,b){G&&(x(b,K,S,"setPoint"),b.u()||v("Link.setPoint called with a t.dA=function(a,b){G&&(x(b,K,S,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,b)};t.m=function(a,b,c){G&&(D(b,S,"insertPointAt:x"),D(c,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,new K(b,c))}; t.ve=function(a){G&&(x(a,K,S,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(a)};t.Kf=function(a,b){G&&(D(a,S,"insertPointAt:x"),D(b,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(new K(a,b))}; t.Ev=function(a){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.sb(a)};t.Rj=function(){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.clear()}; -function qf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),bm(a));d?bq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),dm(a));d?cq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Fb&&$h(g.animationManager,a,e);a.g("points",f,e)}}t.Fh=function(){null===this.Zc&&(this.Zc=this.Tb,this.Tb=this.Tb.copy())}; -t.Lf=function(){if(null!==this.Zc){for(var a=this.Zc,b=this.Tb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+q,y=m*(u-q)+r);q=f.x+2*h/3;r=f.y+2*k/3;var w=q,z=r;L.C(k,0)?z=0k?-1:1)*n+q,z=m*(w-q)+r);this.Rj();this.ve(f);this.Kf(u,y);this.Kf(w,z);this.ve(p);this.kd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.kd(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.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(gq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(gq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= +p+1)),0>g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(hq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(hq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(q-=m?90:30,0>A&&(q-=180)),0>q?q+=360:360<=q&&(q-=360),l&&(y+=Math.abs(A)*(m?1:2)),0===q?r=y:90===q?u=y:180===q?r=-y:270===q?u=-y:(r=y*Math.cos(q*Math.PI/180),u=y*Math.sin(q*Math.PI/180)),g.pc()&&l&&(y=b.la(Ic,K.alloc()),w=K.allocAt(y.x+1E3*r,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,w,!0,n),K.free(y),K.free(w));y=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=w=0;if(m||!k||l){var E=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>A&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(E+=Math.abs(A)*(m?1:2));0===C?w=E:90===C?z=E:180===C?w=-E:270===C?z=-E:(w=E*Math.cos(C*Math.PI/180),z=E*Math.sin(C*Math.PI/180));c.pc()&&l&&(c=e.la(Ic,K.alloc()),g=K.allocAt(c.x+1E3*w,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+r,n.y+u);g=y;if(m||!k||l)g=new K(y.x+w,y.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +n,f-2,g)?this.kd(f-1,y):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} S.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.Ae()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.we;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.dk(e,d,g,c,f);null!== -a&&f.transform(a);return f};function iq(a,b){var c=b.mo;null===c&&(c=new jq,c.port=b,c.node=b.part,b.mo=c);return kq(c,a)} -S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!fq(c))return b.la(c,h),h;if(c.fd()){var k=iq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===lq){var l=iq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= -b.la(gq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=hq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(gq(k),f),e&&(g=hq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?hq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(fq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=iq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; -S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===gd?zc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===gd?zc:b));return a};function fq(a){return a===zc||.5===a.x&&.5===a.y}function gq(a){return.5===a.x&&.5===a.y?a:Ic} -S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); -if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Pf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;qo(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),qo(m,y,w,z)?r=!0:(w.x= -h,w.y=q,w.transform(A),qo(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),qo(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=xl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; +a&&f.transform(a);return f};function jq(a,b){var c=b.mo;null===c&&(c=new kq,c.port=b,c.node=b.part,b.mo=c);return lq(c,a)} +S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!gq(c))return b.la(c,h),h;if(c.fd()){var k=jq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===mq){var l=jq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +b.la(hq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=iq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(hq(k),f),e&&(g=iq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; +S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?iq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(gq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=jq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===hd?xc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===hd?xc:b));return a};function gq(a){return a===xc||.5===a.x&&.5===a.y}function hq(a){return.5===a.x&&.5===a.y?a:Ic} +S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); +if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Of)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;ro(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),ro(m,y,w,z)?r=!0:(w.x= +h,w.y=q,w.transform(A),ro(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),ro(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=zl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; S.prototype.computeCurve=function(){if(null===this.hg){var a=this.fromPort,b=this.isOrthogonal;this.hg=null!==a&&a===this.toPort&&!b}return this.hg?og:this.curve};S.prototype.computeCorner=function(){if(this.curve===og)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; S.prototype.findMidLabel=function(){for(var a=this.path,b=this.S.s,c=b.length,d=0;dk?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Xp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(oq,oq);k.Hc(oq,oq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this.isOrthogonal){if(e===Xp)return!1;e===Yp&&(e=Wp)}switch(e){case Xp:var f=this.i(a),g=this.i(c);if(!f.cb(b)||!g.cb(d)){e=f.x;f=f.y;var h=g.x-e,k=g.y-f,l=Math.sqrt(h*h+k*k);if(!L.ca(l,0)){if(L.ca(h,0))var m=0>k?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Yp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(pq,pq);k.Hc(pq,pq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.ha(a)||h.ha(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(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,m.x=l.x, @@ -1703,697 +1704,697 @@ c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ha(a)||h.ha(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=rq&&(Ck(q),h.Hc(q.To*q.Yx,q.So*q.Zx),pq(q,a,b,n,d,h,!1),k=qq(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=sq&&(Fk(q),h.Hc(q.To*q.Yx,q.So*q.Zx),qq(q,a,b,n,d,h,!1),k=rq(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.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)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=q.To/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!==r&&(0===d||180===d?this.Kf(f.x,r.y):this.Kf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ve(l.copy()),this.ve(m.copy()));K.free(l);K.free(m)}}; S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).fd()||this.computeSpot(!1,this.toPort).fd()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function gk(a){if(null===a.diagram||!a.isAvoiding||!xk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=yk(a.diagram,!0,a.containingGroup,null);for(var d=1;dtq&&qq(b,m,n)!==l-1&&(qq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):qq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):qq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):qq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>tq&&qq(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>tq)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>tq&&(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),qq(b,g,m)===l-1?sq(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),qq(b,g,m)===l-1&&sq(a,b,g,m,f,!1,f)));a.Kf(c,d)} +function jk(a){if(null===a.diagram||!a.isAvoiding||!Ak(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=Bk(a.diagram,!0,a.containingGroup,null);for(var d=1;duq&&rq(b,m,n)!==l-1&&(rq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):rq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):rq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):rq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>uq&&rq(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>uq)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>uq&&(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),rq(b,g,m)===l-1?tq(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),rq(b,g,m)===l-1&&tq(a,b,g,m,f,!1,f)));a.Kf(c,d)} S.prototype.zz=function(a){G&&x(a,K,S,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Kb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;kthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;ky?r>q?(f.x=w-A,f.y=q-A,e.x=w+u,e.y=q+u):(f.x=w-A,f.y=q+A,e.x=w+u,e.y=q-u):r>q?(f.x=w+A,f.y=q-A,e.x=w-u,e.y=q+u):(f.x=w+A,f.y=q+A,e.x=w-u,e.y=q-u));L.ca(y,w)&&L.ca(q,r)&&(q>p?(z>w?(f.x=w-A,f.y=q-A,e.x=w+u):(f.x=w+A,f.y=q-A,e.x=w-u),e.y=q+u):(z>w?(f.x=w-A,f.y=q+A,e.x=w+u):(f.x=w+A,f.y=q+A,e.x=w-u),e.y=q-u));if(L.ca(y,w)&&L.ca(w,z)||L.ca(p,q)&&L.ca(q,r))y=.5*(y+z),p=.5*(p+r),f.x=y,f.y=p,e.x=y,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ca(g.x,this.i(0).x)&& -L.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));Kd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb));l=.5*(l+m.x);g=.5*(g+m.y);Kd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}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=uq(this,g.copy(),!1,yb)),Kd(h,f.x-d,f.y-k,e.x-d, -e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb)),xq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);xq(this,h,n,y,f,w,u);K.free(w);Ld(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(xq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),xq(this,h,n,y,f,w,u),K.free(w),Ld(h,p.x+n,p.y+y,q+n,z+y),f.h(q, -z))):(xq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Od=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=uq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=uq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; -function wq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} -function uq(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=wq(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=wq(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 vq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 xq(a,b,c,d,e,f,g){if(!g&&Zp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=yq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Jd(b,n,q,!1):Kd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Jd(b,q,m,!1):Kd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} -function yq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& -L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function Zp(a){a=a.curve;return a===jg||a===kg}function cq(a,b){if(b||Zp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} -S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;h=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=vq(this,g.copy(),!1,xb)),Hd(h,f.x-d,f.y-k,e.x-d, +e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=vq(this,m.copy(),!1,xb)),yq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);yq(this,h,n,y,f,w,u);K.free(w);Id(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(yq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),yq(this,h,n,y,f,w,u),K.free(w),Id(h,p.x+n,p.y+y,q+n,z+y),f.h(q, +z))):(yq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Ld=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=vq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=vq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; +function xq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} +function vq(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=xq(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=xq(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 wq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 yq(a,b,c,d,e,f,g){if(!g&&$p(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=zq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Gd(b,n,q,!1):Hd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Gd(b,q,m,!1):Hd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function zq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& +L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function $p(a){a=a.curve;return a===jg||a===kg}function dq(a,b){if(b||$p(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} +S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",S,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),this.ib())}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",S,"fromShortLength"), -this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:gd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Gp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, +this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Hp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, "number",S,"toEndSegmentLength"),0>a&&Ba(a,">= 0",S,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),this.ib())}},toShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Kj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",S,"toShortLength"),this.cd(),this.fa.Kj=a,this.xc(),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.Cd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.lf(f),e=2;ed&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); +a.x,c-a.y)}return a}},midPoint:{configurable:!0,get:function(){this.Hg();return this.computeMidPoint(new K)}},midAngle:{configurable:!0,get:function(){this.Hg();return this.computeMidAngle()}},flattenedLengths:{configurable:!0,get:function(){if(null===this.qq){this.md||cq(this);for(var a=this.qq=[],b=this.pointsCount,c=0;cd&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); a.push(d)}}return this.qq}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.It;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;dthis.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!fq(this.computeSpot(!0))?1:0}}, -lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!fq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Vp&&a!==Wp&&a!==Xp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, -set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),cq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, -set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Up&&a!==Cq&&a!==Dq&&a!==lq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),cq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +enumerable:!0,get:function(){return 4===(this.Dj.value&4)}},xk:{configurable:!0,get:function(){return 0!==(this.Va&128)},set:function(a){0!==(this.Va&128)!==a&&(this.Va^=128)}},geometry:{configurable:!0,get:function(){if(!this.xk){this.Hg();if(2>this.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!gq(this.computeSpot(!0))?1:0}}, +lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!gq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Wp&&a!==Xp&&a!==Yp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, +set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),dq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, +set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Vp&&a!==Dq&&a!==Eq&&a!==mq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),dq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, get:function(){return this.Bo},set:function(a){var b=this.Bo;b!==a&&(G&&B(a,"number",S,"smoothness"),this.Bo=a,this.xc(),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.Ei())return a.model.Gc(this.data)}}});S.prototype.invalidateOtherJumpOvers=S.prototype.jp;S.prototype.findClosestSegment=S.prototype.zz;S.prototype.updateRoute=S.prototype.Hg;S.prototype.invalidateRoute=S.prototype.ib;S.prototype.rollbackRoute=S.prototype.Gv; S.prototype.commitRoute=S.prototype.Lf;S.prototype.startRoute=S.prototype.Fh;S.prototype.clearPoints=S.prototype.Rj;S.prototype.removePoint=S.prototype.Ev;S.prototype.addPointAt=S.prototype.Kf;S.prototype.addPoint=S.prototype.ve;S.prototype.insertPointAt=S.prototype.m;S.prototype.insertPoint=S.prototype.dA;S.prototype.setPointAt=S.prototype.O;S.prototype.setPoint=S.prototype.kd;S.prototype.getPoint=S.prototype.i;S.prototype.getOtherPort=S.prototype.Wz;S.prototype.getOtherNode=S.prototype.fp; -var dq=null,eq=null,Up=new F(S,"Normal",1),Cq=new F(S,"Orthogonal",2),Dq=new F(S,"AvoidsNodes",6),lq=new F(S,"AvoidsNodesStraight",7),lg=new F(S,"None",0),og=new F(S,"Bezier",9),kg=new F(S,"JumpGap",10),jg=new F(S,"JumpOver",11),Vp=new F(S,"End",17),Wp=new F(S,"Scale",18),Xp=new F(S,"Stretch",19),zn=new F(S,"OrientAlong",21),rn=new F(S,"OrientPlus90",22),tn=new F(S,"OrientMinus90",23),Yp=new F(S,"OrientOpposite",24),An=new F(S,"OrientUpright",25),sn=new F(S,"OrientPlus90Upright",26),un=new F(S,"OrientMinus90Upright", -27),vn=new F(S,"OrientUpright45",28),nq=16,mq=14,oq=8;S.className="Link";S.Normal=Up;S.Orthogonal=Cq;S.AvoidsNodes=Dq;S.AvoidsNodesStraight=lq;S.None=lg;S.Bezier=og;S.JumpGap=kg;S.JumpOver=jg;S.End=Vp;S.Scale=Wp;S.Stretch=Xp;S.OrientAlong=zn;S.OrientPlus90=rn;S.OrientMinus90=tn;S.OrientOpposite=Yp;S.OrientUpright=An;S.OrientPlus90Upright=sn;S.OrientMinus90Upright=un;S.OrientUpright45=vn;S.EndSegmentStep=8;S.CurvinessStart=nq;S.SpacingMin=mq;S.OrthoShortCut=oq; -function Bq(a,b,c,d){Ya(this);this.Pe=this.Dq=!1;this.Qs=a;this.hy=b;this.rv=c;this.iy=d;this.links=[]}Bq.prototype.fm=function(){if(!this.Dq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=tq&&(c[d]=Eq)} -zk.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; -function Fq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=tq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h, -k)}}function Gq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=tq;for(a.gc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(Gq(a,h,k,q,c,f,b,n,p),Gq(a,h,k,1,!c,f,b,n,p),Gq(a,h,k,-1,!c,f,b,n,p)):Gq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(Hq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Hq(a,l,m,1,!(90===e||270===e),f,b,n,p),Hq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Hq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Iq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=tq;e=c[c.length-2];g=c[c.length-1];d[e][g]= -a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Jq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Jq){g.push(k);g.push(l);if(Iq(a,k,l, -m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Jq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -oa.Object.defineProperties(zk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}jq.prototype.fm=function(){this.xe.length=0}; -function kq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Df?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(Ac,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Kq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Lq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= -n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(jq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;f=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=uq&&(c[d]=Fq)} +Ck.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Hk)return!1}return!0}; +function Gq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=uq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h, +k)}}function Hq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Hk,m=uq;for(a.gc[b][c]=m;l===Hk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Hk?(Hq(a,h,k,q,c,f,b,n,p),Hq(a,h,k,1,!c,f,b,n,p),Hq(a,h,k,-1,!c,f,b,n,p)):Hq(a,h,k,q,c,h,k,h,k);d[l][m]===Hk?(Iq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Iq(a,l,m,1,!(90===e||270===e),f,b,n,p),Iq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Iq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Jq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=uq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Kq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Kq){g.push(k);g.push(l);if(Jq(a,k,l, +m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Kq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} +oa.Object.defineProperties(Ck.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}kq.prototype.fm=function(){this.xe.length=0}; +function lq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Cf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(yc,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Lq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Mq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= +n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(kq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:q>Math.abs(A)?(z=Math.abs(A)/q,q=Math.abs(A)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(A)?(z=Math.abs(A)/ -m,m=Math.abs(A)):z=1}w=0}var H=C.mp;if(d===Rp){C=C.link.computeThickness();C*=z;H.set(E);switch(r){case 8:H.x=E.x+u/2+p/2-w-C/2;break;case 2:H.y=E.y+A/2+q/2-w-C/2;break;case 1:H.x=E.x+u/2-n/2+w+C/2;break;default:case 4:H.y=E.y+A/2-m/2+w+C/2}w+=C}else{var T=.5;d===Cp&&(T=(C.gp+1)/(C.Ul+1));H.x=E.x+u*T;H.y=E.y+A*T}}}K.free(h);K.free(k);K.free(g);K.free(l);E=a.xe;for(f=0;fb.Tc?1:a.angleb.angle?1:0}; -jq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,zc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.yb.Tc?1:a.angleb.angle?1:0}; +kq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,xc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Gi.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)&&(Oq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Df&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Df&&a.Ch?!0:!1};function Nq(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 Df?null===k.layout?Nq(a,b,k.memberParts,!1,e,f,g,h):(Oq(k),b.add(k)):(Oq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Oq(k),b.add(k)))}} -function Oq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Nq(this,b,a.nodes,!0,null,!0,!0,!0),Nq(this,b,a.links,!0,null,!0,!0,!0),Nq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Df?Nq(this,b,a.memberParts,!1,null,!0,!0,!0):Nq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Gi.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.la(Ac),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; -oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Df,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, +Gi.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,this.Ch,!0,!1,!0),Oq(this,b,a.parts,!0,this.Ch,!0,!1,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,this.Ch,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Gi.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)&&(Pq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Cf&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Cf&&a.Ch?!0:!1};function Oq(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 Cf?null===k.layout?Oq(a,b,k.memberParts,!1,e,f,g,h):(Pq(k),b.add(k)):(Pq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Pq(k),b.add(k)))}} +function Pq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,null,!0,!0,!0),Oq(this,b,a.links,!0,null,!0,!0,!0),Oq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,null,!0,!0,!0):Oq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Gi.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.la(yc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; +oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Cf,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",Gi,"isInitial");this.Sh=a;a||(this.Jn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn!==a&&(B(a,"boolean",Gi,"isViewportSized"),(this.Kn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.Hn},set:function(a){this.Hn!==a&&(B(a,"boolean",Gi,"isRouting"),this.Hn=a)}},isRealtime:{configurable:!0,get:function(){return this.Gn}, -set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Mq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, +set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Nq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, set:function(a){this.Rm!==a&&(null!==a&&B(a,"function",Gi,"boundsComputation"),this.Rm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.Nm},set:function(a){x(a,K,Gi,"arrangementOrigin");this.Nm.D(a)||(this.Nm.assign(a),this.F())}}});Gi.prototype.collectParts=Gi.prototype.vx;Gi.prototype.getLayoutBounds=Gi.prototype.Ai;Gi.prototype.invalidateLayout=Gi.prototype.F;Gi.className="Layout"; -function Mq(a){Ya(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Yc=a;this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}Mq.prototype.clear=function(){if(this.If)for(var a=this.If.iterator;a.next();)a.value.clear();if(this.Ie)for(a=this.Ie.iterator;a.next();)a.value.clear();this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}; -Mq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Pq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, -set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Pq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Df)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Pq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Pq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Pq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Pq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, +Nq.prototype.findGroupVertex=function(a){if(null===a)return null;var b=a.findVisibleNode();if(null===b)return null;a=this.xi(b);if(null!==a)return a;for(b=b.containingGroup;null!==b;){a=this.xi(b);if(null!==a)return a;b=b.containingGroup}return null};t=Nq.prototype;t.oh=function(a){if(null!==a){G&&x(a,Qq,Nq,"addVertex:vertex");this.If.add(a);var b=a.node;null!==b&&this.Rs.add(b,a);a.network=this}}; +t.Ol=function(a){if(null===a)return null;G&&x(a,V,Nq,"addNode:node");var b=this.xi(a);null===b&&(b=this.createVertex(),b.node=a,this.oh(b));return b};t.Wu=function(a){if(null!==a&&(G&&x(a,Qq,Nq,"deleteVertex:vertex"),Sq(this,a))){for(var b=a.Fg,c=b.count-1;0<=c;c--){var d=b.P(c);this.Yj(d)}b=a.yg;for(a=b.count-1;0<=a;a--)c=b.P(a),this.Yj(c)}};function Sq(a,b){if(null===b)return!1;var c=a.If.remove(b);c&&(b=b.node,null!==b&&a.Rs.remove(b));return c} +t.qz=function(a){null!==a&&(G&&x(a,V,Nq,"deleteNode:node"),a=this.xi(a),null!==a&&this.Wu(a))};t.xi=function(a){if(null===a)return null;G&&x(a,V,Nq,"findVertex:node");return this.Rs.L(a)};t.No=function(a){if(null!==a){G&&x(a,Rq,Nq,"addEdge:edge");Tq(this,a);var b=a.toVertex;null!==b&&b.Pl(a);b=a.fromVertex;null!==b&&b.Ml(a)}};function Tq(a,b){if(null!==b){a.Ie.add(b);var c=b.link;null!==c&&null===a.Xo(c)&&a.Ms.add(c,b);b.network=a}} +t.Uy=function(a){if(null===a)return null;G&&x(a,S,Nq,"addLink:link");var b=a.fromNode,c=a.toNode,d=this.Xo(a);null===d?(d=this.createEdge(),d.link=a,null!==b&&(d.fromVertex=this.Ol(b)),null!==c&&(d.toVertex=this.Ol(c)),this.No(d)):(null!==b?d.fromVertex=this.Ol(b):d.fromVertex=null,null!==c?d.toVertex=this.Ol(c):d.toVertex=null);return d};t.Yj=function(a){if(null!==a){G&&x(a,Rq,Nq,"deleteEdge:edge");var b=a.toVertex;null!==b&&b.Yl(a);b=a.fromVertex;null!==b&&b.Xl(a);Uq(this,a)}}; +function Uq(a,b){null!==b&&a.Ie.remove(b)&&(b=b.link,null!==b&&a.Ms.remove(b))}t.pz=function(a){null!==a&&(G&&x(a,S,Nq,"deleteLink:link"),a=this.Xo(a),null!==a&&this.Yj(a))};t.Xo=function(a){if(null===a)return null;G&&x(a,S,Nq,"findEdge:link");return this.Ms.L(a)}; +t.jk=function(a,b,c){if(null===a||null===b)return null;G&&(x(a,Qq,Nq,"linkVertexes:fromVertex"),x(b,Qq,Nq,"linkVertexes:toVertex"),null!==c&&x(c,S,Nq,"linkVertexes:link"));if(a.network===this&&b.network===this){var d=this.createEdge();d.link=c;d.fromVertex=a;d.toVertex=b;this.No(d);return d}return null};t.um=function(a){if(null!==a){G&&x(a,Rq,Nq,"reverseEdge:edge");var b=a.fromVertex,c=a.toVertex;null!==b&&null!==c&&(b.Xl(a),c.Yl(a),a.um(),b.Pl(a),c.Ml(a))}}; +t.Wo=function(){for(var a=Na(),b=this.Ie.iterator;b.next();){var c=b.value;c.fromVertex===c.toVertex&&a.push(c)}b=a.length;for(c=0;cb?1:0):1:null!==b?-1:0} +oa.Object.defineProperties(Qq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, +set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Qq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Cf)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Qq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Qq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Qq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Qq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},width:{configurable:!0, -enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Mq,Pq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); +enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Nq,Qq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Fg.iterator}},destinationEdges:{configurable:!0, -enumerable:!0,get:function(){return this.yg.iterator}},edges:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Fg.count+this.yg.count}}});Pq.prototype.deleteDestinationEdge=Pq.prototype.Xl;Pq.prototype.addDestinationEdge=Pq.prototype.Ml;Pq.prototype.deleteSourceEdge=Pq.prototype.Yl; -Pq.prototype.addSourceEdge=Pq.prototype.Pl;Pq.className="LayoutVertex";Pq.standardComparer=Wq; -Pq.smartComparer=function(a,b){G&&x(a,Pq,Pq,"smartComparer:m");G&&x(b,Pq,Pq,"smartComparer:n");if(null!==a){if(null!==b){a=a.di;var c=b.di;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ka("Layout");d=[];switch(this.alignment){case er:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= -m=0;nf-1|| -0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case dr:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case dr:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Xq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(cl.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",cl,"wrappingWidth"),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.Ka("Layout");d=[];switch(this.alignment){case fr:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +m=0;nf-1|| +0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case er:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case er:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Yq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} +oa.Object.defineProperties(el.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",el,"wrappingWidth"),0n)){var u=n+Jn(r);r.wc(u,!0);Vn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; -Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;dn)){var u=n+Ln(r);r.wc(u,!0);Xn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; +Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new ab;e.add("[");c&&1d)return;Ma(a.Nc,d)}Rr(a,"nodeDataArray",se,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;c=d)return"[]";var e=new bb;e.add("[");c&&1d)return;Ma(a.Nc,d)}Sr(a,"nodeDataArray",ue,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Rr(this,"",re,"",a,null,c,null,b)}; -t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Rr(this,"",se,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Wn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; -t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Wn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Rr(this,"nodeCategory",pe,c,a,d,b))}else ik(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} -function Mr(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 Mr(a,b.constructor);return typeof b}function Pr(a){return Wr[a]?Wr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Wn(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){G&&Fa("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){G&&Fa("property set error: "+d.toString())}} +X.prototype.setDataProperty=function(a,b,c){G&&(B(a,"object",X,"setDataProperty:data"),B(b,"string",X,"setDataProperty:propname"),""===b&&v("Model.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.hb(a)){if(b===this.nodeKeyProperty){this.ym(a,c);return}if(b===this.nodeCategoryProperty){this.xm(a,c);return}}else!Vr&&a instanceof P&&(Vr=!0,Fa('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Fa(" Is that really your intent?"));var d= +Yn(a,b);d!==c&&(lk(a,b,c),this.Ss(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.Po=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.Ry=function(a,b){this.Gs(a,-1,b)}; +t.Gs=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),D(b,X,"insertArrayItem:idx"),a===this.Nc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Sr(this,"",te,"",a,null,c,null,b)}; +t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Sr(this,"",ue,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Yn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Yn(a,c);void 0===d&&(d="");d!==b&&(lk(a,c,b),Sr(this,"nodeCategory",re,c,a,d,b))}else lk(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} +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 Qr(a){return Xr[a]?Xr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Yn(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){G&&Fa("property get error: "+d.toString())}return c} +function lk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;b!==a&&(B(a,"string",X,"name"),this.Ea=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.en},set:function(a){var b=this.en;b!==a&&(B(a,"string",X,"dataFormat"),this.en=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Sg},set:function(a){var b=this.Sg;b!==a&&(B(a,"boolean", -X,"isReadOnly"),this.Sg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(B(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Qa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(x(a,ue,X,"undoManager"),null!==b&&b.ky(this),this.o=a,null!==a&&a.ox(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.hh}, -set:function(a){B(a,"boolean",X,"skipsUndoManager");this.hh=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(Sr(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===se){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== -a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Yr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; -t.Px=function(a){return sr(this,a,!0)};t.Lv=function(a,b){Ar(this,a,b,!0)};t.Sx=function(a){return sr(this,a,!1)};t.Qv=function(a,b){Ar(this,a,b,!1)};function sr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Wn(b,a),void 0!==a))){if(ur(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function Ar(a,b,c,d){null===c&&(c=void 0);void 0===c||ur(c)||Aa(c,"number or string",Yr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Wn(b,e);f!==c&&(yr(a,f,b),ik(b,e,c),null===a.nc(c)&&zr(a,c,b),Rr(a,d?"linkFromKey":"linkToKey",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}}t.Qx=function(a){return rr(this,a,!0)};t.Mv=function(a,b){Br(this,a,b,!0)};t.Tx=function(a){return rr(this,a,!1)}; -t.Rv=function(a,b){Br(this,a,b,!1)};function rr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Wn(b,a);return void 0===b?"":b}function Br(a,b,c,d){B(c,"string",Yr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Wn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Rr(a,d?"linkFromPortId":"linkToPortId",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}} -t.Qf=function(a){if(null===a)return as;var b=this.pe;if(""===b)return as;a=Wn(a,b);return void 0===a?as:a};t.Ys=function(a,b){Ia(b,Yr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);void 0===d&&(d=as);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(yr(this,b,a),Rr(this,"linkLabelKeys",se,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Wn(a,b),void 0!==b)){if(ur(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&ur(b)||Aa(b,"number or string",Yr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);d!==b&&null===this.uh(b)&&(ik(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Rr(this,"linkKey",pe,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else ik(a,c,b)}}; -t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&ur(a)?this.Cb.L(a):null}; -t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;ik(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||wr(this,a,!0))};function wr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Rr(a,"linkDataArray",re,"linkDataArray",a,null,b,null,d);bs(a,b)} -t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Rr(a,"linkDataArray",se,"linkDataArray",a,b,null,d,null);c=sr(a,b,!0);yr(a,c,b);c=sr(a,b,!1);yr(a,c,b);d=a.Qf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ue){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== +a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Zr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),lk(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; +t.Px=function(a){return tr(this,a,!0)};t.Lv=function(a,b){Br(this,a,b,!0)};t.Sx=function(a){return tr(this,a,!1)};t.Qv=function(a,b){Br(this,a,b,!1)};function tr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Yn(b,a),void 0!==a))){if(vr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function Br(a,b,c,d){null===c&&(c=void 0);void 0===c||vr(c)||Aa(c,"number or string",Zr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Yn(b,e);f!==c&&(zr(a,f,b),lk(b,e,c),null===a.nc(c)&&Ar(a,c,b),Sr(a,d?"linkFromKey":"linkToKey",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}}t.Qx=function(a){return sr(this,a,!0)};t.Mv=function(a,b){Cr(this,a,b,!0)};t.Tx=function(a){return sr(this,a,!1)}; +t.Rv=function(a,b){Cr(this,a,b,!1)};function sr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Yn(b,a);return void 0===b?"":b}function Cr(a,b,c,d){B(c,"string",Zr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Yn(b,e);void 0===f&&(f="");f!==c&&(lk(b,e,c),Sr(a,d?"linkFromPortId":"linkToPortId",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}} +t.Qf=function(a){if(null===a)return bs;var b=this.pe;if(""===b)return bs;a=Yn(a,b);return void 0===a?bs:a};t.Ys=function(a,b){Ia(b,Zr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);void 0===d&&(d=bs);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(zr(this,b,a),Sr(this,"linkLabelKeys",ue,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Yn(a,b),void 0!==b)){if(vr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&vr(b)||Aa(b,"number or string",Zr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);d!==b&&null===this.uh(b)&&(lk(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Sr(this,"linkKey",re,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else lk(a,c,b)}}; +t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&vr(a)?this.Cb.L(a):null}; +t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){lk(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;lk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;lk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; +t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||xr(this,a,!0))};function xr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Sr(a,"linkDataArray",te,"linkDataArray",a,null,b,null,d);cs(a,b)} +t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Sr(a,"linkDataArray",ue,"linkDataArray",a,b,null,d,null);c=tr(a,b,!0);zr(a,c,b);c=tr(a,b,!1);zr(a,c,b);d=a.Qf(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 I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ss&&k===ts?h=es:h===ss&&k!==ts&&(h=this.arrangement);if((this.direction===ns||this.direction===os)&&this.sorting!==hs){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===ns?(this.arrangement===ss&&a.reverse(),d=new I,d.addAll(a), -d.addAll(c)):(this.arrangement===ss&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ss){isNaN(b)&&(b=6);if(h!==es&&h!==ss){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==ns&&this.direction!==os||d!==ss)if(this.direction===ns||this.direction===os){g=0;switch(d){case rs:g=180*ys(this,h,p,l,k)/Math.PI;break;case es:k=b=0;g=a.first();null!==g&&(b=vs(g,Math.PI/2));g=c.first(); -null!==g&&(k=vs(g,Math.PI/2));g=180*ys(this,h,p,l,n+(b+k)/2)/Math.PI;break;case qs:g=m/b.length}if(this.direction===ns){switch(d){case rs:zs(this,a,l,ps);break;case es:As(this,a,l,ps);break;case qs:Bs(this,a,m/2,l,ps)}switch(d){case rs:zs(this,c,l+g,gs);break;case es:As(this,c,l+g,gs);break;case qs:Bs(this,c,m/2,l+g,gs)}}else{switch(d){case rs:zs(this,c,l,ps);break;case es:As(this,c,l,ps);break;case qs:Bs(this,c,m/2,l,ps)}switch(d){case rs:zs(this,a,l+g,gs);break;case es:As(this,a,l+g,gs);break;case qs:Bs(this, -a,m/2,l+g,gs)}}}else switch(d){case rs:zs(this,b,l,this.direction);break;case es:As(this,b,l,this.direction);break;case qs:Bs(this,b,m,l,this.direction);break;case ss:Cs(this,b,m,l,this.direction)}else Cs(this,b,m,l-m/2,gs)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function Bs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===gs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Fs(a,k,l,m,n,e,f)||Gs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Fs(a,k,l,n,p,e,m)||Gs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function Gs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===gs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}ds.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -ds.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; -ds.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function xs(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} -function ws(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?xs(a,1,c,d,e):xs(a,1,c))}function ys(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} -ds.prototype.sort=function(a){switch(this.sorting){case ls:break;case ms:a.reverse();break;case js:a.sort(this.comparer);break;case ks:a.sort(this.comparer);a.reverse();break;case hs:return this.lk(Hs(a));default:v("Invalid sorting type.")}return a}; -function Hs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} -ds.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ts&&k===us?h=fs:h===ts&&k!==us&&(h=this.arrangement);if((this.direction===os||this.direction===ps)&&this.sorting!==is){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===os?(this.arrangement===ts&&a.reverse(),d=new I,d.addAll(a), +d.addAll(c)):(this.arrangement===ts&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ts){isNaN(b)&&(b=6);if(h!==fs&&h!==ts){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==os&&this.direction!==ps||d!==ts)if(this.direction===os||this.direction===ps){g=0;switch(d){case ss:g=180*zs(this,h,p,l,k)/Math.PI;break;case fs:k=b=0;g=a.first();null!==g&&(b=ws(g,Math.PI/2));g=c.first(); +null!==g&&(k=ws(g,Math.PI/2));g=180*zs(this,h,p,l,n+(b+k)/2)/Math.PI;break;case rs:g=m/b.length}if(this.direction===os){switch(d){case ss:As(this,a,l,qs);break;case fs:Bs(this,a,l,qs);break;case rs:Cs(this,a,m/2,l,qs)}switch(d){case ss:As(this,c,l+g,hs);break;case fs:Bs(this,c,l+g,hs);break;case rs:Cs(this,c,m/2,l+g,hs)}}else{switch(d){case ss:As(this,c,l,qs);break;case fs:Bs(this,c,l,qs);break;case rs:Cs(this,c,m/2,l,qs)}switch(d){case ss:As(this,a,l+g,hs);break;case fs:Bs(this,a,l+g,hs);break;case rs:Cs(this, +a,m/2,l+g,hs)}}}else switch(d){case ss:As(this,b,l,this.direction);break;case fs:Bs(this,b,l,this.direction);break;case rs:Cs(this,b,m,l,this.direction);break;case ts:Ds(this,b,m,l,this.direction)}else Ds(this,b,m,l-m/2,hs)}this.updateParts();this.network=null;this.isValidLayout=!0}; +function Cs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===hs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Gs(a,k,l,m,n,e,f)||Hs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Gs(a,k,l,n,p,e,m)||Hs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function Hs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===hs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}es.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +es.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; +es.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function ys(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +function xs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?ys(a,1,c,d,e):ys(a,1,c))}function zs(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +es.prototype.sort=function(a){switch(this.sorting){case ms:break;case ns:a.reverse();break;case ks:a.sort(this.comparer);break;case ls:a.sort(this.comparer);a.reverse();break;case is:return this.lk(Is(a));default:v("Invalid sorting type.")}return a}; +function Is(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} +es.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;cb[c[r]].indexOf(c[r===c.length-1?0:r+1])&&q.push(r===c.length-1?0:r+1);if(0===q.length)for(r=0;rc.indexOf(H)||Ec.indexOf(H)||E=u?E+1:E)),w+=E=u&&E++,A>=u&&A++,E>A&&(C=A,A=E,E=C),A-E<(c.length+2)/2===(Eq||q===m||(r=q>m?q-m:m-q,n+=qg-r?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.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,ds,ds,"arrangement"),a===ss||a===es||a===rs||a===qs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,ds,ds,"direction"), -a===gs||a===ps||a===ns||a===os)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,ds,ds,"sorting"),a===ls||a===ms||a===js||ks||a===hs)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",ds,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", -ds,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,ds,ds,"nodeDiameterFormula"),a===is||a===ts)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); -var es=new F(ds,"ConstantSpacing",0),rs=new F(ds,"ConstantDistance",1),qs=new F(ds,"ConstantAngle",2),ss=new F(ds,"Packed",3),gs=new F(ds,"Clockwise",4),ps=new F(ds,"Counterclockwise",5),ns=new F(ds,"BidirectionalLeft",6),os=new F(ds,"BidirectionalRight",7),ls=new F(ds,"Forwards",8),ms=new F(ds,"Reverse",9),js=new F(ds,"Ascending",10),ks=new F(ds,"Descending",11),hs=new F(ds,"Optimized",12),is=new F(ds,"Pythagorean",13),ts=new F(ds,"Circular",14);ds.className="CircularLayout";ds.ConstantSpacing=es; -ds.ConstantDistance=rs;ds.ConstantAngle=qs;ds.Packed=ss;ds.Clockwise=gs;ds.Counterclockwise=ps;ds.BidirectionalLeft=ns;ds.BidirectionalRight=os;ds.Forwards=ls;ds.Reverse=ms;ds.Ascending=js;ds.Descending=ks;ds.Optimized=hs;ds.Pythagorean=is;ds.Circular=ts;function fs(){this.cm=-Infinity;this.Gm=this.zk=null} -fs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Ns(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=a?this.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,es,es,"arrangement"),a===ts||a===fs||a===ss||a===rs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,es,es,"direction"), +a===hs||a===qs||a===os||a===ps)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,es,es,"sorting"),a===ms||a===ns||a===ks||ls||a===is)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",es,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", +es,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,es,es,"nodeDiameterFormula"),a===js||a===us)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); +var fs=new F(es,"ConstantSpacing",0),ss=new F(es,"ConstantDistance",1),rs=new F(es,"ConstantAngle",2),ts=new F(es,"Packed",3),hs=new F(es,"Clockwise",4),qs=new F(es,"Counterclockwise",5),os=new F(es,"BidirectionalLeft",6),ps=new F(es,"BidirectionalRight",7),ms=new F(es,"Forwards",8),ns=new F(es,"Reverse",9),ks=new F(es,"Ascending",10),ls=new F(es,"Descending",11),is=new F(es,"Optimized",12),js=new F(es,"Pythagorean",13),us=new F(es,"Circular",14);es.className="CircularLayout";es.ConstantSpacing=fs; +es.ConstantDistance=ss;es.ConstantAngle=rs;es.Packed=ts;es.Clockwise=hs;es.Counterclockwise=qs;es.BidirectionalLeft=os;es.BidirectionalRight=ps;es.Forwards=ms;es.Reverse=ns;es.Ascending=ks;es.Descending=ls;es.Optimized=is;es.Pythagorean=js;es.Circular=us;function gs(){this.cm=-Infinity;this.Gm=this.zk=null} +gs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ +p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Os(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mq&&(q=1);h=L.sqrt((h+q+l*l*4/(g*g))/q);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ss(a,b,c){G&&(x(b,Ls,Ks,"popNetwork:oldnet"),D(c,Ks,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.jf){var e=d.jf.P(d.Hv);d.ae=e.dt;var f=e.gw,g=e.hw;d.bounds=new M(d.centerX-f,d.centerY-g,e.et,e.ct);d.focus=new K(f,g);d.Hv--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ts(a,b,c){G&&(x(b,Vs,Ks,"surroundNode:oldnet"),D(c,Ks,"surroundNode:level"));var d=b.Tj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.jf&&0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} -function Ns(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= -0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Ws(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ys),r=d.random(), +function Os(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= +0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Xs(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Zs),r=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*r):kq?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ks.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ks.prototype.moveFixedVertex=function(){};Ks.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; -Ks.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=gd,b.toSpot=gd)}};Ks.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; -Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ks.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ks.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ks.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ks.prototype.electricalFieldX=function(){return 0};Ks.prototype.electricalFieldY=function(){return 0}; -Ks.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ks.prototype.gravitationalFieldX=function(){return 0};Ks.prototype.gravitationalFieldY=function(){return 0};Ks.prototype.isFixed=function(a){return a.isFixed}; -oa.Object.defineProperties(Ks.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ks,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ks,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, -get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ks,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ks,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ks,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, -set:function(a){this.nn!==a&&(B(a,"number",Ks,"epsilonDistance"),0n?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Zs),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ls.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ls.prototype.moveFixedVertex=function(){};Ls.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; +Ls.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=hd,b.toSpot=hd)}};Ls.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; +Ls.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ls.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ls.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ls.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ls.prototype.electricalFieldX=function(){return 0};Ls.prototype.electricalFieldY=function(){return 0}; +Ls.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ls.prototype.gravitationalFieldX=function(){return 0};Ls.prototype.gravitationalFieldY=function(){return 0};Ls.prototype.isFixed=function(a){return a.isFixed}; +oa.Object.defineProperties(Ls.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ls,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ls,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, +get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ls,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ls,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ls,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, +set:function(a){this.nn!==a&&(B(a,"number",Ls,"epsilonDistance"),0w&&0w&&0a[this.Sd]&&(this.Vq=a[c]-1,this.Sd=c),a[c]u||l===u&&p>r)&&h++;yl||u===l&&r>p)&&h++}}}}}if(0>=c)for(n=d[g].destinationEdgesArrayAccess,k=0;ku||l===u&&q>y)&&h++,rl||u===l&&y>q)&&h++);f[g*e+g]=h;for(h= g+1;h=c)for(n=d[g].destinationEdgesArrayAccess,A=d[h].destinationEdgesArrayAccess,k=0;k=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}kt(a,b,d);return f} -function st(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&st(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&st(a,k,c,d,e,f)}} -function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)tt(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)tt(a,b.value.fromVertex,c,d,e,f)}} -$s.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case ut:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==vt(a);){for(e=wt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=wt(a);for(e=xt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=xt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case at:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -yt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&yt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&st(a,h,0,-1,!0,!1)}for(st(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; -e=p.length;for(var q=0;q=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}lt(a,b,d);return f} +function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&tt(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&tt(a,k,c,d,e,f)}} +function ut(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)ut(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)ut(a,b.value.fromVertex,c,d,e,f)}} +at.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case vt:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==wt(a);){for(e=xt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=xt(a);for(e=yt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=yt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& +k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case bt:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +zt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&zt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&tt(a,h,0,-1,!0,!1)}for(tt(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; +e=p.length;for(var q=0;qf)&&!m&&(h=g,f=l)}if(0>d){for(c.reset();c.next();)d=c.value,1===d.component&&(d.layer-=e);b.component=0}else h.component=0}}} -function ht(a,b,c){return 90===a.N?c&&!b.rev||!c&&b.rev?270:90:180===a.N?c&&!b.rev||!c&&b.rev?0:180:270===a.N?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}function it(a,b,c){for(var d=c[c.length-1].sourceEdges.iterator;d.next();){var e=d.value;if(!e.rev&&e.valid){e=e.fromVertex;c.push(e);if(e===b||it(a,b,c))return!0;c.pop()}}return!1} -$s.prototype.initializeIndices=function(){switch(this.bl){default:case Ft:Gt(this);break;case ct:var a=null,b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();){var c=b.value;if(c.near&&(null===a&&(a=new vb),c.layer===c.near.layer)){var d=a.get(c.near)||[];d.push(c);a.set(c.near,d)}}for(c=this.Oa;0<=c;c--)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Ht(this,d,a);break;case It:a=null;b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();)c=b.value,c.near&& -(null===a&&(a=new vb),c.layer===c.near.layer&&(d=a.get(c.near)||[],d.push(c),a.set(c.near,d)));for(c=0;c<=this.Oa;c++)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Jt(this,d,a)}}; -function Gt(a){var b=null,c=a.network.vertexes.iterator;if(a._experimental){for(;c.next();){var d=c.value;if(d.near&&(null===b&&(b=new vb),d.layer===d.near.layer)){var e=b.get(d.near)||[];e.push(d);b.set(d.near,e)}}c.reset()}for(d={};c.next();)e=c.value,b&&e.near||(d.layer=e.layer,e.index=a.Ab[d.layer],a.Ab[d.layer]++,b&&(e=b.get(e),Array.isArray(e)&&e.forEach(function(b){return function(c){c.index=a.Ab[b.layer];a.Ab[b.layer]++}}(d)))),d={layer:d.layer}} -function Ht(a,b,c){if(!c||!b.near){var d=b.layer;b.index=a.Ab[d];a.Ab[d]++;if(c){var e=c.get(b);Array.isArray(e)&&e.forEach(function(b){b.index=a.Ab[d];a.Ab[d]++})}b=b.destinationEdgesArrayAccess;for(e=!0;e;){e=!1;for(var f=0;fh.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= -Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}break;default:case dt:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b): -(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}}nt(this,b)}; -function Kt(a,b,c){G&&(D(b,$s,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,$s,"medianBarycenterCrossingReduction:direction"));var d=jt(a,b),e=a.Ab[b],f=rt(a,b,c),g=qt(a,b,c);for(c=0;ch.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= +Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}break;default:case et:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b): +(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}}ot(this,b)}; +function Lt(a,b,c){G&&(D(b,at,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,at,"medianBarycenterCrossingReduction:direction"));var d=kt(a,b),e=a.Ab[b],f=st(a,b,c),g=rt(a,b,c);for(c=0;cf+1&&(p+=4*(z-f),q+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;zf+1&&(p+=4*(z-(f+1)),q+= 4*(z-f))}C=d[f+1].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;z>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= -0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=lt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=lt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ -C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}kt(a,b, -d);a.normalize()}function Ut(a,b){G&&(D(b,$s,"packAux:column"),D(1,$s,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} -function Vt(a,b){G&&(D(b,$s,"tightPackAux:column"),D(1,$s,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} -function Rt(a,b){G&&D(b,$s,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Ut(a,c););a.normalize();for(c=0;cf?nt(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=mt(a),f=pt(a),d=f+1;ff?nt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(tt(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;f>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= +0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=mt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=mt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ +C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}lt(a,b, +d);a.normalize()}function Vt(a,b){G&&(D(b,at,"packAux:column"),D(1,at,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} +function Wt(a,b){G&&(D(b,at,"tightPackAux:column"),D(1,at,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} +function St(a,b){G&&D(b,at,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Vt(a,c););a.normalize();for(c=0;cf?ot(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=nt(a),f=qt(a),d=f+1;ff?ot(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(ut(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;fc)for(g=a.Wa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -function St(a){for(var b=Na(),c=a.rl.length,d=0;d<=c;d++)b[d]=[];for(d=a.network.vertexes.iterator;d.next();){var e=d.value;b[c-e.layer][e.index]=e}c=new J;Xt(b,c);var f=null,g=null,h=null,k=null,l=0!==(a.Ee&1),m=0!==(a.Ee&2),n=0!==(a.Ee&4),p=0!==(a.Ee&8);l&&(a.verticalAlignment(b,c,!0),f=Yt(a,b,!0,!1));b.reverse();n&&(a.verticalAlignment(b,c,!1),h=Yt(a,b,!1,!1));d=ca(b);for(e=d.next();!e.done;e=d.next())e.value.reverse();p&&(a.verticalAlignment(b,c,!1),k=Yt(a,b,!1,!0));b.reverse();m&&(a.verticalAlignment(b, -c,!0),g=Yt(a,b,!0,!0));Pa(b);a.v(f,g,h,k);a.network.vertexes.each(function(a){var b=Na();l&&b.push(f.get(a));m&&b.push(g.get(a));n&&b.push(h.get(a));p&&b.push(k.get(a));b.sort(function(a,b){return a-b});var c=b.length;c=(b[Math.floor((c-1)/2)]+b[Math.ceil((c-1)/2)])/2;Pa(b);a.Fc=c})} -function Xt(a,b){for(var c=a.length,d=1;dm)&&b.add(n);f++}e= -m}}}$s.prototype.verticalAlignment=function(a,b,c){$t(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?Zt(f):au(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} -$s.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=eu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; -function eu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}$s.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=gt(this,!0),b=gt(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; -function gt(a,b){return 270===a.N?b?ld:od:90===a.N?b?od:ld:180===a.N?b?md:nd:b?nd:md} -$s.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0m)&&b.add(n);f++}e= +m}}}at.prototype.verticalAlignment=function(a,b,c){au(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?$t(f):bu(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} +at.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=fu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; +function fu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}at.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=ht(this,!0),b=ht(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; +function ht(a,b){return 270===a.N?b?md:pd:90===a.N?b?pd:md:180===a.N?b?nd:od:b?od:nd} +at.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+ n.bounds.height,b.m(u++,C,n+H),b.m(u++,C,n),b.m(u++,C,n-A)):(b.m(u++,C,E+H),b.m(u++,C,E),b.m(u++,C,E-A)):270===this.N?E<=n.bounds.y?(n=n.bounds.y,b.m(u++,C,n-A),b.m(u++,C,n),b.m(u++,C,n+H)):(b.m(u++,C,E-A),b.m(u++,C,E),b.m(u++,C,E+H)):0===this.N&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(u++,n+H,E),b.m(u++,n,E),b.m(u++,n-A,E)):(b.m(u++,C+H,E),b.m(u++,C,E),b.m(u++,C-A,E)));else{b.m(u++,w,z);var T=0;if(180===this.N||0===this.N){if(180===this.N?C>=n.bounds.right:C<=n.bounds.x)T=(0===this.N? -A:H)/2;b.m(u++,w+T,E)}else{if(270===this.N?E>=n.bounds.bottom:E<=n.bounds.y)T=(90===this.N?-A:H)/2;b.m(u++,C,z+T)}b.m(u++,C,E)}}else A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):90===this.N?(b.m(u++,C,E+H+r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):270===this.N?(b.m(u++,C,E-A- -r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):b.m(u++,C,E)}n=y}if(null===h||l!==zc||q)if(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,q)r=this.Rd[m.layer],180===this.N||0===this.N?(q=z,q>=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.x&&q<=m.bounds.right&&(270===this.N?E>=m.bounds.y:E<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-r:r),q=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(u- 2,n,z),b.O(u-1,n+H,z)):90===this.N&&E<=m.bounds.bottom?(n=m.bounds.y,b.O(u-2,w,n),b.O(u-1,w,n-A)):270===this.N&&E>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(u-2,w,n),b.O(u-1,w,n+H)):0===this.N&&C<=m.bounds.right&&(n=m.bounds.x,b.O(u-2,n,z),b.O(u-1,n-A,z));else{A=Math.max(10,this.ne[m.layer]);H=Math.max(10,this.Rd[m.layer]);q=0;if(180===this.N||0===this.N){if(180===this.N?C<=m.bounds.x:C>=m.bounds.right)q=(0===this.N?H:-A)/2;b.m(u++,C+q,z)}else{if(270===this.N?E<=m.bounds.y:E>=m.bounds.bottom)q= (90===this.N?H:-A)/2;b.m(u++,w,E+q)}b.m(u++,C,E)}}else{for(;null!==m&&m!==n;){A=y=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(y=w.toVertex,A=w.fromVertex,null!==A.node&&(A=null),null!==y.node)););if(null===y)break;y!==n&&(w=b.i(u-1).x,z=b.i(u-1).y,C=y.centerX,E=y.centerY,q?180===this.N||0===this.N?(null!==A?A.centerY:z)!==E&&(A=this.Ya[y.layer]+this.cg.x,u===b.firstPickIndex+1&&(A=0===this.N?Math.max(A,w):Math.min(A,w)),b.m(u++,A,z),b.m(u++,A,E)):(null!==A?A.centerX: w)!==C&&(A=this.Ya[y.layer]+this.cg.y,u===b.firstPickIndex+1&&(A=90===this.N?Math.max(A,z):Math.min(A,z)),b.m(u++,w,A),b.m(u++,C,A)):(A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):90===this.N?(b.m(u++,C,E-A-r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):270===this.N?(b.m(u++,C,E+H+ r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):180===this.N?(b.m(u++,C+H,E),b.m(u++,C-A,E)):90===this.N?(b.m(u++,C,E-A),b.m(u++,C,E+H)):270===this.N?(b.m(u++,C,E+H),b.m(u++,C,E-A)):(b.m(u++,C-A,E),b.m(u++,C+H,E))));m=y}q&&(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,180===this.N||0===this.N?z!==E&&(A=0===this.N? -Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===zc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===zc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), -b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===zc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===zc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), +Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===xc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===xc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), +b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===xc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===xc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), b.O(b.pointsCount-1,e.x,e.y)));b.Lf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -$s.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new I,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=this.linkSpacing)){for(var a=new I,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.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; -t.Ws=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,$s,"isApprox:a"),D(b,$s,"isApprox:b"));a-=b;return-1a}; +f.x+r,f.y),q.O(p.index+1,g.x+r,g.y),q.Lf()}f=e}a=d}}}};t=at.prototype;t.oy=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.layerb.layer?1:a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; +t.Ws=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,at,"isApprox:a"),D(b,at,"isApprox:b"));a-=b;return-1a}; t.Mi=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.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",$s,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== -a&&(B(a,"boolean",$s,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",$s,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, -maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var at=new F($s,"CycleDepthFirst",0),ut=new F($s,"CycleGreedy",1),ft=new F($s,"CycleFromLayers",2),bt=new F($s,"LayerOptimalLinkLength",0),zt=new F($s,"LayerLongestPathSink",1),Bt=new F($s,"LayerLongestPathSource",2),ct=new F($s,"InitDepthFirstOut",0),It=new F($s,"InitDepthFirstIn",1),Ft=new F($s,"InitNaive",2),Mt=new F($s,"AggressiveNone",0),dt=new F($s,"AggressiveLess",1),Nt=new F($s,"AggressiveMore",2),Ot=8; -$s.className="LayeredDigraphLayout";$s.CycleDepthFirst=at;$s.CycleGreedy=ut;$s.CycleFromLayers=ft;$s.LayerOptimalLinkLength=bt;$s.LayerLongestPathSink=zt;$s.LayerLongestPathSource=Bt;$s.InitDepthFirstOut=ct;$s.InitDepthFirstIn=It;$s.InitNaive=Ft;$s.AggressiveNone=Mt;$s.AggressiveLess=dt;$s.AggressiveMore=Nt;$s.PackNone=0;$s.PackExpand=1;$s.PackStraighten=2;$s.PackMedian=4;$s.PackAll=15;$s.AlignNone=0;$s.AlignUpperLeft=1;$s.AlignUpperRight=2;$s.AlignLowerLeft=4;$s.AlignLowerRight=8;$s.AlignAll=15; -function fu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}fu.className="SegInfo";function et(a){Mq.call(this,a)}na(et,Mq);et.prototype.createVertex=function(){return new gu(this)};et.prototype.createEdge=function(){return new hu(this)};et.className="LayeredDigraphNetwork";function gu(a){Pq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} -na(gu,Pq);function iu(a,b){return a.index-b.index}function bu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} -function Zt(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(iu);a.qo=b}return a.qo}function au(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(iu);a.oo=b}return a.oo}gu.prototype.Pl=function(a){Pq.prototype.Pl.call(this,a);this.po=this.qo=null}; -gu.prototype.Yl=function(a){Pq.prototype.Yl.call(this,a);this.po=this.qo=null};gu.prototype.Ml=function(a){Pq.prototype.Ml.call(this,a);this.no=this.oo=null};gu.prototype.Xl=function(a){Pq.prototype.Xl.call(this,a);this.no=this.oo=null}; -oa.Object.defineProperties(gu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",gu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",gu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",gu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(B(a,"number",gu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,gu,gu,"near"),this.G=a)}}});gu.prototype.deleteDestinationEdge=gu.prototype.Xl;gu.prototype.addDestinationEdge=gu.prototype.Ml;gu.prototype.deleteSourceEdge=gu.prototype.Yl;gu.prototype.addSourceEdge=gu.prototype.Pl;gu.className="LayeredDigraphVertex"; -function hu(a){Qq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(hu,Qq); -oa.Object.defineProperties(hu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,gu,hu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,gu,hu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",hu,"valid"),this.Na=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",hu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",hu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",hu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", -hu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",hu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",hu,"portToColOffset"),this.G=a)}}});hu.className="LayeredDigraphEdge"; -function Z(a){Gi.call(this);this.ac=new J;this.jo=ju;this.Ad=ku;this.Ho=lu;this.Oq=mu;this.ow=[];this.zd=!0;this.Yb=nu;this.fe=(new Gb(10,10)).freeze();var b=new ou(this);this.$=new pu(b);this.aa=new pu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; -Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new ou(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Df?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==qu&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ju&&null!==b?this.Ad=b.isTreePathToChildren?ku:ru:this.Ad=this.path===ju?ku:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} -Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,pu,Z,"removeChild:p");G&&x(b,pu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Yu(this,a,g,ha,w,z):Zu(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Mu:for(C=0;Cn&&(aawb&&(dv(a,-wb,0,la,ya-1),ev(C,-wb,0),ev(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(dv(a,0,-wb,la,ya-1),ev(C,0,-wb),ev(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Pu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=jv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=hv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=jv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=iv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< -R)e=$u(this,4),R=$u(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=$u(this,C.length+2);R=$u(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ +function kt(a,b){var c=a.Ab[b];if(c>=a.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",at,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== +a&&(B(a,"boolean",at,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",at,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, +maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var bt=new F(at,"CycleDepthFirst",0),vt=new F(at,"CycleGreedy",1),gt=new F(at,"CycleFromLayers",2),ct=new F(at,"LayerOptimalLinkLength",0),At=new F(at,"LayerLongestPathSink",1),Ct=new F(at,"LayerLongestPathSource",2),dt=new F(at,"InitDepthFirstOut",0),Jt=new F(at,"InitDepthFirstIn",1),Gt=new F(at,"InitNaive",2),Nt=new F(at,"AggressiveNone",0),et=new F(at,"AggressiveLess",1),Ot=new F(at,"AggressiveMore",2),Pt=8; +at.className="LayeredDigraphLayout";at.CycleDepthFirst=bt;at.CycleGreedy=vt;at.CycleFromLayers=gt;at.LayerOptimalLinkLength=ct;at.LayerLongestPathSink=At;at.LayerLongestPathSource=Ct;at.InitDepthFirstOut=dt;at.InitDepthFirstIn=Jt;at.InitNaive=Gt;at.AggressiveNone=Nt;at.AggressiveLess=et;at.AggressiveMore=Ot;at.PackNone=0;at.PackExpand=1;at.PackStraighten=2;at.PackMedian=4;at.PackAll=15;at.AlignNone=0;at.AlignUpperLeft=1;at.AlignUpperRight=2;at.AlignLowerLeft=4;at.AlignLowerRight=8;at.AlignAll=15; +function gu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}gu.className="SegInfo";function ft(a){Nq.call(this,a)}na(ft,Nq);ft.prototype.createVertex=function(){return new hu(this)};ft.prototype.createEdge=function(){return new iu(this)};ft.className="LayeredDigraphNetwork";function hu(a){Qq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} +na(hu,Qq);function ju(a,b){return a.index-b.index}function cu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} +function $t(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(ju);a.qo=b}return a.qo}function bu(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(ju);a.oo=b}return a.oo}hu.prototype.Pl=function(a){Qq.prototype.Pl.call(this,a);this.po=this.qo=null}; +hu.prototype.Yl=function(a){Qq.prototype.Yl.call(this,a);this.po=this.qo=null};hu.prototype.Ml=function(a){Qq.prototype.Ml.call(this,a);this.no=this.oo=null};hu.prototype.Xl=function(a){Qq.prototype.Xl.call(this,a);this.no=this.oo=null}; +oa.Object.defineProperties(hu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",hu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",hu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",hu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(B(a,"number",hu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,hu,hu,"near"),this.G=a)}}});hu.prototype.deleteDestinationEdge=hu.prototype.Xl;hu.prototype.addDestinationEdge=hu.prototype.Ml;hu.prototype.deleteSourceEdge=hu.prototype.Yl;hu.prototype.addSourceEdge=hu.prototype.Pl;hu.className="LayeredDigraphVertex"; +function iu(a){Rq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(iu,Rq); +oa.Object.defineProperties(iu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,hu,iu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,hu,iu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",iu,"valid"),this.Na=a)}},rev:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",iu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",iu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",iu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", +iu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",iu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",iu,"portToColOffset"),this.G=a)}}});iu.className="LayeredDigraphEdge"; +function Z(a){Gi.call(this);this.ac=new J;this.jo=ku;this.Ad=lu;this.Ho=mu;this.Oq=nu;this.ow=[];this.zd=!0;this.Yb=ou;this.fe=(new Gb(10,10)).freeze();var b=new pu(this);this.$=new qu(b);this.aa=new qu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; +Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new pu(this)}; +Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Cf?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; +Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==ru&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ku&&null!==b?this.Ad=b.isTreePathToChildren?lu:su:this.Ad=this.path===ku?lu:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} +Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,qu,Z,"removeChild:p");G&&x(b,qu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Zu(this,a,g,ha,w,z):$u(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Nu:for(C=0;Cn&&(aawb&&(ev(a,-wb,0,la,ya-1),fv(C,-wb,0),fv(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(ev(a,0,-wb,la,ya-1),fv(C,0,-wb),fv(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Qu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=kv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=iv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=kv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=jv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< +R)e=av(this,4),R=av(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=av(this,C.length+2);R=av(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ d,0),R[1].h(R[0].x,y),R[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])),R[0].h(0,u+y),R[1].h(d,R[0].y),R[2].xd?Yu(a,b,e,O,A,C):Zu(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Mu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Yu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Vu(b),m=0,n=0,p=0,q=0;qd?Zu(a,b,e,O,A,C):$u(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Nu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Zu(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Wu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=lv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=lv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} -function Zu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Vu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=mv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=mv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} +function $u(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Wu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=lv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=lv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Wu:return a.width>b?a.width:b;case Xu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Lu:case Bu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Mu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Pu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function iv(a,b,c){G&&x(a,pu,Z,"calculateSubheight:v");switch(a.alignment){case gv:case fv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Wu:return a.height>b?a.height:b;case Xu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Lu:case Bu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Mu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Pu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function jv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case fv:b/=2;c/=2;break;case gv:b/=2;c/=2;break;case Wu:c=b=0;break;case Xu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function av(a,b,c,d,e,f){G&&x(a,pu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=jv(b,c,d);dv(a,b.x,b.y,e,f)}function dv(a,b,c,d,e){G&&x(a,pu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} -function bv(a,b,c,d){G&&(x(b,pu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case ku:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case ru:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function ev(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= -0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, -k.y);f=$u(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length); -for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=$u(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=mv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=mv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Xu:return a.width>b?a.width:b;case Yu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Mu:case Cu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Nu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Qu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function jv(a,b,c){G&&x(a,qu,Z,"calculateSubheight:v");switch(a.alignment){case hv:case gv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Xu:return a.height>b?a.height:b;case Yu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Mu:case Cu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Nu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Qu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function kv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case gv:b/=2;c/=2;break;case hv:b/=2;c/=2;break;case Xu:c=b=0;break;case Yu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function bv(a,b,c,d,e,f){G&&x(a,qu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=kv(b,c,d);ev(a,b.x,b.y,e,f)}function ev(a,b,c,d,e){G&&x(a,qu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} +function cv(a,b,c,d){G&&(x(b,qu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case lu:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case su:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function fv(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= +0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, +k.y);f=av(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length); +for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=av(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,pu,Z,"computeLayerSpacing:v");var b=Vu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,qu,Z,"computeLayerSpacing:v");var b=Wu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.$.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(B(a,"number",Z,"nodeSpacing"),this.$.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(B(a,"number",Z,"layerSpacing"),this.$.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, -enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Su||a===Uu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, +enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Tu||a===Vu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, set:function(a){this.$.breadthLimit!==a&&(B(a,"number",Z,"breadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing},set:function(a){this.$.rowSpacing!==a&&(B(a,"number",Z,"rowSpacing"),this.$.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(B(a,"number",Z,"rowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(B(a,"number",Z,"commentSpacing"),this.$.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(B(a,"number",Z,"commentMargin"),this.$.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(B(a, "boolean",Z,"setsPortSpot"),this.$.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.$.portSpot},set:function(a){x(a,Hb,Z,"portSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(B(a,"boolean",Z,"setsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot}, -set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Gu||a===Hu||a===Iu||Ju)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= +set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Hu||a===Iu||a===Ju||Ku)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(B(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&($a(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, set:function(a){this.aa.nodeIndent!==a&&(B(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(B(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== a&&(B(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(B(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"alternateLayerSpacingParentOverlap"), -0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Su||a===Uu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Tu||a===Vu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(B(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(B(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, set:function(a){this.aa.commentSpacing!==a&&(B(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(B(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsPortSpot"), this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){x(a,Hb,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){x(a,Hb,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); -var ju=new F(Z,"PathDefault",-1),ku=new F(Z,"PathDestination",0),ru=new F(Z,"PathSource",1),Gu=new F(Z,"SortingForwards",10),Hu=new F(Z,"SortingReverse",11),Iu=new F(Z,"SortingAscending",12),Ju=new F(Z,"SortingDescending",13),fv=new F(Z,"AlignmentCenterSubtrees",20),gv=new F(Z,"AlignmentCenterChildren",21),Wu=new F(Z,"AlignmentStart",22),Xu=new F(Z,"AlignmentEnd",23),Lu=new F(Z,"AlignmentBus",24),Bu=new F(Z,"AlignmentBusBranching",25),Mu=new F(Z,"AlignmentTopLeftBus",26),Pu=new F(Z,"AlignmentBottomRightBus", -27),Su=new F(Z,"CompactionNone",30),Uu=new F(Z,"CompactionBlock",31),lu=new F(Z,"StyleLayered",40),Fu=new F(Z,"StyleLastParents",41),Eu=new F(Z,"StyleAlternating",42),Du=new F(Z,"StyleRootOnly",43),nu=new F(Z,"ArrangementVertical",50),nv=new F(Z,"ArrangementHorizontal",51),qu=new F(Z,"ArrangementFixedRoots",52),mu=new F(Z,"LayerIndividual",60),zu=new F(Z,"LayerSiblings",61),yu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=ju;Z.PathDestination=ku;Z.PathSource=ru; -Z.SortingForwards=Gu;Z.SortingReverse=Hu;Z.SortingAscending=Iu;Z.SortingDescending=Ju;Z.AlignmentCenterSubtrees=fv;Z.AlignmentCenterChildren=gv;Z.AlignmentStart=Wu;Z.AlignmentEnd=Xu;Z.AlignmentBus=Lu;Z.AlignmentBusBranching=Bu;Z.AlignmentTopLeftBus=Mu;Z.AlignmentBottomRightBus=Pu;Z.CompactionNone=Su;Z.CompactionBlock=Uu;Z.StyleLayered=lu;Z.StyleLastParents=Fu;Z.StyleAlternating=Eu;Z.StyleRootOnly=Du;Z.ArrangementVertical=nu;Z.ArrangementHorizontal=nv;Z.ArrangementFixedRoots=qu;Z.LayerIndividual=mu; -Z.LayerSiblings=zu;Z.LayerUniform=yu;function ou(a){Mq.call(this,a)}na(ou,Mq);ou.prototype.createVertex=function(){return new pu(this)};ou.prototype.createEdge=function(){return new pv(this)};ou.className="TreeNetwork"; -function pu(a){Pq.call(this,a);this.Z=!1;this.ob=null;this.v=[];this.tb=this.Na=this.G=this.oa=0;this.zd=null;this.W=new K(0,0);this.Ja=new Gb(0,0);this.ra=new K(0,0);this.wm=this.vm=this.KA=!1;this.yp=this.lp=null;this.td=Gu;this.od=Wq;this.Qb=0;this.Pb=gv;this.hr=this.gr=0;this.ir=20;this.oe=50;this.Nq=0;this.Up=Uu;this.Np=0;this.Br=25;this.Tp=this.Ar=10;this.Sp=20;this.Kr=!0;this.rr=gd;this.Jr=!0;this.Qp=gd}na(pu,Pq); -pu.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.td=a.sorting,this.od=a.comparer,this.Qb=a.angle,this.Pb=a.alignment,this.gr=a.nodeIndent,this.hr=a.nodeIndentPastParent,this.ir=a.nodeSpacing,this.oe=a.layerSpacing,this.Nq=a.layerSpacingParentOverlap,this.Up=a.compaction,this.Np=a.breadthLimit,this.Br=a.rowSpacing,this.Ar=a.rowIndent,this.Tp=a.commentSpacing,this.Sp=a.commentMargin,this.Kr=a.setsPortSpot,this.rr=a.portSpot,this.Jr=a.setsChildPortSpot,this.Qp=a.childPortSpot)}; -oa.Object.defineProperties(pu.prototype,{initialized:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"boolean",pu,"initialized"),this.Z=a)}},parent:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(G&&null!==a&&x(a,pu,pu,"parent"),this.ob=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",pu,"children:value");if(null!== -a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.xc;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;gthis.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};hb.prototype.Gd=function(){return this.next()}; -hb.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};hb.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};hb.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; -hb.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};hb.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; -hb.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};hb.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};hb.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; -oa.Object.defineProperties(hb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});hb.prototype.first=hb.prototype.first;hb.prototype.hasNext=hb.prototype.Gd;hb.prototype.next=hb.prototype.next;hb.prototype.reset=hb.prototype.reset;hb.className="ListIteratorBackwards"; -function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.fb,d=this.Cf;if(null!==d)for(;cthis.key)return!1;Da(a)}var b=--this.fb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.je();return!1};ib.prototype.Gd=function(){return this.next()}; +ib.prototype.first=function(){var a=this.Hb;this.wa=a.A;var b=a.s;this.fb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ib.prototype.any=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};ib.prototype.all=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0}; +ib.prototype.each=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=b.s,e=d.length;this.fb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};ib.prototype.map=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new I;a.s=d;a.Db();return a.iterator}; +ib.prototype.filter=function(a){var b=this.Hb;b.Tg=null;var c=b.A,d=[],e=b.s,f=e.length;this.fb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new I;a.s=d;a.Db();return a.iterator};ib.prototype.je=function(){this.key=-1;this.value=null;this.wa=-1;this.Hb.Tg=this};ib.prototype.toString=function(){return"ListIteratorBackwards("+this.fb+"/"+this.Hb.count+")"}; +oa.Object.defineProperties(ib.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Hb.s.length}}});ib.prototype.first=ib.prototype.first;ib.prototype.hasNext=ib.prototype.Gd;ib.prototype.next=ib.prototype.next;ib.prototype.reset=ib.prototype.reset;ib.className="ListIteratorBackwards"; +function I(a){Ya(this);this._isFrozen=!1;this.s=[];this.A=0;this.Tg=this.Xa=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.Db=function(){var a=this.A;a++;999999999a||a>=b.length)&&Ba(a,"0 <= i < length",I,"elt:i");return b[a]};t.get=function(a){return this.P(a)};t.jd=function(a,b){G&&D(a,I,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",I,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.jd(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]}; t.qc=function(){var a=this.s,b=a.length;return 0a||a>=b.length)&&Ba(a,"0 I.prototype.copy=function(){var a=new I,b=this.s;0=f)return this;(0>b||b>=e-1)&&Ba(b,"0 <= from < length",I,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a=e)for(c=d.slice(b),c.sort(a),a=b;a=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new gb(this)}},iteratorBackwards:{configurable:!0, -enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new hb(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; +oa.Object.defineProperties(I.prototype,{_dataArray:{configurable:!0,get:function(){return this.s}},count:{configurable:!0,get:function(){return this.s.length}},size:{configurable:!0,get:function(){return this.s.length}},length:{configurable:!0,get:function(){return this.s.length}},iterator:{configurable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0, +enumerable:!0,get:function(){if(0>=this.s.length)return eb;var a=this.Tg;return null!==a?(a.reset(),a):new ib(this)}}});I.prototype.reverse=I.prototype.reverse;I.prototype.sortRange=I.prototype.Mi;I.prototype.sort=I.prototype.sort;I.prototype.toSet=I.prototype.Xv;I.prototype.toArray=I.prototype.La;I.prototype.removeRange=I.prototype.removeRange;I.prototype.removeAt=I.prototype.sb;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.insertAt=I.prototype.Mb; I.prototype.pop=I.prototype.pop;I.prototype.last=I.prototype.qc;I.prototype.first=I.prototype.first;I.prototype.set=I.prototype.set;I.prototype.setElt=I.prototype.jd;I.prototype.get=I.prototype.get;I.prototype.elt=I.prototype.P;I.prototype.indexOf=I.prototype.indexOf;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.clear=I.prototype.clear;I.prototype.addAll=I.prototype.addAll;I.prototype.push=I.prototype.push;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.qa; I.prototype.freeze=I.prototype.freeze;I.className="List";function lb(a){this.qg=a;a.Xa=null;this.wa=a.A;this.ya=null}lb.prototype.reset=function(){var a=this.qg;a.Xa=null;this.wa=a.A;this.ya=null};lb.prototype.next=function(){var a=this.qg;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=b.value,this.key=b.key,!0;this.je();return!1};lb.prototype.Gd=function(){return this.next()}; lb.prototype.first=function(){var a=this.qg;this.wa=a.A;a=a.ja;if(null!==a){this.ya=a;var b=a.value;this.key=a.key;return this.value=b}return null};lb.prototype.any=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};lb.prototype.all=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; lb.prototype.each=function(a){var b=this.qg;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Ca;return this};lb.prototype.map=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Ca;return c.iterator};lb.prototype.filter=function(a){var b=this.qg;b.Xa=null;for(var c=new I,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Ca}return c.iterator}; lb.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.qg.Xa=this};lb.prototype.toString=function(){return null!==this.ya?"SetIterator@"+this.ya.value:"SetIterator"};oa.Object.defineProperties(lb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.qg.Zb}}});lb.prototype.first=lb.prototype.first;lb.prototype.hasNext=lb.prototype.Gd;lb.prototype.next=lb.prototype.next;lb.prototype.reset=lb.prototype.reset; lb.className="SetIterator";function J(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=J.prototype;t.Db=function(){var a=this.A;a++;999999999=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; +function mb(a){var b=a.__gohashid;void 0===b&&(b=ob++,a.__gohashid=b);return b}function jb(a){return a.__gohashid}oa.Object.defineProperties(J.prototype,{count:{configurable:!0,get:function(){return this.Zb}},size:{configurable:!0,get:function(){return this.Zb}},iterator:{configurable:!0,get:function(){if(0>=this.Zb)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new lb(this)}}});J.prototype.toList=J.prototype.Wv;J.prototype.toArray=J.prototype.La; J.prototype.clear=J.prototype.clear;J.prototype.retainAll=J.prototype.JA;J.prototype.removeAll=J.prototype.vp;J.prototype["delete"]=J.prototype.delete;J.prototype.remove=J.prototype.remove;J.prototype.first=J.prototype.first;J.prototype.containsAny=J.prototype.kz;J.prototype.containsAll=J.prototype.jz;J.prototype.has=J.prototype.has;J.prototype.contains=J.prototype.contains;J.prototype.addAll=J.prototype.addAll;J.prototype.add=J.prototype.add;J.prototype.thaw=J.prototype.qa;J.prototype.freeze=J.prototype.freeze; -var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=ib;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; +var ob=1;J.className="Set";J.uniqueHash=Ya;J.hashIdUnique=mb;J.hashId=jb;function pb(a){this.sa=a;this.wa=a.A;this.ya=null}pb.prototype.reset=function(){this.wa=this.sa.A;this.ya=null};pb.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key)return!1;Da(a)}var b=this.ya;b=null===b?a.ja:b.Ca;if(null!==b)return this.ya=b,this.value=this.key=a=b.key,!0;this.je();return!1};pb.prototype.Gd=function(){return this.next()}; pb.prototype.first=function(){var a=this.sa;this.wa=a.A;a=a.ja;return null!==a?(this.ya=a,this.value=this.key=a=a.key):null};pb.prototype.any=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d.key))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};pb.prototype.all=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d.key))return!1;b.A!==c&&Da(b);d=d.Ca}return!0}; pb.prototype.each=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d.key),b.A!==c&&Da(b),d=d.Ca;return this};pb.prototype.map=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e.key)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};pb.prototype.filter=function(a){var b=this.sa,c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;){var f=e.key;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Ca}return d.iterator}; pb.prototype.je=function(){this.value=this.key=null;this.wa=-1};pb.prototype.toString=function(){return null!==this.ya?"MapKeySetIterator@"+this.ya.value:"MapKeySetIterator"};oa.Object.defineProperties(pb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});pb.prototype.first=pb.prototype.first;pb.prototype.hasNext=pb.prototype.Gd;pb.prototype.next=pb.prototype.next;pb.prototype.reset=pb.prototype.reset; @@ -85,16 +85,16 @@ ub.prototype.next=function(){var a=this.sa;if(a.A!==this.wa){if(null===this.key) ub.prototype.any=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Ca}return!1};ub.prototype.all=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Ca}return!0};ub.prototype.each=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Ca;return this}; ub.prototype.map=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.filter=function(a){var b=this.sa;b.Xa=null;var c=b.A;this.ya=null;for(var d=new I,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Ca;return d.iterator};ub.prototype.je=function(){this.value=this.key=null;this.wa=-1;this.sa.Xa=this};ub.prototype.toString=function(){return null!==this.ya?"MapIterator@"+this.ya:"MapIterator"}; oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.sa.Zb}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.Gd;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapIterator"; -function vb(a){Ya(this);this._isFrozen=!1;this.$b={};this.Zb=0;this.wf=this.Xa=null;this.A=0;this.xf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=vb.prototype;t.Db=function(){var a=this.A;a++;999999999=this.count)return eb;var a=this.Xa;return null!==a?(a.reset(),a):new ub(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?eb:new pb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return eb; var a=this.wf;return null!==a?(a.reset(),a):new rb(this)}}});vb.prototype.toKeySet=vb.prototype.Xf;vb.prototype.toArray=vb.prototype.La;vb.prototype.clear=vb.prototype.clear;vb.prototype["delete"]=vb.prototype.delete;vb.prototype.remove=vb.prototype.remove;vb.prototype.get=vb.prototype.get;vb.prototype.getValue=vb.prototype.L;vb.prototype.has=vb.prototype.has;vb.prototype.contains=vb.prototype.contains;vb.prototype.first=vb.prototype.first;vb.prototype.addAll=vb.prototype.addAll; -vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var yb,zb,Ab,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; +vb.prototype.set=vb.prototype.set;vb.prototype.add=vb.prototype.add;vb.prototype.thaw=vb.prototype.qa;vb.prototype.freeze=vb.prototype.freeze;vb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var xb,yb,zb,Bb,Cb;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this}; K.prototype.Eg=function(a,b){G&&(B(a,"number",K,"setTo:x"),B(b,"number",K,"setTo:y"),this.na());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(x(a,K,K,"set:p"),this.na());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Db(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 K(c,e)}return new K} function Eb(a){G&&x(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.ui=function(a,b){return this.J===a&&this.K===b};t.cb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(x(a,K,K,"add:p"),this.na());this.J+=a.x;this.K+=a.y;return this};t.ze=function(a){G&&(x(a,K,K,"subtract:p"),this.na());this.J-=a.x;this.K-=a.y;return this}; @@ -112,7 +112,7 @@ oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return K.prototype.projectOntoLineSegmentPoint=K.prototype.AA;K.prototype.projectOntoLineSegment=K.prototype.zA;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(D(a,K,"intersectingLineSegments:a1x"),D(b,K,"intersectingLineSegments:a1y"),D(c,K,"intersectingLineSegments:a2x"),D(d,K,"intersectingLineSegments:a2y"),D(e,K,"intersectingLineSegments:b1x"),D(f,K,"intersectingLineSegments:b1y"),D(g,K,"intersectingLineSegments:b2x"),D(h,K,"intersectingLineSegments:b2y"));return L.em(a,b,c,d,e,f,g,h)}; K.prototype.compareWithLineSegmentPoint=K.prototype.iz;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(D(a,K,"compareWithLineSegment:a1x"),D(b,K,"compareWithLineSegment:a1y"),D(c,K,"compareWithLineSegment:a2x"),D(d,K,"compareWithLineSegment:a2y"),D(e,K,"compareWithLineSegment:b1x"),D(f,K,"compareWithLineSegment:b1y"));return L.Tl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.gb;K.prototype.normalize=K.prototype.normalize; K.prototype.distanceSquared=K.prototype.Fd;K.prototype.distanceSquaredPoint=K.prototype.Nf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.ze;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.cb;K.prototype.equalTo=K.prototype.ui;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.Eg;var Nb=[];K.className="Point";K.parse=Db;K.stringify=Eb; -K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=yb=(new K(0,0)).pa();K.InfiniteTopLeft=zb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=Ab=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; +K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb;K.Origin=xb=(new K(0,0)).pa();K.InfiniteTopLeft=yb=(new K(-Infinity,-Infinity)).pa();K.InfiniteBottomRight=zb=(new K(Infinity,Infinity)).pa();K.SixPoint=Bb=(new K(6,6)).pa();K.NoPoint=Cb=(new K(NaN,NaN)).pa();K.parse=Db;K.stringify=Eb;K.distanceLineSegmentSquared=Kb;K.distanceSquared=Lb;K.direction=Mb; function Gb(a,b){void 0===a?this.ea=this.ga=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.ga=a,this.ea=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Ob,Pb,Qb,Rb,Sb,Tb,Ub;Gb.prototype.assign=function(a){this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.h=function(a,b){this.ga=a;this.ea=b;return this}; Gb.prototype.Eg=function(a,b){G&&(B(a,"number",Gb,"setTo:w"),B(b,"number",Gb,"setTo:h"),0>a&&Ba(a,">= 0",Gb,"setTo:w"),0>b&&Ba(b,">= 0",Gb,"setTo:h"),this.na());this.ga=a;this.ea=b;return this};Gb.prototype.set=function(a){G&&(x(a,Gb,Gb,"set:s"),this.na());this.ga=a.ga;this.ea=a.ea;return this};Gb.prototype.copy=function(){var a=new Gb;a.ga=this.ga;a.ea=this.ea;return a};t=Gb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; @@ -136,38 +136,38 @@ function hc(a,b){var c=a.ga,d=a.J,e=b.x-10;if(d>b.width+10+10+e||e>c+d)return!1; t.Zv=function(a,b,c,d){G?(D(a,M,"union:x"),D(b,M,"union:y"),void 0===c?c=0:D(c,M,"union:w"),void 0===d?d=0:D(d,M,"union:h"),(0>c||0>d)&&v("Rect.union:Width and height cannot be negative"),this.na()):(void 0===c&&(c=0),void 0===d&&(d=0));return ic(this,a,b,c,d)};function ic(a,b,c,d,e){var f=Math.min(a.J,b),g=Math.min(a.K,c);b=Math.max(a.J+a.ga,b+d);c=Math.max(a.K+a.ea,c+e);a.J=f;a.K=g;a.ga=b-f;a.ea=c-g;return a} t.Li=function(a,b,c){G&&(D(a,M,"setSpot:x"),D(b,M,"setSpot:y"),x(c,Hb,M,"setSpot:spot"),this.na());this.J=a-c.offsetX-c.x*this.ga;this.K=b-c.offsetY-c.y*this.ea;return this}; function jc(a,b,c,d,e,f,g,h){G?(D(a,M,"contains:rx"),D(b,M,"contains:ry"),D(c,M,"contains:rw"),D(d,M,"contains:rh"),D(e,M,"contains:x"),D(f,M,"contains:y"),void 0===g?g=0:D(g,M,"contains:w"),void 0===h?h=0:D(h,M,"contains:h"),(0>c||0>d||0>g||0>h)&&v("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d} -function mc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; -M.alloc=function(){var a=nc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=nc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){nc.push(a)}; +function lc(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersects:rx"),D(b,M,"intersects:ry"),D(c,M,"intersects:rw"),D(d,M,"intersects:rh"),D(e,M,"intersects:x"),D(f,M,"intersects:y"),D(g,M,"intersects:w"),D(h,M,"intersects:h"),(0>c||0>d||0>g||0>h)&&v("Rect.intersects:Width and height cannot be negative"));return a>g+e||e>c+a?!1:b>h+f||f>d+b?!1:!0}t.u=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.fA=function(){return 0===this.width&&0===this.height}; +M.alloc=function(){var a=mc.pop();return void 0===a?new M:a};M.allocAt=function(a,b,c,d){var e=mc.pop();return void 0===e?new M(a,b,c,d):e.h(a,b,c,d)};M.free=function(a){mc.push(a)}; oa.Object.defineProperties(M.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"x"),this.na(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"y"),this.na(a));this.K=a}},width:{configurable:!0,get:function(){return this.ga},set:function(a){G&&(B(a,"number",M,"width"),this.na(a));0>a&&Ba(a,">= 0",M,"width");this.ga=a}},height:{configurable:!0,get:function(){return this.ea}, set:function(a){G&&(B(a,"number",M,"height"),this.na(a));0>a&&Ba(a,">= 0",M,"height");this.ea=a}},left:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",M,"left"),this.na(a));this.J=a}},top:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",M,"top"),this.na(a));this.K=a}},right:{configurable:!0,get:function(){return this.J+this.ga},set:function(a){G&&(D(a,M,"right"),this.na(a));this.J+=a-(this.J+this.ga)}}, bottom:{configurable:!0,get:function(){return this.K+this.ea},set:function(a){G&&(D(a,M,"top"),this.na(a));this.K+=a-(this.K+this.ea)}},position:{configurable:!0,get:function(){return new K(this.J,this.K)},set:function(a){G&&(x(a,K,M,"position"),this.na(a));this.J=a.x;this.K=a.y}},size:{configurable:!0,get:function(){return new Gb(this.ga,this.ea)},set:function(a){G&&(x(a,Gb,M,"size"),this.na(a));this.ga=a.width;this.ea=a.height}},center:{configurable:!0, enumerable:!0,get:function(){return new K(this.J+this.ga/2,this.K+this.ea/2)},set:function(a){G&&(x(a,K,M,"center"),this.na(a));this.J=a.x-this.ga/2;this.K=a.y-this.ea/2}},centerX:{configurable:!0,get:function(){return this.J+this.ga/2},set:function(a){G&&(D(a,M,"centerX"),this.na(a));this.J=a-this.ga/2}},centerY:{configurable:!0,get:function(){return this.K+this.ea/2},set:function(a){G&&(D(a,M,"centerY"),this.na(a));this.K=a-this.ea/2}}});M.prototype.isEmpty=M.prototype.fA; M.prototype.isReal=M.prototype.u;M.intersectsLineSegment=function(a,b,c,d,e,f,g,h){G&&(D(a,M,"intersectsLineSegment:x"),D(b,M,"intersectsLineSegment:y"),D(c,M,"intersectsLineSegment:w"),D(d,M,"intersectsLineSegment:h"),D(e,M,"intersectsLineSegment:p1x"),D(f,M,"intersectsLineSegment:p1y"),D(g,M,"intersectsLineSegment:p2x"),D(h,M,"intersectsLineSegment:p2y"),(0>c||0>d)&&v("Rect.intersectsLineSegment: width and height cannot be negative"));return L.Wx(a,b,c,d,e,f,g,h)};M.prototype.setSpot=M.prototype.Li; M.prototype.union=M.prototype.Zv;M.prototype.unionRect=M.prototype.ld;M.prototype.unionPoint=M.prototype.lf;M.prototype.intersects=M.prototype.kv;M.prototype.intersectsRect=M.prototype.dd;M.prototype.intersect=M.prototype.jv;M.prototype.intersectRect=M.prototype.Vx;M.prototype.grow=M.prototype.aA;M.prototype.subtractMargin=M.prototype.Uv;M.prototype.addMargin=M.prototype.Oo;M.prototype.inflate=M.prototype.Hc;M.prototype.offset=M.prototype.offset;M.prototype.contains=M.prototype.contains; -M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var oc=null,pc=null,nc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;M.ZeroRect=oc=(new M(0,0,0,0)).pa();M.NoRect=pc=(new M(NaN,NaN,NaN,NaN)).pa(); -M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=mc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; +M.prototype.containsRect=M.prototype.df;M.prototype.containsPoint=M.prototype.ha;M.prototype.equalsApprox=M.prototype.cb;M.prototype.equalTo=M.prototype.ui;M.prototype.equals=M.prototype.D;M.prototype.setSize=M.prototype.NA;M.prototype.setPoint=M.prototype.kd;M.prototype.set=M.prototype.set;M.prototype.setTo=M.prototype.Eg;var nc=null,oc=null,mc=[];M.className="Rect";M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;M.ZeroRect=nc=(new M(0,0,0,0)).pa();M.NoRect=oc=(new M(NaN,NaN,NaN,NaN)).pa(); +M.parse=bc;M.stringify=cc;M.contains=jc;M.intersects=lc;function fc(a,b,c,d){void 0===a?this.Qe=this.Fe=this.$e=this.af=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):v("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}fc.prototype.assign=function(a){this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this}; fc.prototype.Eg=function(a,b,c,d){G&&(B(a,"number",fc,"setTo:t"),B(b,"number",fc,"setTo:r"),B(c,"number",fc,"setTo:b"),B(d,"number",fc,"setTo:l"),this.na());this.af=a;this.$e=b;this.Fe=c;this.Qe=d;return this};fc.prototype.set=function(a){G&&(x(a,fc,fc,"assign:m"),this.na());this.af=a.af;this.$e=a.$e;this.Fe=a.Fe;this.Qe=a.Qe;return this};fc.prototype.copy=function(){var a=new fc;a.af=this.af;a.$e=this.$e;a.Fe=this.Fe;a.Qe=this.Qe;return a};t=fc.prototype; t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; -function qc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} -function rc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; -t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=sc.pop();return void 0===a?new fc:a};fc.free=function(a){sc.push(a)}; +function pc(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 fc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new fc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new fc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new fc(c,e):new fc(c,e,f,g)}return new fc} +function qc(a){G&&x(a,fc);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.D=function(a){return a instanceof fc?this.af===a.top&&this.$e===a.right&&this.Fe===a.bottom&&this.Qe===a.left:!1};t.ui=function(a,b,c,d){return this.af===a&&this.$e===b&&this.Fe===c&&this.Qe===d}; +t.cb=function(a){return L.C(this.af,a.top)&&L.C(this.$e,a.right)&&L.C(this.Fe,a.bottom)&&L.C(this.Qe,a.left)};t.u=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};fc.alloc=function(){var a=rc.pop();return void 0===a?new fc:a};fc.free=function(a){rc.push(a)}; oa.Object.defineProperties(fc.prototype,{top:{configurable:!0,get:function(){return this.af},set:function(a){G&&(D(a,fc,"top"),this.na(a));this.af=a}},right:{configurable:!0,get:function(){return this.$e},set:function(a){G&&(D(a,fc,"right"),this.na(a));this.$e=a}},bottom:{configurable:!0,get:function(){return this.Fe},set:function(a){G&&(D(a,fc,"bottom"),this.na(a));this.Fe=a}},left:{configurable:!0,get:function(){return this.Qe},set:function(a){G&& -(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var tc=null,uc=null,sc=[];fc.className="Margin";fc.parse=qc;fc.stringify=rc;fc.ZeroMargin=tc=(new fc(0,0,0,0)).pa();fc.TwoMargin=uc=(new fc(2,2,2,2)).pa();fc.parse=qc;fc.stringify=rc; -function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var zc,Ac,Bc,Cc,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,gd,hd,id,jd,kd,ld,md,nd,od,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; +(D(a,fc,"left"),this.na(a));this.Qe=a}}});fc.prototype.isReal=fc.prototype.u;fc.prototype.equalsApprox=fc.prototype.cb;fc.prototype.equalTo=fc.prototype.ui;fc.prototype.equals=fc.prototype.D;fc.prototype.set=fc.prototype.set;fc.prototype.setTo=fc.prototype.Eg;var sc=null,tc=null,rc=[];fc.className="Margin";fc.parse=pc;fc.stringify=qc;fc.ZeroMargin=sc=(new fc(0,0,0,0)).pa();fc.TwoMargin=tc=(new fc(2,2,2,2)).pa();fc.parse=pc;fc.stringify=qc; +function Hb(a,b,c,d){void 0===a?this.te=this.se=this.K=this.J=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._isFrozen=!1}var xc,yc,zc,Ac,Hc,Ic,Jc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Tc,Uc,Vc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,hd,id,jd,kd,ld,md,nd,od,pd,rd,sd;Hb.prototype.assign=function(a){this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this}; Hb.prototype.Eg=function(a,b,c,d){G&&(td(a,"setTo:x"),td(b,"setTo:y"),ud(c,"setTo:offx"),ud(d,"setTo:offy"),this.na());this.J=a;this.K=b;this.se=c;this.te=d;return this};Hb.prototype.set=function(a){G&&(x(a,Hb,Hb,"set:s"),this.na());this.J=a.J;this.K=a.K;this.se=a.se;this.te=a.te;return this};Hb.prototype.copy=function(){var a=new Hb;a.J=this.J;a.K=this.K;a.se=this.se;a.te=this.te;return a};t=Hb.prototype;t.pa=function(){this._isFrozen=!0;Object.freeze(this);return this}; t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.na=function(a){if(G&&this._isFrozen){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function vd(a,b){a.J=NaN;a.K=NaN;a.se=b;return a} function td(a,b){(isNaN(a)||1a)&&Ba(a,"0 <= "+b+" <= 1",Hb,b)}function ud(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&Ba(a,"real number, not NaN or Infinity",Hb,b)} -function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return zc;if("TopLeft"===a)return Ac;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Bc;if("TopRight"===a)return Cc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== -a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return gd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +function wd(a){if("string"===typeof a){a=a.trim();if("None"===a)return xc;if("TopLeft"===a)return yc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return zc;if("TopRight"===a)return Ac;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Hc;if("Center"===a)return Ic;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Jc;if("BottomLeft"===a)return Lc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Mc;if("BottomRight"===a)return Nc;if("TopSide"===a)return Oc;if("LeftSide"=== +a)return Pc;if("RightSide"===a)return Qc;if("BottomSide"===a)return Rc;if("TopBottomSides"===a)return Tc;if("LeftRightSides"===a)return Uc;if("TopLeftSides"===a)return Vc;if("TopRightSides"===a)return Wc;if("BottomLeftSides"===a)return Xc;if("BottomRightSides"===a)return Yc;if("NotTopSide"===a)return Zc;if("NotLeftSide"===a)return $c;if("NotRightSide"===a)return ad;if("NotBottomSide"===a)return bd;if("AllSides"===a)return cd;if("Default"===a)return hd;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=b):f===h?(e=a):jc(a,b, (a+=360);360<=a&&(a-=360);return a},zx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 N.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?A:new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; +N.parse=function(a,b){function c(){return u>=C-1?!0:null!==l[u+1].match(E)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());y===y.toLowerCase()&&(b=A.x+b,c=A.y+c);a.h(b,c)}function f(){e(A);return A}function g(){e(z);return z}function h(){var a=w.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new K(A.x,A.y):new K(2*A.x-z.x,2*A.y-z.y)}void 0===b&&(b=!1);"string"!==typeof a&&Aa(a,"string",N,"parse:str");var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm; a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Jd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A= -new K((y===y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A=new K(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Kd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Kd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)z=r=h(),H=f(),Ld(a,r.x,r.y,H.x,H.y);break;case "B":for(;!c();){r=parseFloat(d()); +l.splice(a,1);for(m=0;m=C-1);)if(w=y,y=d(),""!==y)switch(y.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.tc||!0===q?(Gd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(A);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)A.h((y=== +y.toLowerCase()?A.x:0)+parseFloat(d()),A.y),a.lineTo(A.x,A.y);break;case "V":for(;!c();)A.h(A.x,(y===y.toLowerCase()?A.y:0)+parseFloat(d())),a.lineTo(A.x,A.y);break;case "C":for(;!c();){r=new K;e(r);var H=g(),T=f();Hd(a,r.x,r.y,H.x,H.y,T.x,T.y)}break;case "S":for(;!c();)r=h(),H=g(),T=f(),Hd(a,r.x,r.y,H.x,H.y,T.x,T.y);break;case "Q":for(;!c();)r=g(),H=f(),Id(a,r.x,r.y,H.x,H.y);break;case "T":for(;!c();)r=h(),z.assign(r),H=f(),Id(a,r.x,r.y,H.x,H.y),z.assign(H);break;case "B":for(;!c();){r=parseFloat(d()); H=parseFloat(d());T=parseFloat(d());var aa=parseFloat(d()),Y=parseFloat(d()),R=Y,O=!1;c()||(R=parseFloat(d()),c()||(O=0!==parseFloat(d())));y===y.toLowerCase()&&(T+=A.x,aa+=A.y);a.arcTo(r,H,T,aa,Y,R,O)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),T=parseFloat(d()),Y=aa=!1,O=R=0,R=d(),1===R.length?(aa=!!parseFloat(R),Y=!!parseFloat(d()),R=parseFloat(d())):2===R.length?(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]),R=parseFloat(d())):(aa=!!parseFloat(R[0]),Y=!!parseFloat(R[1]), -R=parseFloat(R.slice(2))),O=parseFloat(d()),y===y.toLowerCase()&&(R=A.x+R,O=A.y+O),A.h(R,O),Md(a,r,H,T,aa,Y,R,O);break;case "Z":Nd(a);A.assign(k);break;case "F":r="";for(H=1;l[u+H];)if("0"===l[u+H])p=!0,H++;else if(null!==l[u+H].match(/[Uu]/))H++;else if(null===l[u+H].match(E))H++;else{r=l[u+H];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Zd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case N.j:case N.v:case N.G:var g=this.ud;var h=this.vd;this.ud=g*a+h*c+e;this.vd=g*b+h*d+f;g=this.Jc;h=this.Kc;this.Jc=g*a+h*c+e;this.Kc=g*b+h*d+f;break;case N.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Xd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:v("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ha=function(a,b){void 0===b&&(b=0);var c=this.ud,d=this.vd,e=this.Jc,f=this.Kc;switch(this.type){case N.j:return L.dc(c,d,e,f,b,a.x,a.y);case N.v:var g=M.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ha(a);M.free(g);return a;case N.G:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return be(this,a,b,!0,!1);default:return!1}}; -function be(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case N.o:return $d(this,a,b,!0,!1);default:return!1}}; +function $d(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.Nx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.fv=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -236,237 +236,237 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.Ox=function(a){if(this.type===N.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=K.alloc();L.Bh(b,c,d,e,f,a,h);a=h.x;f=h.y;K.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===N.v){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=K.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,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.s,d=c.length,e=0;ea&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,je,"x1"),this.hi=Math.max(d,0),G&&D(e,je,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= -!0)):(G&&D(d,je,"x1"),this.Ye=d,G&&D(e,je,"y1"),this.gi=e,G&&D(f,je,"x2"),a===Td&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Td&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}je.prototype.copy=function(){var a=new je;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=je.prototype; -t.cb=function(a){if(!(a instanceof je)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Qd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Rd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Sd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Td:return L.C(this.startAngle, -a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Zd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===je?this.type=a:Ea(this,a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Qd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Rd: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 Sd: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 Td: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 Zd: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)+ +t.ha=function(a,b,c){for(var d=this.startX,e=this.startY,f=d,g=e,h=this.segments.s,k=h.length,l=0;la&&(a+=360),this.Ye=a,this.gi=0,G&&D(d,le,"x1"),this.hi=Math.max(d,0),G&&D(e,le,"y1"),this.$g=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc= +!0)):(G&&D(d,le,"x1"),this.Ye=d,G&&D(e,le,"y1"),this.gi=e,G&&D(f,le,"x2"),a===Qd&&(f=Math.max(f,0)),this.hi=f,"number"===typeof g?(a===Qd&&(g=Math.max(g,0)),this.$g=g):this.$g=0);this.ge=null}le.prototype.copy=function(){var a=new le;a.ta=this.ta;a.l=this.l&-2;a.Jc=this.Jc;a.Kc=this.Kc;a.Ye=this.Ye;a.gi=this.gi;a.hi=this.hi;a.$g=this.$g;return a};t=le.prototype; +t.cb=function(a){if(!(a instanceof le)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Nd:case Cd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY);case Od:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y)&&L.C(this.point2X,a.point2X)&&L.C(this.point2Y,a.point2Y);case Pd:return L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.point1X,a.point1X)&&L.C(this.point1Y,a.point1Y);case Qd:return L.C(this.startAngle, +a.startAngle)&&L.C(this.sweepAngle,a.sweepAngle)&&L.C(this.centerX,a.centerX)&&L.C(this.centerY,a.centerY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);case Xd:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&L.C(this.xAxisRotation,a.xAxisRotation)&&L.C(this.endX,a.endX)&&L.C(this.endY,a.endY)&&L.C(this.radiusX,a.radiusX)&&L.C(this.radiusY,a.radiusY);default:return!1}};t.wb=function(a){a.classType===le?this.type=a:Ea(this,a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Nd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Od: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 Pd: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 Qd: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 Xd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.qa=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function $d(a,b){if(null!==a.ge&&!1===b._isInvalidBounds)return a.ge;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ge=[],a.ge;b=a.Ye;var e=a.gi,f=L.zx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=L.zx(0,0,b>f?b:f,m,m+g,!0);f=Ib.alloc();f.reset();f.translate(c,d);f.rotate(a.Ye,0,0);f.scale(k,q);N.Na(b,f); Ib.free(f);a.ge=b;return a.ge} -oa.Object.defineProperties(je.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, -get:function(){return this.ta},set:function(a){G&&$a(a,je,je,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, -get:function(){return this.Ye},set:function(a){G&&D(a,je,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,je,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, -get:function(){return this.$g},set:function(a){G&&D(a,je,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,je,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, -get:function(){return this.hi},set:function(a){G&&D(a,je,"radiusX");0>a&&Ba(a,">= zero",je,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,je,"radiusY");0>a&&Ba(a,">= zero",je,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,je,"startAngle");this._isFrozen&&xa(this, -a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,je,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== -(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,je,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});je.prototype.equalsApprox=je.prototype.cb; -var Qd=new F(je,"Move",0),Cd=new F(je,"Line",1),Rd=new F(je,"Bezier",2),Sd=new F(je,"QuadraticBezier",3),Td=new F(je,"Arc",4),Zd=new F(je,"SvgArc",4);je.className="PathSegment";je.Move=Qd;je.Line=Cd;je.Bezier=Rd;je.QuadraticBezier=Sd;je.Arc=Td;je.SvgArc=Zd;function le(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} -le.prototype.copy=function(){var a=new le;return this.clone(a)};le.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; -le.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};le.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);return b}; -le.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;me(c,a,b);b.assign(c.bt(b));return b}; -oa.Object.defineProperties(le.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,le,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,le,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= +oa.Object.defineProperties(le.prototype,{_isFrozen:{configurable:!0,get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{configurable:!0,get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{configurable:!0,get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{configurable:!0, +get:function(){return this.ta},set:function(a){G&&$a(a,le,le,"type");this._isFrozen&&xa(this,a);this.ta=a;this._isInvalidBounds=!0}},endX:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"endX");this._isFrozen&&xa(this,a);this.Jc=a;this._isInvalidBounds=!0}},endY:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"endY");this._isFrozen&&xa(this,a);this.Kc=a;this._isInvalidBounds=!0}},point1X:{configurable:!0, +get:function(){return this.Ye},set:function(a){G&&D(a,le,"point1X");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},point1Y:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"point1Y");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},point2X:{configurable:!0,get:function(){return this.hi},set:function(a){G&&D(a,le,"point2X");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},point2Y:{configurable:!0, +get:function(){return this.$g},set:function(a){G&&D(a,le,"point2Y");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},centerX:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"centerX");this._isFrozen&&xa(this,a);this.Ye=a;this._isInvalidBounds=!0}},centerY:{configurable:!0,get:function(){return this.gi},set:function(a){G&&D(a,le,"centerY");this._isFrozen&&xa(this,a);this.gi=a;this._isInvalidBounds=!0}},radiusX:{configurable:!0, +get:function(){return this.hi},set:function(a){G&&D(a,le,"radiusX");0>a&&Ba(a,">= zero",le,"radiusX");this._isFrozen&&xa(this,a);this.hi=a;this._isInvalidBounds=!0}},radiusY:{configurable:!0,get:function(){return this.$g},set:function(a){G&&D(a,le,"radiusY");0>a&&Ba(a,">= zero",le,"radiusY");this._isFrozen&&xa(this,a);this.$g=a;this._isInvalidBounds=!0}},startAngle:{configurable:!0,get:function(){return this.Jc},set:function(a){G&&D(a,le,"startAngle");this._isFrozen&&xa(this, +a);a%=360;0>a&&(a+=360);this.Jc=a;this._isInvalidBounds=!0}},sweepAngle:{configurable:!0,get:function(){return this.Kc},set:function(a){G&&D(a,le,"sweepAngle");this._isFrozen&&xa(this,a);360a&&(a=-360);this.Kc=a;this._isInvalidBounds=!0}},isClockwiseArc:{configurable:!0,get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{configurable:!0,get:function(){return 0!== +(this.l&16)},set:function(a){this._isFrozen&&xa(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{configurable:!0,get:function(){return this.Ye},set:function(a){G&&D(a,le,"xAxisRotation");this._isFrozen&&xa(this,a);a%=360;0>a&&(a+=360);this.Ye=a;this._isInvalidBounds=!0}}});le.prototype.equalsApprox=le.prototype.cb; +var Nd=new F(le,"Move",0),Cd=new F(le,"Line",1),Od=new F(le,"Bezier",2),Pd=new F(le,"QuadraticBezier",3),Qd=new F(le,"Arc",4),Xd=new F(le,"SvgArc",4);le.className="PathSegment";le.Move=Nd;le.Line=Cd;le.Bezier=Od;le.QuadraticBezier=Pd;le.Arc=Qd;le.SvgArc=Xd;function ne(){this.H=null;this.Ku=(new K(0,0)).freeze();this.zt=(new K(0,0)).freeze();this.Op=this.dr=0;this.Pp=1;this.Kq="";this.ks=this.gq=!1;this.eq=this.Rp=0;this.Jg=this.Aq=this.Gq=!1;this.mq=null;this.es=0;this.Dd=this.$r=null} +ne.prototype.copy=function(){var a=new ne;return this.clone(a)};ne.prototype.clone=function(a){a.H=this.H;a.Ku.assign(this.viewPoint);a.zt.assign(this.documentPoint);a.dr=this.dr;a.Op=this.Op;a.Pp=this.Pp;a.Kq=this.Kq;a.gq=this.gq;a.ks=this.ks;a.Rp=this.Rp;a.eq=this.eq;a.Gq=this.Gq;a.Aq=this.Aq;a.Jg=this.Jg;a.mq=this.mq;a.es=this.es;a.$r=this.$r;a.Dd=this.Dd;return a}; +ne.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};ne.prototype.ep=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);return b}; +ne.prototype.Vz=function(a,b){var c=this.diagram;if(null===c)return b;oe(c,a,b);b.assign(c.bt(b));return b}; +oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{configurable:!0,get:function(){return this.Ku},set:function(a){x(a,K,ne,"viewPoint");this.Ku.assign(a)}},documentPoint:{configurable:!0,get:function(){return this.zt},set:function(a){x(a,K,ne,"documentPoint");this.zt.assign(a)}},modifiers:{configurable:!0,get:function(){return this.dr},set:function(a){this.dr= a}},button:{configurable:!0,get:function(){return this.Op},set:function(a){this.Op=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.Pp},set:function(a){this.Pp=a}},key:{configurable:!0,get:function(){return this.Kq},set:function(a){this.Kq=a}},down:{configurable:!0,get:function(){return this.gq},set:function(a){this.gq=a}},up:{configurable:!0, enumerable:!0,get:function(){return this.ks},set:function(a){this.ks=a}},clickCount:{configurable:!0,get:function(){return this.Rp},set:function(a){this.Rp=a}},delta:{configurable:!0,get:function(){return this.eq},set:function(a){this.eq=a}},isMultiTouch:{configurable:!0,get:function(){return this.Gq},set:function(a){this.Gq=a}},handled:{configurable:!0,get:function(){return this.Aq},set:function(a){this.Aq=a}},bubbles:{configurable:!0, get:function(){return this.Jg},set:function(a){this.Jg=a}},event:{configurable:!0,get:function(){return this.mq},set:function(a){this.mq=a}},isTouchEvent:{configurable:!0,get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{configurable:!0,get:function(){return this.es},set:function(a){this.es=a}},targetDiagram:{configurable:!0,get:function(){return this.$r},set:function(a){this.$r=a}}, targetObject:{configurable:!0,get:function(){return this.Dd},set:function(a){this.Dd=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}}});le.prototype.getMultiTouchDocumentPoint=le.prototype.Vz;le.prototype.getMultiTouchViewPoint=le.prototype.ep;le.className="InputEvent";function ne(){this.H=null;this.Ea="";this.nr=this.Yr=null}ne.prototype.copy=function(){var a=new ne;a.H=this.H;a.Ea=this.Ea;a.Yr=this.Yr;a.nr=this.nr;return a};ne.prototype.toString=function(){var a="*"+this.name;null!==this.subject&&(a+=":"+this.subject.toString());null!==this.parameter&&(a+="("+this.parameter.toString()+")");return a}; -oa.Object.defineProperties(ne.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},subject:{configurable:!0,get:function(){return this.Yr},set:function(a){this.Yr=a}},parameter:{configurable:!0,get:function(){return this.nr},set:function(a){this.nr=a}}});ne.className="DiagramEvent"; -function oe(){this.Sm=pe;this.Df=this.cr="";this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}oe.prototype.clear=function(){this.Xn=this.Yn=this.co=this.eo=this.bo=this.H=this.ic=null}; -oe.prototype.copy=function(){var a=new oe;a.Sm=this.Sm;a.cr=this.cr;a.Df=this.Df;a.ic=this.ic;a.H=this.H;a.bo=this.bo;var b=this.eo;a.eo=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.co;a.co=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Yn;a.Yn=Ga(b)&&"function"===typeof b.M?b.M():b;b=this.Xn;a.Xn=Ga(b)&&"function"===typeof b.M?b.M():b;return a};oe.prototype.wb=function(a){a.classType===oe?this.change=a:Ea(this,a)}; -oe.prototype.toString=function(){var a="";a=this.change===qe?a+"* ":this.change===pe?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===qe?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Ra(this.object)),null!==this.oldValue&&(a+=" old: "+Ra(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ra(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};oe.prototype.L=function(a){return a?this.oldValue:this.newValue};oe.prototype.Xz=function(a){return a?this.oldParam:this.newParam};oe.prototype.canUndo=function(){return null!==this.model||null!==this.diagram?!0:!1}; -oe.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))};oe.prototype.canRedo=function(){return null!==this.model||null!==this.diagram?!0:!1};oe.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))}; -oa.Object.defineProperties(oe.prototype,{model:{configurable:!0,get:function(){return this.ic},set:function(a){this.ic=a}},diagram:{configurable:!0,get:function(){return this.H},set:function(a){this.H=a}},change:{configurable:!0,get:function(){return this.Sm},set:function(a){G&&$a(a,oe,oe,"change");this.Sm=a}},modelChange:{configurable:!0,get:function(){return this.cr},set:function(a){G&&B(a,"string",oe,"modelChange");this.cr=a}},propertyName:{configurable:!0, -enumerable:!0,get:function(){return this.Df},set:function(a){G&&"string"!==typeof a&&B(a,"function",oe,"propertyName");this.Df=a}},isTransactionFinished:{configurable:!0,get:function(){return this.Sm===qe&&("CommittedTransaction"===this.Df||"FinishedUndo"===this.Df||"FinishedRedo"===this.Df)}},object:{configurable:!0,get:function(){return this.bo},set:function(a){this.bo=a}},oldValue:{configurable:!0,get:function(){return this.eo},set:function(a){this.eo= -a}},oldParam:{configurable:!0,get:function(){return this.co},set:function(a){this.co=a}},newValue:{configurable:!0,get:function(){return this.Yn},set:function(a){this.Yn=a}},newParam:{configurable:!0,get:function(){return this.Xn},set:function(a){this.Xn=a}}});oe.prototype.redo=oe.prototype.redo;oe.prototype.canRedo=oe.prototype.canRedo;oe.prototype.undo=oe.prototype.undo;oe.prototype.canUndo=oe.prototype.canUndo;oe.prototype.getParam=oe.prototype.Xz; -oe.prototype.getValue=oe.prototype.L;oe.prototype.clear=oe.prototype.clear;var qe=new F(oe,"Transaction",-1),pe=new F(oe,"Property",0),re=new F(oe,"Insert",1),se=new F(oe,"Remove",2);oe.className="ChangedEvent";oe.Transaction=qe;oe.Property=pe;oe.Insert=re;oe.Remove=se;function te(){this.o=(new I).freeze();this.Ea="";this.j=!1} -te.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -oa.Object.defineProperties(te.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});te.prototype.optimize=te.prototype.lk;te.prototype.redo=te.prototype.redo;te.prototype.canRedo=te.prototype.canRedo;te.prototype.undo=te.prototype.undo;te.prototype.canUndo=te.prototype.canUndo; -te.prototype.clear=te.prototype.clear;te.className="Transaction";function ue(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} -ue.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.jd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +oa.Object.defineProperties(ve.prototype,{changes:{configurable:!0,get:function(){return this.o}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},isComplete:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}}});ve.prototype.optimize=ve.prototype.lk;ve.prototype.redo=ve.prototype.redo;ve.prototype.canRedo=ve.prototype.canRedo;ve.prototype.undo=ve.prototype.undo;ve.prototype.canUndo=ve.prototype.canUndo; +ve.prototype.clear=ve.prototype.clear;ve.className="Transaction";function we(){this.bu=new J;this.Pd=!1;this.v=(new I).freeze();this.Me=-1;this.o=999;this.Pe=!1;this.$p=null;this.ni=0;this.j=!1;G&&(this.j=!0);this.Te=(new I).freeze();this.tl=new I;this.Gt=!0;this.Qt=this.Eq=this.Tt=this.St=!1} +we.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&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&Fa("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Ub("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.P(0),null!==f&&f.clear(),b.sb(0),a.Me--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Me++),b.freeze()),a.isInternalTransaction||a.Ub("CommittedTransaction",c,e);else{a.Pe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Ub("RolledBackTransaction",c,e),a.Pe=!1}null!== e&&e.clear()}a.$p=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.P(e),null!==b&&b.undo(),c.qa(),c.sb(e);c.freeze()}return!1}t.Bx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.qa();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.P(b);null!==c&&c.clear();a.sb(b);this.Eq=!0}a.freeze()}}; -ue.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; -ue.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -oa.Object.defineProperties(ue.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndex=this.transactionLevel&&!this.Gt&&(a=a.diagram,null!==a&&!1===a.Di||Fa("Change not within a transaction: "+c.toString()))}}; +we.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +oa.Object.defineProperties(we.prototype,{models:{configurable:!0,get:function(){return this.bu.iterator}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){this.Pd=a}},transactionToUndo:{configurable:!0,get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.P(this.historyIndex):null}},transactionToRedo:{configurable:!0,get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -oa.Object.defineProperties(we.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",we,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",we,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", -we,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",we,"transactionResult");this.Jm=a}}});we.prototype.startTransaction=we.prototype.Ka;we.className="Tool";function Ua(){we.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ae;this.v=Ce;this.Zp=this.j=null;this.Mj=-1}na(Ua,we);Ua.prototype.initializeStandardTools=function(){}; -Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof Be&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Ie&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Je){b.bubbles=!0;return}if(this.gestureBehavior===Ie)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; -for(var d=0;de||Math.abs(b.y-a.y)>d}; +oa.Object.defineProperties(ye.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",ye,"name");this.Ea=a}},isEnabled:{configurable:!0,get:function(){return this.Pd},set:function(a){B(a,"boolean",ye,"isEnabled");this.Pd=a}},isActive:{configurable:!0,get:function(){return this.tb},set:function(a){B(a,"boolean", +ye,"isActive");this.tb=a}},transactionResult:{configurable:!0,get:function(){return this.Jm},set:function(a){null!==a&&B(a,"string",ye,"transactionResult");this.Jm=a}}});ye.prototype.startTransaction=ye.prototype.Ka;ye.className="Tool";function Ua(){ye.call(this);this.name="ToolManager";this.ob=new I;this.ub=new I;this.Nb=new I;this.G=this.Z=850;this.o=(new Gb(2,2)).pa();this.Na=5E3;this.oa=Ce;this.v=Ee;this.Zp=this.j=null;this.Mj=-1}na(Ua,ye);Ua.prototype.initializeStandardTools=function(){}; +Ua.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof De&&this.Zp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +Ua.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===Le&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===Me){b.bubbles=!0;return}if(this.gestureBehavior===Le)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}var c=a.undoManager;G&&c.checksTransactionLevel&&0!==c.transactionLevel&&Fa("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");c=this.mouseDownTools.length; +for(var d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Gf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Gf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Hf(e,g,f,k,h):Hf(e,null,null,null,null)}}}}Ne.prototype.doDragOver=function(){}; -function If(a,b){var c=a.diagram;a.dragsLink&&uf(a,!0);Xe(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;Jf(a,e,f);f=Ff(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Qe){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Qe){a=M.alloc();for(b= -c.selection.iterator;b.next();)d=b.value,d instanceof V&&Kf(c,d,a);M.free(a)}}}function Jf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Df||(c=a.mouseDrop,null!==c&&c(b))}function Kf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} -Ne.prototype.doDropOnto=function(){};Ne.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(pf(this,!1),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts)):this.mayMove()?(kf(this),rf(this,this.draggedParts,!0)):this.mayDragOut()?(pf(this,!1),rf(this,this.copiedParts,!1)):kf(this),tf(this,a.lastInput.documentPoint))}}; -Ne.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(kf(this),pf(this,!0),Te(a,this.copiedParts),rf(this,this.copiedParts,!1),hf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,kf(this),this.mayMove()&&(rf(this,this.draggedParts, -!0),tf(this,a.lastInput.documentPoint)));this.ln=!0;If(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Lf(this);a.eb();hf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; -Ne.prototype.simulatedMouseMove=function(a,b,c){if(null===Qe)return!1;var d=Qe.diagram;c instanceof Q||(c=null);var e=Ue;c!==e&&(null!==e&&e!==d&&(e.Gg(),Qe.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ue=c,null!==c&&c!==d&&(nf(),e=c.toolManager.findTool("Dragging"),null!==e&&(Pe.contains(e)||Pe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +var Ce=new F(Ua,"WheelScroll",0),Be=new F(Ua,"WheelZoom",1),Pe=new F(Ua,"WheelNone",2),Ee=new F(Ua,"GestureZoom",3),Le=new F(Ua,"GestureCancel",4),Me=new F(Ua,"GestureNone",5);Ua.className="ToolManager";Ua.WheelScroll=Ce;Ua.WheelZoom=Be;Ua.WheelNone=Pe;Ua.GestureZoom=Ee;Ua.GestureCancel=Le;Ua.GestureNone=Me; +function Qe(){ye.call(this);0c.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Ze;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=Ff(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=Ff(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== +d.ey&&d.V("LinkRelinked",c,d.ey),c.toPort!==d.gy&&d.V("LinkRelinked",c,d.gy)):Gf(e,g,f,k,h):Gf(e,null,null,null,null)}}}}Qe.prototype.doDragOver=function(){}; +function Hf(a,b){var c=a.diagram;a.dragsLink&&vf(a,!0);$e(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;If(a,e,f);f=Ef(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Te){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Te){a=M.alloc();for(b= +c.selection.iterator;b.next();)d=b.value,d instanceof V&&Jf(c,d,a);M.free(a)}}}function If(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof Cf||(c=a.mouseDrop,null!==c&&c(b))}function Jf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.df(c)&&(d=!0);a=a.cv(c,function(a){return a.part},function(a){return a instanceof S},!0,function(a){return a instanceof S},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Zd(b)&&c.isAvoiding&&c.ib()} +Qe.prototype.doDropOnto=function(){};Qe.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(qf(this,!1),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts)):this.mayMove()?(lf(this),sf(this,this.draggedParts,!0)):this.mayDragOut()?(qf(this,!1),sf(this,this.copiedParts,!1)):lf(this),uf(this,a.lastInput.documentPoint))}}; +Qe.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(lf(this),qf(this,!0),We(a,this.copiedParts),sf(this,this.copiedParts,!1),jf(a,this.copiedParts),null!==this.copiedParts&&(a.V("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,lf(this),this.mayMove()&&(sf(this,this.draggedParts, +!0),uf(this,a.lastInput.documentPoint)));this.ln=!0;Hf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Xf():this.draggedParts.Xf();this.copiedParts=null;b&&Kf(this);a.eb();jf(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.V(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.V("ChangedSelection",a.selection)}}}; +Qe.prototype.simulatedMouseMove=function(a,b,c){if(null===Te)return!1;var d=Te.diagram;c instanceof Q||(c=null);var e=Xe;c!==e&&(null!==e&&e!==d&&(e.Gg(),Te.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Xe=c,null!==c&&c!==d&&(of(),e=c.toolManager.findTool("Dragging"),null!==e&&(Se.contains(e)||Se.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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;M.free(f); -f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,qf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Re(a,g.Xf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,qf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ne.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Ne.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; -oa.Object.defineProperties(Ne.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Ne,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Ne,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Oe,Ne,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Ne,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Ne,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Ne,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= -a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Ne,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Ne,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, -enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Ne,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Ne,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Ne,"dragsTree"); -this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Ne,"currentPart");this.Z=a}},copiedParts:{configurable:!0, -get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Ne,"draggedLink");this.diagram.draggedLink=a}}, -isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Ne,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Ne,"delay");this.Uk=a}}});Ne.prototype.getDraggingSource=Ne.prototype.Uz;var Qe=null,Ue=null;Ne.className="DraggingTool";Pe=new I; -Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Qe&&Qe.doCancel();we.prototype.doCancel.call(this)}; -function Of(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kg&&(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;M.free(f); +f=a.Sr;g=new vb;h=K.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof S&&l.canCopy()&&(m=c.L(l),null!==m&&(m.points=l.points,rf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Vd())));for(b=b.iterator;b.next();)l=b.value,l.ed()&&l.canCopy()&&(k=c.L(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.$a(),g.add(k,a.Vd(h))));K.free(h);a.copiedParts=g;Ue(a,g.Xf());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/ +2)));a.doUpdateCursor(null)}}}Qe.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.$s=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Nn=null};Qe.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new K}; +oa.Object.defineProperties(Qe.prototype,{isCopyEnabled:{configurable:!0,get:function(){return this.ub},set:function(a){B(a,"boolean",Qe,"isCopyEnabled");this.ub=a}},copiesEffectiveCollection:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"boolean",Qe,"copiesEffectiveCollection");this.v=a}},dragOptions:{configurable:!0,get:function(){return this.oa},set:function(a){x(a,Re,Qe,"dragOptions");this.oa=a}},isGridSnapEnabled:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){B(a,"boolean",Qe,"isGridSnapEnabled");this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{configurable:!0,get:function(){return this.ob},set:function(a){B(a,"boolean",Qe,"isComplexRoutingRealtime");this.ob=a}},isGridSnapRealtime:{configurable:!0,get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){B(a,"boolean",Qe,"isGridSnapRealtime");this.dragOptions.isGridSnapRealtime= +a}},gridSnapCellSize:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){x(a,Gb,Qe,"gridSnapCellSize");this.dragOptions.gridSnapCellSize.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{configurable:!0,get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){x(a,Hb,Qe,"gridSnapCellSpot");this.dragOptions.gridSnapCellSpot.D(a)||(a=a.M(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{configurable:!0, +enumerable:!0,get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){x(a,K,Qe,"gridSnapOrigin");this.dragOptions.gridSnapOrigin.D(a)||(a=a.M(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{configurable:!0,get:function(){return this.dragOptions.dragsLink},set:function(a){B(a,"boolean",Qe,"dragsLink");this.dragOptions.dragsLink=a}},dragsTree:{configurable:!0,get:function(){return this.dragOptions.dragsTree},set:function(a){B(a,"boolean",Qe,"dragsTree"); +this.dragOptions.dragsTree=a}},copyCursor:{configurable:!0,get:function(){return this.G},set:function(a){this.G=a}},moveCursor:{configurable:!0,get:function(){return this.Uc},set:function(a){this.Uc=a}},nodropCursor:{configurable:!0,get:function(){return this.Vc},set:function(a){this.Vc=a}},currentPart:{configurable:!0,get:function(){return this.Z},set:function(a){null!==a&&x(a,U,Qe,"currentPart");this.Z=a}},copiedParts:{configurable:!0, +get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na=a}},draggingParts:{configurable:!0,get:function(){return null!==this.copiedParts?this.copiedParts.Xf():null!==this.draggedParts?this.draggedParts.Xf():this.Be}},draggedLink:{configurable:!0,get:function(){return this.diagram.draggedLink},set:function(a){null!==a&&x(a,S,Qe,"draggedLink");this.diagram.draggedLink=a}}, +isDragOutStarted:{configurable:!0,get:function(){return this.Nb},set:function(a){this.Nb=a}},startPoint:{configurable:!0,get:function(){return this.Sr},set:function(a){x(a,K,Qe,"startPoint");this.Sr.D(a)||this.Sr.assign(a)}},delay:{configurable:!0,get:function(){return this.Uk},set:function(a){B(a,"number",Qe,"delay");this.Uk=a}}});Qe.prototype.getDraggingSource=Qe.prototype.Uz;var Te=null,Xe=null;Qe.className="DraggingTool";Se=new I; +Ta("draggingTool",function(){return this.findTool("Dragging")},function(a){this.nb("Dragging",a,this.mouseMoveTools)});Ua.prototype.doCancel=function(){null!==Te&&Te.doCancel();ye.prototype.doCancel.call(this)}; +function Nf(){0=d&&(d=.1);var e=this,f=b.Ag(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0);d=Infinity;b=null;for(f=f.iterator;f.next();){var g=f.value,h=g.part;if(h instanceof V){var k=g.la(Ic,K.alloc()),l=c.x-k.x,m=c.y-k.y;K.free(k);k=l*l+m*m;kc){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; -Of.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; -Of.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Of.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; -Of.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, -c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Of.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Qf(this,c,b,d)}; -function Qf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Qf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Qf(a,b.labeledLink,c,d))?!0:!1} -Of.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Rf){if(d===Sf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Tf(this,a,b,c,!0)}if(d===Uf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== -a)return!1;return!Tf(this,a,b,c,!0)}if(d===Vf)return a===b?a=!0:(d=new J,d.add(b),a=Wf(this,d,a,b,c)),!a;if(d===Xf)return!Tf(this,a,b,c,!1);if(d===Yf)return a===b?a=!0:(d=new J,d.add(b),a=Zf(this,d,a,b,c)),!a}return!0};function Tf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Tf(a,g,c,d,e)))return!0}return!1} -function Wf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Wf(a,b,g,d,e)))return!0}return!1}function Zf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Zf(a,b,h,d,e))return!0}}return!1} -oa.Object.defineProperties(Of.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Of,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Of,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, -set:function(a){x(a,S,Of,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Of,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Of,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, -set:function(a){x(a,V,Of,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Of,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Of,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, -set:function(a){null!==a&&x(a,V,Of,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Of,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Of,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Of,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Of,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Of,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Of,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, -get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Of,"portTargeted");this.$f=a}}});Of.className="LinkingBaseTool";function $f(){0c){if(null!==this.originalLink&&a===this.originalFromNode&&b===this.originalFromPort)return!0;b=b.portId;null===b&&(b="");if(a.Yo(b).count>=c)return!1}return!0}; +Nf.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==a.layer&&!a.layer.allowLink||!0!==b.toLinkable))return!1;var c=b.toMaxLinks;if(Infinity>c){if(null!==this.originalLink&&a===this.originalToNode&&b===this.originalToPort)return!0;b=b.portId;null===b&&(b="");if(a.Yd(b).count>=c)return!1}return!0}; +Nf.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;a=a.part;b=b.part;return null!==a&&a===b};Nf.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.part;if(!(c instanceof V))return!1;a=a.portId;null===a&&(a="");var d=b.part;if(!(d instanceof V))return!1;b=b.portId;null===b&&(b="");for(b=d.Yd(b);b.next();)if(d=b.value,d.fromNode===c&&d.fromPortId===a)return!0;return!1}; +Nf.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.fromLinkableSelfNode&&d.toLinkableSelfNode||!this.isInSameNode(b,d))&&(b.fromLinkableDuplicates&&d.toLinkableDuplicates||!this.isLinked(b,d)))||null!==this.originalLink&&(null!==a&&this.isLabelDependentOnLink(a,this.originalLink)||null!==c&&this.isLabelDependentOnLink(c,this.originalLink))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a, +c,this.originalLink))return!1;if(null!==a){var e=a.linkValidation;if(null!==e&&!e(a,b,c,d,this.originalLink))return!1}if(null!==c&&(e=c.linkValidation,null!==e&&!e(a,b,c,d,this.originalLink)))return!1;e=this.linkValidation;return null!==e?e(a,b,c,d,this.originalLink):!0};Nf.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.labeledLink;if(null===c)return!1;if(c===b)return!0;var d=new J;d.add(a);return Pf(this,c,b,d)}; +function Pf(a,b,c,d){if(b===c)return!0;var e=b.fromNode;if(null!==e&&e.isLinkLabel&&(d.add(e),Pf(a,e.labeledLink,c,d)))return!0;b=b.toNode;return null!==b&&b.isLinkLabel&&(d.add(b),Pf(a,b.labeledLink,c,d))?!0:!1} +Nf.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.isUnconnectedLinkValid;var d=this.diagram.validCycle;if(d!==Qf){if(d===Rf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=b.linksConnected;d.next();){var e=d.value;if(e!==c&&e.isTreeLink&&e.toNode===b)return!1}return!Sf(this,a,b,c,!0)}if(d===Tf){d=c||this.temporaryLink;if(null!==d&&!d.isTreeLink)return!0;for(d=a.linksConnected;d.next();)if(e=d.value,e!==c&&e.isTreeLink&&e.fromNode=== +a)return!1;return!Sf(this,a,b,c,!0)}if(d===Uf)return a===b?a=!0:(d=new J,d.add(b),a=Vf(this,d,a,b,c)),!a;if(d===Wf)return!Sf(this,a,b,c,!1);if(d===Xf)return a===b?a=!0:(d=new J,d.add(b),a=Yf(this,d,a,b,c)),!a}return!0};function Sf(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.linksConnected;f.next();){var g=f.value;if(g!==d&&(!e||g.isTreeLink)&&g.toNode===b&&(g=g.fromNode,g!==b&&Sf(a,g,c,d,e)))return!0}return!1} +function Vf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e&&g.toNode===c&&(g=g.fromNode,g!==c&&Vf(a,b,g,d,e)))return!0}return!1}function Yf(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.linksConnected;f.next();){var g=f.value;if(g!==e){var h=g.fromNode;g=g.toNode;h=h===c?g:h;if(h!==c&&Yf(a,b,h,d,e))return!0}}return!1} +oa.Object.defineProperties(Nf.prototype,{portGravity:{configurable:!0,get:function(){return this.Be},set:function(a){B(a,"number",Nf,"portGravity");0<=a&&(this.Be=a)}},isUnconnectedLinkValid:{configurable:!0,get:function(){return this.Na},set:function(a){B(a,"boolean",Nf,"isUnconnectedLinkValid");this.Na=a}},linkingCursor:{configurable:!0,get:function(){return this.v},set:function(a){this.v=a}},temporaryLink:{configurable:!0,get:function(){return this.Pi}, +set:function(a){x(a,S,Nf,"temporaryLink");this.Pi=a}},temporaryFromNode:{configurable:!0,get:function(){return this.Oi},set:function(a){x(a,V,Nf,"temporaryFromNode");if(this.Oi=a)this.j=a.port}},temporaryFromPort:{configurable:!0,get:function(){return this.j},set:function(a){x(a,P,Nf,"temporaryFromPort");if(null!==this.j){var b=this.j.panel;if(null!==b){var c=b.S.indexOf(this.j);b.sb(c);b.Mb(c,a)}}this.j=a}},temporaryToNode:{configurable:!0,get:function(){return this.Qi}, +set:function(a){x(a,V,Nf,"temporaryToNode");if(this.Qi=a)this.o=a.port}},temporaryToPort:{configurable:!0,get:function(){return this.o},set:function(a){x(a,P,Nf,"temporaryToPort");if(null!==this.o){var b=this.o.panel;if(null!==b){var c=b.S.indexOf(this.o);b.sb(c);b.Mb(c,a)}}this.o=a}},originalLink:{configurable:!0,get:function(){return this.Nb},set:function(a){null!==a&&x(a,S,Nf,"originalLink");this.Nb=a}},originalFromNode:{configurable:!0,get:function(){return this.ob}, +set:function(a){null!==a&&x(a,V,Nf,"originalFromNode");this.ob=a}},originalFromPort:{configurable:!0,get:function(){return this.ub},set:function(a){null!==a&&x(a,P,Nf,"originalFromPort");this.ub=a}},originalToNode:{configurable:!0,get:function(){return this.Uc},set:function(a){null!==a&&x(a,V,Nf,"originalToNode");this.Uc=a}},originalToPort:{configurable:!0,get:function(){return this.Vc},set:function(a){null!==a&&x(a,P,Nf,"originalToPort");this.Vc=a}},isForwards:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){B(a,"boolean",Nf,"isForwards");this.oa=a}},validPortsCache:{configurable:!0,get:function(){return this.zy}},targetPort:{configurable:!0,get:function(){return this.ag},set:function(a){null!==a&&x(a,P,Nf,"targetPort");this.ag=a}},linkValidation:{configurable:!0,get:function(){return this.tj},set:function(a){null!==a&&B(a,"function",Nf,"linkValidation");this.tj=a}},portTargeted:{configurable:!0, +get:function(){return this.$f},set:function(a){null!==a&&B(a,"function",Nf,"portTargeted");this.$f=a}}});Nf.className="LinkingBaseTool";function Zf(){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)};tg.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}; tg.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.Ic(),this.Ka(this.name),this.jr.set(this.adornedObject.la(this.handle.alignment.vv())),this.fo.set(this.adornedObject.part.location),this.Sw.set(this.adornedObject.desiredSize),this.Ct=this.computeCellSize(),this.Et= -this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; +this.computeMinSize(),this.Dt=this.computeMaxSize(),this.isActive=!0))};tg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.isActive=a.isMouseCaptured=!1};tg.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b}; tg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};tg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.hd();K.free(e)}}; tg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.Et,c=this.Dt,d=this.Ct,e=this.adornedObject.Ds(a.lastInput.documentPoint,K.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);K.free(e);a.eb();this.transactionResult=this.name;a.V("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Df){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Oe;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; +tg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.$a();c=c.la(this.handle.alignment.vv());if(a instanceof Cf){var d=new I;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Re;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().ze(c),!0,e)}else a.location=a.location.copy().ze(c).add(this.oppositePoint);b.hd()}}; tg.prototype.computeResize=function(a,b,c,d,e,f){b.pc()&&(b=Ic);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=K.alloc();L.Zo(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), a.y=m-a.height)):1<=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width))):(a.width=Math.max(Math.min(p.x-h,d.width),c.width),f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):0>=b.y?(a.y=Math.max(p.y,m-d.height), -a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Pf&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; +a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width,a.x=h+.5*(l-h-a.width)));K.free(p);return a};tg.prototype.computeReshape=function(){var a=xg;this.adornedObject instanceof Of&&(a=yg(this.adornedObject));return!(a===zg||this.diagram.lastInput.shift)}; tg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};tg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=we.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.la(b)};Ag.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.De=this.handle=null;this.yr=new K(NaN,NaN);this.isActive=a.isMouseCaptured=!1};Ag.prototype.stopTransaction=function(){var a=this.diagram,b=ye.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.lk();return b};Ag.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; Ag.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};Ag.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.eb();this.transactionResult=this.name;a.V("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; Ag.prototype.rotate=function(a){G&&D(a,Ag,"rotate:newangle");var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.$a();var c=b.locationObject,d=b.rotateObject;if(c===d||c.Dg(d))c=this.fo.copy(),b.location=c.ze(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.hd()}}; Ag.prototype.computeRotate=function(a){a=this.rotationPoint.gb(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.yi());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof Be)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, -Ag,"handle"),a.part instanceof Be))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, +oa.Object.defineProperties(Ag.prototype,{handleArchetype:{configurable:!0,get:function(){return this.o},set:function(a){null!==a&&x(a,P,Ag,"handleArchetype");this.o=a}},handle:{configurable:!0,get:function(){return this.j},set:function(a){if(null!==a&&(x(a,P,Ag,"handle"),!(a.part instanceof De)))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{configurable:!0,get:function(){return this.De},set:function(a){if(null!==a&&(x(a,P, +Ag,"handle"),a.part instanceof De))throw Error("new handle must not be in an Adornment: "+a);this.De=a}},snapAngleMultiple:{configurable:!0,get:function(){return this.oa},set:function(a){B(a,"number",Ag,"snapAngleMultiple");this.oa=a}},snapAngleEpsilon:{configurable:!0,get:function(){return this.Z},set:function(a){B(a,"number",Ag,"snapAngleEpsilon");this.Z=a}},originalAngle:{configurable:!0,get:function(){return this.Rw}},rotationPoint:{configurable:!0, get:function(){return this.yr},set:function(a){this.yr=a.copy()}},handleAngle:{configurable:!0,get:function(){return this.v},set:function(a){B(a,"number",Ag,"handleAngle");this.v=a}},handleDistance:{configurable:!0,get:function(){return this.G},set:function(a){B(a,"number",Ag,"handleDistance");this.G=a}}});Ag.className="RotatingTool";Ta("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.nb("Rotating",a,this.mouseDownTools)}); -function Bg(){we.call(this);0e.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};ah.prototype.doStart=function(){kh=this;null!==this.textBlock&&this.doActivate()}; -ah.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof bh&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=hh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(Ac),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};ah.prototype.doCancel=function(){this.stopTool()}; -ah.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};ah.prototype.doMouseDown=function(){this.isActive&&this.acceptText(lh)};ah.prototype.acceptText=function(a){switch(a){case lh:if(this.wa===nh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this);break;case qh:case fh:case gh:if(fh!==a||!0!==this.textBlock.isMultiline)if(this.wa===hh||this.wa===jh||this.wa===ih)this.wa=oh,ph(this)}}; -function ph(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.Ka(a.name),a.wa=nh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=jh,a.doError(e,f))}} -ah.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)};ah.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};ah.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=dh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};ah.prototype.doStop=function(){kh=null}; -ah.prototype.isValidText=function(a,b,c){x(a,bh,ah,"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};ah.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; -oa.Object.defineProperties(ah.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,bh,ah,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Le||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, -get:function(){return this.Z},set:function(a){$a(a,ah,ah,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",ah,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",ah,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", -ah,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,ah,ah,"starting"),this.wa=a)}}});ah.prototype.measureTemporaryTextBlock=ah.prototype.by; -var qh=new F(ah,"LostFocus",0),lh=new F(ah,"MouseDown",1),gh=new F(ah,"Tab",2),fh=new F(ah,"Enter",3),rh=new F(ah,"SingleClick",0),ch=new F(ah,"SingleClickSelected",1),mh=new F(ah,"DoubleClick",2),dh=new F(ah,"StateNone",0),hh=new F(ah,"StateActive",1),ih=new F(ah,"StateEditing",2),oh=new F(ah,"StateValidating",3),jh=new F(ah,"StateInvalid",4),nh=new F(ah,"StateValidated",5),kh=null;ah.className="TextEditingTool";ah.LostFocus=qh;ah.MouseDown=lh;ah.Tab=gh;ah.Enter=fh;ah.SingleClick=rh; -ah.SingleClickSelected=ch;ah.DoubleClick=mh;ah.StateNone=dh;ah.StateActive=hh;ah.StateEditing=ih;ah.StateValidating=oh;ah.StateInvalid=jh;ah.StateValidated=nh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); -function sh(a){th||(uh(),th=!0);this.H=xe;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=vh;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new wh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}sh.prototype.kf=function(a){this.H=a};sh.prototype.canStart=function(){return!0};function xh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),yh(a.H),a.Fb=!0)} -function zh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===vh?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===Ah&&b.Bc.clear(),a.hx=a.al===Bh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ch(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Dh&&null!==d&&(delete d.start.scale,delete d.end.scale), -sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Se(c),Eh(c),a.Fb=!1,b.start(),b.hc&&(Fh(a),c.eb(),Gh(b,0),Mf(c,!0),Hh(a),c.V("AnimationStarting",a)))}))}}function Ih(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Jh(a,b,c,d){a.isTicking||Ih(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=sh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; -function Kh(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 uh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga.lastInput.clickCount?!1:!0};Zg.prototype.doStart=function(){ih=this;null!==this.textBlock&&this.doActivate()}; +Zg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.oc(a.lastInput.documentPoint));if(null!==b&&b instanceof $g&&(this.textBlock=b,null!==b.part)){a.animationManager.Ic();this.isActive=!0;this.wa=fh;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.ki=this.textBlock.copy();var d=new M(this.textBlock.la(yc),this.textBlock.la(Nc));a.Iv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Zg.prototype.doCancel=function(){this.stopTool()}; +Zg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Zg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(jh)};Zg.prototype.acceptText=function(a){switch(a){case jh:if(this.wa===lh)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this);break;case oh:case dh:case eh:if(dh!==a||!0!==this.textBlock.isMultiline)if(this.wa===fh||this.wa===hh||this.wa===gh)this.wa=mh,nh(this)}}; +function nh(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.Ka(a.name),a.wa=lh,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.V("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.wa=hh,a.doError(e,f))}} +Zg.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)};Zg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Zg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.wa=bh,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Zg.prototype.doStop=function(){ih=null}; +Zg.prototype.isValidText=function(a,b,c){x(a,$g,Zg,"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};Zg.prototype.by=function(a){var b=this.ki;b.text=a;b.measure(this.textBlock.Uh,Infinity);return b}; +oa.Object.defineProperties(Zg.prototype,{textBlock:{configurable:!0,get:function(){return this.oa},set:function(a){null!==a&&x(a,$g,Zg,"textBlock");this.oa=a}},currentTextEditor:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{configurable:!0,get:function(){return this.j},set:function(a){!G||a instanceof Oe||v("TextEditingTool.defaultTextEditor must be an HTMLInfo.");this.j=a}},starting:{configurable:!0, +get:function(){return this.Z},set:function(a){$a(a,Zg,Zg,"starting");this.Z=a}},textValidation:{configurable:!0,get:function(){return this.Ij},set:function(a){null!==a&&B(a,"function",Zg,"textValidation");this.Ij=a}},minimumEditorScale:{configurable:!0,get:function(){return this.v},set:function(a){null!==a&&B(a,"number",Zg,"minimumEditorScale");this.v=a}},selectsTextOnActivate:{configurable:!0,get:function(){return this.G},set:function(a){null!==a&&B(a,"boolean", +Zg,"selectsTextOnActivate");this.G=a}},state:{configurable:!0,get:function(){return this.wa},set:function(a){this.wa!==a&&($a(a,Zg,Zg,"starting"),this.wa=a)}}});Zg.prototype.measureTemporaryTextBlock=Zg.prototype.by; +var oh=new F(Zg,"LostFocus",0),jh=new F(Zg,"MouseDown",1),eh=new F(Zg,"Tab",2),dh=new F(Zg,"Enter",3),ph=new F(Zg,"SingleClick",0),ah=new F(Zg,"SingleClickSelected",1),kh=new F(Zg,"DoubleClick",2),bh=new F(Zg,"StateNone",0),fh=new F(Zg,"StateActive",1),gh=new F(Zg,"StateEditing",2),mh=new F(Zg,"StateValidating",3),hh=new F(Zg,"StateInvalid",4),lh=new F(Zg,"StateValidated",5),ih=null;Zg.className="TextEditingTool";Zg.LostFocus=oh;Zg.MouseDown=jh;Zg.Tab=eh;Zg.Enter=dh;Zg.SingleClick=ph; +Zg.SingleClickSelected=ah;Zg.DoubleClick=kh;Zg.StateNone=bh;Zg.StateActive=fh;Zg.StateEditing=gh;Zg.StateValidating=mh;Zg.StateInvalid=hh;Zg.StateValidated=lh;Ta("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.nb("TextEditing",a,this.mouseUpTools)}); +function qh(a){rh||(sh(),rh=!0);this.H=ze;this.$k=this.Fb=this.Iq=this.hc=!1;this.hx=!0;this.al=th;this.Qm=!1;this.Sh=this.Pd=!0;this.Pg=600;this.rw=this.ex=!1;this.ee=new J;this.ie=new uh;this.ie.de=this;this.Ri=new J;this.Cu=new J;this.fs=new J;this.Cr=new J;a&&Object.assign(this,a)}qh.prototype.kf=function(a){this.H=a};qh.prototype.canStart=function(){return!0};function vh(a,b){a.Pd&&a.canStart(b)&&(a.ee.add(b),a.defaultAnimation.isAnimating&&a.Ic(),wh(a.H),a.Fb=!0)} +function xh(a){if(a.Pd&&a.Fb){var b=a.ie,c=a.H,d=a.ee.contains("Model");d&&(a.$k=!0,a.al===th?(b.isViewportUnconstrained=!0,b.Bc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.al===yh&&b.Bc.clear(),a.hx=a.al===zh&&c.qu.D(c.va)?!0:!1,c.V("InitialAnimationStarting",a));d&&!a.Sh||0===b.Bc.count?(a.ee.clear(),a.Fb=!1,b.Bc.clear(),Ah(b,c),a.$k=!1,c.R()):(a.ee.clear(),c.wg=!1,d=b.Bc.get(c),c.autoScale!==Bh&&null!==d&&(delete d.start.scale,delete d.end.scale), +sa.requestAnimationFrame(function(){!1===a.Fb||b.hc||(c.Sf("temporaryPixelRatio")&&Ve(c),Ch(c),a.Fb=!1,b.start(),b.hc&&(Dh(a),c.eb(),Eh(b,0),Lf(c,!0),Fh(a),c.V("AnimationStarting",a)))}))}}function Gh(a){return a.ee.contains("Trigger")&&1===a.ee.count}function Hh(a,b,c,d){a.isTicking||Gh(a)||b instanceof S&&(null!==b.fromNode||null!==b.toNode)||a.ie.add(b,"position",c,d,!1)}t=qh.prototype;t.uv=function(a){return this.ie.uv(a)};t.mv=function(a){return this.ie.mv(a)}; +function Ih(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 sh(){function a(a,b,e,f,g,h){a.position=new K(f(g,b.x,e.x-b.x,h),f(g,b.y,e.y-b.y,h))}var b=new vb;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&Ba(a,">= 1",sh,"duration");this.Pg=a}},isAnimating:{configurable:!0, -enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",sh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& -$a(a,sh,sh,"initialAnimationStyle");this.al=a}}});sh.prototype.stopAnimation=sh.prototype.Ic;var bi=null,th=!1,vh=new F(sh,"Default",1),Bh=new F(sh,"AnimateLocations",2),Ah=new F(sh,"None",3);sh.className="AnimationManager";sh.defineAnimationEffect=function(a,b){th||(uh(),th=!0);bi.add(a,b)};sh.Default=vh;sh.AnimateLocations=Bh;sh.None=Ah; -function wh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=yb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}wh.prototype.suspend=function(){this.il=!0};wh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Lh(this,!0);Fh(this.de);Mf(this.H);Hh(this.de);this.H.redraw()}; -function Ch(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a&&Ba(a,">= 1",qh,"duration");this.Pg=a}},isAnimating:{configurable:!0, +enumerable:!0,get:function(){return this.hc}},isTicking:{configurable:!0,get:function(){return this.Iq}},isInitial:{configurable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",qh,"isInitial");this.Sh=a}},defaultAnimation:{configurable:!0,get:function(){return this.ie}},activeAnimations:{configurable:!0,get:function(){return this.Ri}},initialAnimationStyle:{configurable:!0,get:function(){return this.al},set:function(a){G&& +$a(a,qh,qh,"initialAnimationStyle");this.al=a}}});qh.prototype.stopAnimation=qh.prototype.Ic;var bi=null,rh=!1,th=new F(qh,"Default",1),zh=new F(qh,"AnimateLocations",2),yh=new F(qh,"None",3);qh.className="AnimationManager";qh.defineAnimationEffect=function(a,b){rh||(sh(),rh=!0);bi.add(a,b)};qh.Default=th;qh.AnimateLocations=zh;qh.None=yh; +function uh(a){this.Iu=this.bx=this.de=this.H=null;this.il=this.hc=this.j=!1;this.qn=this.Wd=0;this.Yp=this.Bt=ci;this.hl=this.to=!1;this.pu=1;this.nu=0;this.Nd=this.Pg=NaN;this.vw=0;this.rn=null;this.o=xb;this.Bc=new vb;this.fu=new vb;this.Ll=new J;this.gu=new J;this.sw=di;a&&Object.assign(this,a)}uh.prototype.suspend=function(){this.il=!0};uh.prototype.advanceTo=function(a,b){b&&(this.il=!1);this.to&&a>=this.Nd&&(this.hl=!0,a-=this.Nd);this.vw=a;Jh(this,!0);Dh(this.de);Lf(this.H);Fh(this.de);this.H.redraw()}; +function Ah(a,b){a.fu.clear();a.hl=!1;a.nu=0;a.Nd=NaN;0a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} -function Gh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; -t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Fh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();lf(b,!1);b.eb();b.R();Mf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Mf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Hh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ch(this,null),c.$l(this),b.fc())}}; -t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Df&&(d=b.placeholder);null!==d?(c=d.la(Ac),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; -t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Df&&(c=b.placeholder);if(null!==c){var d=c.la(Ac);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Df)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; -oa.Object.defineProperties(wh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",wh,"duration");1>a&&Ba(a,">= 1",wh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}wh.className="Animation";wh.EaseLinear=function(a,b,c,d){return c*a/d+b};wh.EaseInOutQuad=ci;wh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};wh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};wh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};wh.EaseOutExpo=ei; +function Jh(a,b){if(!a.il||b){var c=a.de;if(!1!==a.hc){var d=+new Date,e=d>a.qn?a.Nd:d-a.Wd;b&&(e=a.vw,ea.qn&&(a.to&&!a.hl?(a.Wd=+new Date,a.qn=a.Wd+a.Nd,a.hl=!0):a.$l(!1))}}} +function Eh(a,b){for(var c=a.Nd,d=a.Bc.iterator,e=a.hl;d.next();){var f=d.key;if(!(f instanceof P&&null===f.diagram)){var g=d.value,h=e?g.end:g.start;g=e?g.start:g.end;var k=bi,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.Yp,b,c,a)}}}t.stop=function(){if(!this.hc)return this;this.$l(!0);return this}; +t.$l=function(a){null!==this.Iu&&this.Iu.vo.remove(this.bx);if(this.hc){var b=this.H,c=this.de;this.il=this.hc=c.$k=!1;Dh(c);for(var d=this.Bc,e=this.Ll.iterator;e.next();)b.remove(e.value);for(e=this.gu.iterator;e.next();)e.value.w();e=this.to;d=d.iterator;for(var f=bi;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.$u,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Vu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Vu?k[n]:l[n],this.Yp,this.Nd,this.Nd,this)}h.Vu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.Cv&&g instanceof U&&g.ec(!1)}b.Ns.clear();mf(b,!1);b.eb();b.R();Lf(b,!0);if(c.defaultAnimation===this){for(n=c.Cr.iterator;n.next();)e=n.value,null!==e.eh&&(e.points=e.eh,e.eh=null);c.Cr.clear()}Lf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.sw);Fh(c);this.nu++;!a&&this.pu>this.nu?(this.hl=!1,this.start()):(this.rn&&this.rn(this),Ah(this,null),c.$l(this),b.fc())}}; +t.Pj=function(a,b){var c=b.actualBounds,d=null;b instanceof Cf&&(d=b.placeholder);null!==d?(c=d.la(yc),d=d.padding,c.x+=d.left,c.y+=d.top,this.add(a,"position",c,a.position,!1)):this.add(a,"position",new K(c.x+c.width/2,c.y+c.height/2),a.position,!1);this.add(a,"scale",.01,a.scale,!1);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Pj(d,b)}; +t.Nj=function(a,b){if(a.isVisible()){var c=null;b instanceof Cf&&(c=b.placeholder);if(null!==c){var d=c.la(yc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.Bc;d.contains(a)&&(d.L(a).Cv=!0);if(a instanceof Cf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Nj(d,b)}};t.Yz=function(a){var b=this.fu.get(a);null===b&&(b={},this.fu.add(a,b));return b}; +oa.Object.defineProperties(uh.prototype,{duration:{configurable:!0,get:function(){return this.Pg},set:function(a){B(a,"number",uh,"duration");1>a&&Ba(a,">= 1",uh,"duration");this.Pg=a}},reversible:{configurable:!0,get:function(){return this.to},set:function(a){this.to=a}},runCount:{configurable:!0,get:function(){return this.pu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function ei(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}uh.className="Animation";uh.EaseLinear=function(a,b,c,d){return c*a/d+b};uh.EaseInOutQuad=ci;uh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};uh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};uh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};uh.EaseOutExpo=ei; function ki(a,b,c){this.start=a;this.end=b;this.$u={};this.Vu=c;this.Cv=!1}ki.className="AnimationState";function li(a,b,c){this.Dd=null;this.Df=a;this.Eo=c||mi;this.Gk=null;void 0!==b&&(this.Gk=b,void 0===c&&(this.Eo=ni))}li.prototype.copy=function(){var a=new li(this.Df);a.Eo=this.Eo;var b=this.Gk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.Gk=c}return a}; function oi(a,b){a=a.Gk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))} oa.Object.defineProperties(li.prototype,{propertyName:{configurable:!0,get:function(){return this.Df},set:function(a){this.Df=a}},animationSettings:{configurable:!0,get:function(){return this.Gk},set:function(a){this.Gk=a}},startCondition:{configurable:!0,get:function(){return this.Eo},set:function(a){G&&$a(a,li,li,"startCondition");this.Eo=a}}});var mi=new F(li,"Default",1),ni=new F(li,"Immediate",2),pi=new F(li,"Bundled",3);li.className="AnimationTrigger"; li.Default=mi;li.Immediate=ni;li.Bundled=pi;function qi(a){Ya(this);this.H=null;this.Ua=new I;this.Ea="";this.vb=1;this.o=!1;this.j=this.fi=this.v=this.aj=this.$i=this.Zi=this.Yi=this.Wi=this.Xi=this.Vi=this.cj=this.Ui=this.bj=this.Ti=this.Si=!0;this.lr=[];a&&Object.assign(this,a)}t=qi.prototype;t.clear=function(){for(var a=this.Ua,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Df?e++:k instanceof V?d++:k instanceof S?f++:k instanceof Be?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Ua.iterator;h.next();){var k=h.value;k instanceof Cf?e++:k instanceof V?d++:k instanceof S?f++:k instanceof De?g++:c++}h="";0c.ar||h.height*e>c.ar?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&&(wi(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(wi(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),wi(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.Ks()||(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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(pe,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; +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.ad(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.jb(re,a,this,b,c,d,e)};t.Bi=function(a,b,c){var d=this.Ua;b.Ug=this;null===this&&ri(b);if(a>=d.count)a=d.count;else if(d.P(a)===b)return-1;d.Mb(a,b);b.hp(c);d=this.diagram;null!==d&&(c?d.R():d.Bi(b));xi(this,a,b);return a}; t.wc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.wc(a,b,c);var d=this.Ua;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.P(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.ip(c);d.sb(a);d=this.diagram;null!==d&&(c?d.R():d.wc(b));b.Ug=null;ri(b);return a}; -function xi(a,b,c){b=yi(a,b,c);if(c instanceof Df&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Ua.s,f=e.length,g=0;gd&&h.containingGroup===c&&(d=g,0<=b))break}!(0>d)&&dd&&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.P(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.sb(b);a.Mb(f,c);return f}for(g=NaN;0<=--f&&(g=a.P(f).zOrder,isNaN(g)););}else if(!isNaN(k)&&k=d){h--;if(h===b)break;a.sb(b);a.Mb(h,c);return h}for(k=NaN;++h< e&&(k=a.P(h).zOrder,isNaN(k)););}return b} oa.Object.defineProperties(qi.prototype,{parts:{configurable:!0,get:function(){return this.Ua.iterator}},partsBackwards:{configurable:!0,get:function(){return this.Ua.iteratorBackwards}},diagram:{configurable:!0,get:function(){return this.H}},name:{configurable:!0,get:function(){return this.Ea},set:function(a){B(a,"string",qi,"name");var b=this.Ea;if(b!==a){var c=this.diagram;if(null!==c)for(""===b&&v("Cannot rename default Layer to: "+a),c= @@ -637,137 +637,137 @@ set:function(a){var b=this.cj;b!==a&&(B(a,"boolean",qi,"allowUngroup"),this.cj=a get:function(){return this.Wi},set:function(a){var b=this.Wi;b!==a&&(B(a,"boolean",qi,"allowMove"),this.Wi=a,this.g("allowMove",b,a))}},allowReshape:{configurable:!0,get:function(){return this.Yi},set:function(a){var b=this.Yi;b!==a&&(B(a,"boolean",qi,"allowReshape"),this.Yi=a,this.g("allowReshape",b,a))}},allowResize:{configurable:!0,get:function(){return this.Zi},set:function(a){var b=this.Zi;b!==a&&(B(a,"boolean",qi,"allowResize"),this.Zi=a,this.g("allowResize",b,a))}}, allowRotate:{configurable:!0,get:function(){return this.$i},set:function(a){var b=this.$i;b!==a&&(B(a,"boolean",qi,"allowRotate"),this.$i=a,this.g("allowRotate",b,a))}},allowSelect:{configurable:!0,get:function(){return this.aj},set:function(a){var b=this.aj;b!==a&&(B(a,"boolean",qi,"allowSelect"),this.aj=a,this.g("allowSelect",b,a))}}});qi.prototype.findObjectsNear=qi.prototype.Ag;qi.prototype.findObjectsIn=qi.prototype.Of;qi.prototype.findObjectsAt=qi.prototype.wi; qi.prototype.findObjectAt=qi.prototype.oc;qi.className="Layer"; -function Q(a,b){zi||(Ai(),zi=!0);Ya(this);xe=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if($g){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===pe&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,xe; -function Di(a){a.de=new sh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Dh;a.Lk=gd;a.Rg=Dh;a.Cq=gd;a.Lt=Ac;a.Ot=Ac;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= -!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new le;a.pq.diagram=a;a.ah=new le;a.ah.diagram=a;a.pj=new le;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Rf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; +function Q(a,b){zi||(Ai(),zi=!0);Ya(this);ze=this;this.Bb=!0;this.Pa=null;this.Fa=this.Ga=0;this.Aa=null;if(Yg){var c=this,d=function(){c.removeEventListener(sa.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==sa.document.body?this.setRTL():c.addEventListener(sa.document,"DOMContentLoaded",d,!1)}this.Bl=null;Bi.add("Model",Ci);var e=this;this.Nb=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.da){b.diagram.da=!1;try{var c=a.change;""===a.modelChange&&c===re&&b.updateDataBindings(a.object, +a.propertyName)}finally{b.diagram.da=!0}}};this.Uc=function(a){e.partManager.doModelChanged(a)};this.uu=this.xu=null;Di(this);this.model=Ei();this.hh=!0;Fi(this);this.layout=new Gi;this.hh=!1;this.nk=this.qk=this.rk=this.pk=this.Hi=this.uA=this.kk=this.cw=null;this.tk=function(){};this.preventDefault=null;this.Dn=!1;this.jg=new Hi;void 0!==a&&("string"===typeof a||sa.Element&&a instanceof Element?Ii(this,a):b=a);this.Bb=!1;b&&this.Bm(b);return this}var Ji,ze; +function Di(a){a.de=new qh;a.de.kf(a);a.Jb=17;a.Vw=!1;a.Fn=!1;a.ou="default";a.ab=new I;a.Cj=new vb;a.Al="default";a.my();a.ly();a.vb=1;a.va=(new K(NaN,NaN)).freeze();a.qu=new K(NaN,NaN);a.Ia=1;a.bq=1;a.Mt=(new K(NaN,NaN)).freeze();a.Nt=NaN;a.au=1E-4;a.Zt=100;a.Gb=new Ib;a.Mu=(new K(NaN,NaN)).freeze();a.Ht=(new M(NaN,NaN,NaN,NaN)).freeze();a.Ej=(new fc(0,0,0,0)).freeze();a.Fj=di;a.Au=!1;a.lu=null;a.su=null;a.Jh=Bh;a.Lk=hd;a.Rg=Bh;a.Cq=hd;a.Lt=yc;a.Ot=yc;a.Lc=!0;a.Bn=!1;a.Ne=new J;a.Ph=new vb;a.kn= +!0;a.Ip=250;a.Hk=-1;a.Kp=(new fc(16,16,16,16)).freeze();a.wg=!1;a.Vk=!1;a.sn=!0;a.pq=new ne;a.pq.diagram=a;a.ah=new ne;a.ah.diagram=a;a.pj=new ne;a.pj.diagram=a;a.Lg=null;a.Bf=null;a.Du=!1;Ki(a);a.mi=new J;a.Ut=!0;a.Hu=Li;a.Ew=!1;a.Ju=Qf;a.vt="auto";a.aq="auto";a.Kh=null;a.Qh=null;a.Mh=null;a.bi=null;a.$h=null;a.Zh=null;a.cu=null;a.Xh=null;a.Kt=!1;a.Yh=null;a.ai=null;a.li=null;a.Nh=null;a.du=!1;a.ku={};a.Bj=[null,null];a.hh=!1;a.Xw=!1;a.Bu=!1;a.yt=!1;a.Gw=!0;a.rd=!1;a.mj=!1;a.kx=!0;a.Me=-2;a.Zg=new vb; a.ko=new I;a.Sg=!1;a.Pd=!0;a.gt=!0;a.Si=!0;a.Ti=!0;a.ht=!1;a.it=!0;a.bj=!0;a.Ui=!0;a.cj=!0;a.kt=!0;a.Vi=!0;a.Xi=!0;a.Wi=!0;a.Yi=!0;a.Zi=!0;a.$i=!0;a.aj=!0;a.lt=!0;a.nt=!0;a.Fw=!1;a.gl=!1;a.yn=!0;a.zn=!0;a.jt=!0;a.mt=!0;a.vu=16;a.zu=16;a.Dr=!1;a.tu=!1;a.yu=0;a.wu=0;a.Eb=(new fc(5)).freeze();a.Ww=(new J).freeze();a.$t=999999999;a.Cw=(new J).freeze();a.lj=!0;a.Oe=!0;a.Bd=!0;a.Le=!1;a.uf=!1;a.Ih=!0;a.vf=!1;a.Jy=new J;a.Dw=new J;a.ii=null;a.pw=new Gb(8,8);a.qw=999;a.Qw=1;a.Yw=0;a.lc={scale:1,position:new K, -bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new bh;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new bh;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Pf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Df;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new bh;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Pf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Pf;c.isPanelMain=!0;b.add(c);c=new Pf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Pf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new Be;b.type=W.Auto;c=new Pf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new Be;b.type=W.Link;c=new Pf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= -new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Oe;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; +bounds:new M,gz:new Gb,vA:new Gb,hA:!1};a.lc.canvasSize=a.lc.gz;a.lc.newCanvasSize=a.lc.vA;a.lc.isScroll=!1;a.ix=(new M(NaN,NaN,NaN,NaN)).freeze();a.Io=(new Gb(NaN,NaN)).freeze();a.fq=(new M(NaN,NaN,NaN,NaN)).freeze();a.Vt=!1;a.Xg=new vb;var b=new V,c=new $g;c.bind(new Mi("text","",Ra));b.add(c);a.Fy=b;a.Xg.add("",b);b=new V;c=new $g;c.stroke="brown";c.bind(new Mi("text","",Ra));b.add(c);a.Xg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Of;c.figure="Ellipse";c.fill="black";c.stroke= +null;c.desiredSize=(new Gb(3,3)).pa();b.add(c);a.Xg.add("LinkLabel",b);a.kj=new vb;b=new Cf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new $g;c.font="bold 12pt sans-serif";c.bind(new Mi("text","",Ra));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Of;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new vg;d.padding=(new fc(5,5,5,5)).pa();c.add(d);b.add(c);a.Dy=b;a.kj.add("",b);a.Wh=new vb;b=new S;c=new Of;c.isPanelMain=!0;b.add(c);c=new Of;c.toArrow= +"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.Ey=b;a.Wh.add("",b);b=new S;c=new Of;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Wh.add("Comment",b);b=new De;b.type=W.Auto;c=new Of;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new vg;c.margin=(new fc(1.5,1.5,1.5,1.5)).pa();b.add(c);a.eu=b;a.Jt=b;b=new De;b.type=W.Link;c=new Of;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Xt=b;a.le=null;a.zq=!1;a.Ok=null;a.partManager=new Ci;a.toolManager= +new Ua;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.At=null;a.jn=new Re;a.hu=null;a.iu=null;a.Zr=!1;a.commandHandler=Ni();a.rq=null;a.sq=Cb;a.gx=!1;a.Sb=1;a.ji=null;a.ar=1;a.er=0;a.Ow=[0,0,0,0,0];a.fr=0;a.Lq=1;a.Iw=0;a.Jw=new K;a.Qy=500;a.Jp=new K;a.Jq=!1}Q.prototype.clear=function(){this.animationManager.Ic();this.model.clear();Oi=null;Pi="";Qi(this,!1);this.ko.clear();Ri();this.Zg.clear();this.ii=null;this.eb();this.$a();this.R()}; function Qi(a,b){a.animationManager.Ic(!0);a.Ww=(new J).freeze();a.Cw=(new J).freeze();var c=a.skipsUndoManager,d=null!==a.ic&&void 0!==a.ic;d&&(a.skipsUndoManager=!0);var e=null;null!==a.le&&(e=a.le.part,null!==e&&a.remove(e));var f=[],g=a.ab.length;if(b){for(b=0;b=a)return b;for(var c=this.ab.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function Ii(a,b){if($g){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); -a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new cj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", -e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);dj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new cj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if($g){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; -f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=ej;e.addEventListener("pointerdown",fj);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Eh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=gj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():hj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=ij(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;jj(a,f,c);c.targetObject=null;a.doMouseMove();hj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=ij(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&jj(e.H,b,d);null===e&&(e=b.target);jj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=kj(b,e);d.targetObject=null;a.doMouseUp();hj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; -c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+lj[1]+lj[2]+"wI"+mj.slice(1,5)]["b"+nj.slice(1,b)](d.ba,oj,b,b);d.ad(!0);pj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), +function Ii(a,b){if(Yg){void 0!==b&&null!==b||v("Diagram setup requires an argument DIV.");null!==a.Pa&&v("Diagram has already completed setup.");"string"===typeof b?a.Pa=sa.document.getElementById(b):b instanceof HTMLDivElement?a.Pa=b:v("No DIV or DIV id supplied: "+b);null===a.Pa&&v("Invalid DIV id; could not get element with id: "+b);void 0!==a.Pa.H&&v("Invalid div id; div already has a Diagram associated with it.");if(!a.Bl&&sa.ResizeObserver){var c=ua(function(){a.fc()},250);a.Bl=new sa.ResizeObserver(function(){c()}); +a.Bl.observe(a.Pa)}"static"===sa.getComputedStyle(a.Pa,null).position&&(a.Pa.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Pa.style["-webkit-tap-highlight-color"]=d;a.Pa.innerHTML="";a.Pa.H=a;a.Pa.goDiagram=a;a.Pa.go=sa.go;var e=new fj(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===sa.getComputedStyle(a.Pa,null).getPropertyValue("direction")&&(a.Fn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none", +e.style.touchAction="none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.Aa=e;a.pb=e.context;d=a.pb;a.Sb=a.computePixelRatio();a.viewSize.u()||(a.Ga=a.Pa.clientWidth||1,a.Fa=a.Pa.clientHeight||1);gj(a,a.Ga,a.Fa);a.Pa.insertBefore(e.Ta,a.Pa.firstChild);e=new fj(null);e.width=1;e.height=1;a.yw=e;a.Gy=e.context;if(Yg){e=wa("div");var f=wa("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Ga+"px";e.style.height=a.Fa+"px";e.style.zIndex="1"; +f.style.position="absolute";f.style.width="1px";f.style.height="1px";a.Pa.appendChild(e);e.appendChild(f);e.onscroll=hj;e.addEventListener("pointerdown",ij);e.H=a;e.Ly=!0;e.My=!0;a.xu=e;a.uu=f}a.tk=ua(function(){a.ji=null;a.R()},300);a.cw=ua(function(){Ch(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.kk=function(b){if(a.isEnabled){var c=jj(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0Math.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=0c||Math.abs(e.y-b.screenY)>c)?a.Lq++:a.Lq=1;d.clickCount=a.Lq;a.Iw=b.timeStamp;a.Jw.Eg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():kj(a,d,b)}};a.pk=function(b){if(a.isEnabled){a.gl=!0;var c=a.Bj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=lj(a,b,!1,!1,!1,null!==c[1]);var d=sa.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;mj(a,f,c);c.targetObject=null;a.doMouseMove();kj(a,c,b)}}};a.rk=function(b){if(a.isEnabled){a.gl=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.ku;if(c&&a.Du)delete d[b.pointerId],b.preventDefault();else if(d=a.Bj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=lj(a,b,!1,!0,!0,!1);var e=sa.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&mj(e.H,b,d);null===e&&(e=b.target);mj(a,b,d);d.clickCount=a.Lq;d.targetDiagram=nj(b,e);d.targetObject=null;a.doMouseUp();kj(a,d,b);c&&(a.Jq=!1)}}};a.qk=function(b){if(a.isEnabled){a.gl=!1;var c=a.ku;c[b.pointerId]&&delete c[b.pointerId]; +c=a.Bj;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.nk=function(b){var c=a.Bj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.Jq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.iq=d.ba["d"+oj[1]+oj[2]+"wI"+pj.slice(1,5)]["b"+qj.slice(1,b)](d.ba,rj,b,b);d.ad(!0);sj(a);"svg"===a.Al&&(b=a.Cj.get("svg"),a.Pa.appendChild(b.Ta), a.pb=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function pj(a){var b=a.Aa.Ta;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.Hi,!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,"pointercancel",a.nk,!1);a.addEventListener(b,"pointerenter",a.uz,!1);a.addEventListener(b,"pointerleave",a.vz,!1);a.addEventListener(b,"wheel",a.kk,!1);a.addEventListener(b,"keydown",a.jA,!1);a.addEventListener(b,"keyup",a.kA,!1);a.addEventListener(b, -"blur",a.ez,!1);a.addEventListener(b,"focus",a.fz,!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(sa,"resize",a.cw,!1)}function Se(a){30r&&(this.position=y.h(-(b.scrollWidth-this.Ga)+w-this.Ga/e+m,this.position.y))),a.My&&this.allowVerticalScroll&&(hu&&(this.position= -y.h(this.position.x,-(b.scrollHeight-this.Fa)+a.scrollTop-this.Fa/e+f))),K.free(y),this.Bd=!0,this.Oe=this.Dr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);yh(this);return sj(this,a)}; -function sj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new M);wh(this);return vj(this,a)}; +function vj(a,b){if(a.fixedBounds.u())return b.assign(a.fixedBounds),b.Oo(a.Eb),b;for(var c=!0,d=a.ab.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===xj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=uj(this,wj);a!==di&&(tj(this,!1),vj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; -t.VA=function(a,b){void 0===b&&(b=wj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===wj||b===xj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===xj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; -t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(Ac,b));K.free(b)}else this.rq=null,this.sq=Cb}; -function vj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(Ac,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=zc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===Aj?(b=k>h?(g-a.Jb)/d:(f-a.Jb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.Fj;this.Fj=di;this.scale=xj(this,zj);a!==di&&(wj(this,!1),yj(this,this.documentBounds,this.Ga/this.Ia,this.Fa/this.Ia,this.Lk,!1));this.Fj=a};t=Q.prototype; +t.VA=function(a,b){void 0===b&&(b=zj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===zj||b===Aj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Ga;var f=this.Fa;e=b===Aj?f/d>e/c?(f-(this.Le?this.Jb:0))/d:(e-(this.uf?this.Jb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new K(a.x,a.y)}}; +t.$y=function(a,b){this.$a();var c=this.documentBounds,d=this.viewportBounds;this.position=new K(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.Tz=function(a){if(a instanceof P){this.rq=a;var b=K.alloc();this.sq=this.Cp(a.la(yc,b));K.free(b)}else this.rq=null,this.sq=Cb}; +function yj(a,b,c,d,e,f){var g=K.allocAt(a.va.x,a.va.y),h=g.x,k=g.y;if(null!==a.rq){var l=K.alloc();l=a.rq.la(yc,l);h=l.x-a.sq.x/a.scale;k=l.y-a.sq.y/a.scale;e=xc;K.free(l)}if(f||a.scrollMode===di)e.mb()&&(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.Ej,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Df&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} -t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Df||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Df&&c.isVisible()&&Hj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Be&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; -function Hj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Df?(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;eb;b++){var c=a.Ne.iterator;if(null===c||0===a.Ne.count)break;a.Ne=new J;a.bw(c,a.Ne);G&&22===b&&Fa("failure to validate parts")}a.nodes.each(function(a){a instanceof Cf&&0!==(a.U&65536)!==!1&&(a.U=a.U^65536)})}} +t.bw=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ed()||c instanceof Cf||(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof Cf&&c.isVisible()&&Kj(this,c);for(a.reset();a.next();)c=a.value,c instanceof S&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof De&&c.isVisible()&&(c.Fi()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function Kj(a,b){for(var c=Na(),d=Na(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof Cf?(Lj(f)||Mj(f)||Nj(f))&&Kj(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;eE&&(w=T.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Jb(m,u);Jb(q,u);d.push(new M(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Rj(this.jg,this)&&(e=0E&&(w=T.left, z=T.right),y.height>H&&(A=T.top,C=T.bottom)):(w=T.left,z=T.right,A=T.top,C=T.bottom);var aa=y.width+w+z,Y=y.height+A+C;T=a.scale;var R=aa>k/T,O=Y>l/T;if(!(f||a.uf||a.Le||R||O))return!0;w=y.x-w;k=m.x;z=y.right+z;l=m.right+g;A=y.y-A;var la=m.y;y=y.bottom+C;m=m.bottom+h;var ha="1px";C="1px";a.scrollMode===di&&(R||O)&&(R&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(R=1,w+1l+1&&(R=Math.max((z-l)*T+a.Ga,R)),E+g+1m+1&&(R=Math.max((y-m)*T+a.Fa,R)),H+h+1l+1&&(g=Math.max((z-l)*T+a.Ga,g)),E+1m+1&&(h=Math.max((y-m)*T+g,h)),H+1l+1&&(b=a.position.x*T));if(a.Fn)switch(a.ou){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(H+1< Y?r.scrollTop=(a.position.y-A)*T:A+1m+1&&(r.scrollTop=a.position.y*T));k=a.Ga;l=a.Fa;r.style.width=k+(a.uf?a.Jb:0)+"px";r.style.height=l+(a.Le?a.Jb:0)+"px";return c!==k||d!==l||a.animationManager.Fb?(c=M.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,T,f),M.free(c),!1):!0}t=Q.prototype; -t.add=function(a){x(a,U,Q,"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.bk(a.layerName),null===b&&(b=this.bk("")),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.Bi(99999999,a,a.diagram===this);0<=c&&this.jb(re,"parts",b,null,a,null,c);b.isTemporary||this.eb();a.F(1);c=a.layerChanged;null!==c&&c(a,null, -b)}};t.Bi=function(a){this.partManager.Bi(a);var b=this;Vj(a,function(a){Wj(b,a)});(a instanceof Be||a instanceof Df&&null!==a.placeholder)&&a.w();null!==a.data&&Vj(a,function(a){Xj(b.partManager,a)});!0!==Jj(a)&&!0!==Kj(a)||this.Ne.add(a);Yj(a,!0,this);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()}; -t.wc=function(a){a.Qj();this.partManager.wc(a);var b=this;null!==a.data&&Vj(a,function(a){ak(b.partManager,a,b)});this.Ne.remove(a);Zj(a)?(a.actualBounds.u()&&this.R(Uj(a,a.actualBounds)),this.eb()):a.isVisible()&&a.actualBounds.u()&&this.R(Uj(a,a.actualBounds));this.fc()};t.remove=function(a){x(a,U,Q,"remove:part");bk(this,a,!0)}; -function bk(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.F(2),c&&b.Xj(),c=d.wc(-1,b,!1),0<=c&&a.jb(se,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Vs=function(a,b){void 0===b&&(b=!1);if(Ha(a))for(var c=a.length,d=0;dd&&this.eb();return this}; -t.Ty=function(a,b){hk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(se,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; -t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(se,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +k=k.y;isNaN(k)&&(k=f?Math.round(1E3*a.location.y)/1E3:a.location.y);d.h(Math.max(h,Math.min(c.x,l)),Math.max(g,Math.min(c.y,k)));e!==b&&K.free(e);return d};function fk(a){var b=a.toolManager.findTool("Dragging");return null!==b?b.dragOptions:a.jn} +function Eg(a,b,c,d,e){void 0===e&&(e=fk(a));d.assign(c);if(null!==b){var f=a.grid;b=e.gridSnapCellSize;a=b.width;b=b.height;var g=e.gridSnapOrigin,h=g.x;g=g.y;e=e.gridSnapCellSpot;if(null!==f){var k=f.gridCellSize;isNaN(a)&&(a=k.width);isNaN(b)&&(b=k.height);f=f.gridOrigin;isNaN(h)&&(h=f.x);isNaN(g)&&(g=f.y)}f=K.allocAt(0,0);f.Li(0,0,a,b,e);L.Zo(c.x,c.y,h+f.x,g+f.y,a,b,d);K.free(f)}}function We(a,b){if(null!==b)for(a.Zr=!0,a=b.iterator;a.next();)b=a.key,b instanceof S&&(b.suspendsRouting=!0)} +function jf(a,b){if(null!==b){for(b=b.iterator;b.next();){var c=b.key;c instanceof S&&(c.suspendsRouting=!1,jk(c)&&c.ib())}a.Zr=!1}}function hk(a,b,c){b=b.containingGroup;if(null!==b){a=hk(a,b,c);if(null!==a)return a;a=c.L(b);if(null!==a)return a}return null}t=Q.prototype;t.Vd=function(a,b,c){if(void 0===c)return new Ze(xb);var d=a.isGridSnapEnabled;a.groupsSnapMembers||null===b.containingGroup||(d=!1);return d?new Ze(new K(Math.round(1E3*c.x)/1E3,Math.round(1E3*c.y)/1E3)):new Ze(c.copy())}; +function kk(a,b,c){x(b,qi,Q,"addLayer:layer");null!==b.diagram&&b.diagram!==a&&v("Cannot share a Layer with another Diagram: "+b+" of "+b.diagram);null===c?null!==b.diagram&&v("Cannot add an existing Layer to this Diagram again: "+b):(x(c,qi,Q,"addLayer:existingLayer"),c.diagram!==a&&v("Existing Layer must be in this Diagram: "+c+" not in "+c.diagram),b===c&&v("Cannot move a Layer before or after itself: "+b));if(b.diagram!==a){b=b.name;a=a.ab;c=a.count;for(var d=0;dd&&this.eb();return this}; +t.Ty=function(a,b){kk(this,a,b);a.kf(this);var c=this.ab,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ic&&this.jb(ue,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.eb();return this}; +t.EA=function(a){x(a,qi,Q,"removeLayer:layer");a.diagram!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.ab,c=b.indexOf(a);if(b.remove(a)){for(b=a.Ua.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.ic&&this.jb(ue,"layers",this,a,null,c,null);this.R();this.eb()}}};t.bk=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.px=function(a){B(a,"function",Q,"addModelChangedListener:listener");null===this.Bf&&(this.Bf=new I);this.Bf.add(a);this.model.bf(a);return this};t.GA=function(a){B(a,"function",Q,"removeModelChangedListener:listener");null!==this.Bf&&(this.Bf.remove(a),0===this.Bf.count&&(this.Bf=null));this.model.uk(a)};t.bf=function(a){B(a,"function",Q,"addChangedListener:listener");null===this.Lg&&(this.Lg=new I);this.Lg.add(a);return this}; -t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==qe&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==qe&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.uk=function(a){B(a,"function",Q,"removeChangedListener:listener");null!==this.Lg&&(this.Lg.remove(a),0===this.Lg.count&&(this.Lg=null))};t.rs=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.iv(a);a.change!==se&&(this.isModified=!0);if(null!==this.Lg)for(var b=this.Lg,c=b.length,d=0;dn.Ua.indexOf(q)&&n.Bi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.cc(),n.wc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof qi&&(b?(q.kf(this),this.ab.Mb(p,q)):this.ab.sb(p)):v("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==se&&v("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ka=function(a){return this.undoManager.Ka(a)};Q.prototype.kb=function(a){return this.undoManager.kb(a)};Q.prototype.Wf=function(){return this.undoManager.Wf()};Q.prototype.commit=function(a,b){void 0===b&&(b="");var c=this.skipsUndoManager;null===b&&(this.skipsUndoManager=!0,b="");this.undoManager.Ka(b);var d=!1;try{a(this),d=!0}finally{d?this.undoManager.kb(b):this.undoManager.Wf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.Fp=function(){this.partManager.Fp()}; -function mk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= -a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);tj(a,!1);a=a.Ia;d.Fb&&(Ih(d)||d.ie.add(d.H,"scale",b,a))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Dh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ke(e,this));this.Bb||this.invalidateViewport(a,b);Ej(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= +function pk(a,b,c){var d=a.animationManager;if(a.Bb||a.rd)a.Ia=c,Si(a),a.R(),a.Oe=!0,a=a.Ia,d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a));else if(null===a.Aa)a.Ia=c,Si(a);else{a.Bb=!0;var e=a.viewportBounds.copy(),f=a.Ga,g=a.Fa,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.fd()?l.Tf(Pc)?h=0:l.Tf(Qc)&&(h=f-1):h=l.mb()?l.x*(f-1):f/2);isNaN(k)&&(l.fd()?l.Tf(Oc)?k=0:l.Tf(Rc)&&(k=g-1):k=l.mb()?l.y*(g-1):g/2);null===a.scaleComputation||a.animationManager.defaultAnimation.isAnimating||(c= +a.scaleComputation(a,c));ca.maxScale&&(c=a.maxScale);f=K.allocAt(a.va.x+h/b-h/c,a.va.y+k/b-k/c);a.position=f;K.free(f);a.Ia=c;Si(a);a.Bb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);wj(a,!1);a=a.Ia;d.Fb&&(Gh(d)||d.ie.add(d.H,"scale",b,a))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Oe=!0);this.Bd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==Bh||a.width===b.width&&a.height===b.height||e.F();e=this.currentTool;!0===this.gl&&e instanceof Ua&&(this.lastInput.documentPoint=this.bt(this.lastInput.viewPoint),Ne(e,this));this.Bb||this.invalidateViewport(a,b);Hj(this);this.lc.scale=c;this.lc.position.x=a.x;this.lc.position.y=a.y;this.lc.bounds.assign(a);this.lc.canvasSize.width= Math.round(a.width*c);this.lc.canvasSize.height=Math.round(a.height*c);this.lc.newCanvasSize.width=this.Ga;this.lc.newCanvasSize.height=this.Fa;this.lc.isScroll=d;this.V("ViewportBoundsChanged",this.lc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.dd(b)&&a.ib()})}}; -function Ej(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(nk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, +function Hj(a,b){var c=a.le;if(null!==c&&c.visible){for(var d=Gb.alloc(),e=1,f=1,g=c.S.s,h=g.length,k=0;km||(qk(l.figure)?f=f*m/L.Mx(f,m):e=e*m/L.Mx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==b)e=b.width,f=b.height,a=b.x,g=b.y;else{b=M.alloc();a=a.viewportBounds;b.h(a.x,a.y,a.width,a.height);if(!b.u()){M.free(b);return}e=b.width;f=b.height;a=b.x;g=b.y;M.free(b)}c.width=e+2*d.width;c.height=f+2*d.height;b=K.alloc();L.Zo(a,g,0,0,d.width, d.height,b);b.offset(-d.width,-d.height);Gb.free(d);c.part.location=b;K.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.V("ChangingSelection",b);for(var c=b.La(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||xh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)vk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),yh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||zh(f),a.da=c}}}function vk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)vk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Hj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; +function Vj(a,b){a.lj=!1;var c=a.fq;c.D(b)||(c=c.copy(),a.fq.assign(b),wj(a,!1),a.V("DocumentBoundsChanged",void 0,c),a.Oe=!0,a.R())}t.$a=function(){if(this.lj){var a=M.alloc();Vj(this,this.computeBounds(a));M.free(a)}};t.Mz=function(){for(var a=new J,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&a.add(c)}for(b=this.links;b.next();)c=b.value,c.isTopLevel&&a.add(c);return a.iterator};t.Lz=function(){return this.mi.iterator}; +t.nA=function(a){wh(this);a&&wk(this,!0);this.rd?Ij(this,!1):(this.Vk=!0,Lf(this))};function wk(a,b){for(var c=a.mi.iterator;c.next();)xk(a,c.value,b);a.layout&&(b?a.layout.isValidLayout=!1:a.layout.F())}function xk(a,b,c){if(null!==b){for(var d=b.sl.iterator;d.next();)xk(a,d.value,c);null!==b.layout&&(c?b.layout.isValidLayout=!1:b.layout.F())}} +function Ij(a,b){if(a.Ih&&!a.yt){var c=a.da;a.da=!0;var d=a.undoManager.transactionLevel,e=a.layout,f=a.animationManager;try{0===d&&(a.undoManager.isInternalTransaction=!0,a.Ka("Layout"));1>=d&&!f.defaultAnimation.isAnimating&&!f.Fb&&(b||vh(f,"Layout"));a.Ih=!1;for(var g=a.mi.iterator;g.next();)yk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),wh(a),e.isValidLayout=!0):a.Ih=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.kb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||xh(f),a.da=c}}}function yk(a,b,c,d){if(null!==b){for(var e=b.sl.iterator;e.next();)yk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.Ch=!b.location.u(),e.doLayout(b),b.F(32),Kj(a,b),e.isValidLayout=!0):a.Ih=!0)}}t.Sz=function(){for(var a=new I,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.vh()&&a.add(c)}return a.iterator}; function Ki(a){function b(a){var b=a.toLowerCase(),e=new I;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new vb,d=new vb;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.xw=c;a.ww=d} -function Rj(a,b){var c=a.ww.L(b);return null!==c?c:a.ww.L(b.toLowerCase())}function wk(a,b){var c=a.xw.L(b);if(null!==c)return c;c=a.xw.L(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b)}t.Oj=function(a,b){B(a,"string",Q,"addDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.add(b);return this};t.om=function(a,b){B(a,"string",Q,"removeDiagramListener:name");B(b,"function",Q,"addDiagramListener:listener");a=wk(this,a);null!==a&&a.remove(b)}; -t.V=function(a,b,c){G&&B(a,"string",Q,"raiseDiagramEvent:name");var d=wk(this,a),e=new ne;e.diagram=this;a=Rj(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.P(0)(e);else if(0!==b)for(d=d.La(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=M.allocAt(0,0,d.width*e,d.height*e);var f=K.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, -1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(yb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); -M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Df&&(a.nq=null)})}; -function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!$g)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; -t.$x=function(a){void 0===a&&(a={});return Hk(this,this.qA,a)}; -t.qA=function(a,b,c){var d=Qk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case mj+"data":e=d.getImageData(0,0,c.width,c.height);break;case mj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.cb(xb)||(b=new K(b.x+f.x/e,b.y+f.y/e)); +M.free(d);K.free(f);return b};t=Q.prototype;t.Ps=function(){return null};t.pv=function(){return null};t.ps=function(a,b){this.Cj.add(a,b)};t.Tu=function(a){(this.gx=a)||this.nodes.each(function(a){a instanceof Cf&&(a.nq=null)})}; +function Kk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].ml){f=!1;break}f||a-l>k?b(c,e,h):sa.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Zg.iterator;g.next();)if(!g.value[0].ml){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;sa.requestAnimationFrame(function(){d()});return null}t.pA=function(a){if(!Yg)return null;void 0===a&&(a={});a.returnType="Image";return this.$x(a)}; +t.$x=function(a){void 0===a&&(a={});return Kk(this,this.qA,a)}; +t.qA=function(a,b,c){var d=Sk(c,a,"canvas",null);if(null===d)return null;c=d.ba.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case pj+"data":e=d.getImageData(0,0,c.width,c.height);break;case pj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&v('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Qk(a,b,c,d){a.animationManager.Ic();a.hd();if(null===a.Aa)return null;"object"!==typeof b&&v("properties argument must be an Object.");var e=!1,f=b.size||null,g=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(g="NaN");var h=b.maxSize;void 0===b.maxSize&&(e=!0,h="SVG"===c?new Gb(Infinity,Infinity):new Gb(2E3,2E3));var k=b.position||null,l=b.parts||null,m=void 0===b.padding?1:b.padding,n=b.background||null,p=b.omitTemporary;void 0===p&&(p=!0);var q=b.document||document,r=b.elementFinished|| -null,u=b.showTemporary;void 0===u&&(u=!p);b=b.showGrid;void 0===b&&(b=u);null!==f&&isNaN(f.width)&&isNaN(f.height)&&(f=null);"number"===typeof m?m=new fc(m):m instanceof fc||v("MakeImage padding must be a Margin or a number.");m.left=Math.max(m.left,0);m.right=Math.max(m.right,0);m.top=Math.max(m.top,0);m.bottom=Math.max(m.bottom,0);a.pb.ad(!0);p=new cj(null,q,void 0,!0);var y=p.context;if(!(f||g||l||k)){p.width=a.Ga+Math.ceil(m.left+m.right);p.height=a.Fa+Math.ceil(m.top+m.bottom);if("SVG"===c){if(null=== -d)return null;d.resize(p.width,p.height,p.width,p.height);d.ownerDocument=q;d.vs=r;Pj(a,d.context,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);return d.context}a.kn=!1;Pj(a,y,m,new Gb(p.width,p.height),a.Ia,a.va,l,n,u,b);a.kn=!0;return p.context}var w=a.bq,z=a.documentBounds.copy();z.Uv(a.Eb);if(u)for(var A=a.ab.s,C=A.length,E=0;Ew?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Uk&&G&&(f>w|| -z>h)&&(Fa("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."),Uk=!0),isNaN(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Pj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); -return d.context}a.kn=!1;Pj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} -oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Vk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Tj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, -0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Tj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, +null!==g?("NaN"===g&&(g=w),f.u()?(f=H,z=E):isNaN(E)?(f=H,z=z.height*g):(f=z.width*g,z=E)):null!==f?f.u()?(g=Math.min(H/z.width,E/z.height),f=H,z=E):isNaN(E)?(g=H/z.width,f=H,z=z.height*g):(g=E/z.height,f=z.width*g,z=E):null!==g?"NaN"===g&&h.u()?(g=Math.min((h.width-k)/z.width,(h.height-C)/z.height),g>w?(g=w,f=z.width,z=z.height):(f=h.width,z=h.height)):(f=z.width*g,z=z.height*g):(g=w,f=z.width,z=z.height);null!==m?(f+=k,z+=C):m=new fc(0);null!==h&&(w=h.width,h=h.height,"SVG"!==c&&e&&!Wk&&G&&(f>w|| +z>h)&&(Fa("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(w)&&(w=2E3),isNaN(h)&&(h=2E3),isFinite(w)&&(f=Math.min(f,w)),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=q;d.vs=r;Sj(a,d.context,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b); +return d.context}a.kn=!1;Sj(a,y,m,new Gb(Math.ceil(f),Math.ceil(z)),g,A,l,n,u,b);a.kn=!0;return p.context} +oa.Object.defineProperties(Q.prototype,{renderer:{configurable:!0,get:function(){return this.Al},set:function(a){this instanceof Xk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.Al&&(this.Al=a,"default"===a||"canvas"===a?(a=this.Cj.get("svg"),null!==a&&a.Ta.remove(),this.Aa&&(this.pb=this.Aa.context)):"svg"===a?(this.Cj.contains("svg")?a=this.Cj.get("svg"):(a=new Wj(this,sa.document),this.ps("svg",a)),null!==this.div&&this.div.appendChild(a.Ta),this.pb=a.context,this.Aa&&(this.Aa.context.setTransform(this.Sb, +0,0,this.Sb,0,0),this.Aa.context.clearRect(0,0,this.Ga,this.Fa))):"debug"!==a||this.Cj.contains("SVG")||(a=new Wj(this,sa.document),this.ps("SVG",a),a.Ta.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Ta)),this.tk()))}},div:{configurable:!0,get:function(){return this.Pa},set:function(a){null!==a&&x(a,HTMLDivElement,Q,"div");if(this.Pa!==a){var b=this.Pa;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.Aa&&(b=this.Aa.Ta,this.removeEventListener(b, "pointermove",this.pk,!1),this.removeEventListener(b,"pointerdown",this.Hi,!1),this.removeEventListener(b,"pointerup",this.rk,!1),this.removeEventListener(b,"pointerout",this.qk,!1),this.removeEventListener(b,"pointercancel",this.nk,!1),this.Aa.Cx()),this.Bl&&(this.Bl.disconnect(),this.Bl=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.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),xe===this&&(xe=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= +this.currentTool.doCancel(),this.Aa=null,this.removeEventListener(sa,"resize",this.cw,!1),this.removeEventListener(sa,"wheel",this.kk,!0),ze===this&&(ze=null)):null===this.Hi&&(this.vf=!1);this.Pa=null;if(null!==a){if(b=a.H)b.div=null;Ii(this,a);this.tk()}}}},sx:{configurable:!0,get:function(){return this.er}},Di:{configurable:!0,get:function(){return this.vf}},draggedLink:{configurable:!0,get:function(){return this.At},set:function(a){this.At!==a&&(this.At= a,null!==a&&(this.hu=a.fromPort,this.iu=a.toPort))}},ey:{configurable:!0,get:function(){return this.hu},set:function(a){this.hu=a}},gy:{configurable:!0,get:function(){return this.iu},set:function(a){this.iu=a}},animationManager:{configurable:!0,get:function(){return this.de}},undoManager:{configurable:!0,get:function(){return this.ic.undoManager}},skipsUndoManager:{configurable:!0,get:function(){return this.hh},set:function(a){B(a, "boolean",Q,"skipsUndoManager");this.hh=a;this.ic.skipsUndoManager=a}},delaysLayout:{configurable:!0,get:function(){return this.yt},set:function(a){this.yt=a}},opacity:{configurable:!0,get:function(){return this.vb},set:function(a){var b=this.vb;b!==a&&(B(a,"number",Q,"opacity"),(0>a||1a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", -b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,le,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,le, -Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,le,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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-"+ +this.zn=a,this.Oe=!0,this.R(),this.g("hasVerticalScrollbar",b,a),wj(this,!1))}},hasHorizontalScrollbar:{configurable:!0,get:function(){return this.yn},set:function(a){var b=this.yn;b!==a&&(B(a,"boolean",Q,"hasHorizontalScrollbar"),this.yn=a,this.Oe=!0,this.R(),this.g("hasHorizontalScrollbar",b,a),wj(this,!1))}},allowHorizontalScroll:{configurable:!0,get:function(){return this.jt},set:function(a){var b=this.jt;b!==a&&(B(a,"boolean",Q,"allowHorizontalScroll"),this.jt=a,this.g("allowHorizontalScroll", +b,a),wj(this,!1))}},allowVerticalScroll:{configurable:!0,get:function(){return this.mt},set:function(a){var b=this.mt;b!==a&&(B(a,"boolean",Q,"allowVerticalScroll"),this.mt=a,this.g("allowVerticalScroll",b,a),wj(this,!1))}},scrollHorizontalLineChange:{configurable:!0,get:function(){return this.vu},set:function(a){var b=this.vu;b!==a&&(B(a,"number",Q,"scrollHorizontalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollHorizontalLineChange"),this.vu=a,this.g("scrollHorizontalLineChange", +b,a))}},scrollVerticalLineChange:{configurable:!0,get:function(){return this.zu},set:function(a){var b=this.zu;b!==a&&(B(a,"number",Q,"scrollVerticalLineChange"),0>a&&Ba(a,">= 0",Q,"scrollVerticalLineChange"),this.zu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{configurable:!0,get:function(){return this.pj},set:function(a){G&&x(a,ne,Q,"lastInput");this.pj=a}},previousInput:{configurable:!0,get:function(){return this.ah},set:function(a){G&&x(a,ne, +Q,"previousInput");this.ah=a}},firstInput:{configurable:!0,get:function(){return this.pq},set:function(a){G&&x(a,ne,Q,"firstInput");this.pq=a}},currentCursor:{configurable:!0,get:function(){return this.vt},set:function(a){""===a&&(a=this.aq);if(this.vt!==a){B(a,"string",Q,"currentCursor");var b=this.Aa,c=this.Pa;if(null!==b&&null!==c){this.vt=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.aq},set:function(a){""===a&&(a="auto");var b=this.aq;b!==a&&(B(a,"string",Q,"defaultCursor"),this.aq=a,this.g("defaultCursor",b,a))}},click:{configurable:!0,get:function(){return this.Kh},set:function(a){var b=this.Kh;b!==a&&(null!==a&&B(a,"function",Q,"click"),this.Kh=a,this.g("click", b,a))}},doubleClick:{configurable:!0,get:function(){return this.Qh},set:function(a){var b=this.Qh;b!==a&&(null!==a&&B(a,"function",Q,"doubleClick"),this.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return this.Mh},set:function(a){var b=this.Mh;b!==a&&(null!==a&&B(a,"function",Q,"contextClick"),this.Mh=a,this.g("contextClick",b,a))}},mouseOver:{configurable:!0,get:function(){return this.bi},set:function(a){var b=this.bi;b!== a&&(null!==a&&B(a,"function",Q,"mouseOver"),this.bi=a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return this.$h},set:function(a){var b=this.$h;b!==a&&(null!==a&&B(a,"function",Q,"mouseHover"),this.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return this.Zh},set:function(a){var b=this.Zh;b!==a&&(null!==a&&B(a,"function",Q,"mouseHold"),this.Zh=a,this.g("mouseHold",b,a))}},mouseDragOver:{configurable:!0, get:function(){return this.cu},set:function(a){var b=this.cu;b!==a&&(null!==a&&B(a,"function",Q,"mouseDragOver"),this.cu=a,this.g("mouseDragOver",b,a))}},mouseDrop:{configurable:!0,get:function(){return this.Xh},set:function(a){var b=this.Xh;b!==a&&(G&&null!==a&&B(a,"function",Q,"mouseDrop"),this.Xh=a,this.g("mouseDrop",b,a))}},handlesDragDropForTopLevelParts:{configurable:!0,get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(B(a,"boolean",Q,"handlesDragDropForTopLevelParts"), this.Kt=a,this.g("handlesDragDropForTopLevelParts",b,a))}},mouseEnter:{configurable:!0,get:function(){return this.Yh},set:function(a){var b=this.Yh;b!==a&&(null!==a&&B(a,"function",Q,"mouseEnter"),this.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return this.ai},set:function(a){var b=this.ai;b!==a&&(null!==a&&B(a,"function",Q,"mouseLeave"),this.ai=a,this.g("mouseLeave",b,a))}},toolTip:{configurable:!0,get:function(){return this.li}, -set:function(a){var b=this.li;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("Diagram.toolTip must be an Adornment or HTMLInfo."),this.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return this.Nh},set:function(a){var b=this.Nh;b!==a&&(!G||a instanceof Be||a instanceof Le||v("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Nh=a,this.g("contextMenu",b,a))}},commandHandler:{configurable:!0,get:function(){return this.tb}, -set:function(a){this.tb!==a&&(this.tb=a,a.kf(this))}},toolManager:{configurable:!0,get:function(){return this.Be},set:function(a){this.Be!==a&&(x(a,Ua,Q,"toolManager"),this.Be=a,a.diagram=this)}},defaultTool:{configurable:!0,get:function(){return this.ub},set:function(a){var b=this.ub;b!==a&&(x(a,we,Q,"defaultTool"),this.ub=a,a.diagram=this,this.currentTool===b&&(this.currentTool=a))}},currentTool:{configurable:!0,get:function(){return this.ob},set:function(a){var b= -this.ob;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(x(a,we,Q,"currentTool"),this.ob=a,a.diagram=this,a.doStart())}},selection:{configurable:!0,get:function(){return this.Ww}},maxSelectionCount:{configurable:!0,get:function(){return this.$t},set:function(a){var b=this.$t;if(b!==a)if(B(a,"number",Q,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.$t=a,this.g("maxSelectionCount",b,a),!this.undoManager.isUndoingRedoing&& -(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,Be,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, -enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,Be,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,Be,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, -enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||ok(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& -v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;xh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=pk(this.ic.type);for(var e=0;e= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.eu},set:function(a){var b=this.eu;b!==a&&(x(a,De,Q,"nodeSelectionAdornmentTemplate"),this.eu=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{configurable:!0, +enumerable:!0,get:function(){return this.Jt},set:function(a){var b=this.Jt;b!==a&&(x(a,De,Q,"groupSelectionAdornmentTemplate"),this.Jt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{configurable:!0,get:function(){return this.Xt},set:function(a){var b=this.Xt;b!==a&&(x(a,De,Q,"linkSelectionAdornmentTemplate"),this.Xt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{configurable:!0,get:function(){return this.Cw}},isModified:{configurable:!0, +enumerable:!0,get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction?!0:this.Dn&&this.Me!==a.historyIndex:this.Dn},set:function(a){if(this.Dn!==a){B(a,"boolean",Q,"isModified");this.Dn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Me=b.historyIndex);a||rk(this)}}},model:{configurable:!0,get:function(){return this.ic},set:function(a){var b=this.ic;if(b!==a){x(a,X,Q,"model");this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&& +v("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Ic(!0);var c=Qi(this,!0);this.vf=!1;this.sn=!0;this.Me=-2;this.wg=!1;var d=this.Bb;this.Bb=!0;vh(this.animationManager,"Model");b&&(null!==this.Bf&&this.Bf.each(function(a){return b.uk(a)}),b.uk(this.Uc));this.ic=a;this.partManager=sk(this.ic.type);for(var e=0;ethis.scale&&(this.scale=a)):Ba(a,"> 0",Q,"minScale"))}},maxScale:{configurable:!0,get:function(){return this.Zt}, -set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),tj(this,!1))}}, +set:function(a){D(a,Q,"maxScale");var b=this.Zt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{configurable:!0,get:function(){return this.Mu},set:function(a){this.Mu.D(a)||(x(a,K,Q,"zoomPoint"),this.Mu=a=a.M())}},contentAlignment:{configurable:!0,get:function(){return this.Lk},set:function(a){var b=this.Lk;b.D(a)||(x(a,Hb,Q,"contentAlignment"),this.Lk=a=a.M(),this.g("contentAlignment",b,a),wj(this,!1))}}, initialContentAlignment:{configurable:!0,get:function(){return this.Cq},set:function(a){var b=this.Cq;b.D(a)||(x(a,Hb,Q,"initialContentAlignment"),this.Cq=a=a.M(),this.g("initialContentAlignment",b,a))}},padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.eb(),this.g("padding",b,a))}},partManager:{configurable:!0,get:function(){return this.Vc}, set:function(a){var b=this.Vc;b!==a&&(x(a,Ci,Q,"partManager"),null!==a.diagram&&v("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.kf(null),this.Vc=a,a.kf(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.Yc}, -set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Wk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, -set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Xk&&a!==Yk&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= +set:function(a){var b=this.Yc;b!==a&&(x(a,Gi,Q,"layout"),this.Yc=a,a.diagram=this,a.group=null,this.Ih=!0,this.g("layout",b,a),this.fc())}},isTreePathToChildren:{configurable:!0,get:function(){return this.Ut},set:function(a){var b=this.Ut;if(b!==a&&(B(a,"boolean",Q,"isTreePathToChildren"),this.Ut=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Yk(a.value)}},treeCollapsePolicy:{configurable:!0,get:function(){return this.Hu}, +set:function(a){var b=this.Hu;b!==a&&(a!==Li&&a!==Zk&&a!==$k&&v("Unknown Diagram.treeCollapsePolicy: "+a),this.Hu=a,this.g("treeCollapsePolicy",b,a))}},gf:{configurable:!0,get:function(){return this.Ew},set:function(a){this.Ew=a}},avoidanceCellSize:{configurable:!0,get:function(){return this.pw},set:function(a){this.ii=null;this.pw=new Gb(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{configurable:!0,get:function(){return this.qw},set:function(a){this.qw= Math.max(1,a)}},autoScrollInterval:{configurable:!0,get:function(){return this.Ip},set:function(a){var b=this.Ip;D(a,Q,"scale");b!==a&&(this.Ip=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{configurable:!0,get:function(){return this.Kp},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,Q,"autoScrollRegion");var b=this.Kp;b.D(a)||(this.Kp=a=a.M(),this.eb(),this.g("autoScrollRegion",b,a))}}}); -oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return Zk.qc()},set:function(a){Zk.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return $k}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; +oa.Object.defineProperties(Q,{licenseKey:{configurable:!0,get:function(){return al.qc()},set:function(a){al.add(a.replace(/\s/g,""))}},version:{configurable:!0,get:function(){return bl}}});Q.prototype.makeImageData=Q.prototype.$x;Q.prototype.makeImage=Q.prototype.pA;Q.prototype.cacheGroupExternalLinks=Q.prototype.Tu;Q.prototype.addRenderer=Q.prototype.ps;Q.prototype.makeSVG=Q.prototype.pv;Q.prototype.makeSvg=Q.prototype.Ps;Q.prototype.stopAutoScroll=Q.prototype.Gg; Q.prototype.doAutoScroll=Q.prototype.us;Q.prototype.isUnoccupied=Q.prototype.ik;Q.prototype.raiseDiagramEvent=Q.prototype.V;Q.prototype.removeDiagramListener=Q.prototype.om;Q.prototype.addDiagramListener=Q.prototype.Oj;Q.prototype.findTreeRoots=Q.prototype.Sz;Q.prototype.layoutDiagram=Q.prototype.nA;Q.prototype.findTopLevelGroups=Q.prototype.Lz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.Mz;Q.prototype.ensureBounds=Q.prototype.$a;Q.prototype.findLinksByExample=Q.prototype.ys; Q.prototype.findNodesByExample=Q.prototype.zs;Q.prototype.findLinkForData=Q.prototype.Rc;Q.prototype.findNodeForData=Q.prototype.vi;Q.prototype.findPartForData=Q.prototype.Sc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.bc;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.be;Q.prototype.transformViewToDoc=Q.prototype.bt;Q.prototype.transformRectDocToView=Q.prototype.TA;Q.prototype.transformDocToView=Q.prototype.Cp; Q.prototype.centerRect=Q.prototype.ss;Q.prototype.scrollToRect=Q.prototype.Iv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.cA;Q.prototype.highlight=Q.prototype.bA;Q.prototype.selectCollection=Q.prototype.LA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.Fp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Wf; @@ -873,95 +873,95 @@ Q.prototype.commitTransaction=Q.prototype.kb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.nx;Q.prototype.addLayer=Q.prototype.Nl;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Wj;Q.prototype.removeParts=Q.prototype.Vs;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ux;Q.prototype.setProperties=Q.prototype.Bm;Q.prototype.attach=Q.prototype.Ru;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.ly;Q.prototype.setInputOption=Q.prototype.MA; Q.prototype.getInputOption=Q.prototype.dm;Q.prototype.resetRenderingHints=Q.prototype.my;Q.prototype.setRenderingHint=Q.prototype.qy;Q.prototype.getRenderingHint=Q.prototype.Sf;Q.prototype.maybeUpdate=Q.prototype.hd;Q.prototype.requestUpdate=Q.prototype.fc;Q.prototype.delayInitialization=Q.prototype.oz;Q.prototype.isUpdateRequested=Q.prototype.iA;Q.prototype.invalidateDocumentBounds=Q.prototype.eb;Q.prototype.findObjectsNear=Q.prototype.Ag;Q.prototype.findPartsNear=Q.prototype.Hz; Q.prototype.findObjectsIn=Q.prototype.Of;Q.prototype.findPartsIn=Q.prototype.Lx;Q.prototype.findObjectsAt=Q.prototype.wi;Q.prototype.findPartsAt=Q.prototype.Gz;Q.prototype.findObjectAt=Q.prototype.oc;Q.prototype.findPartAt=Q.prototype.bm;Q.prototype.focusObject=Q.prototype.Tz;Q.prototype.alignDocument=Q.prototype.$y;Q.prototype.zoomToRect=Q.prototype.VA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.Ax;Q.prototype.focus=Q.prototype.focus; -var Bi=new vb,Ti=null,$g=void 0!==sa.document,Oi=null,Pi="",Dh=new F(Q,"None",0),wj=new F(Q,"Uniform",1),xj=new F(Q,"UniformToFill",2),Rf=new F(Q,"CycleAll",10),Vf=new F(Q,"CycleNotDirected",11),Xf=new F(Q,"CycleNotDirectedFast",12),Yf=new F(Q,"CycleNotUndirected",13),Sf=new F(Q,"CycleDestinationTree",14),Uf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Xk=new F(Q,"AllParentsCollapsed",22),Yk=new F(Q,"AnyParentsCollapsed", -23),Zk=new I,$k="2.3.12",mj="image",Uk=!1,oj=null,zi=!1; -function Ai(){if($g){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; -oj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){$g=a?void 0!==sa.document:!1}; -Q.isUsingDOM=function(){return $g};Q.None=Dh;Q.Uniform=wj;Q.UniformToFill=xj;Q.CycleAll=Rf;Q.CycleNotDirected=Vf;Q.CycleNotDirectedFast=Xf;Q.CycleNotUndirected=Yf;Q.CycleDestinationTree=Sf;Q.CycleSourceTree=Uf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Xk;Q.AnyParentsCollapsed=Yk;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} -function Oj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if($g){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=Zk.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); +var Bi=new vb,Ti=null,Yg=void 0!==sa.document,Oi=null,Pi="",Bh=new F(Q,"None",0),zj=new F(Q,"Uniform",1),Aj=new F(Q,"UniformToFill",2),Qf=new F(Q,"CycleAll",10),Uf=new F(Q,"CycleNotDirected",11),Wf=new F(Q,"CycleNotDirectedFast",12),Xf=new F(Q,"CycleNotUndirected",13),Rf=new F(Q,"CycleDestinationTree",14),Tf=new F(Q,"CycleSourceTree",15),di=new F(Q,"DocumentScroll",1),fi=new F(Q,"InfiniteScroll",2),Li=new F(Q,"TreeParentCollapsed",21),Zk=new F(Q,"AllParentsCollapsed",22),$k=new F(Q,"AnyParentsCollapsed", +23),al=new I,bl="2.3.13",pj="image",Wk=!1,rj=null,zi=!1; +function Ai(){if(Yg){var a=sa.document.createElement("canvas"),b=a.getContext("2d"),c=Va("7ca11abfd022028846");b[c]=Va("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ta.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ib.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",L.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])Ib.prototype.Jd=Ib.prototype.Su; +rj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=sa.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.inherit=function(a,b){function c(){}if(Object.getPrototypeOf(a).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+a);B(a,"function",Q,"inherit");B(b,"function",Q,"inherit");c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};Q.useDOM=function(a){Yg=a?void 0!==sa.document:!1}; +Q.isUsingDOM=function(){return Yg};Q.None=Bh;Q.Uniform=zj;Q.UniformToFill=Aj;Q.CycleAll=Qf;Q.CycleNotDirected=Uf;Q.CycleNotDirectedFast=Wf;Q.CycleNotUndirected=Xf;Q.CycleDestinationTree=Rf;Q.CycleSourceTree=Tf;Q.DocumentScroll=di;Q.InfiniteScroll=fi;Q.TreeParentCollapsed=Li;Q.AllParentsCollapsed=Zk;Q.AnyParentsCollapsed=$k;function Hi(){this.Ny=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Xc=this.j=!0:this.Xc=null} +function Rj(a,b){b.pb.setTransform(b.Sb,0,0,b.Sb,0,0);b.pb.Ec();if(null===a.Xc)a:{b="f";var c=sa[Va("76a715b2f73f148a")][Va("72ba13b5")]||"";a.Xc=!0;if(Yg){var d=Q[Va("76a115b6ed251eaf4692")];if(d)for(var e=al.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(ta[Va("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=sa[Va("74a900bae4370f8b51")][Va("6fbb13a1c2311e8a57")].toLowerCase();g=h[Va("73a612b6fb191d")](Va("3aad1ab6e022098b4dc4")); f=Va(d[2]);if(-1g&&f!==Va("7da71ca0ad381e90")&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("76a715b2ef3e149757")));0>g&&(g=b[Va("73a612b6fb191d")](Va("2bfa41fdb3784bca12")));0>g&&(g=c[Va("73a612b6fb191d")](Va("7baa19a6f76c1988428554")));a.Xc=!(0<=g&&gh),!a.Xc))break;if("#"===f[0]){g=sa.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Va("79a417a0f0181a8946")]=d;if(sa.document[Va("78a712aa")]){sa.document[Va("78a712aa")][Va("7bb806b6ed32388c4a875b")](g);k=sa.getComputedStyle(g).getPropertyValue(Va("78a704b7e62456904c9b12701b6532a8"));var l=sa.getComputedStyle(g).getPropertyValue(Va("75b817b0ea2202"));sa.document[Va("78a712aa")][Va("68ad1bbcf533388c4a875b")](g);if(k)if(g=sa[Va("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Xc=!1;break}else if(g&&g(Va("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.$f=function(){null!==d.observed&&el(d)};c.autoScale=wj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Vk,Q);Vk.prototype.computePixelRatio=function(){return 1}; -Vk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Lj(this);if(null===this.Dl){var c=new cj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),fl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; -Vk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Tj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Lj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?fl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Xc&&a!==a.Ny?!0:!1}Hi.className="DiagramHelper";function Ze(a){this.j=void 0===a?new K:a;this.o=new K}oa.Object.defineProperties(Ze.prototype,{point:{configurable:!0,get:function(){return this.j},set:function(a){this.j=a}},shifted:{configurable:!0,get:function(){return this.o},set:function(a){this.o=a}}});var oj="DraggingInfo";Ze.className="DraggingInfo";function ik(a,b,c){this.node=a;this.info=b;this.hv=c}ik.className="DraggingNodeInfoPair"; +function Re(){this.reset()}Re.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new Gb(NaN,NaN)).freeze();this.gridSnapCellSpot=yc;this.gridSnapOrigin=(new K(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Re.className="DraggingOptions"; +function cl(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;dl(c);b&&c.Bm(b);return c}na(cl,Q);function dl(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=zc;a.layout=new el}cl.prototype.reset=function(){Q.prototype.reset.call(this);dl(this)};cl.className="Palette"; +function Xk(a,b){if("string"===typeof a||sa.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.Bb=!0;c.Z=null;c.yn=!1;c.zn=!1;c.G=!0;c.v=!0;c.oa=0;c.o=!1;c.Dl=null;c.qy("drawShadows",!1);a=new U;var e=new Of;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new fc(0,0,0,0);c.va.h(0,0);c.toolManager.nb("Dragging",new fl,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new K(c.x-b.width/2,c.y-b.height/2)}};c.ag=function(){d.eb();gl(d)};c.ce=function(){null!==d.observed&&(d.eb(),d.R())};c.Na=function(){1>d.updateDelay?d.R():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.$f=function(){null!==d.observed&&gl(d)};c.autoScale=zj;c.Bb=!1;b&&Object.assign(c,b);return c}na(Xk,Q);Xk.prototype.computePixelRatio=function(){return 1}; +Xk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.Aa,b=this.pb;if(null!==a&&null!==b){Oj(this);if(null===this.Dl){var c=new fj(null);c.width=a.width;c.height=a.height;this.Dl=c}try{this.Aa=this.Dl,this.pb=this.Aa.context,this.pb.ad(!0),this.pb.setTransform(1,0,0,1,0,0),this.pb.clearRect(0,0,this.Aa.width,this.Aa.height),hl(this)}finally{this.Aa=a,this.pb=b}}}Q.prototype.redraw.call(this)}; +Xk.prototype.mc=function(){null===this.Pa&&v("No div specified");null===this.Aa&&v("No canvas specified");if(!(this.Aa instanceof Wj)&&(si(this.box),this.Lc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.Di){Oj(this);var b=this.Aa;a=this.pb;a.ad(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?hl(this):null!==this.Dl&&(a.drawImage(this.Dl.Ta,0,0),b=this.Gb,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.Sb,this.Sb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.Ec());b=this.ab.s;for(var c=b.length,d=0;da&&(a=0);this.oa!==a&&(this.oa=a)}}});Vk.className="Overview";function dl(){Ne.call(this);this.j=null}na(dl,Ne); -dl.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.timestampa&&(a=0);this.oa!==a&&(this.oa=a)}}});Xk.className="Overview";function fl(){Qe.call(this);this.j=null}na(fl,Qe); +fl.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))}; -gl.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,gl,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"increaseZoom:factor");var b=this.diagram;b.autoScale===Dh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; -gl.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,gl,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Dh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};gl.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; -gl.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,gl,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -gl.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;xh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=oc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());zh(b)};gl.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -gl.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,gl,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0b.maxScale||(b.scale=a))}; +il.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);D(a,il,"canDecreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"increaseZoom:factor");var b=this.diagram;b.autoScale===Bh&&(a=b.scale*a,ab.maxScale||(b.scale=a))}; +il.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);D(a,il,"canIncreaseZoom:factor");var b=this.diagram;if(b.autoScale!==Bh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};il.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"resetZoom:newscale");var b=this.diagram;ab.maxScale||(b.scale=a)}; +il.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);D(a,il,"canResetZoom:newscale");var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +il.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Ic();a.redraw();var c=a.position,d=a.scale;vh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Nu&&!isNaN(this.Wt)&&a.documentBounds.D(this.Lu)?(a.scale=this.Wt,a.position=this.Hw,this.Nu=NaN,this.Lu=nc):(this.Wt=d,this.Hw=c.copy(),a.zoomToFit(),this.Nu=a.scale,this.Lu=a.documentBounds.copy());xh(b)};il.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +il.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&x(a,U,il,"part");var b=this.diagram;b.$a();if(null===a){try{null!==this.og&&(this.og.next()?a=this.og.value:this.og=null)}catch(k){this.og=null}null===a&&(0a&&(a+=360));return a}; t.Pf=function(){if(0!==(this.l&4096)===!1)return this.Wk;var a=this.Ia;return null!==this.panel?a*this.panel.Pf():a};t.Ds=function(a,b){void 0===b&&(b=new K);b.assign(a);this.we.Jd(b);return b};t.Es=function(a,b,c){return this.dk(a.x,a.y,b.x,b.y,c)}; t.dk=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,L.Rf(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=L.Rf(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -P.prototype.measure=function(a,b,c,d){if(!1!==Ij(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(yl(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case kl:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case ll: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.Ib> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Al(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; -function Bl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=yl(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Dj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Dj(a,!0);a.measure(d,e,0,0);break;case kl:Dj(a,!0);a.measure(d,f,0,0);break;case ll:Dj(a,!0),a.measure(c,e,0,0)}}} -t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||Cl(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(Cl(a,!0),a instanceof V&&Dl(a,this))}; -t.mc=function(a,b){if(!El(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&zl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Fl&&l.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, -a,m,!0,!1,k,h),m instanceof Fl&&m.type===Gl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Hl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= +P.prototype.measure=function(a,b,c,d){if(!1!==Lj(this)){var e=this.Wg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.xq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(Al(this,!0)){case xg:g=e=0;h&&(b=a=Infinity);break;case Ad:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case ml:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case nl: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.Ib> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Ob.u()||v("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ob.toString());this.km(f,this.Ob);Cl(this,!1);M.free(f)};t=P.prototype;t.ph=function(){}; +function Dl(a,b,c,d,e){a.Ob.h(b,c,d,e);if(!a.desiredSize.u()){var f=a.Ac;c=a.Wg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Al(a,!0);c===d&&f===e&&(b=xg);switch(b){case xg:if(c>d||f>e)Gj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case Ad:Gj(a,!0);a.measure(d,e,0,0);break;case ml:Gj(a,!0);a.measure(d,f,0,0);break;case nl:Gj(a,!0),a.measure(c,e,0,0)}}} +t.km=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||El(c,!0),this.R(),dc(a,b)||(c.zh(),this.ao(c)))};t.ao=function(a){null!==this.portId&&(El(a,!0),a instanceof V&&Fl(a,this))}; +t.mc=function(a,b){if(!Gl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&Bl(this),g=this.Ob;if(f){var h=this.Ob,k=this.jc,l=this.areaBackground,m=this.Ra;null===l&&null===m||a.Ec();null!==l&&(wi(this,a,l,!0,!0,k,h),l instanceof Hl&&l.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(wi(this, +a,m,!0,!1,k,h),m instanceof Hl&&m.type===Il?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.zg(m)):a.fillRect(h.x,h.y,h.width,h.height));this.sh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){G&&G.Rl&&G.wz&&G.wz(a,this);f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&Jl(this);l=this.part;k=!1;var n=0;l&&b.Sf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Sb);m=this.Kd();var p;if(!(p=b.mj||!m)){var q=this.naturalBounds;p=this.Hh;var r= p.m11,u=p.m21,y=p.dx,w=p.m12,z=p.m22,A=p.dy,C,E=C=0;p=C*r+E*u+y;var H=C*w+E*z+A;C=q.width+n;E=0;var T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);var aa=Math.min(H,C);var Y=Math.max(p+0,T)-E;var R=Math.max(H+0,C)-aa;p=E;H=aa;C=q.width+n;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;C=0;E=q.height+n;T=C*r+E*u+y;C=C*w+E*z+A;E=Math.min(p,T);aa=Math.min(H,C);Y=Math.max(p+Y,T)-E;R=Math.max(H+R,C)-aa;p=E;H=aa;n=b.viewportBounds;q=n.x;r= -n.y;p=!(p>n.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof bh&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== -c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Il(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Il(a):k&&!1===this.shadowVisible&&Jl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Kl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Ll(this,h)&&null===this.shadowVisible&&Jl(a);null!==this.Ra&&(a.Ec(),Ml(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== -this.Ra||null!==this.areaBackground||Ll(this,h))?(Nl(this,!0),null===this.shadowVisible&&Jl(a)):Nl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Il(a);m&&k&&Jl(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; -function Ll(a,b){if(null===b)return!1;zl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Kl(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Fl&&a.areaBackground.type===Gl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} -function Ml(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Fl&&a.Ra.type===Gl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} -function Ol(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;gn.width+q||q>Y+p||H>n.height+r||r>R+H)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof $g&&(a.font=this.font);if(p){H=h.Ae()?h.naturalBounds:h.actualBounds;Y=Math.max(g.x,H.x);R=Math.max(g.y,H.y);n=Math.min(g.right,H.right)-Y;q=Math.min(g.bottom,H.bottom)-R;r=this.yb;null!==r&&(Y=r.x,R=r.y,n=r.width,q=r.height);if(Y>g.width+g.x||g.x>H.width+H.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(Y,R,n,q);a.clip()}if(m){if(!l.isVisible()){1!== +c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}k&&(H=l.shadowOffset,a.Tv(H.x*b.scale*this.scale*b.Sb,H.y*b.scale*this.scale*b.Sb,l.shadowBlur),Kl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?Kl(a):k&&!1===this.shadowVisible&&Ll(a);l=this.naturalBounds;null!==this.areaBackground&&(a.Ec(),Ml(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&Nl(this,h)&&null===this.shadowVisible&&Ll(a);null!==this.Ra&&(a.Ec(),Ol(this,a,l,g));G&&G.Rl&&G.xz&&G.xz(a,this);k&&(null!== +this.Ra||null!==this.areaBackground||Nl(this,h))?(Pl(this,!0),null===this.shadowVisible&&Ll(a)):Pl(this,!1);this.sh(a,b);k&&0!==(this.l&512)===!0&&Kl(a);m&&k&&Ll(a);p&&(a.restore(),a.ad(this instanceof W));f.Ks()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}}; +function Nl(a,b){if(null===b)return!1;Bl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Vb()!==a}t.Sv=function(){};function Ml(a,b,c,d){wi(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof Hl&&a.areaBackground.type===Il?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.zg(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)} +function Ol(a,b,c,d){var e=a.xq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;wi(a,b,a.Ra,!0,!1,c,d);a.Ra instanceof Hl&&a.Ra.type===Il?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.zg(a.Ra)):b.fillRect(f-e/2,g-e/2,h,k)} +function Ql(a,b,c){for(var d=b.S.s,e=d.length,f=-1,g=0;ge)&&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 bb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Qj(a,e)}else Qj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function om(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);km.add(a,b)} -function pm(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} -oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new sl),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new sl),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),rl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), -rl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new qm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); -a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new qm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1e)&&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 cb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Tj(a,e)}else Tj(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function qm(a,b){B(a,"string",P,"defineBuilder:name");B(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();G&&(""===a||"none"===c||a===c)&&v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);mm.add(a,b)} +function rm(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} +oa.Object.defineProperties(P.prototype,{bindingId:{configurable:!0,get:function(){return null!==this.B?this.B.Mp:-1},set:function(a){this.bindingId!==a&&(null===this.B&&(this.B=new ul),this.B.Mp=a)}},localBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Be:null},set:function(a){this.localBindings!==a&&(null===this.B&&(this.B=new ul),this.B.Be=a)}},srcBindings:{configurable:!0,get:function(){return null!==this.B?this.B.Jm:null},set:function(a){this.srcBindings!== +a&&(null===this.B&&(this.B=new ul),this.B.Jm=a)}},shadowVisible:{configurable:!0,get:function(){return null!==this.B?this.B.Pi:null},set:function(a){var b=this.shadowVisible;b!==a&&(G&&null!==a&&B(a,"boolean",P,"shadowVisible"),tl(this),this.B.Pi=a,this.$c=!0,this.R(),this.g("shadowVisible",b,a))}},enabledChanged:{configurable:!0,get:function(){return null!==this.B?this.B.Nb:null},set:function(a){var b=this.enabledChanged;b!==a&&(null!==a&&B(a,"function",P,"enabledChanged"), +tl(this),this.B.Nb=a,this.g("enabledChanged",b,a))}},segmentOrientation:{configurable:!0,get:function(){return null!==this.Za?this.Za.Er:lg},set:function(a){var b=this.segmentOrientation;b!==a&&(G&&$a(a,S,P,"segmentOrientation"),null===this.Za&&(this.Za=new sm),this.Za.Er=a,this.w(),this.g("segmentOrientation",b,a),a===lg&&(this.angle=0))}},segmentIndex:{configurable:!0,get:function(){return null!==this.Za?this.Za.v:-Infinity},set:function(a){G&&B(a,"number",P,"segmentIndex"); +a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Za&&(this.Za=new sm),this.Za.v=a,this.w(),this.g("segmentIndex",b,a))}},segmentFraction:{configurable:!0,get:function(){return null!==this.Za?this.Za.o:0},set:function(a){G&&B(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&v("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ia=a,this.w(), -this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,gm(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Pf&& -this.xc(),this.g("desiredSize",d,a),ul(this)&&(a=this.part,null!==a&&(vl(this,a,"width"),vl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, -set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Pf&&this.xc(),this.g("desiredSize",b,a),ul(this)&&(a=this.part,null!==a&&vl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), -rl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),rl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, -margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Hl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Hl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? -this.B.ob:null},set:function(a){this.animationTriggers!==a&&(rl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(rl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= -a.M(),bm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), -rl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), -rl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),rl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| -v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&sm(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,tm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, -get:function(){return null!==this.fa?this.fa.Lj:zc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),fm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),fm(this))}},toShortLength:{configurable:!0, -enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),fm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== -this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:zc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),fm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? -this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),fm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),fm(this))}},fromLinkable:{configurable:!0, +this.g("scale",b,a))}},angle:{configurable:!0,get:function(){return this.Qb},set:function(a){var b=this.Qb;b!==a&&(G&&D(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Qb=a,im(this),this.w(),this.g("angle",b,a)))}},desiredSize:{configurable:!0,get:function(){return this.pd},set:function(a){G&&x(a,Gb,P,"desiredSize");var b=a.width,c=a.height,d=this.pd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.pd=a=a.M(),this.w(),this instanceof Of&& +this.xc(),this.g("desiredSize",d,a),wl(this)&&(a=this.part,null!==a&&(xl(this,a,"width"),xl(this,a,"height"))))}},width:{configurable:!0,get:function(){return this.pd.width},set:function(a){var b=this.pd.width;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"width"),b=this.pd,this.pd=a=(new Gb(a,this.pd.height)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"width")))}},height:{configurable:!0,get:function(){return this.pd.height}, +set:function(a){var b=this.pd.height;b===a||isNaN(b)&&isNaN(a)||(G&&B(a,"number",P,"height"),b=this.pd,this.pd=a=(new Gb(this.pd.width,a)).freeze(),this.w(),this instanceof Of&&this.xc(),this.g("desiredSize",b,a),wl(this)&&(a=this.part,null!==a&&xl(this,a,"height")))}},minSize:{configurable:!0,get:function(){return null!==this.B?this.B.v:Ob},set:function(a){var b=this.minSize;b.D(a)||(G&&x(a,Gb,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(), +tl(this),this.B.v=a,this.w(),this.g("minSize",b,a))}},maxSize:{configurable:!0,get:function(){return null!==this.B?this.B.o:Tb},set:function(a){var b=this.maxSize;b.D(a)||(G&&x(a,Gb,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),tl(this),this.B.o=a,this.w(),this.g("maxSize",b,a))}},measuredBounds:{configurable:!0,get:function(){return this.Ac}},naturalBounds:{configurable:!0,get:function(){return this.jc}}, +margin:{configurable:!0,get:function(){return this.Wg},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,P,"margin");var b=this.Wg;b.D(a)||(this.Wg=a=a.M(),this.w(),this.g("margin",b,a))}},transform:{configurable:!0,get:function(){0!==(this.l&2048)===!0&&Jl(this);return this.Gb}},we:{configurable:!0,get:function(){0!==(this.l&4096)===!0&&Jl(this);return this.Hh}},animationTriggers:{configurable:!0,get:function(){return null!==this.B? +this.B.ob:null},set:function(a){this.animationTriggers!==a&&(tl(this),this.B.ob=a)}},reshapingBehavior:{configurable:!0,get:function(){return null!==this.B?this.B.ag:xg},set:function(a){this.reshapingBehavior!==a&&(tl(this),this.B.ag=a)}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,P,"alignment"),a.pc()&&!a.Wb()&&v("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Pb=a= +a.M(),dm(this),this.g("alignment",b,a))}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){G&&D(a,P,"column");a=Math.round(a);var b=this.Mg;b!==a&&(0>a&&Ba(a,">= 0",P,"column"),this.Mg=a,this.w(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{configurable:!0,get:function(){return null!==this.B?this.B.ub:1},set:function(a){G&&B(a,"number",P,"columnSpan");a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"columnSpan"), +tl(this),this.B.ub=a,this.w(),this.g("columnSpan",b,a))}},row:{configurable:!0,get:function(){return this.uo},set:function(a){G&&D(a,P,"row");a=Math.round(a);var b=this.uo;b!==a&&(0>a&&Ba(a,">= 0",P,"row"),this.uo=a,this.w(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{configurable:!0,get:function(){return null!==this.B?this.B.Oi:1},set:function(a){G&&B(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rowSpan;b!==a&&(1>a&&Ba(a,">= 1",P,"rowSpan"), +tl(this),this.B.Oi=a,this.w(),this.g("rowSpan",b,a))}},spanAllocation:{configurable:!0,get:function(){return null!==this.B?this.B.Qi:null},set:function(a){var b=this.spanAllocation;b!==a&&(null!==a&&B(a,"function",P,"spanAllocation"),tl(this),this.B.Qi=a,this.w(),this.g("spanAllocation",b,a))}},alignmentFocus:{configurable:!0,get:function(){return this.Ek},set:function(a){var b=this.Ek;b.D(a)||(G&&x(a,Hb,P,"alignmentFocus"),!G||!a.pc()||a.Wb()||a.kp()&&this instanceof V|| +v("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Ek=a=a.M(),this.w(),this.g("alignmentFocus",b,a))}},portId:{configurable:!0,get:function(){return this.lo},set:function(a){var b=this.lo;if(b!==a){G&&null!==a&&B(a,"string",P,"portId");var c=this.part;null===c||c instanceof V||v("Cannot set portID on a Link: "+a);null!==b&&null!==c&&um(c,this);this.lo=a;null!==a&&null!==c&&(c.ff=!0,vm(c,this));this.g("portId",b,a)}}},toSpot:{configurable:!0, +get:function(){return null!==this.fa?this.fa.Lj:xc},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,P,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),hm(this))}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a,"number",P,"toEndSegmentLength"),0>a&&Ba(a,">= 0",P,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),hm(this))}},toShortLength:{configurable:!0, +enumerable:!0,get:function(){return null!==this.fa?this.fa.Kj:0},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",P,"toShortLength"),this.cd(),this.fa.Kj=a,this.g("toShortLength",b,a),hm(this))}},toLinkable:{configurable:!0,get:function(){return null!==this.fa?this.fa.gs:null},set:function(a){var b=this.toLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"toLinkable"),this.cd(),this.fa.gs=a,this.g("toLinkable",b,a))}},toMaxLinks:{configurable:!0,get:function(){return null!== +this.fa?this.fa.hs:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(G&&B(a,"number",P,"toMaxLinks"),0>a&&Ba(a,">= 0",P,"toMaxLinks"),this.cd(),this.fa.hs=a,this.g("toMaxLinks",b,a))}},fromSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.jj:xc},set:function(a){var b=this.fromSpot;b.D(a)||(G&&x(a,Hb,P,"fromSpot"),a=a.M(),this.cd(),this.fa.jj=a,this.g("fromSpot",b,a),hm(this))}},fromEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa? +this.fa.hj:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(G&&B(a,"number",P,"fromEndSegmentLength"),0>a&&Ba(a,">= 0",P,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),hm(this))}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:0},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",P,"fromShortLength"),this.cd(),this.fa.ij=a,this.g("fromShortLength",b,a),hm(this))}},fromLinkable:{configurable:!0, enumerable:!0,get:function(){return null!==this.fa?this.fa.uq:null},set:function(a){var b=this.fromLinkable;b!==a&&(G&&null!==a&&B(a,"boolean",P,"fromLinkable"),this.cd(),this.fa.uq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{configurable:!0,get:function(){return null!==this.fa?this.fa.vq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(G&&B(a,"number",P,"fromMaxLinks"),0>a&&Ba(a,">= 0",P,"fromMaxLinks"),this.cd(),this.fa.vq=a,this.g("fromMaxLinks",b,a))}},cursor:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),rl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),rl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= -this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),rl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),rl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== -a&&B(a,"function",P,"mouseEnter"),rl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),rl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),rl(this),this.B.bi= -a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),rl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),rl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),rl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),rl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, -get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),rl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),rl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: -null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),rl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),rl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== -a&&(null!==a&&B(a,"function",P,"actionCancel"),rl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof Be||a instanceof Le||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),rl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= -this.contextMenu;b!==a&&(!G||a instanceof Be||a instanceof Le||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),rl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; +enumerable:!0,get:function(){return null!==this.B?this.B.j:""},set:function(a){var b=this.cursor;b!==a&&(B(a,"string",P,"cursor"),tl(this),this.B.j=a,this.g("cursor",b,a))}},click:{configurable:!0,get:function(){return null!==this.B?this.B.Kh:null},set:function(a){var b=this.click;b!==a&&(null!==a&&B(a,"function",P,"click"),tl(this),this.B.Kh=a,this.g("click",b,a))}},doubleClick:{configurable:!0,get:function(){return null!==this.B?this.B.Qh:null},set:function(a){var b= +this.doubleClick;b!==a&&(null!==a&&B(a,"function",P,"doubleClick"),tl(this),this.B.Qh=a,this.g("doubleClick",b,a))}},contextClick:{configurable:!0,get:function(){return null!==this.B?this.B.Mh:null},set:function(a){var b=this.contextClick;b!==a&&(null!==a&&B(a,"function",P,"contextClick"),tl(this),this.B.Mh=a,this.g("contextClick",b,a))}},mouseEnter:{configurable:!0,get:function(){return null!==this.B?this.B.Yh:null},set:function(a){var b=this.mouseEnter;b!==a&&(null!== +a&&B(a,"function",P,"mouseEnter"),tl(this),this.B.Yh=a,this.g("mouseEnter",b,a))}},mouseLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ai:null},set:function(a){var b=this.mouseLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseLeave"),tl(this),this.B.ai=a,this.g("mouseLeave",b,a))}},mouseOver:{configurable:!0,get:function(){return null!==this.B?this.B.bi:null},set:function(a){var b=this.mouseOver;b!==a&&(null!==a&&B(a,"function",P,"mouseOver"),tl(this),this.B.bi= +a,this.g("mouseOver",b,a))}},mouseHover:{configurable:!0,get:function(){return null!==this.B?this.B.$h:null},set:function(a){var b=this.mouseHover;b!==a&&(null!==a&&B(a,"function",P,"mouseHover"),tl(this),this.B.$h=a,this.g("mouseHover",b,a))}},mouseHold:{configurable:!0,get:function(){return null!==this.B?this.B.Zh:null},set:function(a){var b=this.mouseHold;b!==a&&(null!==a&&B(a,"function",P,"mouseHold"),tl(this),this.B.Zh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{configurable:!0, +enumerable:!0,get:function(){return null!==this.B?this.B.$f:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(null!==a&&B(a,"function",P,"mouseDragEnter"),tl(this),this.B.$f=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{configurable:!0,get:function(){return null!==this.B?this.B.ce:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(null!==a&&B(a,"function",P,"mouseDragLeave"),tl(this),this.B.ce=a,this.g("mouseDragLeave",b,a))}},mouseDrop:{configurable:!0, +get:function(){return null!==this.B?this.B.Xh:null},set:function(a){var b=this.mouseDrop;b!==a&&(null!==a&&B(a,"function",P,"mouseDrop"),tl(this),this.B.Xh=a,this.g("mouseDrop",b,a))}},actionDown:{configurable:!0,get:function(){return null!==this.B?this.B.Z:null},set:function(a){var b=this.actionDown;b!==a&&(null!==a&&B(a,"function",P,"actionDown"),tl(this),this.B.Z=a,this.g("actionDown",b,a))}},actionMove:{configurable:!0,get:function(){return null!==this.B?this.B.oa: +null},set:function(a){var b=this.actionMove;b!==a&&(null!==a&&B(a,"function",P,"actionMove"),tl(this),this.B.oa=a,this.g("actionMove",b,a))}},actionUp:{configurable:!0,get:function(){return null!==this.B?this.B.Na:null},set:function(a){var b=this.actionUp;b!==a&&(null!==a&&B(a,"function",P,"actionUp"),tl(this),this.B.Na=a,this.g("actionUp",b,a))}},actionCancel:{configurable:!0,get:function(){return null!==this.B?this.B.G:null},set:function(a){var b=this.actionCancel;b!== +a&&(null!==a&&B(a,"function",P,"actionCancel"),tl(this),this.B.G=a,this.g("actionCancel",b,a))}},toolTip:{configurable:!0,get:function(){return null!==this.B?this.B.li:null},set:function(a){var b=this.toolTip;b!==a&&(!G||null===a||a instanceof De||a instanceof Oe||v("GraphObject.toolTip must be an Adornment or HTMLInfo."),tl(this),this.B.li=a,this.g("toolTip",b,a))}},contextMenu:{configurable:!0,get:function(){return null!==this.B?this.B.Nh:null},set:function(a){var b= +this.contextMenu;b!==a&&(!G||a instanceof De||a instanceof Oe||v("GraphObject.contextMenu must be an Adornment or HTMLInfo."),tl(this),this.B.Nh=a,this.g("contextMenu",b,a))}}});P.prototype.trigger=P.prototype.Yv;P.prototype.findBindingPanel=P.prototype.th;P.prototype.findTemplateBinder=P.prototype.Kz;P.prototype.setProperties=P.prototype.Bm;P.prototype.apply=P.prototype.apply;P.prototype.attach=P.prototype.Ru;P.prototype.set=P.prototype.set;P.prototype.isEnabledObject=P.prototype.Uf; P.prototype.isVisibleObject=P.prototype.Ld;P.prototype.isContainedBy=P.prototype.Dg;P.prototype.getNearestIntersectionPoint=P.prototype.Es;P.prototype.getLocalPoint=P.prototype.Ds;P.prototype.getDocumentScale=P.prototype.Pf;P.prototype.getDocumentAngle=P.prototype.yi;P.prototype.getDocumentBounds=P.prototype.zi;P.prototype.getDocumentPoint=P.prototype.la;P.prototype.intersectsRect=P.prototype.dd;P.prototype.containedInRect=P.prototype.qh;P.prototype.containsRect=P.prototype.df; -P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var km=null;P.className="GraphObject";km=new vb; -om("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=jm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},jm(Pf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= -c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Pf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Pf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= -d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Pf){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Pf))){var f=c.skipsUndoManager;c.skipsUndoManager=!0;var g=d._buttonFillPressed;b.fill!==g&&(b.fill=g);g= +P.prototype.containsPoint=P.prototype.ha;P.prototype.raiseChanged=P.prototype.g;P.prototype.raiseChangedEvent=P.prototype.jb;P.prototype.addCopyProperty=P.prototype.mx;var mm=null;P.className="GraphObject";mm=new vb; +qm("Button",function(){function a(a,b){return null!==a.diagram.oc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=lm(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.lb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},lm(Of,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Hb(0,0,2.76142374915397,2.761423749153969),spot2:new Hb(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke= +c}};b.mouseLeave=function(a,b){b.Uf()&&b instanceof W&&(a=b.lb("ButtonBorder"),a instanceof Of&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.Uf()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.lb("ButtonBorder");if(c instanceof Of){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= +d}}};b.actionUp=function(b,d){if(d.Uf()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.lb("ButtonBorder");if(c instanceof Of){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.Uf()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.lb("ButtonBorder"),b instanceof Of))){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}); -om("TreeExpanderButton",function(){var a=jm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +qm("TreeExpanderButton",function(){var a=lm("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).qp()),{visible:!1},(new Mi("visible","isTreeLeaf",function(a){return!a})).qp());a.click=function(a,c){c=c.part;c instanceof De&&(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}); -om("SubGraphExpanderButton",function(){var a=jm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},jm(Pf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof Be&&(c=c.adornedPart);if(c instanceof Df){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});om("ToolTip",function(){return jm(Be,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},jm(Pf,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); -om("ContextMenu",function(){return jm(Be,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});om("ContextMenuButton",function(){var a=jm("Button");a.stretch=kl;var b=a.lb("ButtonBorder");b instanceof Pf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); -om("PanelExpanderButton",function(a){var b=pm(a,"COLLAPSIBLE"),c=jm("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},jm(Pf,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); -a=c.lb("ButtonBorder");a instanceof Pf&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); -om("CheckBoxButton",function(a){var b=pm(a);a=jm("Button",{desiredSize:new Gb(14,14)},jm(Pf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +qm("SubGraphExpanderButton",function(){var a=lm("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},lm(Of,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Rb},(new Mi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).qp()));a.click=function(a,c){c=c.part;c instanceof De&&(c=c.adornedPart);if(c instanceof Cf){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});qm("ToolTip",function(){return lm(De,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},lm(Of,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Hb(0,0,4,6),spot2:new Hb(1,1,-4,-4)}))}); +qm("ContextMenu",function(){return lm(De,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new K(0,3),shadowBlur:5},new Mi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});qm("ContextMenuButton",function(){var a=lm("Button");a.stretch=ml;var b=a.lb("ButtonBorder");b instanceof Of&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new Hb(0,0,2,3),b.spot2=new Hb(1,1,-2,-2));return a}); +qm("PanelExpanderButton",function(a){var b=rm(a,"COLLAPSIBLE"),c=lm("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},lm(Of,{name:"ButtonIcon",strokeWidth:2},(new Mi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).qp(b))); +a=c.lb("ButtonBorder");a instanceof Of&&(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.th();null===e&&(e=c.part);null!==e&&(c=e.lb(b),null!==c&&(a.handled=!0,d.Ka("Collapse/Expand Panel"),c.visible=!c.visible,d.kb("Collapse/Expand Panel")))}};return c}); +qm("CheckBoxButton",function(a){var b=rm(a);a=lm("Button",{desiredSize:new Gb(14,14)},lm(Of,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ad,geometryStretch:zg,visible:!1},""!==b?(new Mi("visible",b)).ay():[]));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.lb("ButtonIcon");c.Ka("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.kb("checkbox")}}};return a}); -om("CheckBox",function(a){a=pm(a);a=jm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=jm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ml=new F(P,"Default",0);P.Vertical=ll=new F(P,"Vertical",4);P.Horizontal=kl=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); -P.UniformToFill=nl=new F(P,"UniformToFill",2);P.FlipVertical=ol=new F(P,"FlipVertical",1);P.FlipHorizontal=pl=new F(P,"FlipHorizontal",2);P.FlipBoth=ql=new F(P,"FlipBoth",3);P.make=jm;P.getBuilders=function(){var a=new vb,b;for(b in km)if(b!==b.toLowerCase()){var c=km.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=om; -P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};um.className="STransform"; -function vm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}vm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};vm.className="SGradient"; -function Tj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, -c)}Tj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Tj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Tj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Tj.prototype.focus=function(){this.Ta.focus()};Tj.prototype.Cx=function(){this.ownerDocument=null}; -oa.Object.defineProperties(Tj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Tj.className="SVGSurface"; +qm("CheckBox",function(a){a=rm(a);a=lm("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new fc(0,1,0,0)});var b=lm(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new fc(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});P.None=xg=new F(P,"None",0);P.Default=ol=new F(P,"Default",0);P.Vertical=nl=new F(P,"Vertical",4);P.Horizontal=ml=new F(P,"Horizontal",5);P.Fill=Ad=new F(P,"Fill",3);P.Uniform=zg=new F(P,"Uniform",1); +P.UniformToFill=pl=new F(P,"UniformToFill",2);P.FlipVertical=ql=new F(P,"FlipVertical",1);P.FlipHorizontal=rl=new F(P,"FlipHorizontal",2);P.FlipBoth=sl=new F(P,"FlipBoth",3);P.make=lm;P.getBuilders=function(){var a=new vb,b;for(b in mm)if(b!==b.toLowerCase()){var c=mm.L(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};P.defineBuilder=qm; +P.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ma[1]*a+this.ma[3]*d,f=this.ma[0]*-d+this.ma[2]*a,g=this.ma[1]*-d+this.ma[3]*a;this.ma[0]=this.ma[0]*a+this.ma[2]*d;this.ma[1]=e;this.ma[2]=f;this.ma[3]=g;this.translate(-b,-c)}};wm.className="STransform"; +function xm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.wx=[];this.pattern=null}xm.prototype.addColorStop=function(a,b){this.wx.push({offset:a,color:b})};xm.className="SGradient"; +function Wj(a,b,c){this.ownerDocument=a=void 0===b?sa.document:b;this.wA="http://www.w3.org/2000/svg";void 0!==a&&(this.Ta=this.$d("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ta.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.vs=null;this.context=new vi(this, +c)}Wj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Ta.setAttributeNS(null,"width",c+"px"),this.Ta.setAttributeNS(null,"height",d+"px"),this.Ta.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.Lw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.Lw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Wj.prototype.$d=function(a,b,c){a=this.ownerDocument.createElementNS(this.wA,a);if(Ga(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Wj.prototype.getBoundingClientRect=function(){return this.Ta.getBoundingClientRect()};Wj.prototype.focus=function(){this.Ta.focus()};Wj.prototype.Cx=function(){this.ownerDocument=null}; +oa.Object.defineProperties(Wj.prototype,{width:{configurable:!0,get:function(){return this.Ta.width.baseVal.value},set:function(a){this.Ta.setAttribute("width",a+"px")}},height:{configurable:!0,get:function(){return this.Ta.height.baseVal.value},set:function(a){this.Ta.setAttribute("height",a+"px")}},style:{configurable:!0,get:function(){return this.Ta.style}}});Wj.className="SVGSurface"; function vi(a,b){this.Vv=a;this.svg=a.Ta;this.stack=[];this.yh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Wl=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.gh=this.Or=this.Nr=0;this.Ed=this.gd=null;this.path=[];this.lm={};this.Pt=!1; -this.jh=null;this.Hj=0;this.xb=new um;this.j=Sl(this);this.Zj=Sl(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} -function Mj(a,b,c,d,e,f,g){void 0===a.Zj?Ql(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; +this.jh=null;this.Hj=0;this.xb=new wm;this.j=Ul(this);this.Zj=Ul(this,"gojs-diagram");this.Vl=this.Gi=null;var c=ob++,d=this.$d("clipPath",{id:"mainClip"+c});d.appendChild(this.$d("rect",{x:0,y:0,width:a.width,height:a.height}));this.Lw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Zj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.yA={};this.isTemporary=!!b;this.filter="";this.mk=null} +function Pj(a,b,c,d,e,f,g){void 0===a.Zj?Sl(a,b,c,d,e,f,g):a.Zj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=vi.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.lm={stroke:"none",fill:"none"}};t.ef=function(a){this.addPath(this.path,this.xb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new vm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(mj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new vm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Tl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Tl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";wm(this,mj,f,this.xb);this.addElement(mj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");xm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};wm(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};wm(this,"fill",a,this.xb);xm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};wm(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.lm.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new xm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.yA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ob++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.$d("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.$d(pj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new xm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Vl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.xb.translate(f,g);1===d&&1===e||a.xb.scale(d,e);0===b&&0===c||a.xb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Vl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};L.ca(d,h)&&L.ca(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";ym(this,pj,f,this.xb);this.addElement(pj,f)};t.fill=function(a){a&&(this.lm["fill-rule"]="evenodd");zm(this,this.lm)};t.zg=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};ym(this,"fill",a,this.xb);this.addElement("rect",a)};t.Gx=function(a,b,c,d){a={x:a,y:b,width:c,height:d};ym(this,"fill",a,this.xb);zm(this,a);this.svg.prepend(this.$d("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};ym(this,"fill",b,this.xb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.xb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.mk= a.mk}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,mk:this.mk});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; -t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Bm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; -oa.Object.defineProperties(Xl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, +t.zg=function(a,b){if(a instanceof Hl&&a.type===Il){var c=a.Kk;a=a.st;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Um?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Um?this.clip():this.fill(b)};t.vk=function(){this.Um||this.stroke()};t.Tv=function(a,b,c){this.Nr=a;this.Or=b;this.gh=c}; +t.ws=function(a,b){var c=this.ba;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.ts=function(){var a=this.ba;void 0!==a.setLineDash&&(a.setLineDash(Dm),a.lineDashOffset=0)};t.ad=function(a){a&&(this.qt="");this.pt=this.rt=""};t.Us=function(){}; +oa.Object.defineProperties(Zl.prototype,{fillStyle:{configurable:!0,get:function(){return this.ba.fillStyle},set:function(a){this.pt!==a&&(this.pt=this.ba.fillStyle=a)}},font:{configurable:!0,get:function(){return this.ba.font},set:function(a){this.qt!==a&&(this.qt=this.ba.font=a)}},globalAlpha:{configurable:!0,get:function(){return this.ba.globalAlpha},set:function(a){this.ba.globalAlpha=a}},lineCap:{configurable:!0,get:function(){return this.ba.lineCap}, set:function(a){this.ba.lineCap=a}},lineDashOffset:{configurable:!0,get:function(){return this.ba.lineDashOffset},set:function(a){this.ba.lineDashOffset=a}},lineJoin:{configurable:!0,get:function(){return this.ba.lineJoin},set:function(a){this.ba.lineJoin=a}},lineWidth:{configurable:!0,get:function(){return this.ba.lineWidth},set:function(a){this.ba.lineWidth=a}},miterLimit:{configurable:!0,get:function(){return this.ba.miterLimit},set:function(a){this.ba.miterLimit= a}},shadowBlur:{configurable:!0,get:function(){return this.ba.shadowBlur},set:function(a){this.ba.shadowBlur=a}},shadowColor:{configurable:!0,get:function(){return this.ba.shadowColor},set:function(a){this.ba.shadowColor=a}},shadowOffsetX:{configurable:!0,get:function(){return this.ba.shadowOffsetX},set:function(a){this.ba.shadowOffsetX=a}},shadowOffsetY:{configurable:!0,get:function(){return this.ba.shadowOffsetY},set:function(a){this.ba.shadowOffsetY= a}},strokeStyle:{configurable:!0,get:function(){return this.ba.strokeStyle},set:function(a){this.rt!==a&&(this.rt=this.ba.strokeStyle=a)}},textAlign:{configurable:!0,get:function(){return this.ba.textAlign},set:function(a){this.ba.textAlign=a}},imageSmoothingEnabled:{configurable:!0,get:function(){return this.ba.imageSmoothingEnabled},set:function(a){this.ba.imageSmoothingEnabled=a}},filter:{configurable:!0,get:function(){return this.ba.filter}, -set:function(a){this.ba.filter=""===a?"none":a}},clipInsteadOfFill:{configurable:!0,get:function(){return this.Um},set:function(a){this.Um=a}}});var Bm=Object.freeze([]);Xl.className="CanvasSurfaceContext";function Cm(){this.G=this.o=this.v=this.j=0}Cm.className="ColorNumbers"; -function Fl(a,b){Dm||(Em(),Dm=!0);Ya(this);this._isFrozen=!1;void 0===a?(this.ta=Wl,this.Jk="black"):"string"===typeof a?(this.ta=Wl,G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush constructor'),this.Jk=a):(G&&$a(a,Fl,Fl,"constructor:type"),this.ta=a,this.Jk="black");a=this.ta;a===Zl?(this.Wd=Bc,this.Xk=Mc):this.Xk=a===Gl?this.Wd=Ic:this.Wd=zc;this.Tr=0;this.kq=NaN;this.He=this.qr=this.Ge=null;this.st=this.Kk=0;b&&Object.assign(this,b)} -Fl.prototype.copy=function(){var a=new Fl;a.ta=this.ta;a.Jk=this.Jk;a.Wd=this.Wd.M();a.Xk=this.Xk.M();a.Tr=this.Tr;a.kq=this.kq;null!==this.Ge&&(a.Ge=this.Ge.copy());a.qr=this.qr;return a};t=Fl.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.Ge&&this.Ge.freeze();return this};t.qa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.Ge&&this.Ge.qa();return this};t.wb=function(a){a.classType===Fl?this.type=a:Ea(this,a)}; -t.toString=function(){var a="Brush(";if(this.type===Wl)a+=this.color;else if(a=this.type===Zl?a+"Linear ":this.type===Gl?a+"Radial ":this.type===Yl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&xa(this);("number"!==typeof a||!isFinite(a)||1a)&&Ba(a,"0 <= loc <= 1",Fl,"addColorStop:loc");B(b,"string",Fl,"addColorStop:color");G&&!Fm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Wl&&(this.type=Zl);this.He=null;return this}; -function Fm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Fl,"isValidColor");Dm||(Em(),Dm=!0);var b=Gm;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(a,b));return this};function Jm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(b,c)} -t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Hm:b;if(this.type===Wl)gi(this.color),this.color=Im(-a,b);else if((this.type===Zl||this.type===Gl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Im(-a,b));return this};function Km(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Hm:c;gi(a);return Im(-b,c)} -function Lm(a,b,c){gi(a);a=Mm.j;var d=Mm.v,e=Mm.o,f=Mm.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Mm.j-a)*c+a)+", "+Math.round((Mm.v-d)*c+d)+", "+Math.round((Mm.o-e)*c+e)+", "+Math.round((Mm.G-f)*c+f)+")"} -t.Xx=function(){if(this.type===Wl)return Nm(this.color);if((this.type===Zl||this.type===Gl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Gl)return Nm(a.first().value);if(null!==a.get(.5))return Nm(a.get(.5));if(2===a.count)return a=a.La(),Nm(Lm(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 Nm(Lm(a.get(c),a.get(d),1-f/e))}return!1}; -function Nm(a){if(!a)return!1;if(a instanceof Fl)return a.Xx();gi(a);return 128>(299*Mm.j+587*Mm.v+114*Mm.o)/1E3} -function Im(a,b){switch(b){case Hm:b=100*Om(Mm.j);var c=100*Om(Mm.v),d=100*Om(Mm.o);Pm.j=.4124564*b+.3575761*c+.1804375*d;Pm.v=.2126729*b+.7151522*c+.072175*d;Pm.o=.0193339*b+.119192*c+.9503041*d;Pm.G=Mm.G;b=Qm(Pm.j/Rm[0]);c=Qm(Pm.v/Rm[1]);d=Qm(Pm.o/Rm[2]);Sm.j=116*c-16;Sm.v=500*(b-c);Sm.o=200*(c-d);Sm.G=Pm.G;Sm.j=Math.min(100,Math.max(0,Sm.j+100*a));a=(Sm.j+16)/116;b=a-Sm.o/200;Pm.j=Rm[0]*Tm(Sm.v/500+a);Pm.v=Rm[1]*(Sm.j>Um*Vm?Math.pow(a,3):Sm.j/Um);Pm.o=Rm[2]*Tm(b);Pm.G=Sm.G;a=-.969266*Pm.j+1.8760108* -Pm.v+.041556*Pm.o;b=.0556434*Pm.j+-.2040259*Pm.v+1.0572252*Pm.o;Mm.j=255*Wm((3.2404542*Pm.j+-1.5371385*Pm.v+-.4985314*Pm.o)/100);Mm.v=255*Wm(a/100);Mm.o=255*Wm(b/100);Mm.G=Pm.G;Mm.j=Math.round(Mm.j);255Mm.j&&(Mm.j=0);Mm.v=Math.round(Mm.v);255Mm.v&&(Mm.v=0);Mm.o=Math.round(Mm.o);255Mm.o&&(Mm.o=0);return"rgba("+Mm.j+", "+Mm.v+", "+Mm.o+", "+Mm.G+")";case Xm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ -ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Dm||(Em(),Dm=!0);var b=Gm;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,Mm.j=a[0],Mm.v=a[1],Mm.o=a[2],Mm.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Mm.j=0,Mm.v=0,Mm.o=0,Mm.G=1)}} -function hi(){var a=Mm.j/255,b=Mm.v/255,c=Mm.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Mm.G}function Om(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Wm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function Qm(a){return a>Vm?Math.pow(a,1/3):(Um*a+16)/116}function Tm(a){var b=a*a*a;return b>Vm?b:(116*a-16)/Um}function rm(a,b){"string"===typeof a?G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Fl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Em(){Gm=$g?(new cj(null,void 0,{willReadFrequently:!0})).context:null} -oa.Object.defineProperties(Fl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Fl,Fl,"type");this.ta=a;this.start.pc()&&(a===Zl?this.start=Bc:a===Gl&&(this.start=Ic));this.end.pc()&&(a===Zl?this.end=Mc:a===Gl&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Fm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); -this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Fl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"startRadius");0>a&&Ba(a,">= zero",Fl, -"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Fl,"endRadius");0>a&&Ba(a,">= zero",Fl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Fl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& -xa(this,a);this.qr=a;this.He=null}}});Fl.prototype.isDark=Fl.prototype.Xx;Fl.prototype.darkenBy=Fl.prototype.nz;Fl.prototype.lightenBy=Fl.prototype.oA;Fl.prototype.addColorStop=Fl.prototype.addColorStop;var Vm=216/24389,Um=24389/27,Rm=[95.047,100,108.883],Gm=null,Mm=new Cm,ii=new Cm,Pm=new Cm,Sm=new Cm,Dm=!1;Fl.className="Brush";var Wl;Fl.Solid=Wl=new F(Fl,"Solid",0);var Zl;Fl.Linear=Zl=new F(Fl,"Linear",1);var Gl;Fl.Radial=Gl=new F(Fl,"Radial",2);var Yl;Fl.Pattern=Yl=new F(Fl,"Pattern",4);var Hm; -Fl.Lab=Hm=new F(Fl,"Lab",5);var Xm;Fl.HSL=Xm=new F(Fl,"HSL",6); -Fl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Fl,"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};Fl.isValidColor=Fm;Fl.lighten=function(a){return Jm(a)};Fl.lightenBy=Jm;Fl.darken=function(a){return Km(a)};Fl.darkenBy=Km;Fl.mix=Lm;Fl.isDark=Nm;function nm(){this.Ea="Base"}nm.prototype.measure=function(){};nm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};nm.prototype.arrange=function(){};nm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};nm.prototype.CA=function(a){a.fk()};nm.prototype.mc=function(){}; -oa.Object.defineProperties(nm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});nm.prototype.remeasureObject=nm.prototype.CA;nm.prototype.arrangeElement=nm.prototype.bz;nm.prototype.measureElement=nm.prototype.rA;nm.className="PanelLayout";function Ym(){this.Ea="Base"}na(Ym,nm); -Ym.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Zm(a);for(var k=0;ka)&&Ba(a,"0 <= loc <= 1",Hl,"addColorStop:loc");B(b,"string",Hl,"addColorStop:color");G&&!Hm(b)&&v('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Ge&&(this.Ge=new vb);this.Ge.add(a,b);this.ta===Yl&&(this.type=am);this.He=null;return this}; +function Hm(a){if("black"===a)return!0;if(""===a)return!1;G&&B(a,"string",Hl,"isValidColor");Fm||(Gm(),Fm=!0);var b=Im;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.oA=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(a,b));return this};function Lm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(b,c)} +t.nz=function(a,b){this._isFrozen&&xa(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?Jm:b;if(this.type===Yl)gi(this.color),this.color=Km(-a,b);else if((this.type===am||this.type===Il)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)gi(c.value),this.addColorStop(c.key,Km(-a,b));return this};function Mm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Jm:c;gi(a);return Km(-b,c)} +function Nm(a,b,c){gi(a);a=Om.j;var d=Om.v,e=Om.o,f=Om.G;gi(b);void 0===c&&(c=.5);return"rgba("+Math.round((Om.j-a)*c+a)+", "+Math.round((Om.v-d)*c+d)+", "+Math.round((Om.o-e)*c+e)+", "+Math.round((Om.G-f)*c+f)+")"} +t.Xx=function(){if(this.type===Yl)return Pm(this.color);if((this.type===am||this.type===Il)&&null!==this.colorStops){var a=this.colorStops;if(this.type===Il)return Pm(a.first().value);if(null!==a.get(.5))return Pm(a.get(.5));if(2===a.count)return a=a.La(),Pm(Nm(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 Pm(Nm(a.get(c),a.get(d),1-f/e))}return!1}; +function Pm(a){if(!a)return!1;if(a instanceof Hl)return a.Xx();gi(a);return 128>(299*Om.j+587*Om.v+114*Om.o)/1E3} +function Km(a,b){switch(b){case Jm:b=100*Qm(Om.j);var c=100*Qm(Om.v),d=100*Qm(Om.o);Rm.j=.4124564*b+.3575761*c+.1804375*d;Rm.v=.2126729*b+.7151522*c+.072175*d;Rm.o=.0193339*b+.119192*c+.9503041*d;Rm.G=Om.G;b=Sm(Rm.j/Tm[0]);c=Sm(Rm.v/Tm[1]);d=Sm(Rm.o/Tm[2]);Um.j=116*c-16;Um.v=500*(b-c);Um.o=200*(c-d);Um.G=Rm.G;Um.j=Math.min(100,Math.max(0,Um.j+100*a));a=(Um.j+16)/116;b=a-Um.o/200;Rm.j=Tm[0]*Vm(Um.v/500+a);Rm.v=Tm[1]*(Um.j>Wm*Xm?Math.pow(a,3):Um.j/Wm);Rm.o=Tm[2]*Vm(b);Rm.G=Um.G;a=-.969266*Rm.j+1.8760108* +Rm.v+.041556*Rm.o;b=.0556434*Rm.j+-.2040259*Rm.v+1.0572252*Rm.o;Om.j=255*Ym((3.2404542*Rm.j+-1.5371385*Rm.v+-.4985314*Rm.o)/100);Om.v=255*Ym(a/100);Om.o=255*Ym(b/100);Om.G=Rm.G;Om.j=Math.round(Om.j);255Om.j&&(Om.j=0);Om.v=Math.round(Om.v);255Om.v&&(Om.v=0);Om.o=Math.round(Om.o);255Om.o&&(Om.o=0);return"rgba("+Om.j+", "+Om.v+", "+Om.o+", "+Om.G+")";case Zm:return hi(),ii.o=Math.min(100,Math.max(0,ii.o+100*a)),"hsla("+ii.j+", "+ii.v+"%, "+ii.o+"%, "+ +ii.G+")";default:v("Unknown color space: "+b)}}function gi(a){Fm||(Gm(),Fm=!0);var b=Im;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,Om.j=a[0],Om.v=a[1],Om.o=a[2],Om.G=a[3]/255):(b.fillStyle="#FFFFFF",c=b.fillStyle,b.fillStyle=a,b.fillStyle===c&&G&&v('Color "'+a+'" is not a valid color string for RGBA color conversion'),Om.j=0,Om.v=0,Om.o=0,Om.G=1)}} +function hi(){var a=Om.j/255,b=Om.v/255,c=Om.o/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))}ii.j=Math.round(g);ii.v=Math.round(100*a);ii.o=Math.round(100*e);ii.G=Om.G}function Qm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Ym(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Sm(a){return a>Xm?Math.pow(a,1/3):(Wm*a+16)/116}function Vm(a){var b=a*a*a;return b>Xm?b:(116*a-16)/Wm}function tm(a,b){"string"===typeof a?G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for '+b):a instanceof Hl||v("Value for "+b+" must be a color string or a Brush, not "+a)}function Gm(){Im=Yg?(new fj(null,void 0,{willReadFrequently:!0})).context:null} +oa.Object.defineProperties(Hl.prototype,{type:{configurable:!0,get:function(){return this.ta},set:function(a){this._isFrozen&&xa(this,a);$a(a,Hl,Hl,"type");this.ta=a;this.start.pc()&&(a===am?this.start=zc:a===Il&&(this.start=Ic));this.end.pc()&&(a===am?this.end=Mc:a===Il&&(this.end=Ic));this.He=null}},color:{configurable:!0,get:function(){return this.Jk},set:function(a){this._isFrozen&&xa(this,a);G&&!Hm(a)&&v('Color "'+a+'" is not a valid color string for Brush.color'); +this.Jk=a;this.He=null}},start:{configurable:!0,get:function(){return this.Wd},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"start");this.Wd=a.M();this.He=null}},end:{configurable:!0,get:function(){return this.Xk},set:function(a){this._isFrozen&&xa(this,a);x(a,Hb,Hl,"end");this.Xk=a.M();this.He=null}},startRadius:{configurable:!0,get:function(){return this.Tr},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"startRadius");0>a&&Ba(a,">= zero",Hl, +"startRadius");this.Tr=a;this.He=null}},endRadius:{configurable:!0,get:function(){return this.kq},set:function(a){this._isFrozen&&xa(this,a);D(a,Hl,"endRadius");0>a&&Ba(a,">= zero",Hl,"endRadius");this.kq=a;this.He=null}},colorStops:{configurable:!0,get:function(){return this.Ge},set:function(a){this._isFrozen&&xa(this,a);G&&x(a,vb,Hl,"colorStops");this.Ge=a;this.He=null}},pattern:{configurable:!0,get:function(){return this.qr},set:function(a){this._isFrozen&& +xa(this,a);this.qr=a;this.He=null}}});Hl.prototype.isDark=Hl.prototype.Xx;Hl.prototype.darkenBy=Hl.prototype.nz;Hl.prototype.lightenBy=Hl.prototype.oA;Hl.prototype.addColorStop=Hl.prototype.addColorStop;var Xm=216/24389,Wm=24389/27,Tm=[95.047,100,108.883],Im=null,Om=new Em,ii=new Em,Rm=new Em,Um=new Em,Fm=!1;Hl.className="Brush";var Yl;Hl.Solid=Yl=new F(Hl,"Solid",0);var am;Hl.Linear=am=new F(Hl,"Linear",1);var Il;Hl.Radial=Il=new F(Hl,"Radial",2);var $l;Hl.Pattern=$l=new F(Hl,"Pattern",4);var Jm; +Hl.Lab=Jm=new F(Hl,"Lab",5);var Zm;Hl.HSL=Zm=new F(Hl,"HSL",6); +Hl.randomColor=function(a,b){void 0===a&&(a=128);G&&(D(a,Hl,"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};Hl.isValidColor=Hm;Hl.lighten=function(a){return Lm(a)};Hl.lightenBy=Lm;Hl.darken=function(a){return Mm(a)};Hl.darkenBy=Mm;Hl.mix=Nm;Hl.isDark=Pm;function pm(){this.Ea="Base"}pm.prototype.measure=function(){};pm.prototype.rA=function(a,b,c,d,e){a.measure(b,c,d,e)};pm.prototype.arrange=function(){};pm.prototype.bz=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};pm.prototype.CA=function(a){a.fk()};pm.prototype.mc=function(){}; +oa.Object.defineProperties(pm.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){this.Ea=a}},classType:{configurable:!0,get:function(){return W}}});pm.prototype.remeasureObject=pm.prototype.CA;pm.prototype.arrangeElement=pm.prototype.bz;pm.prototype.measureElement=pm.prototype.rA;pm.className="PanelLayout";function $m(){this.Ea="Base"}na($m,pm); +$m.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=an(a);for(var k=0;kaa&&(tb=Math.max(aa-wf,0));var Ik=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(Ik?wf:0)),0)}if(1===vc.columnSpan&&(Yb===xg||Yb===ll)){O=a.Kb(Xb);var Vi=O.bd();tb=Math.max(ag-O.actual,0);tb+Vi>T&&(tb=Math.max(T-Vi,0));var ko=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(ko?Vi:0)),0)}vf&&vc.fk()}}}}}Pa(z);var ge=0,De=0;f=a.columnCount;for(var Kg=0;Kg=a.rowCount);bf++)O=a.Lb(db.row+bf),tb=0,tb=Yb===Ad||Yb===ll?Math.max(O.minimum,0===Hd[db.row+bf]?O.maximum:Math.min(Hd[db.row+bf],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc, -O.maximum)),Xd.height+=tb,Gc+=O.minimum;for(var fd=1;fd=a.columnCount);fd++)O=a.Kb(db.column+fd),tb=0,tb=Yb===Ad||Yb===kl?Math.max(O.minimum,0===Sc[db.column+fd]?O.maximum:Math.min(Sc[db.column+fd],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Xd.width+=tb,Mk+=O.minimum;xb.width+=Xd.width;xb.height+=Xd.height;var Wh=db.margin,Bf=Wh.right+Wh.left,Xi=Wh.top+Wh.bottom;db.measure(xb.width,xb.height,Mk,Gc);for(var Xh=db.measuredBounds,Yd= -Math.max(Xh.width+Bf,0),eg=Math.max(Xh.height+Xi,0),Cf=0,Yh=0;Yh=a.rowCount);Yh++)O=a.Lb(db.row+Yh),Cf+=O.total||0;if(Cf=cf)&&!(db.row+Ge>=a.rowCount);Ge++){O=a.Lb(db.row+Ge);var ef=O.ua||0,ff=df(db,O,ie);G&&"number"!==typeof ff&&v(db+" spanAllocation does not return a number: "+ff);O.actual=Math.min(O.maximum,ef+ff);O.ua!==ef&&(cf-=O.ua-ef)}for(;0Id&&(O.actual=Math.min(O.maximum,Id+cf),O.ua!==Id&&(cf-=O.ua-Id));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var Ng=0,gf=0;gf=a.columnCount);gf++)O=a.Kb(db.column+gf),Ng+=O.total||0;if(Ng=Og)&&!(db.column+fg>=a.columnCount);fg++){O=a.Kb(db.column+fg);var Yi=O.ua||0,Zi=He(db,O,mo);G&&"number"!==typeof Zi&&v(db+" spanAllocation does not return a number: "+ -Zi);O.actual=Math.min(O.maximum,Yi+Zi);O.ua!==Yi&&(Og-=O.ua-Yi)}for(;0Nk&&(O.actual=Math.min(O.maximum,Nk+Og),O.ua!==Nk&&(Og-=O.ua-Nk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Xd);Gb.free(xb);void 0!==Hd&&Pa(Hd);void 0!==Sc&&Pa(Sc);var Pg=0,Qg=0,Ok=a.desiredSize,Vr=a.maxSize;Yb=yl(a,!0);var $i=De=ge=0,aj=0;f=a.columnCount;for(var Pk=0;Pk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= -1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,Ye=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(Ye=Math.max(c.height-k,0));var jb=Y.alignment;if(jb.Wb()){jb=a.defaultAlignment;jb.mb()||(jb=Ic);var Ed=jb.x;var Xb=jb.y;var Ze=jb.offsetX;jb=jb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,Ze=Kc.offsetX);dd.mb()&&(Xb=dd.y,jb=dd.offsetY)}else Ed=jb.x,Xb=jb.y, -Ze=jb.offsetX,jb=jb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,jb=Ze=0;Kc=R.width;dd=R.height;var Dc=Y.margin,vc=Dc.left+Dc.right,vf=Dc.top+Dc.bottom,Fd=cm(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==kl||(Kc=Math.max(ha-vc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==ll||(dd=Math.max(ya-vf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+vf;O+=La*Ed-(Kc+vc)*Ed+Ze+Dc.left;la+=sb*Xb-ha*Xb+jb+Dc.top;Y.visible&& -(jc(wb,Wb,tb,Ye,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,Ye)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=nk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= +function en(a,b,c){var d=null;a instanceof W&&""!==a.mf&&(d=a.lb(a.mf),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.Dp(b),d=d.panel}function fn(){this.Ea="Base"}na(fn,pm); +fn.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Vb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Of&&(u=k,r=u.strokeWidth*u.scale);var y=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var w=gn(k),z=w.x*y+w.offsetX;w=w.y*l+w.offsetY;var A=hn(k),C=A.x*y+A.offsetX;A=A.y*l+A.offsetY;isFinite(b)&&(m=Math.max(Math.abs(z-C)-r,0));isFinite(c)&&(n=Math.max(Math.abs(w-A)-r,0));r=Gb.alloc();r.h(0,0);a=an(a);for(A=0;A< +h;A++)w=d[A],w===k||!w.visible&&w!==a||(l=w.margin,y=l.right+l.left,z=l.top+l.bottom,w.measure(m,n,0,0),l=w.measuredBounds,y=Math.max(l.width+y,0),l=Math.max(l.height+z,0),r.h(Math.max(y,r.width),Math.max(l,r.height)));if(1===h)e.width=y,e.height=l,Gb.free(r);else{w=gn(k);A=hn(k);h=d=0;A.x!==w.x&&A.y!==w.y&&(d=r.width/Math.abs(A.x-w.x),h=r.height/Math.abs(A.y-w.y));Gb.free(r);r=0;null!==u&&(r=u.strokeWidth*u.scale,yg(u)===zg&&(d=h=Math.max(d,h)));d+=Math.abs(w.offsetX)+Math.abs(A.offsetX)+r;h+=Math.abs(w.offsetY)+ +Math.abs(A.offsetY)+r;u=k.stretch;u===ol&&(u=Al(k,!1));switch(u){case xg:g=f=0;break;case Ad:isFinite(b)&&(d=b);isFinite(c)&&(h=c);break;case ml:isFinite(b)&&(d=b);g=0;break;case nl:f=0,isFinite(c)&&(h=c)}k.fk();k.measure(d,h,f,g);e.width=k.measuredBounds.width+p;e.height=k.measuredBounds.height+q}}; +fn.prototype.arrange=function(a,b){var c=b.length,d=a.Vb(),e=d.measuredBounds,f=M.alloc();f.h(0,0,1,1);var g=d.margin,h=g.left;g=g.top;var k=a.padding,l=k.left;k=k.top;d.arrange(l+h,k+g,e.width,e.height);var m=gn(d),n=hn(d),p=m.y*e.height+m.offsetY,q=n.x*e.width+n.offsetX;n=n.y*e.height+n.offsetY;f.x=m.x*e.width+m.offsetX;f.y=p;ic(f,q,n,0,0);f.x+=h+l;f.y+=g+k;for(e=0;eaa&&(tb=Math.max(aa-Nh,0));var mo=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;aa=Math.max(aa-(tb+(mo?Nh:0)),0)}if(1===uc.columnSpan&&(Yb===xg||Yb===nl)){O=a.Kb(Xb);var Ui=O.bd();tb=Math.max(Ec-O.actual,0);tb+Ui>T&&(tb=Math.max(T-Ui,0));var Mk=0===O.ua;O.vc=O.vc+tb;O.actual=O.ua+tb;T=Math.max(T-(tb+(Mk?Ui:0)),0)}(cf||Fd)&&uc.fk()}}}}}Pa(z);var Fe=0,Sd=0;f=a.columnCount;for(var Oh= +0;Oh=a.rowCount);fd++)O=a.Lb(ab.row+fd),tb=0,tb=Yb===Ad||Yb===nl?Math.max(O.minimum,0===Sc[ab.row+fd]?O.maximum:Math.min(Sc[ab.row+fd],O.maximum)):Math.max(O.minimum, +isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.height+=tb,Vh+=O.minimum;for(var cg=1;cg=a.columnCount);cg++)O=a.Kb(ab.column+cg),tb=0,tb=Yb===Ad||Yb===ml?Math.max(O.minimum,0===Ie[ab.column+cg]?O.maximum:Math.min(Ie[ab.column+cg],O.maximum)):Math.max(O.minimum,isNaN(O.Oc)?O.maximum:Math.min(O.Oc,O.maximum)),Vd.width+=tb,Gc+=O.minimum;Ab.width+=Vd.width;Ab.height+=Vd.height;var je=ab.margin,Zi=je.right+je.left,$i=je.top+je.bottom;ab.measure(Ab.width,Ab.height,Gc, +Vh);for(var ke=ab.measuredBounds,dg=Math.max(ke.width+Zi,0),eg=Math.max(ke.height+$i,0),Wh=0,Bf=0;Bf=a.rowCount);Bf++)O=a.Lb(ab.row+Bf),Wh+=O.total||0;if(Wh=gd)&&!(ab.row+Je>=a.rowCount);Je++){O=a.Lb(ab.row+Je);var gf=O.ua||0,Wd=fg(ab,O,ff);G&&"number"!==typeof Wd&&v(ab+" spanAllocation does not return a number: "+Wd);O.actual=Math.min(O.maximum,gf+Wd);O.ua!==gf&&(gd-= +O.ua-gf)}for(;0Lg&&(O.actual=Math.min(O.maximum,Lg+gd),O.ua!==Lg&&(gd-=O.ua-Lg));if(0===O.index)break;O=a.Lb(O.index-1)}}for(var hf=0,Xh=0;Xh=a.columnCount);Xh++)O=a.Kb(ab.column+Xh),hf+=O.total||0;if(hf=Mg)&&!(ab.column+Yh>=a.columnCount);Yh++){O=a.Kb(ab.column+Yh);var bj=O.ua||0,no=aj(ab,O,Ke);G&&"number"!== +typeof no&&v(ab+" spanAllocation does not return a number: "+no);O.actual=Math.min(O.maximum,bj+no);O.ua!==bj&&(Mg-=O.ua-bj)}for(;0Pk&&(O.actual=Math.min(O.maximum,Pk+Mg),O.ua!==Pk&&(Mg-=O.ua-Pk));if(0===O.index)break;O=a.Kb(O.index-1)}}}}Pa(A);Gb.free(Vd);Gb.free(Ab);void 0!==Sc&&Pa(Sc);void 0!==Ie&&Pa(Ie);var Ng=0,Og=0,Qk=a.desiredSize,Wr=a.maxSize;Yb=Al(a,!0);var cj=Sd=Fe=0,dj=0;f=a.columnCount;for(var Rk=0;Rk=a.rowCount);O++){var la=a.Lb(z+O);0!==la.ua&&(w.height+=la.total)}for(O= +1;O=a.columnCount);O++)la=a.Kb(C+O),0!==la.ua&&(w.width+=la.total);var ha=E.ua+w.width,ya=A.ua+w.height;O=h;la=k;var La=ha,sb=ya,wb=h,Wb=k,tb=ha,af=ya;h+ha>c.width&&(tb=Math.max(c.width-h,0));k+ya>c.height&&(af=Math.max(c.height-k,0));var kb=Y.alignment;if(kb.Wb()){kb=a.defaultAlignment;kb.mb()||(kb=Ic);var Ed=kb.x;var Xb=kb.y;var bf=kb.offsetX;kb=kb.offsetY;var Kc=E.alignment,dd=A.alignment;Kc.mb()&&(Ed=Kc.x,bf=Kc.offsetX);dd.mb()&&(Xb=dd.y,kb=dd.offsetY)}else Ed=kb.x,Xb=kb.y, +bf=kb.offsetX,kb=kb.offsetY;if(isNaN(Ed)||isNaN(Xb))Xb=Ed=.5,kb=bf=0;Kc=R.width;dd=R.height;var Bc=Y.margin,uc=Bc.left+Bc.right,cf=Bc.top+Bc.bottom,Fd=em(Y,A,E,!1);!isNaN(Y.desiredSize.width)||Fd!==Ad&&Fd!==ml||(Kc=Math.max(ha-uc,0));!isNaN(Y.desiredSize.height)||Fd!==Ad&&Fd!==nl||(dd=Math.max(ya-cf,0));ha=Y.maxSize;ya=Y.minSize;Kc=Math.min(ha.width,Kc);dd=Math.min(ha.height,dd);Kc=Math.max(ya.width,Kc);dd=Math.max(ya.height,dd);ha=dd+cf;O+=La*Ed-(Kc+uc)*Ed+bf+Bc.left;la+=sb*Xb-ha*Xb+kb+Bc.top;Y.visible&& +(jc(wb,Wb,tb,af,O,la,R.width,R.height)?Y.arrange(O,la,Kc,dd):Y.arrange(O,la,Kc,dd,new M(wb,Wb,tb,af)))}}Gb.free(w);for(a=0;a=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();b.ef();for(var q=[],r=a.S.s,u=r.length,y=0;yA)){w=qk(w.figure);for(var C=0;CA&&z.push(E))}}}}r= a.S.s;u=r.length;for(y=0;ye*w*c))){A=H.segmentIndex;if(!isFinite(A)||isNaN(A))A=0;0>A&&(A=w-Math.min(-A,w));A=Math.round(A%w);w=H.opacity;C=1;if(1!==w){if(0===w)continue;C=b.globalAlpha;b.globalAlpha=C*w}E=q[y];var T=!1,aa=H.strokeDashArray;null!==aa&&(T=!0,b.ws(aa,H.strokeDashOffset));if("LineV"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== +e)/e);aa<=H+l;aa++){var Y=aa*e+p;0<=Y&&Y<=h&&qn(aa,z,A,E)&&(b.moveTo(Y,0),b.lineTo(Y,k))}b.stroke();b.ef()}else if("LineH"===H.figure&&null!==H.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)z.measure(Infinity,Infinity,0,0),A=z.measuredBounds,c.ld(A),q.push(A);else{var C=z.segmentIndex,E=z.segmentFraction,H=z.alignmentFocus;H.pc()&&(H=Ic);var T=z.segmentOrientation,aa=z.segmentOffset;if(isNaN(C)){var Y=k.Ba;A=Na();Y.fv(E,A);var R=K.allocAt(A[0],A[1]);R.add(k.i(0));Y.type=== N.j?R.offset(-Y.startX,-Y.startY):(Y=Y.figures.first(),null!==Y&&R.offset(-Y.startX,-Y.startY));Y=A[2];if(T!==lg){var O=k.computeAngle(z,T,Y);z.Qb=O}O=R.x-b.x;var la=R.y-b.y;K.free(R);Pa(A)}else if(C<-n||C>=n)A=K.alloc(),k.Hg(),k.computeMidPoint(A),Y=k.midAngle,T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O),O=A.x-b.x,la=A.y-b.y,K.free(A);else{O=0;0<=C?(la=m.P(C),A=Cha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Pf&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==rn&&T!==sn||r.rotate(90, -ha/2,La/2);T!==tn&&T!==un||r.rotate(-90,ha/2,La/2);T===vn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), +2):A);R=Y.Nf(la);var ha=A.Nf(O);Y=R>ha+10?0<=C?Y.gb(la):la.gb(Y):ha>R+10?0<=C?A.gb(O):O.gb(A):0<=C?Y.gb(O):O.gb(Y)}else Y=0<=C?la.gb(A):A.gb(la);T!==lg&&(O=k.computeAngle(z,T,Y),z.Qb=O);O=la.x+(A.x-la.x)*E-b.x;la=la.y+(A.y-la.y)*E-b.y}z.measure(Infinity,Infinity,0,0);A=z.measuredBounds;R=z.naturalBounds;var ya=0;z instanceof Of&&(ya=z.strokeWidth);ha=R.width+ya;var La=R.height+ya;r.reset();r.translate(-A.x,-A.y);r.scale(z.scale,z.scale);r.rotate(T===lg?z.angle:Y,ha/2,La/2);T!==tn&&T!==un||r.rotate(90, +ha/2,La/2);T!==vn&&T!==wn||r.rotate(-90,ha/2,La/2);T===xn&&(45Y||225Y)&&r.rotate(-Y,ha/2,La/2);R=new M(0,0,ha,La);u.Ki(R,H);r.Ma(u);H=-u.x+ya/2*z.scale;z=-u.y+ya/2*z.scale;y.assign(aa);ya=isNaN(aa.x);var sb=isNaN(aa.y);if(ya||sb){ha=ha/2+3;La=La/2+3;var wb=45<=Y&&135>=Y,Wb=225<=Y&&315>=Y;T===lg&&(wb||Wb)?(y.x=sb?ha:aa.y,y.y=ya?La:aa.x,wb?0<=C||isNaN(C)&&.5>E||!ya||(y.y=-La):Wb&&((0<=C||isNaN(C)&&.5>E)&&ya&&(y.y=-La),sb&&(y.x=-ha))):(ya&&(y.x=0<=C||isNaN(C)&&.5>E?ha:-ha),sb&&(y.y=-La), y.rotate(Y))}else y.rotate(Y);O+=y.x;la+=y.y;R.set(A);R.h(O+H,la+z,A.width,A.height);q.push(R);c.ld(R)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.vg=c;a.position.h(b.x+c.x,b.y+c.y);ac(e,c.width||0,c.height||0);Ib.free(r);K.free(u);K.free(y)}}}}; -pn.prototype.arrange=function(a,b){var c=b.length;if(a instanceof Be||a instanceof S){var d=a,e=null;a instanceof Be&&(e=a,d=e.adornedPart);var f=a instanceof Be?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=K.alloc(),q=n,y=r,q.Hg(),q.computeMidPoint(y),q=n.midAngle,l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,y=r.y, K.free(r);else{u=0;0<=h?(r=b.s[h],y=hz+10?0<=h?q.gb(r):r.gb(q):z>w+10?0<=h?y.gb(u):u.gb(y):0<=h?q.gb(u):u.gb(q)}else q=0<=h?r.gb(y):y.gb(r);l!==lg&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(y.x-r.x)*k;y=r.y+(y.y-r.y)*k}if(p.kp())g.location=new K(n,y);else{p.pc()&&(p=Ic);r=Ib.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var A=g.naturalBounds;u=M.allocAt(0,0,A.width,A.height);w=K.alloc();w.Ki(u,p);r.Ma(w);p=-w.x;z=-w.y;var C=A.width,E=A.height;A=K.alloc();A.assign(m);var H=isNaN(m.x),T=isNaN(m.y);if(H||T){C=C/2+3;E=E/2+3;var aa=45<=q&&135>=q,Y=225<=q&&315>=q;l===lg&&(aa||Y)?(A.x=T?C:m.y,A.y=H?E:m.x,aa?0<=h||isNaN(h)&&.5>k||!H||(A.y=-E):Y&&((0<=h||isNaN(h)&&.5>k)&&H&&(A.y=-E),T&&(A.x=-C))):(H&&(A.x=0<=h||isNaN(h)&&.5>k?C:-C),T&&(A.y=-E),A.rotate(q))}else A.rotate(q);n+=A.x;y+=A.y;r.Dp(u);p+=u.x;z+=u.y;h=K.allocAt(n+ -p,y+z);g.move(h);K.free(h);K.free(A);K.free(w);M.free(u);Ib.free(r)}}null!==e?e.hm(!1):d.hm(!1);d=wn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);K.free(d)}}; -function qn(a,b,c,d){if(!1!==Ij(d)){var e=d.strokeWidth;0===e&&a instanceof Be&&a.type===W.Link&&a.adornedObject instanceof Pf&&(e=a.adornedObject.strokeWidth);e*=d.Ia;a instanceof S&&null!==a.Ba?(a=a.geometry.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof Be&&null!==a.adornedPart.Ba?(a=a.adornedPart.Ba.bounds,d.Re(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Re(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.u()||null===d.Ba?d.jc.h(0,0,e.width,e.height):d.jc.assign(d.Ba.bounds);Dj(d,!1)}} -function xn(){this.Ea="Base"}na(xn,nm); -xn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Vb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new M(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,y=q.flattenedLengths,w=q.flattenedTotalLength,z=u.length,A=0,C=0,E=Na(),H=0;Hha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbYe))for(var jb=0;jbYe&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var Ze=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Dc=0,vc=0,vf=w;a.graduatedMarks= -[];for(var Fd,Ph=0;PhUi*Yb*w/a.graduatedRange&&null===Ec.graduatedSkip)){var Jg=y[0][0],Ud=0,wc=0;vc=w*Ec.graduatedStart-1E-4;vf=w*Ec.graduatedEnd+1E-4;var ag=Ui*Yb,Fc=a.graduatedTickBase;if(Fca.graduatedMin+ag&&(Fc-=Math.floor((Fc-a.graduatedMin)/ag)*ag);for(var Ik=Ze[Ph],Vi=Fc,ko=1E-6*a.graduatedMax, -ge=1;Fc<=a.graduatedMax+ko;ge++){a:{for(var De=Ik.length,Kg=0;Kg-Qh){var yf=!1;break a}}yf=!0}if(yf&&(Fc>a.graduatedMax&&(Fc=a.graduatedMax),null===Ec.graduatedSkip||Ec instanceof bh&&!Ec.graduatedSkip(Fc,Ec)||Ec instanceof Pf&&!Ec.graduatedSkip(Fc,Ec))&&(Dc=(Fc-a.graduatedMin)*w/a.graduatedRange,Dc>w&&(Dc=w),vc<=Dc&&Dc<=vf)){for(var he=E[Ud][wc],$e=y[Ud][wc];UdJg&&wc< -y[Ud].length-1;)wc++,he=E[Ud][wc],$e=y[Ud][wc],Jg+=$e;if(Dc<=Jg)break;Ud++;wc=0;he=E[Ud][wc];$e=y[Ud][wc];Jg+=$e}var xc=u[Ud],Vd=xc[2*wc],Jk=xc[2*wc+1],Ee=(Dc-(Jg-$e))/$e,Rh=new K(Vd+(xc[2*wc+2]-Vd)*Ee+r/2-q.bounds.x,Jk+(xc[2*wc+3]-Jk)*Ee+r/2-q.bounds.y);Rh.scale(h.scale,h.scale);a:{var Gd=he,bg=E[Ud];if(!(.5005>Ee&&.4995Ee?0Ee||.9995Lg){var Sh=1-Math.abs(.5-Ee);he=(Gd*Sh+Wd*(1-Sh))%360;break a}}}he=Gd}if(Ec instanceof bh){var pd="";null!==Ec.graduatedFunction?(pd=Ec.graduatedFunction(Fc,Ec),pd=null!==pd&&void 0!==pd?pd.toString():""):pd=(+Fc.toFixed(2)).toString();""!==pd&&Fd.push({nm:Rh,angle:he,text:pd})}else Fd.push({nm:Rh,angle:he})}Fc=Vi+ge*ag}}}a.graduatedMarks.push(Fd)}Pa(E); -var xb=a.graduatedMarks;if(null!==xb)for(var Wi=d.length,kc=0;kcqd;qd++){switch(qd){case 0:yc.h(Xd,Hd);break;case 1:yc.h(Xd+Th,Hd);break;case 2:yc.h(Xd,Hd+dg);break;case 3:yc.h(Xd+Th,Hd+dg)}yc.rotate(db+kb.angle);yc.offset(Lk,Vh);0===Uh&&0===qd?Sc.h(yc.x,yc.y,0,0):Sc.lf(yc);yc.offset(-Lk,-Vh);yc.rotate(-db-kb.angle)}K.free(yc);null!==Fe.graduatedBounds&&Fe.graduatedBounds.push(Sc);ic(af,Sc.x,Sc.y,Sc.width,Sc.height)}else if(kb instanceof bh){var ed=a,Mk=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new bh);var Gc=ed.temporaryTextBlock;yn(Gc,kb); -var bf=kb.alignmentFocus;bf.pc()&&(bf=Bc);for(var fd=kb.segmentOrientation,Wh=kb.segmentOffset,Bf=new M,Xi=0,Xh=0,Yd=0,eg=0,Cf=0,Yh=lc.length,cf=0;cfYd||225Yd)&&Id.rotate(-Yd,ef/2,ff/2);var Ng=M.allocAt(0,0,ef,ff),gf=K.alloc();gf.Ki(Ng,bf);Id.Ma(gf);var Og=-gf.x,mo=-gf.y,He=K.alloc();He.assign(Wh);isNaN(He.x)&&(He.x=ef/2+3);isNaN(He.y)&&(He.y=-(ff/2+3));He.rotate(Yd);Xi+=He.x+Og;Xh+=He.y+mo;var fg=new M(Xi,Xh,df.width,df.height),Yi=new M(df.x,df.y,df.width,df.height),Zi=new M(Ge.x,Ge.y,Ge.width,Ge.height); -ie.lA=eg;ie.lineCount=Gc.lineCount;ie.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];ie.actualBounds=fg;ie.measuredBounds=Yi;ie.naturalBounds=Zi;0===cf?Bf.assign(fg):Bf.ld(fg);K.free(He);K.free(gf);M.free(Ng);Ib.free(Id)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(Bf);ic(Mk,Bf.x,Bf.y,Bf.width,Bf.height)}Dj(kb,!1)}}}; -xn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=Bc);for(var z=0;zha&&(ha+=360);aa.push(ha)}A=O;C=la}E.push(aa)}if(null===a.graduatedIntervals){for(var ya=[],La=a.S.s,sb=La.length,wb=0;wbaf))for(var kb=0;kbaf&&tb.push(Xb)}}}}a.graduatedIntervals=ya}var bf=a.graduatedIntervals;var Kc=a.S.s,dd=Kc.length,Bc=0,uc=0,cf=w;a.graduatedMarks= +[];for(var Fd,wf=0;wfYb*Lk*w/a.graduatedRange&&null===Cc.graduatedSkip)){var $f=y[0][0],Rd=0,Dc=0;uc=w*Cc.graduatedStart-1E-4;cf=w*Cc.graduatedEnd+1E-4;var xf=Yb*Lk,Ec=a.graduatedTickBase;if(Eca.graduatedMin+xf&&(Ec-=Math.floor((Ec-a.graduatedMin)/xf)*xf);for(var Nh=bf[wf],mo=Ec,Ui=1E-6*a.graduatedMax, +Mk=1;Ec<=a.graduatedMax+Ui;Mk++){a:{for(var Fe=Nh.length,Sd=0;Sd-yf){var Ph=!1;break a}}Ph=!0}if(Ph&&(Ec>a.graduatedMax&&(Ec=a.graduatedMax),null===Cc.graduatedSkip||Cc instanceof $g&&!Cc.graduatedSkip(Ec,Cc)||Cc instanceof Of&&!Cc.graduatedSkip(Ec,Cc))&&(Bc=(Ec-a.graduatedMin)*w/a.graduatedRange,Bc>w&&(Bc=w),uc<=Bc&&Bc<=cf)){for(var qd=E[Rd][Dc],df=y[Rd][Dc];Rd$f&&Dc< +y[Rd].length-1;)Dc++,qd=E[Rd][Dc],df=y[Rd][Dc],$f+=df;if(Bc<=$f)break;Rd++;Dc=0;qd=E[Rd][Dc];df=y[Rd][Dc];$f+=df}var vc=u[Rd],Qh=vc[2*Dc],Td=vc[2*Dc+1],Ge=(Bc-($f-df))/df,Vi=new K(Qh+(vc[2*Dc+2]-Qh)*Ge+r/2-q.bounds.x,Td+(vc[2*Dc+3]-Td)*Ge+r/2-q.bounds.y);Vi.scale(h.scale,h.scale);a:{var ee=qd,He=E[Rd];if(!(.5005>Ge&&.4995Ge?0Ge||.9995Wi){var Rh=1-Math.abs(.5-Ge);qd=(ee*Rh+Ud*(1-Rh))%360;break a}}}qd=ee}if(Cc instanceof $g){var fe="";null!==Cc.graduatedFunction?(fe=Cc.graduatedFunction(Ec,Cc),fe=null!==fe&&void 0!==fe?fe.toString():""):fe=(+Ec.toFixed(2)).toString();""!==fe&&Fd.push({nm:Vi,angle:qd,text:fe})}else Fd.push({nm:Vi,angle:qd})}Ec=mo+Mk*xf}}}a.graduatedMarks.push(Fd)}Pa(E); +var zf=a.graduatedMarks;if(null!==zf)for(var Ab=d.length,ag=0;agab;ab++){switch(ab){case 0:wc.h(Af,Vd);break;case 1:wc.h(Af+Xi,Vd);break;case 2:wc.h(Af,Vd+Th);break;case 3:wc.h(Af+Xi,Vd+Th)}wc.rotate(Uh+gb.angle);wc.offset(bg,Ok);0===he&&0===ab?Sc.h(wc.x,wc.y,0,0):Sc.lf(wc);wc.offset(-bg,-Ok);wc.rotate(-Uh-gb.angle)}K.free(wc);null!==Fc.graduatedBounds&&Fc.graduatedBounds.push(Sc);ic(ef,Sc.x,Sc.y,Sc.width,Sc.height)}else if(gb instanceof $g){var ed=a,ie=e;null===ed.temporaryTextBlock&&(ed.temporaryTextBlock=new $g);var Gc=ed.temporaryTextBlock;An(Gc,gb); +var Vh=gb.alignmentFocus;Vh.pc()&&(Vh=zc);for(var fd=gb.segmentOrientation,cg=gb.segmentOffset,je=new M,Zi=0,$i=0,ke=0,dg=0,eg=0,Wh=kc.length,Bf=0;Bfke||225ke)&&Wd.rotate(-ke,Je/2,gf/2);var Lg=M.allocAt(0,0,Je,gf),hf=K.alloc();hf.Ki(Lg,Vh);Wd.Ma(hf);var Xh=-hf.x,Mg=-hf.y,Ke=K.alloc();Ke.assign(cg);isNaN(Ke.x)&&(Ke.x=Je/2+3);isNaN(Ke.y)&&(Ke.y=-(gf/2+3));Ke.rotate(ke);Zi+=Ke.x+Xh;$i+=Ke.y+Mg;var aj=new M(Zi,$i,ff.width,ff.height),Yh=new M(ff.x,ff.y,ff.width,ff.height),bj=new M(fg.x,fg.y,fg.width,fg.height); +gd.lA=dg;gd.lineCount=Gc.lineCount;gd.lines=[Gc.Ib,Gc.Uh,Gc.rf,Gc.We,Gc.Wc,Gc.Xb,Gc.Je];gd.actualBounds=aj;gd.measuredBounds=Yh;gd.naturalBounds=bj;0===Bf?je.assign(aj):je.ld(aj);K.free(Ke);K.free(hf);M.free(Lg);Ib.free(Wd)}null!==ed.graduatedBounds&&ed.graduatedBounds.push(je);ic(ie,je.x,je.y,je.width,je.height)}Gj(gb,!1)}}}; +zn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Vb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.S.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,y=p.strokeWidth*p.scale,w=p.alignmentFocus;w.pc()&&(w=zc);for(var z=0;zg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +W.prototype.Mf=function(a){P.prototype.Mf.call(this,a);a.S=this.S;for(var b=a.S.s,c=b.length,d=0;dg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){wi(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.ws(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.Eb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.ef();n&&b.ts()}}}} -function Cn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=En(a,!0),l=En(a,!1),m=0;mp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function En(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.bd(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.Eb,wi(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function Gn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),K.free(r));K.free(m);f&&e.transform(g);return l}; -t.Sj=function(){for(var a=this.S.s,b=a.length,c=0;cc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case kl:this.w(!0);this.measure(c+h,f+g,0,0);break;case ll:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; -t.rh=function(a){var b=this.naturalBounds,c=Zm(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dc||f>d)this.w(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case Ad:this.w(!0);this.measure(c+h,d+g,0,0);break;case ml:this.w(!0);this.measure(c+h,f+g,0,0);break;case nl:this.w(!0),this.measure(b+h,d+g,0,0)}}this.ta.arrange(this,e,this.vg)}}; +t.rh=function(a){var b=this.naturalBounds,c=an(this);if(jc(0,0,b.width,b.height,a.x,a.y)){b=this.S.s;for(var d=b.length,e=K.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(Jb(e.set(a),f.transform),f.ha(e))return K.free(e),!0}K.free(e);return null===this.Ra&&null===this.areaBackground?!1:!0}return!1};t.xs=function(a){if(this.bindingId===a)return this;for(var b=this.S.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); -if(null!==m?m.Of(a,b,c,d,e,p):xl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Ln(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Ln(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Of=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=Ib.alloc(),g.reset());g.multiply(this.transform);if(this.qh(a,g))return Nn(this,b,c,e),void 0===f&&Ib.free(g),!0;if(this.dd(a,g)){if(!this.isAtomic)for(var h=an(this),k=this.S.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=Ib.alloc();p.set(g); +if(null!==m?m.Of(a,b,c,d,e,p):zl(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);Ib.free(p)}}}void 0===f&&Ib.free(g);return d}void 0===f&&Ib.free(g);return!1};function Nn(a,b,c,d){for(var e=a.S.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&Nn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.Ag=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.Ae(),k=h?a:Jb(K.allocAt(a.x,a.y),this.transform),l=h?b:Jb(K.allocAt(b.x,b.y),this.transform),m=k.Nf(l),n=0y.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; -function en(a){var b=null;a instanceof Pf&&(b=a.spot1,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=Ac);return b}function fn(a){var b=null;a instanceof Pf&&(b=a.spot2,b===gd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;cy.width||u.y>y.height||0>u.x+u.width||0>u.y+u.height))if(r.Ae()?(u=r.transform,Jb(k.set(a),u),Jb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.Ag(k,l,c,d,e,f):u.Kx(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}K.free(k);K.free(l)}return e?n:g}return!1}; +function gn(a){var b=null;a instanceof Of&&(b=a.spot1,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=yc);return b}function hn(a){var b=null;a instanceof Of&&(b=a.spot2,b===hd&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Nc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Ij(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||Mn(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.jb(se,"elements",this,b,null,d,null),c.jb(re,"elements",this,null,b,null,a)))};function Nn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(re,"rowdefs",this,null,c,null,a)}return b[a]}; -t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"rowdefs",this,c,null,a,null);this.w()}}};function kk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new jk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(re,"coldefs",this,null,c,null,a)}return b[a]}; -t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(se,"coldefs",this,c,null,a,null);this.w()}}};function lk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof jk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} -t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&mm(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&mm(a,new jk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&mm(a,new jk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.sb(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Mb(a,b);if(0===a||b.isPanelMain)this.lh=null;Lj(this)||this.w();b.w(!1);null!==b.portId?this.ff=!0:b instanceof W&&!0===b.ff&&(this.ff=!0);this.graduatedIntervals=null;this.Uf()||On(this,b,!1);c=this.part;null!==c&&(c.ci=null,c.mg=NaN,this.ff&&c instanceof V&&(c.ff=!0),c.ff&&c instanceof V&&(c.Cc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.jb(ue,"elements",this,b,null,d,null),c.jb(te,"elements",this,null,b,null,a)))};function Pn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){x(a,P,W,"remove:element");for(var b=this.S.s,c=b.length,d=-1,e=0;ea&&Ba(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!0;c.index=a;b[a]=c;this.jb(te,"rowdefs",this,null,c,null,a)}return b[a]}; +t.IA=function(a){G&&D(a,W,"removeRowDefinition:idx");0>a&&Ba(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"rowdefs",this,c,null,a,null);this.w()}}};function nk(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Kb=function(a){G&&D(a,W,"getColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new mk;c.Ji(this);c.isRow=!1;c.index=a;b[a]=c;this.jb(te,"coldefs",this,null,c,null,a)}return b[a]}; +t.DA=function(a){G&&D(a,W,"removeColumnDefinition:idx");0>a&&Ba(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.jb(ue,"coldefs",this,c,null,a,null);this.w()}}};function ok(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof mk?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.w()}} +t.Xy=function(a){var b=null;a.isRow?b=this.Lb(a.index):a.isRow||(b=this.Kb(a.index));b&&om(b,a);return this};t.Yy=function(a,b){(a=this.Lb(a))&&om(a,new mk(b));return this};t.Sy=function(a,b){(a=this.Kb(a))&&om(a,new mk(b));return this};t.Iz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;e=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Pn=!0)}}))} -t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();Gn(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; +t.$z=function(a){if(this.type!==W.Graduated)return NaN;var b=this.Vb();b.transform.Jd(a);return b.geometry.Ox(a)*this.graduatedRange+this.graduatedMin};function jm(a){a=a.allBindings;return null!==a&&a._isFrozen} +function wg(a){var b=a.allBindings;if(null===b)null!==a.data&&v("Template cannot have .data be non-null: "+a),a.allBindings=b=new I;else if(b._isFrozen)return;var c=new I;Pn(a,!1);a.yk(a,function(a,d){d.Eh();var e=d.localBindings;if(null!==e)for(gm(d,!1),e=e.iterator;e.next();){var f=e.value;f.mode===Qn&&gm(d,!0);var g=f.sourceName;null!==g&&("/"===g&&Pn(a,!0),g=yl(f,a,d),null!==g&&(c.add(g),null===g.srcBindings&&(g.srcBindings=new I),g.srcBindings.add(f)));b.add(f)}if(d instanceof W&&d.type===W.Table){if(0< +d.rowCount)for(a=d.rowDefs,e=a.length,f=0;f=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||(Fa("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Rn=!0)}}))} +t.lz=function(a){void 0===a&&(a=!1);var b=this.copy();In(b,function(a){a instanceof W&&(a.allBindings=null,a.zb=null);var b=a.localBindings;null!==b&&(a.localBindings=null,b.each(function(b){a.bind(b.copy())}));b=a.animationTriggers;null!==b&&(a.animationTriggers=null,b.each(function(b){a.Yv(b.value.copy())}))});a&&wg(b);return b}; t.Qa=function(a){var b=this.allBindings;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.lb(e),null===d){G&&Fa("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.Ni;if(-1!==g){if(f=this.xs(g),null===f)continue}else null!==c.Dd&&(f=c.Dd);"/"===e?d=f.part:"."===e?d=f:".."===e&&(d=f.panel);e=c.Fo;if(0!==e){if(!(f instanceof W))continue;1===e?f=f.Kb(c.Jl):2===e&&(f=f.Lb(c.Jl))}void 0!==f&&c.aw(f,d)}}};t.Jx=function(a){if(void 0===a||null===a||null===this.me)return null;B(a,"object",W,"findItemPanelForData");return this.me.L(a)}; -function Qn(a,b){a=a.S.s;for(var c=a.length,d=b.length,e=0,f=null;ea;)this.wc(this.S.length-1,!1);Rn(this,this.itemArray)}; -function Rn(a,b){var c=Jn(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Tn(a,b);e=Un(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Nn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Jn(a);a.Mb(f,e);d&&(e.zb=b,Vn(a,f,c),e.zb=null);e.data=b}}} -function Vn(a,b,c){for(a=a.S;ba;)this.wc(this.S.length-1,!1);Tn(this,this.itemArray)}; +function Tn(a,b){var c=Ln(a);if(null===b||0===b.length)for(;a.S.length>c;)a.wc(a.S.length-1,!1);else if(a.S.length<=c){c=b.length;for(var d=0;dc)){var e=Vn(a,b);e=Wn(a,e);if(null!==e){wg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.th();null!==f&&Pn(f,!0)}"object"===typeof b&&(null===a.me&&(a.me=new vb),a.me.add(b,e));f=c+Ln(a);a.Mb(f,e);d&&(e.zb=b,Xn(a,f,c),e.zb=null);e.data=b}}} +function Xn(a,b,c){for(a=a.S;ba&&Ba(a,">= 0",W,"padding"), a=new fc(a)):(x(a,fc,W,"padding"),0>a.left&&Ba(a.left,">= 0",W,"padding:value.left"),0>a.right&&Ba(a.right,">= 0",W,"padding:value.right"),0>a.top&&Ba(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&Ba(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.w(),this.g("padding",b,a))}},defaultAlignment:{configurable:!0,get:function(){return this.fn},set:function(a){var b=this.fn;b.D(a)||(G&&x(a,Hb,W,"defaultAlignment"),this.fn=a=a.M(),this.w(),this.g("defaultAlignment", -b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:tc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new $n),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", -b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Fl)&&(a instanceof Fl&&a.freeze(),null===this.Y&&(this.Y=new $n),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; -b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new $n),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= -this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new $n),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof Be);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, +b,a))}},defaultStretch:{configurable:!0,get:function(){return this.fg},set:function(a){var b=this.fg;b!==a&&($a(a,P,W,"defaultStretch"),this.fg=a,this.w(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{configurable:!0,get:function(){return null!==this.Y?this.Y.cq:sc},set:function(a){"number"===typeof a?a=new fc(a):G&&x(a,fc,W,"defaultSeparatorPadding");var b=this.defaultSeparatorPadding;b.D(a)||(a=a.M(),null===this.Y&&(this.Y=new bo),this.Y.cq=a,this.w(),this.g("defaultSeparatorPadding", +b,a))}},defaultRowSeparatorStroke:{configurable:!0,get:function(){return null!==this.Y?this.Y.oa:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof Hl)&&(a instanceof Hl&&a.freeze(),null===this.Y&&(this.Y=new bo),this.Y.oa=a,this.R(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{configurable:!0,get:function(){return null!==this.Y?this.Y.Na:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth; +b!==a&&isFinite(a)&&0<=a&&(null===this.Y&&(this.Y=new bo),this.Y.Na=a,this.w(),this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{configurable:!0,get:function(){return null!==this.Y?this.Y.Z:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",W,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea)&&v("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.Nb=a,this.w(),this.g("topIndex",b,a))}},leftIndex:{configurable:!0,get:function(){return null!==this.Y?this.Y.ob:0},set:function(a){var b= +this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&v("Panel.leftIndex must be greater than zero and a real number, not: "+a),null===this.Y&&(this.Y=new bo),this.Y.ob=a,this.w(),this.g("leftIndex",b,a))}},data:{configurable:!0,get:function(){return this.zb},set:function(a){var b=this.zb;if(b!==a){var c=this instanceof U&&!(this instanceof De);c&&B(a,"object",W,"data");wg(this);this.zb=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof S?(null!==b&&c.pf.remove(b),null!==a&&c.pf.add(a, this)):this instanceof U&&(null!==b&&c.qf.remove(b),null!==a&&c.qf.add(a,this))):(c=this.panel,null!==c&&null!==c.me&&(null!==b&&c.me.remove(b),null!==a&&c.me.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.Qa()}}},itemIndex:{configurable:!0,get:function(){return this.Ln},set:function(a){var b=this.Ln;b!==a&&(this.Ln=a,this.g("itemIndex",b,a))}},allBindings:{configurable:!0,get:function(){return null!==this.B?this.B.tb:null},set:function(a){this.localBindings!== -a&&(null===this.B&&(this.B=new sl),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Qn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&ak(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&Xj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Rn(this,a)}}},itemTemplate:{configurable:!0, +a&&(null===this.B&&(this.B=new ul),this.B.tb=a)}},itemArray:{configurable:!0,get:function(){return this.Th},set:function(a){G&&null!==a&&!Array.isArray(a)&&v("Panel.itemArray must be an Array-like object or null, not: "+a);var b=this.Th;if(b!==a||null!==a&&Sn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&dk(c.partManager,this,c),this.Th=a,null!==c&&null!==a&&ak(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Tn(this,a)}}},itemTemplate:{configurable:!0, enumerable:!0,get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.L("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new vb}var b=this.itemTemplateMap.L("");b!==a&&(x(a,W,W,"itemTemplate"),(a instanceof U||a.isPanelMain)&&v("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.Bv())}},itemTemplateMap:{configurable:!0, -enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}rl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== -this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),rl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== -(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Df||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Df&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), -this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&Mn(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), +enumerable:!0,get:function(){return null!==this.B?this.B.Vc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){x(a,vb,W,"itemTemplateMap");for(var c=a.iterator;c.next();){var d=c.value;G&&(d instanceof U||d.isPanelMain)&&v("Template in Panel.itemTemplateMap must not be a Part or be Panel.isPanelMain: "+d)}tl(this);this.B.Vc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing||this.Bv()}}},itemCategoryProperty:{configurable:!0,get:function(){return null!== +this.B?this.B.Uc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&("string"!==typeof a&&"function"!==typeof a&&Aa(a,"string or function",W,"itemCategoryProperty"),tl(this),this.B.Uc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(B(a,"boolean",W,"isAtomic"),this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{configurable:!0,get:function(){return 0!== +(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&(B(a,"boolean",W,"isClipping"),!a||this.type===W.Spot||this instanceof Cf||Fa("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString())),this.l^=2097152,this instanceof Cf&&(this.yb=null),this.w(),this.g("isClipping",b,a))}},isOpposite:{configurable:!0,get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(B(a,"boolean",W,"isOpposite"),this.l^=33554432,this.w(), +this.g("isOpposite",b,a))}},isEnabled:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){B(a,"boolean",W,"isEnabled");var c=null===this.panel||this.panel.Uf();this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&On(this,this,a)}}},alignmentFocusName:{configurable:!0,get:function(){return this.mf},set:function(a){var b=this.mf;b!==a&&(G&&B(a,"string",W,"alignmentFocusName"), this.mf=a,this.w(),this.g("alignmentFocusName",b,a))}}}); -oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return lm.L("Position")}},Horizontal:{configurable:!0,get:function(){return lm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return lm.L("Vertical")}},Spot:{configurable:!0,get:function(){return lm.L("Spot")}},Auto:{configurable:!0,get:function(){return lm.L("Auto")}},Table:{configurable:!0,get:function(){return lm.L("Table")}},Viewbox:{configurable:!0, -enumerable:!0,get:function(){return lm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return lm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return lm.L("TableColumn")}},Link:{configurable:!0,get:function(){return lm.L("Link")}},Grid:{configurable:!0,get:function(){return lm.L("Grid")}},Graduated:{configurable:!0,get:function(){return lm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; +oa.Object.defineProperties(W,{Position:{configurable:!0,get:function(){return nm.L("Position")}},Horizontal:{configurable:!0,get:function(){return nm.L("Horizontal")}},Vertical:{configurable:!0,get:function(){return nm.L("Vertical")}},Spot:{configurable:!0,get:function(){return nm.L("Spot")}},Auto:{configurable:!0,get:function(){return nm.L("Auto")}},Table:{configurable:!0,get:function(){return nm.L("Table")}},Viewbox:{configurable:!0, +enumerable:!0,get:function(){return nm.L("Viewbox")}},TableRow:{configurable:!0,get:function(){return nm.L("TableRow")}},TableColumn:{configurable:!0,get:function(){return nm.L("TableColumn")}},Link:{configurable:!0,get:function(){return nm.L("Link")}},Grid:{configurable:!0,get:function(){return nm.L("Grid")}},Graduated:{configurable:!0,get:function(){return nm.L("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.Bv; W.prototype.findItemPanelForData=W.prototype.Jx;W.prototype.updateTargetBindings=W.prototype.Qa;W.prototype.copyTemplate=W.prototype.lz;W.prototype.graduatedValueForPoint=W.prototype.$z;W.prototype.graduatedPointForValue=W.prototype.Zz;W.prototype.findColumnForLocalX=W.prototype.Az;W.prototype.findRowForLocalY=W.prototype.Iz;W.prototype.addColumnDefinition=W.prototype.Sy;W.prototype.addRowDefinition=W.prototype.Yy;W.prototype.addRowColumnDefinition=W.prototype.Xy; W.prototype.removeColumnDefinition=W.prototype.DA;W.prototype.getColumnDefinition=W.prototype.Kb;W.prototype.removeRowDefinition=W.prototype.IA;W.prototype.getRowDefinition=W.prototype.Lb;W.prototype.removeAt=W.prototype.sb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Mb;W.prototype.elt=W.prototype.P;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.lb;W.prototype.findInVisualTree=W.prototype.am;W.prototype.walkVisualTreeFrom=W.prototype.yk; -W.prototype.findMainElement=W.prototype.Vb;var Pn=!1,Xn=!1,Yn=null,lm=new vb;W.className="Panel";W.definePanelLayout=Zn;Zn("Position",new Ym);Zn("Vertical",new an);Zn("Auto",new dn);Zn("Link",new pn);function ao(){this.yq=0;this.G=100;this.oa=10;this.Z=0;this.ki=this.o=this.j=this.v=null}ao.prototype.copy=function(){var a=new ao;a.yq=this.yq;a.G=this.G;a.oa=this.oa;a.Z=this.Z;a.v=this.v;a.j=this.j;a.o=this.o;a.ki=this.ki;return a};ao.className="GradPanelSettings"; -function $n(){this.Vc=[];this.Uc=[];this.j=this.ub=bo;this.ob=this.Nb=0;this.cq=tc;this.Na=1;this.Z=this.oa=null;this.G=1;this.tb=this.o=this.v=null} -$n.prototype.copy=function(a){for(var b=new $n,c=this.Vc,d=c.length,e=b.Vc,f=0;fa&&Ba(a,">= 0",jk,"height"),this.Oc=a,this.actual=this.ua,null!== -this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",jk,"width"),0>a&&Ba(a,">= 0",jk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",jk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",jk,"minimum"),this.wj=a,this.actual= -this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",jk,"maximum"),0>a&&Ba(a,">= 0",jk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,jk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), -this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,jk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,jk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), -this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&rm(a,"RowColumnDefinition.separatorStroke"),a instanceof Fl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", -b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",jk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];for(var z=0;.1<=u;){0===z&&(m?(e=c,e-=l,u-=l,m=!1):e=c,0===e&&(e=1)); +b)d=b.defaultSeparatorPadding;else return a;return a+(this.isRow?d.top+d.bottom:d.left+d.right)};t.Ub=function(a,b,c){var d=this.Xe;if(null!==d&&(d.jb(re,a,this,b,c,void 0,void 0),null!==this.he&&(b=d.diagram,null!==b&&!b.skipsModelSourceBindings&&(d=d.th(),null!==d&&(b=d.data,null!==b)))))for(c=this.he.iterator;c.next();)c.value.Gp(this,b,a,d)};function kn(a){if(a.sizing===fo){var b=a.Xe;return a.isRow?b.rowSizing:b.columnSizing}return a.sizing} +t.bind=function(a,b,c,d){var e=null;"string"===typeof a?e=new Mi(a,b,c,d):e=a;e.Dd=this;a=this.panel;null!==a&&(b=a.th(),null!==b&&jm(b)&&v("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+e+" on "+a));null===this.he&&(this.he=new I);this.he.add(e);return this}; +oa.Object.defineProperties(mk.prototype,{panel:{configurable:!0,get:function(){return this.Xe}},isRow:{configurable:!0,get:function(){return this.Hq},set:function(a){this.Hq=a}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb=a}},height:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"height"),0>a&&Ba(a,">= 0",mk,"height"),this.Oc=a,this.actual=this.ua,null!== +this.panel&&this.panel.w(),this.Ub("height",b,a))}},width:{configurable:!0,get:function(){return this.Oc},set:function(a){var b=this.Oc;b!==a&&(G&&B(a,"number",mk,"width"),0>a&&Ba(a,">= 0",mk,"width"),this.Oc=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("width",b,a))}},minimum:{configurable:!0,get:function(){return this.wj},set:function(a){var b=this.wj;b!==a&&(G&&B(a,"number",mk,"minimum"),(0>a||!isFinite(a))&&Ba(a,">= 0",mk,"minimum"),this.wj=a,this.actual= +this.ua,null!==this.panel&&this.panel.w(),this.Ub("minimum",b,a))}},maximum:{configurable:!0,get:function(){return this.uj},set:function(a){var b=this.uj;b!==a&&(G&&B(a,"number",mk,"maximum"),0>a&&Ba(a,">= 0",mk,"maximum"),this.uj=a,this.actual=this.ua,null!==this.panel&&this.panel.w(),this.Ub("maximum",b,a))}},alignment:{configurable:!0,get:function(){return this.Pb},set:function(a){var b=this.Pb;b.D(a)||(G&&x(a,Hb,mk,"alignment"),this.Pb=a.M(),null!==this.panel&&this.panel.w(), +this.Ub("alignment",b,a))}},stretch:{configurable:!0,get:function(){return this.tg},set:function(a){var b=this.tg;b!==a&&(G&&$a(a,P,mk,"stretch"),this.tg=a,null!==this.panel&&this.panel.w(),this.Ub("stretch",b,a))}},separatorPadding:{configurable:!0,get:function(){return this.pg},set:function(a){"number"===typeof a?a=new fc(a):null!==a&&G&&x(a,fc,mk,"separatorPadding");var b=this.pg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.M()),this.pg=a,null!==this.panel&&this.panel.w(), +this.Ub("separatorPadding",b,a))}},separatorStroke:{configurable:!0,get:function(){return this.xo},set:function(a){var b=this.xo;b!==a&&(null!==a&&tm(a,"RowColumnDefinition.separatorStroke"),a instanceof Hl&&a.freeze(),this.xo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStroke",b,a))}},separatorStrokeWidth:{configurable:!0,get:function(){return this.yo},set:function(a){var b=this.yo;b!==a&&(this.yo=a,null!==this.panel&&this.panel.w(),this.Ub("separatorStrokeWidth", +b,a))}},separatorDashArray:{configurable:!0,get:function(){return this.Gj},set:function(a){var b=this.Gj;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",mk,"separatorDashArray:value");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,q,r,u=0,y=Na(),w=2;wn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;w=0;r=y[w];n=r[0];q=r[1];p=r[2];r=r[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){Pa(y);return}e>r?(z=e-r,e=r):z=0;var A=Math.sqrt(e*e/(1+p*p));0>n&&(A=-A);h+=A;k+=p*A;a.translate(h,k);a.rotate(q);a.translate(-(g/2),-(f/2));0===z&&d.sh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==z){w++;if(w===y.length){Pa(y);return}r=y[w];n=r[0];q=r[1];p=r[2];r=r[3];e=z}}Pa(y)}} -t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof Be&&"Selection"===h.category&&h.adornedObject instanceof Pf&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.sh=function(a,b){var c=this.Dc,d=this.gj;if(null!==c||null!==d){var e=this.Ba;if(null!==e){a.Ec();var f=this.actualBounds,g=this.naturalBounds;null!==d&&wi(this,a,d,!0,!1,g,f);var h=this.part,k=this.ug;null===c||0!==k||null===h||!this.isPanelMain&&h.Vb()!==this||(k=h.type===W.Link&&h instanceof De&&"Selection"===h.category&&h.adornedObject instanceof Of&&h.adornedPart.Vb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(wi(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Sf("drawShadows")&&(f=h.isShadowed);!1===a.Wl&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.ws(k,this.strokeDashOffset));if(e.type===N.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.vk(),a.ef();else if(e.type===N.v){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.zg(d);null!==c&&(h&&f&&Jl(a),a.vk(),h&&f&&Il(a));a.ef()}else if(e.type===N.G)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+L.Ig*e,k-p,l+e,k-L.Ig*p,l+e,k),a.bezierCurveTo(l+e,k+L.Ig*p,l+L.Ig*e,k+p,l,k+p),a.bezierCurveTo(l-L.Ig*e,k+p,l-e,k+L.Ig*p,l-e,k),a.bezierCurveTo(l-e,k-L.Ig*p,l-L.Ig*e,k-p,l,k-p),a.closePath(),null!==d&&a.zg(d),null!==c&& -(h&&f&&Jl(a),a.vk(),h&&f&&Il(a)),a.ef();else if(e.type===N.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=$d(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;wu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Yd(u,l),y=q.length,0===y)a.lineTo(u.centerX,u.centerY);else for(var w=0;w(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;M.free(f);return L.dc(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== N.v){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Hc(-d,-d);if(f.ha(a))return M.free(f),!1;f.Hc(d,d)}null!==this.stroke&&f.Hc(e,e);a=f.ha(a);M.free(f);return a}if(c.type===N.G){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return M.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);M.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?de(c,a.x,a.y,e):be(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===N.o)return M.free(f),null===this.fill?be(c,a.x,a.y,e):$d(c,a,e,1=this.strokeWidth)m=L.hf(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Na();a=new K;L.hf(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new K;L.hf(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Pa(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),w-=r,z-= -u;q.contains(w,z);)w-=r,z-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.xc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||L.ca(k.y,a))&&(k.yb||L.ca(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} +d;g.y=f;g.transform(c);b=!1;ro(this,g,h,k)?b=!0:(g.x=e,g.y=a,g.transform(c),ro(this,g,h,k)?b=!0:(h.x=d,h.y=a,h.transform(c),ro(this,g,h,k)?b=!0:(g.x=d,g.y=f,g.transform(c),ro(this,g,h,k)&&(b=!0))));K.free(g);Ib.free(c);K.free(h);K.free(k);return b};function ro(a,b,c,d){if(!a.Es(b,c,d))return!1;a=b.x;b=b.y;var e=c.x,f=c.y;c=d.x;d=d.y;if(a===e)return b=a&&d<=b;a=d&&c<=a} t.Kx=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.rh(a,!0))return!0;var e=a.Nf(b),f=e;1.5=e||Lb(b,f,0,-n)>= -e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?de(b,a.x,a.y,f):be(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Rd:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Sd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Td:case Zd:p=n.type===Td?$d(n,f):ae(n,f,g,m);var q=p.length;if(0===q){g=n.type===Td?n.centerX:n.endX;m=n.type===Td?n.centerY:n.endY;if(a.Fd(g,m)> +e||Lb(b,f,0,n)>=e||Lb(b,f,m,0)>=e?!1:!0}else if(b.type===N.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&Kb(a.x,a.y,f,h,k,h)>e&&Kb(a.x,a.y,k,l,f,l)>e&&Kb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?be(b,a.x,a.y,f):$d(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Od:var p=Na();L.cf(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Pd:p=Na();L.rp(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Pa(p);if(g)return!1;g=n.endX;m=n.endY;if(a.Fd(g,m)>e)return!1;break;case Qd:case Xd:p=n.type===Qd?Yd(n,f):Zd(n,f,g,m);var q=p.length;if(0===q){g=n.type===Qd?n.centerX:n.endX;m=n.type===Qd?n.centerY:n.endY;if(a.Fd(g,m)> e)return!1;break}n=null;for(var r=Na(),u=0;ub+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); -return d};function to(a){var b=so[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=so[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),so[d]=a,c!==d&&(so[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} -oa.Object.defineProperties(Pf.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Pf,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);ul(this)&&(a=this.part,null!==a&&vl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, -set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Pf,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Pf,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= -this.gj;b!==a&&(null!==a&&rm(a,"Shape.fill"),a instanceof Fl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"Shape.stroke"),a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Pf,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; -null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Pf,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Pf,"strokeCap"):(eo(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, -set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Pf,"strokeJoin"):(eo(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Pf,"strokeMiterLimit"),1<=a){eo(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", -b,a)}else G&&Ba(a,"value >= 1",Pf,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Pf,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& -(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case pl:a.translate(e,0);a.scale(-1,1);break;case ol:a.translate(0,f);a.scale(1,-1);break;case ql:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case pl:a.scale(-1,1);a.translate(-e,0);break;case ol:a.scale(1,-1);a.translate(0,-f);break;case ql:a.scale(-1,-1),a.translate(-e,-f)}}}; -t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Bo?Bo(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);if(l){h=null!==Co?Co(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= +function so(a){var b=a.diagram;null!==b&&b.undoManager.isUndoingRedoing||(a.segmentOrientation=Bn,"None"!==a.toArrow?(a.segmentIndex=-1,a.alignmentFocus=od):"None"!==a.fromArrow&&(a.segmentIndex=0,a.alignmentFocus=new Hb(1-od.x,od.y)))} +Of.makeGeometry=function(a,b,c){if("None"!==a.toArrow)var d=to[a.toArrow];else"None"!==a.fromArrow?d=to[a.fromArrow]:(d=L.Ce[a.figure],"string"===typeof d&&(d=L.Ce[d]),void 0===d&&v("Unknown Shape.figure: "+a.figure),d=d(a,b,c),d.dl=b,d.cl=c);if(null===d){var e=L.Ce.Rectangle;"function"===typeof e&&(d=e(a,b,c))}G&&(d.bounds.width>b+1E-5||d.bounds.height>c+1E-5)&&v('Geometry made with figure "'+a.figure+'" has bounds '+d.bounds.toString()+" that are too large for the given size ("+b+","+c+"). See documentation for Shape.defineFigureGenerator."); +return d};function uo(a){var b=to[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=to[c];if(void 0===b){var d=null,e;for(e in L.Hm)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=N.parse(L.Hm[d],!1),to[d]=a,c!==d&&(to[c]=d),d}}return"string"===typeof b?b:b instanceof N?a:null} +oa.Object.defineProperties(Of.prototype,{geometry:{configurable:!0,get:function(){return null!==this.Ba?this.Ba:this.Xd},set:function(a){var b=this.Ba,c=this.Xd;if(b!==a){null!==a?(G&&x(a,N,Of,"geometry"),this.Xd=this.Ba=a.freeze()):this.Xd=this.Ba=null;var d=this.part;null!==d&&(d.mg=NaN);this.w();this.g("geometry",b||c,a);wl(this)&&(a=this.part,null!==a&&xl(this,a,"geometryString"))}}},geometryString:{configurable:!0,get:function(){return null===this.geometry?"":this.geometry.toString()}, +set:function(a){a=N.parse(a);var b=a.normalize();this.geometry=a;this.position=a=K.allocAt(-b.x,-b.y);K.free(a)}},isGeometryPositioned:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){G&&B(a,"boolean",Of,"isGeometryPositioned");var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",Of,"isGeometryPositioned"),this.l^=1048576,this.w(),this.g("isGeometryPositioned",b,a))}},fill:{configurable:!0,get:function(){return this.gj},set:function(a){var b= +this.gj;b!==a&&(null!==a&&tm(a,"Shape.fill"),a instanceof Hl&&a.freeze(),this.gj=a,this.R(),this.g("fill",b,a))}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"Shape.stroke"),a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},strokeWidth:{configurable:!0,get:function(){return this.ug},set:function(a){var b=this.ug;if(b!==a)if(G&&D(a,Of,"strokeWidth"),0<=a){this.ug=a;this.w();var c=this.part; +null!==c&&(c.mg=NaN);this.g("strokeWidth",b,a)}else Ba(a,"value >= 0",Of,"strokeWidth:value")}},strokeCap:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Ur:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?Ba(a,'"butt", "round", or "square"',Of,"strokeCap"):(go(this),this.Sa.Ur=a,this.R(),this.g("strokeCap",b,a)))}},strokeJoin:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Vr:"miter"}, +set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?Ba(a,'"miter", "bevel", or "round"',Of,"strokeJoin"):(go(this),this.Sa.Vr=a,this.R(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{configurable:!0,get:function(){return null!==this.Sa?this.Sa.Wr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a)if(G&&D(a,Of,"strokeMiterLimit"),1<=a){go(this);this.Sa.Wr=a;this.R();var c=this.part;null!==c&&(c.mg=NaN);this.g("strokeMiterLimit", +b,a)}else G&&Ba(a,"value >= 1",Of,"strokeWidth:value")}},strokeDashArray:{configurable:!0,get:function(){return this.jh},set:function(a){var b=this.jh;if(b!==a){null===a||Array.isArray(a)||Aa(a,"Array",Of,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.pb!==a&&(c=!1);b.pb instanceof vi&& +(c=!1);!1===b.Sf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case rl:a.translate(e,0);a.scale(-1,1);break;case ql:a.translate(0,f);a.scale(1,-1);break;case sl:a.translate(e,f),a.scale(-1,-1)}a.Ec();m=this.Mc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.Je)n=this.Ib,n>e&&(n=e),this.$j(this.Je,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Wc&&null!==this.Xb)for(p=0;pe&&(q=e);d+=b;this.$j(this.Xb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case rl:a.scale(-1,1);a.translate(-e,0);break;case ql:a.scale(1,-1);a.translate(0,-f);break;case sl:a.scale(-1,-1),a.translate(-e,-f)}}}; +t.$j=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==Co?Co(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);if(l){h=null!==Do?Do(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.ef();b instanceof vi&&b.gd.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.ef(),b instanceof vi&&b.gd.classList.add("gojs-td"))}}; -t.wk=function(a,b,c){if(!P.prototype.wk.call(this,a,b,c))return!1;wi(this,a,this.Dc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Xb.length))){this.l|=16777216; -l=this.Xb[k];for(b=Math.max(1,a-b);Fo(l)>b&&1a.maxLines&&(a.l|=16777216)}} -function Mo(a,b,c,d){var e=a.formatting===Eo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Ao(a)+h);var k=a.overflow===Ho?Io(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===No){a.We=1;var l=Fo(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Lo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Oo(a,g);g=g.substr(f.length);b=Oo(a,g);for(l=Fo(f+b);0 -c&&1c;){var n=1;l=Fo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Fo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Lo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Oo(a,g);for(l=Fo(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} -function Oo(a,b){if(a.wrap===Po)return b.substr(0,1);for(var c=b.length,d=0,e=Qo;d=b.length?b:b.substr(0,d)}function Fo(a){return null===wo?8*a.length:wo.measureText(a).width}function Ao(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===wo){var c=16;return a.rf=c}void 0!==So[b]&&5E3>To?c=So[b]:(c=1.3*wo.measureText("M").width,So[b]=c,To++);return a.rf=c} -function Io(a){if(null===wo)return 6;if(void 0!==Uo[a]&&5E3>Vo)var b=Uo[a];else b=wo.measureText(Jo).width,Uo[a]=b,Vo++;return b} -function Go(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Ao(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==No){a.We=0;var k=Gb.alloc();Mo(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else Mo(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} -oa.Object.defineProperties(bh.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",bh,"font"),zo(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, -get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",bh,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(xo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',bh,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,bh,"flip"),xo(this),this.ia.ig=a,this.R(), -this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:jd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,bh,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),xo(this),this.ia.ms=a,bm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();Mo(this,this.kc,999999,a);var b=a.width; -Gb.free(a);a=Go(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",bh,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& -(G&&B(a,"boolean",bh,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",bh,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Wo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,bh,bh,"wrap"), -xo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Xo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,bh,bh,"overflow"),xo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&rm(a,"TextBlock.stroke"), -a instanceof Fl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Ao(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",bh,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? -this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Le||v("TextBlock.textEditor must be an HTMLInfo."),xo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",bh,"errorFunction"),xo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? -this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,bh,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new uo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,bh,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",bh,"maxLines"),xo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, -choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",bh,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); -var Bo=null,Co=null,No=new F(bh,"None",0),Ko=new F(bh,"WrapFit",1),Wo=new F(bh,"WrapDesiredSize",2),Po=new F(bh,"WrapBreakAll",3),Xo=new F(bh,"OverflowClip",0),Ho=new F(bh,"OverflowEllipsis",1),Eo=new F(bh,"FormatTrim",0),Ro=new F(bh,"FormatNone",0),Qo=/[ \u200b\u00ad]/,So=new bb,To=0,Uo=new bb,Vo=0,Jo="...",Do="",wo=null,vo=!1;bh.className="TextBlock"; -function yo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Eo;this.Wq=Infinity;this.mr=Xo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=jd;this.os=Wo}yo.prototype.copy=function(){var a=new yo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};bh.getEllipsis=function(){return Jo};bh.setEllipsis=function(a){Jo=a;Uo=new bb;Vo=0};bh.getBaseline=function(){return Bo}; -bh.setBaseline=function(a){Bo=a};bh.getUnderline=function(){return Co};bh.setUnderline=function(a){Co=a};bh.isValidFont=zo;bh.FormatNone=Ro;bh.FormatTrim=Eo;bh.None=No;bh.OverflowClip=Xo;bh.OverflowEllipsis=Ho;bh.WrapBreakAll=Po;bh.WrapDesiredSize=Wo;bh.WrapFit=Ko;function uo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}uo.prototype.copy=function(){var a=new uo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};uo.className="GradElementSettings"; -function rk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=pc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Yo;na(rk,P); -rk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};rk.prototype.wb=function(a){a===xg||a===zg||a===nl?this.imageStretch=a:P.prototype.wb.call(this,a)};rk.prototype.toString=function(){return"Picture("+this.source+")#"+ib(this)}; -function Ri(a){void 0===a&&(a="");B(a,"string",rk,"clearCache:url");""!==a?Yo[a]&&(delete Yo[a],Zo--):(Yo=new bb,Zo=0)} -function $o(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case nl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===nl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=ap;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(bp(w,4,l,m,c),bp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;m=this.Xb.length))){this.l|=16777216; +l=this.Xb[k];for(b=Math.max(1,a-b);Go(l)>b&&1a.maxLines&&(a.l|=16777216)}} +function No(a,b,c,d){var e=a.formatting===Fo;e&&(b=b.trim());var f=0,g=a.Ke,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,Bo(a)+h);var k=a.overflow===Io?Jo(g):0;if(a.Mc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===Oo){a.We=1;var l=Go(b);if(0===k||l<=c)a.Ib=Math.max(a.Ib,l),Mo(a,b,a.Ib),null!==d&&d.h(l,h);else{f=Po(a,g);g=g.substr(f.length);b=Po(a,g);for(l=Go(f+b);0 +c&&1c;){var n=1;l=Go(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=Go(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);Mo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Mc+k>a.maxLines)break}m=Po(a,g);for(l=Go(b+m);0a.maxLines))break}a.We=Math.min(a.maxLines,k);a.Ib=Math.max(a.Ib,f);null!==d&&d.h(a.Ib,h*a.We)}} +function Po(a,b){if(a.wrap===Qo)return b.substr(0,1);for(var c=b.length,d=0,e=Ro;d=b.length?b:b.substr(0,d)}function Go(a){return null===xo?8*a.length:xo.measureText(a).width}function Bo(a){if(null!==a.rf)return a.rf;var b=a.Ke;if(null===xo){var c=16;return a.rf=c}void 0!==To[b]&&5E3>Uo?c=To[b]:(c=1.3*xo.measureText("M").width,To[b]=c,Uo++);return a.rf=c} +function Jo(a){if(null===xo)return 6;if(void 0!==Vo[a]&&5E3>Wo)var b=Vo[a];else b=xo.measureText(Ko).width,Vo[a]=b,Wo++;return b} +function Ho(a,b){var c=a.kc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,Bo(a)+d);if(0===c.length)return a.Ib=0,a.Mc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Mc=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.wrap!==Oo){a.We=0;var k=Gb.alloc();No(a,f,b,k);e+=k.height;Gb.free(k);a.Mc+=a.We}else No(a,f,b,null),e+=d,a.Mc++;a.Mc===a.maxLines&&(h=!0)}f=g+1}return a.Yq=e} +oa.Object.defineProperties($g.prototype,{font:{configurable:!0,get:function(){return this.Ke},set:function(a){var b=this.Ke;b!==a&&(G&&(B(a,"string",$g,"font"),Ao(a)||v('Not a valid font: "'+a+'"')),this.Ke=a,this.rf=null,this.w(),this.g("font",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.kc=a,this.w(),this.g("text",b,a),this.$c=!0)}},textAlign:{configurable:!0, +get:function(){return null!==this.ia?this.ia.bs:"start"},set:function(a){var b=this.textAlign;b!==a&&(G&&B(a,"string",$g,"textAlign"),"start"===a||"end"===a||"left"===a||"right"===a||"center"===a?(yo(this),this.ia.bs=a,this.R(),this.g("textAlign",b,a)):G&&Ba(a,'"start", "end", "left", "right", or "center"',$g,"textAlign"))}},flip:{configurable:!0,get:function(){return null!==this.ia?this.ia.ig:xg},set:function(a){var b=this.flip;b!==a&&($a(a,P,$g,"flip"),yo(this),this.ia.ig=a,this.R(), +this.g("flip",b,a))}},verticalAlignment:{configurable:!0,get:function(){return null!==this.ia?this.ia.ms:kd},set:function(a){var b=this.verticalAlignment;b.D(a)||(G&&(x(a,Hb,$g,"verticalAlignment"),a.pc()&&v("TextBlock.verticalAlignment for "+this+" must be a real Spot, not:"+a)),a=a.M(),yo(this),this.ia.ms=a,dm(this),this.g("verticalAlignment",b,a))}},naturalBounds:{configurable:!0,get:function(){if(!this.jc.u()){var a=Gb.alloc();No(this,this.kc,999999,a);var b=a.width; +Gb.free(a);a=Ho(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);ac(this.jc,b,a)}return this.jc}},isMultiline:{configurable:!0,get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(G&&B(a,"boolean",$g,"isMultiline"),this.l^=2097152,this.w(),this.g("isMultiline",b,a))}},isUnderline:{configurable:!0,get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&& +(G&&B(a,"boolean",$g,"isUnderline"),this.l^=4194304,this.$c=!0,this.R(),this.g("isUnderline",b,a))}},isStrikethrough:{configurable:!0,get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(G&&B(a,"boolean",$g,"isStrikethrough"),this.l^=8388608,this.$c=!0,this.R(),this.g("isStrikethrough",b,a))}},wrap:{configurable:!0,get:function(){return null!==this.ia?this.ia.os:Xo},set:function(a){var b=this.wrap;b!==a&&(G&&$a(a,$g,$g,"wrap"), +yo(this),this.ia.os=a,this.w(),this.g("wrap",b,a))}},overflow:{configurable:!0,get:function(){return null!==this.ia?this.ia.mr:Yo},set:function(a){var b=this.overflow;b!==a&&(G&&$a(a,$g,$g,"overflow"),yo(this),this.ia.mr=a,this.w(),this.g("overflow",b,a))}},isOverflowed:{configurable:!0,get:function(){return 0!==(this.l&16777216)}},stroke:{configurable:!0,get:function(){return this.Dc},set:function(a){var b=this.Dc;b!==a&&(null!==a&&tm(a,"TextBlock.stroke"), +a instanceof Hl&&a.freeze(),this.Dc=a,this.R(),this.g("stroke",b,a))}},lineCount:{configurable:!0,get:function(){return this.Mc}},lineHeight:{configurable:!0,get:function(){return Bo(this)}},editable:{configurable:!0,get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(G&&B(a,"boolean",$g,"editable"),this.l^=1048576,this.g("editable",b,a))}},textEditor:{configurable:!0,get:function(){return null!==this.ia? +this.ia.ds:null},set:function(a){var b=this.textEditor;b!==a&&(!G||a instanceof Oe||v("TextBlock.textEditor must be an HTMLInfo."),yo(this),this.ia.ds=a,this.g("textEditor",b,a))}},errorFunction:{configurable:!0,get:function(){return null!==this.ia?this.ia.Od:null},set:function(a){var b=this.errorFunction;b!==a&&(null!==a&&B(a,"function",$g,"errorFunction"),yo(this),this.ia.Od=a,this.g("errorFunction",b,a))}},interval:{configurable:!0,get:function(){return null!==this.ka? +this.ka.el:1},set:function(a){var b=this.interval;G&&D(a,$g,"interval");a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.ka&&(this.ka=new vo);this.ka.el=a;this.w();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{configurable:!0,get:function(){return null!==this.ka?this.ka.v:0},set:function(a){var b=this.graduatedStart;G&&D(a,$g,"graduatedStart");b!==a&&(0>a?a=0:1a?a=0:1=a&&Ba(a,"> 0",$g,"maxLines"),yo(this),this.ia.Wq=a,this.w(),this.g("maxLines",b,a))}},metrics:{configurable:!0,get:function(){return{arrSize:null!==this.Wc?this.Wc:[this.Ib],arrText:null!==this.Xb?this.Xb:[this.Je],maxLineWidth:this.Ib,fontHeight:this.rf}}}, +choices:{configurable:!0,get:function(){return this.Tm},set:function(a){var b=this.Tm;b!==a&&(G&&null!==a&&!Array.isArray(a)&&Aa(a,"Array",$g,"choices:value"),this.Tm=a,this.g("choices",b,a))}}}); +var Co=null,Do=null,Oo=new F($g,"None",0),Lo=new F($g,"WrapFit",1),Xo=new F($g,"WrapDesiredSize",2),Qo=new F($g,"WrapBreakAll",3),Yo=new F($g,"OverflowClip",0),Io=new F($g,"OverflowEllipsis",1),Fo=new F($g,"FormatTrim",0),So=new F($g,"FormatNone",0),Ro=/[ \u200b\u00ad]/,To=new cb,Uo=0,Vo=new cb,Wo=0,Ko="...",Eo="",xo=null,wo=!1;$g.className="TextBlock"; +function zo(){this.uc=!1;this.Od=null;this.ig=xg;this.tq=Fo;this.Wq=Infinity;this.mr=Yo;this.Rr=this.Qr=0;this.bs="start";this.Ij=this.ds=this.cs=null;this.ms=kd;this.os=Xo}zo.prototype.copy=function(){var a=new zo;a.Od=this.Od;a.ig=this.ig;a.tq=this.tq;a.Wq=this.Wq;a.mr=this.mr;a.Qr=this.Qr;a.Rr=this.Rr;a.bs=this.bs;a.cs=this.cs;a.ds=this.ds;a.Ij=this.Ij;a.ms=this.ms;a.os=this.os;return a};$g.getEllipsis=function(){return Ko};$g.setEllipsis=function(a){Ko=a;Vo=new cb;Wo=0};$g.getBaseline=function(){return Co}; +$g.setBaseline=function(a){Co=a};$g.getUnderline=function(){return Do};$g.setUnderline=function(a){Do=a};$g.isValidFont=Ao;$g.FormatNone=So;$g.FormatTrim=Fo;$g.None=Oo;$g.OverflowClip=Yo;$g.OverflowEllipsis=Io;$g.WrapBreakAll=Qo;$g.WrapDesiredSize=Xo;$g.WrapFit=Lo;function vo(){this.el=1;this.v=0;this.j=1;this.o=this.G=null}vo.prototype.copy=function(){var a=new vo;a.el=this.el;a.v=this.v;a.j=this.j;a.G=this.G;a.o=this.o;return a};vo.className="GradElementSettings"; +function uk(a,b){P.call(this);this.Qg=null;this.Co="";this.ih=oc;this.Zk=Ad;this.kh=this.Od=null;this.Yk=Ic;this.ig=xg;this.Il=null;this.Cn=!1;this.Rh=!0;this.ml=!1;this.ot=this.El=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Zo;na(uk,P); +uk.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.Co=this.Co;a.element=this.Qg;a.ih=this.ih.M();a.Zk=this.Zk;a.ig=this.ig;a.Od=this.Od;a.kh=this.kh;a.Yk=this.Yk.M();a.Rh=this.Rh;a.El=this.El};uk.prototype.wb=function(a){a===xg||a===zg||a===pl?this.imageStretch=a:P.prototype.wb.call(this,a)};uk.prototype.toString=function(){return"Picture("+this.source+")#"+jb(this)}; +function Ri(a){void 0===a&&(a="");B(a,"string",uk,"clearCache:url");""!==a?Zo[a]&&(delete Zo[a],$o--):(Zo=new cb,$o=0)} +function ap(a,b){b.Iy||(b.Sq=function(c){b.Fq=!0;b.xn=!1;var d=b.Ng.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.R();var f=b.getAttribute("src")||"";var g=e.Zg.L(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Ad:n=d.width;p=d.height;break;case zg:case pl:q===zg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===pl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Pf()*b.scale;var u=n*q*p*q,y=k*h/u,w=c.__goCache;q=null;var z=bp;if(!e){if(c.Fq&&void 0!==w&&4z*z)for(null===w.ti&&(cp(w,4,l,m,c),cp(w,16,l,m,c)),e=w.ti,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new fe(a,0,!0)).add(new je(Cd,b-a,0)).add(new je(Rd,b,a,b-f,0,b,f)).add(new je(Cd,b,c-a)).add(new je(Rd,b-a,c,b,c-f,b-f,c)).add(new je(Cd,a,c)).add(new je(Rd,0,c-a,f,c,0,c-f)).add(new je(Cd,0,a)).add((new je(Rd,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=L.Yf[d];if(void 0!==e)return e;var f=a*L.Ig;e=(new N).add((new de(a,0,!0)).add(new le(Cd,b-a,0)).add(new le(Od,b,a,b-f,0,b,f)).add(new le(Cd,b,c-a)).add(new le(Od,b-a,c,b,c-f,b-f,c)).add(new le(Cd,a,c)).add(new le(Od,0,c-a,f,c,0,c-f)).add(new le(Cd,0,a)).add((new le(Od,a,0,0,f,f,0)).close()));1e.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.I^=4096;var d=!1;if(null!==c){d=c.skipsUndoManager;c.skipsUndoManager=!0;var e=c.selection;e.qa();a?e.add(this):e.remove(this);e.freeze()}this.g("isSelected",b,a);this.cc();a=this.selectionChanged;null!==a&&a(this);null!==c&&(c.fc(),c.skipsUndoManager=d)}}}},isHighlighted:{configurable:!0,get:function(){return 0!==(this.I& 524288)},set:function(a){var b=0!==(this.I&524288);if(b!==a){G&&B(a,"boolean",U,"isHighlighted");this.I^=524288;var c=this.diagram;null!==c&&(c=c.highlighteds,c.qa(),a?c.add(this):c.remove(this),c.freeze());this.g("isHighlighted",b,a);this.R();a=this.highlightedChanged;null!==a&&a(this)}}},isShadowed:{configurable:!0,get:function(){return 0!==(this.I&8192)},set:function(a){var b=0!==(this.I&8192);b!==a&&(G&&B(a,"boolean",U,"isShadowed"),this.I^=8192,this.$c=!0,this.g("isShadowed",b, -a),this.R())}},isAnimated:{configurable:!0,get:function(){return 0!==(this.I&262144)},set:function(a){var b=0!==(this.I&262144);b!==a&&(G&&B(a,"boolean",U,"isAnimated"),this.I^=262144,this.g("isAnimated",b,a))}},highlightedChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Bq:null},set:function(a){var b=this.highlightedChanged;b!==a&&(null!==a&&B(a,"function",U,"highlightedChanged"),hp(this),this.T.Bq=a,this.g("highlightedChanged",b,a))}},selectionObjectName:{configurable:!0, -enumerable:!0,get:function(){return null!==this.T?this.T.Ir:""},set:function(a){var b=this.selectionObjectName;b!==a&&(G&&B(a,"string",U,"selectionObjectName"),hp(this),this.T.Ir=a,this.fh=null,this.g("selectionObjectName",b,a))}},selectionAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.Gr:null},set:function(a){var b=this.selectionAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"selectionAdornmentTemplate"),hp(this),this.T.Gr=a,this.g("selectionAdornmentTemplate", -b,a))}},selectionObject:{configurable:!0,get:function(){if(null===this.fh){var a=this.selectionObjectName;null!==a&&""!==a?(a=this.lb(a),null!==a?this.fh=a:this.fh=this):this instanceof S?(a=this.path,null!==a?this.fh=a:this.fh=this):this.fh=this}return this.fh}},selectionChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Hr:null},set:function(a){var b=this.selectionChanged;b!==a&&(null!==a&&B(a,"function",U,"selectionChanged"),hp(this),this.T.Hr=a,this.g("selectionChanged", -b,a))}},resizeAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.tr:null},set:function(a){var b=this.resizeAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"resizeAdornmentTemplate"),hp(this),this.T.tr=a,this.g("resizeAdornmentTemplate",b,a))}},resizeObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.vr:""},set:function(a){var b=this.resizeObjectName;b!==a&&(G&&B(a,"string",U,"resizeObjectName"),hp(this),this.T.vr=a,this.g("resizeObjectName", -b,a))}},resizeObject:{configurable:!0,get:function(){var a=this.resizeObjectName;return""!==a&&(a=this.lb(a),null!==a)?a:this}},resizeCellSize:{configurable:!0,get:function(){return null!==this.T?this.T.ur:Ub},set:function(a){var b=this.resizeCellSize;b.D(a)||(G&&x(a,Gb,U,"resizeCellSize"),a=a.M(),hp(this),this.T.ur=a,this.g("resizeCellSize",b,a))}},rotateAdornmentTemplate:{configurable:!0,get:function(){return null!==this.T?this.T.wr:null},set:function(a){var b= -this.rotateAdornmentTemplate;b!==a&&(G&&x(a,Be,U,"rotateAdornmentTemplate"),hp(this),this.T.wr=a,this.g("rotateAdornmentTemplate",b,a))}},rotateObjectName:{configurable:!0,get:function(){return null!==this.T?this.T.xr:""},set:function(a){var b=this.rotateObjectName;b!==a&&(G&&B(a,"string",U,"rotateObjectName"),hp(this),this.T.xr=a,this.g("rotateObjectName",b,a))}},rotateObject:{configurable:!0,get:function(){var a=this.rotateObjectName;return""!==a&&(a=this.lb(a),null!== -a)?a:this}},rotationSpot:{configurable:!0,get:function(){return null!==this.T?this.T.zr:gd},set:function(a){var b=this.rotationSpot;b.D(a)||(G&&(x(a,Hb,U,"rotationSpot"),a===gd||a.mb()||v("Part.rotationSpot must be a specific Spot value or Spot.Default, not: "+a)),a=a.M(),hp(this),this.T.zr=a,this.g("rotationSpot",b,a))}},text:{configurable:!0,get:function(){return this.kc},set:function(a){var b=this.kc;b!==a&&(G&&B(a,"string",U,"text"),this.kc=a,this.g("text",b,a))}}, -containingGroup:{configurable:!0,get:function(){return this.Lh},set:function(a){if(this.ed()){var b=this.Lh;if(b!==a){G&&null!==a&&x(a,Df,U,"containingGroup");null===a||this!==a&&!a.Zd(this)||(this===a&&v("Cannot make a Group a member of itself: "+this.toString()),v("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.F(2);var c=this.diagram;null!==b?vp(b,this):this instanceof Df&&null!==c&&c.mi.remove(this);this.Lh=a;null!==a?up(a, -this):this instanceof Df&&null!==c&&c.mi.add(this);this.F(1);if(null!==c&&c.da){var d=this.data,e=c.model;if(null!==d&&e.Ci()){var f=e.Da(null!==a?a.data:null);e.Ap(d,f)}}d=this.containingGroupChanged;null!==d&&(e=!0,null!==c&&(e=c.da,c.da=!0),d(this,b,a),null!==c&&(c.da=e));if(this instanceof Df)for(c=new J,hl(c,this,!0,0,!0),c=c.iterator;c.next();)if(d=c.value,d instanceof V)for(d=d.linksConnected;d.next();)Ap(d.value);if(this instanceof V){for(c=this.linksConnected;c.next();)Ap(c.value);c=this.labeledLink; -null!==c&&Ap(c)}this.g("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&xi(b,-1,a))}}else v("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{configurable:!0,get:function(){return null!==this.T?this.T.Xp:null},set:function(a){var b=this.containingGroupChanged;b!==a&&(null!==a&&B(a,"function",U,"containingGroupChanged"),hp(this),this.T.Xp=a,this.g("containingGroupChanged",b,a))}},isTopLevel:{configurable:!0,get:function(){return null!== -this.containingGroup||this instanceof V&&null!==this.labeledLink?!1:!0}},layoutConditions:{configurable:!0,get:function(){return null!==this.T?this.T.Pq:127},set:function(a){var b=this.layoutConditions;b!==a&&(G&&B(a,"number",U,"layoutConditions"),hp(this),this.T.Pq=a,this.g("layoutConditions",b,a))}},dragComputation:{configurable:!0,get:function(){return null!==this.T?this.T.hq:null},set:function(a){var b=this.dragComputation;b!==a&&(null!==a&&B(a,"function",U,"dragComputation"), -hp(this),this.T.hq=a,this.g("dragComputation",b,a))}},shadowOffset:{configurable:!0,get:function(){return null!==this.T?this.T.Mr:Bb},set:function(a){var b=this.shadowOffset;b.D(a)||(G&&x(a,K,U,"shadowOffset"),a=a.M(),hp(this),this.T.Mr=a,this.R(),this.g("shadowOffset",b,a))}},shadowColor:{configurable:!0,get:function(){return null!==this.T?this.T.Lr:"gray"},set:function(a){var b=this.shadowColor;b!==a&&(G&&B(a,"string",U,"shadowColor"),hp(this),this.T.Lr=a,this.R(),this.g("shadowColor", -b,a))}},shadowBlur:{configurable:!0,get:function(){return null!==this.T?this.T.gh:4},set:function(a){var b=this.shadowBlur;b!==a&&(G&&B(a,"number",U,"shadowBlur"),hp(this),this.T.gh=a,this.R(),this.g("shadowBlur",b,a))}}});U.prototype.invalidateLayout=U.prototype.F;U.prototype.findCommonContainingGroup=U.prototype.Hx;U.prototype.isMemberOf=U.prototype.Zd;U.prototype.findTopLevelPart=U.prototype.Nz;U.prototype.findSubGraphLevel=U.prototype.Jz;U.prototype.ensureBounds=U.prototype.$a; -U.prototype.getDocumentBounds=U.prototype.zi;U.prototype.findObject=U.prototype.lb;U.prototype.moveTo=U.prototype.moveTo;U.prototype.invalidateAdornments=U.prototype.cc;U.prototype.clearAdornments=U.prototype.Qj;U.prototype.removeAdornment=U.prototype.Vf;U.prototype.addAdornment=U.prototype.nh;U.prototype.findAdornment=U.prototype.ak;U.prototype.updateTargetBindings=U.prototype.Qa;var sp=!1;U.className="Part";U.LayoutNone=0;U.LayoutAdded=1;U.LayoutRemoved=2;U.LayoutShown=4;U.LayoutHidden=8; -U.LayoutNodeSized=16;U.LayoutGroupLayout=32;U.LayoutNodeReplaced=64;U.LayoutStandard=127;U.LayoutAll=16777215;function Be(a,b){void 0===a||a instanceof nm||"string"===typeof a?U.call(this,a):(U.call(this),a&&(b=a));this.I&=-257;this.Vg="Adornment";this.De=null;this.Pw=0;this.lx=!1;this.j=this.bb=null;b&&Object.assign(this,b)}na(Be,U);Be.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(null!==a?a.toString():"")};Be.prototype.updateRelationshipsFromData=function(){}; -Be.prototype.hm=function(a){var b=this.adornedObject,c=null===b||void 0===b?void 0:b.part;if(c instanceof S&&b instanceof Pf){b=c.path;c.hm(a);a=b.geometry;c=this.S.s;b=c.length;for(var d=0;da&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Np(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Np(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Pp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; -function Pp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(2a&&(a=1);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Op(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Op(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.gf){b.gf=!0;var c=new J;c.add(this);Qp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===Li);b.gf=!1}}; +function Qp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Yo():a.Yd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.md||m.ib(),m=m.fp(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.ec(!0);m.zh();var n=c?m.$o():m.ap();l.Kv=a;n.all(function(a){return function(b){return b===a.Kv||!b.isTreeExpanded}}(l))&&e.Pj(m,f)}if(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, +vg.prototype.computeBorder=function(a){var b=this.part,c=b.diagram,d=null===c||!c.animationManager.isAnimating;if(null!==c&&b instanceof Cf&&!b.layer.isTemporary&&b.computesBoundsAfterDrag&&this.wo.u()){var e=c.toolManager.findTool("Dragging");if(e===c.currentTool&&(c=e.computeBorder(b,this.wo,a),null!==c))return c}c=M.alloc();e=this.computeMemberBounds(c);var f=this.Eb;b instanceof Cf&&!b.isSubGraphExpanded?a.h(e.x-f.left,e.y-f.top,0,0):a.h(e.x-f.left,e.y-f.top,Math.max(e.width+f.left+f.right,0), +Math.max(e.height+f.top+f.bottom,0));M.free(c);d&&b instanceof Cf&&b.computesBoundsIncludingLocation&&b.location.u()&&a.lf(b.location);return a}; +vg.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Cf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof S){if(!b.computesBoundsIncludingLinks)continue;if(Lj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};oa.Object.defineProperties(vg.prototype,{padding:{configurable:!0,get:function(){return this.Eb},set:function(a){"number"===typeof a?a=new fc(a):x(a,fc,vg,"padding");var b=this.Eb;b.D(a)||(this.Eb=a=a.M(),this.g("padding",b,a),this.w())}}});vg.className="Placeholder"; -function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Up;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); -S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Gp(b);a=a.toPort;null!==a&&Gp(a)}; -t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Vp||a===Wp||a===Xp?this.adjusting=a:a!==Up&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new tl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Jj(a)||Kj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Jj(a)||Kj(a))?!1:!0};t.Ov=function(){return!1}; -t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case zn:a=b;break;case rn:a=b+90;break;case tn:a=b-90;break;case Yp:a=b+180;break;case An:a=L.pp(b);90a&&(a-=180);break;case sn:a=L.pp(b+90);90a&&(a-=180);break;case un:a=L.pp(b-90);90a&&(a-=180);break;case vn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; -function Ap(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&vp(c,a);a.Lh=b;null!==b&&up(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; -t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Kp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} -t.hp=function(a){U.prototype.hp.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Ip(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Ip(c,this,d)}$p(this)}};t.ip=function(a){U.prototype.ip.call(this,a);Zp(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}}; +function S(a){U.call(this,W.Link);this.Va=8;this.sf=null;this.tf="";this.Gf=this.tn=null;this.Hf="";this.Go=null;this.Ck=lg;this.an=0;this.cn=lg;this.dn=NaN;this.Dj=Vp;this.Bo=.5;this.Cd=null;this.Tb=(new I).freeze();this.eh=this.Zc=null;this.zl=new M;this.Ba=new N;this.v=this.o=this.dg=this.hg=null;this.Fu=new K;this.qq=this.ax=this.$w=null;this.It=NaN;this.fa=null;this.j=[];a&&Object.assign(this,a)}na(S,U); +S.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Va=this.Va&-113;a.tf=this.tf;a.tn=this.tn;a.Hf=this.Hf;a.Go=this.Go;a.Ck=this.Ck;a.an=this.an;a.cn=this.cn;a.dn=this.dn;a.Dj=this.Dj;a.Bo=this.Bo;null!==this.fa&&(a.fa=this.fa.copy())};t=S.prototype;t.Mf=function(a){U.prototype.Mf.call(this,a);this.tf=a.tf;this.Hf=a.Hf;a.Zc=null;a.ib();a.dg=this.dg;var b=a.fromPort;null!==b&&Hp(b);a=a.toPort;null!==a&&Hp(a)}; +t.wb=function(a){a.classType===S?2===(a.value&2)?this.routing=a:a===og||a===kg||a===jg?this.curve=a:a===Wp||a===Xp||a===Yp?this.adjusting=a:a!==Vp&&a!==lg&&v("Unknown Link enum value for a Link property: "+a):U.prototype.wb.call(this,a)};t.cd=function(){null===this.fa&&(this.fa=new vl)};t.Fi=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Mj(a)||Nj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Mj(a)||Nj(a))?!1:!0};t.Ov=function(){return!1}; +t.Pv=function(){};t.ed=function(){return!1};S.prototype.computeAngle=function(a,b,c){return S.computeAngle(b,c)};S.computeAngle=function(a,b){switch(a){default:case lg:a=0;break;case Bn:a=b;break;case tn:a=b+90;break;case vn:a=b-90;break;case Zp:a=b+180;break;case Cn:a=L.pp(b);90a&&(a-=180);break;case un:a=L.pp(b+90);90a&&(a-=180);break;case wn:a=L.pp(b-90);90a&&(a-=180);break;case xn:a=L.pp(b);if(45a||225a)return 0;90a&&(a-=180)}return L.pp(a)}; +function Bp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.Hx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Lh;if(c!==b){null!==c&&wp(c,a);a.Lh=b;null!==b&&vp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.da,g.da=!0);e(a,c,b);null!==g&&(g.da=f)}!a.md||a.$w!==c&&a.ax!==c||a.ib()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=S.prototype; +t.zh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.zh.call(this)};t.fp=function(a){G&&x(a,V,S,"getOtherNode:node");var b=this.fromNode;return a===b?this.toNode:b};t.Wz=function(a){G&&x(a,P,S,"getOtherPort:port");var b=this.fromPort;return a===b?this.toPort:b};function Lp(a,b){null===a.Cd&&(a.Cd=new J);a.Cd.add(b);a.w()} +t.hp=function(a){U.prototype.hp.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Jp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Jp(c,this,d)}aq(this)}};t.ip=function(a){U.prototype.ip.call(this,a);$p(this)&&this.jp(this.actualBounds);if(!a){a=this.sf;var b=null;null!==a&&(b=this.fromPort,Kp(a,this,b));var c=this.Gf;if(null!==c){var d=this.toPort;c===a&&d===b||Kp(c,this,d)}bq(this)}}; t.Xj=function(){this.md=!0;if(null!==this.Cd){var a=this.diagram;if(null!==a)for(var b=this.Cd.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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.free(a));qf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +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?U.prototype.move.call(this,a,!1):(a=K.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),K.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)}; S.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};S.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; S.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(Cb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===og))return this.Ba.ev(.5,a),a.add(this.i(0)),c=this.Ba.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===og){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);L.tx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);L.tx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1659,41 +1660,41 @@ t.kd=function(a,b){G&&(x(b,K,S,"setPoint"),b.u()||v("Link.setPoint called with a t.dA=function(a,b){G&&(x(b,K,S,"insertPoint"),b.u()||v("Link.insertPoint called with a Point that does not have real numbers: "+b.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,b)};t.m=function(a,b,c){G&&(D(b,S,"insertPointAt:x"),D(c,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.Mb(a,new K(b,c))}; t.ve=function(a){G&&(x(a,K,S,"addPoint"),a.u()||v("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(a)};t.Kf=function(a,b){G&&(D(a,S,"insertPointAt:x"),D(b,S,"insertPointAt:y"));G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.add(new K(a,b))}; t.Ev=function(a){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.sb(a)};t.Rj=function(){G&&null===this.Zc&&v("Call Link.startRoute before modifying the points of the route.");this.Tb.clear()}; -function qf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),bm(a));d?bq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function rf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.md,e=new I,f=a.Tb.iterator;f.next();){var g=f.value;e.add((new K(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Tb;a.Tb=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Fb?a.w():(a.qe.h(a.qe.x+b,a.qe.y+c),a.va.h(a.va.x+b,a.va.y+c),dm(a));d?cq(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Fb&&$h(g.animationManager,a,e);a.g("points",f,e)}}t.Fh=function(){null===this.Zc&&(this.Zc=this.Tb,this.Tb=this.Tb.copy())}; -t.Lf=function(){if(null!==this.Zc){for(var a=this.Zc,b=this.Tb,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gl&&(n=-n),u= (0>k?-1:1)*n+q,y=m*(u-q)+r);q=f.x+2*h/3;r=f.y+2*k/3;var w=q,z=r;L.C(k,0)?z=0k?-1:1)*n+q,z=m*(w-q)+r);this.Rj();this.ve(f);this.Kf(u,y);this.Kf(w,z);this.ve(p);this.kd(0,this.getLinkPoint(a,b,g,!0,!1,d,e));this.kd(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.C(c,0)?h=0g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(gq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(gq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= +p+1)),0>g&&(f=-f),f=(0>c?-1:1)*f+a,h=p*(f-a)+b),this.ve(d),this.Kf(f,h),this.ve(e);else{this.ve(d);this.ve(e);h=M.alloc();b.zi(h);k=h.ha(e);p.zi(h);l=h.ha(d);if(k||l)g=b.la(hq(g),new K),this.kd(0,this.getLinkPointFromPoint(a,b,g,e,!0,g)),c=p.la(hq(c),new K),this.kd(1,this.getLinkPointFromPoint(f,p,c,d,!1,c));M.free(h)}}else{n=this.isAvoiding;p&&(m&&n||l)&&this.Rj();var A=l?this.computeCurviness():0;n=this.getLinkPoint(a,b,g,!0,m,d,e);q=u=r=0;if(m||!h||l)y=this.computeEndSegmentLength(a,b,g,!0),q= this.getLinkDirection(a,b,n,g,!0,m,d,e),l&&(h||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(q-=m?90:30,0>A&&(q-=180)),0>q?q+=360:360<=q&&(q-=360),l&&(y+=Math.abs(A)*(m?1:2)),0===q?r=y:90===q?u=y:180===q?r=-y:270===q?u=-y:(r=y*Math.cos(q*Math.PI/180),u=y*Math.sin(q*Math.PI/180)),g.pc()&&l&&(y=b.la(Ic,K.alloc()),w=K.allocAt(y.x+1E3*r,y.y+1E3*u),this.getLinkPointFromPoint(a,b,y,w,!0,n),K.free(y),K.free(w));y=this.getLinkPoint(d,e,c,!1,m,a,b);var C=z=w=0;if(m||!k||l){var E=this.computeEndSegmentLength(d,e, c,!1);C=this.getLinkDirection(d,e,y,c,!1,m,a,b);l&&(k||g.D(c)||!m&&1===g.x+c.x&&1===g.y+c.y)&&(C+=m?0:30,0>A&&(C+=180));0>C?C+=360:360<=C&&(C-=360);l&&(E+=Math.abs(A)*(m?1:2));0===C?w=E:90===C?z=E:180===C?w=-E:270===C?z=-E:(w=E*Math.cos(C*Math.PI/180),z=E*Math.sin(C*Math.PI/180));c.pc()&&l&&(c=e.la(Ic,K.alloc()),g=K.allocAt(c.x+1E3*w,c.y+1E3*z),this.getLinkPointFromPoint(d,e,c,g,!1,y),K.free(c),K.free(g))}c=n;if(m||!h||l)c=new K(n.x+r,n.y+u);g=y;if(m||!k||l)g=new K(y.x+w,y.y+z);!p&&!m&&h&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} +n,f-2,g)?this.kd(f-1,y):!p&&!m&&k&&3Math.abs(b.y-a.y)?(b.x>=a.x?b.x=a.x+9E9:b.x=a.x-9E9,b.y=a.y):(b.y>=a.y?b.y=a.y+9E9:b.y=a.y-9E9,b.x=a.x);return b} S.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));a=null;e=b.panel;null===e||e.Ae()||(e=e.panel);if(null===e){e=d.x;d=d.y;var g=c.x;c=c.y}else{a=e.we;e=1/(a.m11*a.m22-a.m12*a.m21);g=a.m22*e;var h=-a.m12*e,k=-a.m21*e,l=a.m11*e,m=e*(a.m21*a.dy-a.m22*a.dx),n=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*g+d.y*k+m;d=d.x*h+d.y*l+n;g=c.x*g+c.y*k+m;c=c.x*h+c.y*l+n}b.dk(e,d,g,c,f);null!== -a&&f.transform(a);return f};function iq(a,b){var c=b.mo;null===c&&(c=new jq,c.port=b,c.node=b.part,b.mo=c);return kq(c,a)} -S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!fq(c))return b.la(c,h),h;if(c.fd()){var k=iq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===lq){var l=iq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= -b.la(gq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=hq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(gq(k),f),e&&(g=hq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; -S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?hq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= -k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(fq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=iq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; -S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===gd?zc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===gd?zc:b));return a};function fq(a){return a===zc||.5===a.x&&.5===a.y}function gq(a){return.5===a.x&&.5===a.y?a:Ic} -S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); -if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Pf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;qo(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),qo(m,y,w,z)?r=!0:(w.x= -h,w.y=q,w.transform(A),qo(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),qo(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=xl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; +a&&f.transform(a);return f};function jq(a,b){var c=b.mo;null===c&&(c=new kq,c.port=b,c.node=b.part,b.mo=c);return lq(c,a)} +S.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.mb()&&!gq(c))return b.la(c,h),h;if(c.fd()){var k=jq(this,b);if(null!==k){h.assign(k.mp);if(e&&this.routing===mq){var l=jq(this,g);if(null!==l&&k.Ul=m.y&&a.y<=m.y+m.height?h.y=a.y:(c.Tf(Oc)||c.Tf(Rc))&&a.x>=m.x&&a.x<=m.x+m.width&&(h.x=a.x);K.free(k);K.free(l)}}return h}}c= +b.la(hq(c),K.alloc());this.pointsCount>(e?6:2)?(g=d?this.i(1):this.i(this.pointsCount-2),e&&(g=iq(c,g.copy()))):(k=this.computeSpot(!d,g),f=K.alloc(),g=g.la(hq(k),f),e&&(g=iq(c,g)),K.free(f));this.getLinkPointFromPoint(a,b,c,g,d,h);K.free(c);return h}; +S.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.mb())var k=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(h=e?this.i(1):this.i(this.pointsCount-2),h=f?iq(k,h.copy()):c):(c=K.alloc(),h=h.la(Ic,c),K.free(c));c=Math.abs(h.x-k.x)>Math.abs(h.y-k.y)?h.x>= +k.x?0:180:h.y>=k.y?90:270;K.free(k);k=c}g&&d.pc()&&g.Zd(a)&&(k+=180,360<=k&&(k-=360));if(gq(d))return k;a=b.yi();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};S.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.fd()&&(a=jq(this,b),null!==a))return a.Zu;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; +S.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=Ic:(b=this.fromSpot,b.Wb()&&(b=a.fromSpot),a=b===hd?xc:b)):(a=b?b:this.toPort,null===a?a=Ic:(b=this.toSpot,b.Wb()&&(b=a.toSpot),a=b===hd?xc:b));return a};function gq(a){return a===xc||.5===a.x&&.5===a.y}function hq(a){return.5===a.x&&.5===a.y?a:Ic} +S.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==lg&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=Ib.alloc();n.set(g); +if(m instanceof W)h=m.Of(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Of)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.qh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.df(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var y=K.alloc(),w=K.alloc(),z=K.alloc(),A=Ib.alloc();A.set(r);A.qv(m.transform);A.gk();w.x=p;w.y=u;w.transform(A);y.x=h;y.y=u;y.transform(A);r=!1;ro(m,y,w,z)?r=!0:(y.x=p,y.y=q,y.transform(A),ro(m,y,w,z)?r=!0:(w.x= +h,w.y=q,w.transform(A),ro(m,y,w,z)?r=!0:(y.x=h,y.y=u,y.transform(A),ro(m,y,w,z)&&(r=!0))));Ib.free(A);K.free(y);K.free(w);K.free(z);h=r}}else h=m.qh(h,n)}else h=zl(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));Ib.free(n)}}}void 0===f&&Ib.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&Ib.free(g);return!1}; S.prototype.computeCurve=function(){if(null===this.hg){var a=this.fromPort,b=this.isOrthogonal;this.hg=null!==a&&a===this.toPort&&!b}return this.hg?og:this.curve};S.prototype.computeCorner=function(){if(this.curve===og)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; S.prototype.findMidLabel=function(){for(var a=this.path,b=this.S.s,c=b.length,d=0;dk?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Xp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(oq,oq);k.Hc(oq,oq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x, +S.prototype.adjustPoints=function(a,b,c,d){var e=this.computeAdjusting();if(this.isOrthogonal){if(e===Xp)return!1;e===Yp&&(e=Wp)}switch(e){case Xp:var f=this.i(a),g=this.i(c);if(!f.cb(b)||!g.cb(d)){e=f.x;f=f.y;var h=g.x-e,k=g.y-f,l=Math.sqrt(h*h+k*k);if(!L.ca(l,0)){if(L.ca(h,0))var m=0>k?-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);L.ca(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.kd(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.kd(c,d)}}return!0;case Yp:f=this.i(a);n=this.i(c);if(!f.cb(b)||!n.cb(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.kd(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.u()&&k.u()){h.Hc(pq,pq);k.Hc(pq,pq);h.lf(a);k.lf(c);var l=K.alloc(),m=K.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.ha(a)||h.ha(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(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,m.x=l.x, @@ -1703,697 +1704,697 @@ c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ha(a)||h.ha(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=rq&&(Ck(q),h.Hc(q.To*q.Yx,q.So*q.Zx),pq(q,a,b,n,d,h,!1),k=qq(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.C(h.y,g.y)?(h=90===b?Math.max(h.y,a.y): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=sq&&(Fk(q),h.Hc(q.To*q.Yx,q.So*q.Zx),qq(q,a,b,n,d,h,!1),k=rq(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.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)L.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)):L.C(h.y,g.y)?(Math.abs(a.y-h.y)<=q.So/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)L.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)):L.C(h.x,g.x)?(Math.abs(a.x-h.x)<=q.To/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!==r&&(0===d||180===d?this.Kf(f.x,r.y):this.Kf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ve(l.copy()),this.ve(m.copy()));K.free(l);K.free(m)}}; S.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).fd()||this.computeSpot(!1,this.toPort).fd()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function gk(a){if(null===a.diagram||!a.isAvoiding||!xk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=yk(a.diagram,!0,a.containingGroup,null);for(var d=1;dtq&&qq(b,m,n)!==l-1&&(qq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):qq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):qq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):qq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>tq&&qq(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>tq)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>tq&&(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),qq(b,g,m)===l-1?sq(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),qq(b,g,m)===l-1&&sq(a,b,g,m,f,!1,f)));a.Kf(c,d)} +function jk(a){if(null===a.diagram||!a.isAvoiding||!Ak(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=Bk(a.diagram,!0,a.containingGroup,null);for(var d=1;duq&&rq(b,m,n)!==l-1&&(rq(b,c-h,d)===l-1?(e=180,m=c-h,n=d):rq(b,c+h,d)===l-1?(e=0,m=c+h,n=d):rq(b,c,d-k)===l-1?(e=270,m=c,n=d-k):rq(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>uq&&rq(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>uq)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>uq&&(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),rq(b,g,m)===l-1?tq(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),rq(b,g,m)===l-1&&tq(a,b,g,m,f,!1,f)));a.Kf(c,d)} S.prototype.zz=function(a){G&&x(a,K,S,"findClosestSegment:p");var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=Kb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;kthis.pointsCount?this.xk=!0:this.Ba=this.makeGeometry();a=this.path;if(null!==a){a.Ba=this.Ba;for(var b=this.S.s,c=b.length,d=0;d=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;ky?r>q?(f.x=w-A,f.y=q-A,e.x=w+u,e.y=q+u):(f.x=w-A,f.y=q+A,e.x=w+u,e.y=q-u):r>q?(f.x=w+A,f.y=q-A,e.x=w-u,e.y=q+u):(f.x=w+A,f.y=q+A,e.x=w-u,e.y=q-u));L.ca(y,w)&&L.ca(q,r)&&(q>p?(z>w?(f.x=w-A,f.y=q-A,e.x=w+u):(f.x=w+A,f.y=q-A,e.x=w-u),e.y=q+u):(z>w?(f.x=w-A,f.y=q+A,e.x=w+u):(f.x=w+A,f.y=q+A,e.x=w-u),e.y=q-u));if(L.ca(y,w)&&L.ca(w,z)||L.ca(p,q)&&L.ca(q,r))y=.5*(y+z),p=.5*(p+r),f.x=y,f.y=p,e.x=y,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&L.ca(g.x,this.i(0).x)&& -L.ca(g.y,this.i(0).y)&&(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));Kd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb));l=.5*(l+m.x);g=.5*(g+m.y);Kd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);K.free(b);K.free(c);K.free(f);K.free(e)}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=uq(this,g.copy(),!1,yb)),Kd(h,f.x-d,f.y-k,e.x-d, -e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=uq(this,m.copy(),!1,yb)),xq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);xq(this,h,n,y,f,w,u);K.free(w);Ld(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(xq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),xq(this,h,n,y,f,w,u),K.free(w),Ld(h,p.x+n,p.y+y,q+n,z+y),f.h(q, -z))):(xq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Od=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=uq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=uq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; -function wq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} -function uq(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=wq(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=wq(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 vq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 xq(a,b,c,d,e,f,g){if(!g&&Zp(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=yq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Jd(b,n,q,!1):Kd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Jd(b,q,m,!1):Kd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} -function yq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& -L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function Zp(a){a=a.curve;return a===jg||a===kg}function cq(a,b){if(b||Zp(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} -S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;h=b&&(c=b-1),e=this.i(c-1),g=this.i(c),c===b-1&&0!==this.computeShortLength(!1)&&(g=vq(this,g.copy(),!1,xb)),Hd(h,f.x-d,f.y-k,e.x-d, +e.y-k,g.x-d,g.y-k);else{f=K.alloc();f.assign(this.i(0));e=K.alloc();e.assign(f);g=this.computeCorner();n=1;for(l=0;n=b-1){if(!f.D(m))0!==this.computeShortLength(!1)&&(m=vq(this,m.copy(),!1,xb)),yq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?C=p.x-r:C=p.x+r;w.y>p.y?z=p.y+A:z=p.y-A;w=K.allocAt(C,E);yq(this,h,n,y,f,w,u);K.free(w);Id(h,p.x+n,p.y+y,q+n,z+y);f.h(q,z)}else L.C(f.x,p.x)&&L.C(p.y,w.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=A=Math.min(r,Math.abs(w.x-p.x)/2),L.C(A,0)?(yq(this,h,n,y,f,p,u),f.assign(p)):(C=p.x,E=p.y,q=C,z=E,p.y>f.y?E=p.y-r:E=p.y+r,w.x>p.x?q=p.x+A:q=p.x-A,w=K.allocAt(C,E),yq(this,h,n,y,f,w,u),K.free(w),Id(h,p.x+n,p.y+y,q+n,z+y),f.h(q, +z))):(yq(this,h,n,y,f,p,u),f.assign(p));e.assign(m);n=l}K.free(f)}Ld=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=vq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=vq(this,h,!1,f)),a.type=N.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.xk=!0;return a}; +function xq(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 L.ca(a,0)?b:L.ca(b,0)?a:Math.sqrt(a*a+b*b)} +function vq(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=xq(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=xq(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 wq(a,b,c,d){for(var e=a.pointsCount,f=b;L.ca(b.x,f.x)&&L.ca(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!L.ca(b.x,f.x)&&!L.ca(b.y,f.y))return c-1;for(var g=f;L.ca(b.x,f.x)&&L.ca(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||L.ca(b.y,f.y)&&L.ca(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 yq(a,b,c,d,e,f,g){if(!g&&$p(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=zq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===kg?Gd(b,n,q,!1):Hd(b,p,m,n,m,n,q)}else if(L.C(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===kg?Gd(b,q,m,!1):Hd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function zq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Ua.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,y)n&&!L.C(g,y)){h.x=r;h.y=n;m=!0;break a}}else if(!L.C(n,q)&& +L.C(g,y)&&Math.min(n,q)g&&Math.min(r,u)m&&!L.C(r,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}K.free(h)}function $p(a){a=a.curve;return a===jg||a===kg}function dq(a,b){if(b||$p(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Ph.contains(a)||0===a.zl.width&&0===a.zl.height||b.Ph.add(a,a.zl.copy())} +S.prototype.jp=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.Ua.s;for(var g=e.length,h=0;ha&&Ba(a,">= 0",S,"fromEndSegmentLength"),this.cd(),this.fa.hj=a,this.g("fromEndSegmentLength",b,a),this.ib())}},fromShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.ij:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(G&&B(a,"number",S,"fromShortLength"), -this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:gd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Gp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, +this.cd(),this.fa.ij=a,this.xc(),this.g("fromShortLength",b,a))}},toSpot:{configurable:!0,get:function(){return null!==this.fa?this.fa.Lj:hd},set:function(a){var b=this.toSpot;b.D(a)||(G&&x(a,Hb,S,"toSpot"),a=a.M(),this.cd(),this.fa.Lj=a,this.g("toSpot",b,a),(b.fd()||a.fd())&&null!==this.toNode&&Hp(this.toPort),this.ib())}},toEndSegmentLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Jj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(G&&B(a, "number",S,"toEndSegmentLength"),0>a&&Ba(a,">= 0",S,"toEndSegmentLength"),this.cd(),this.fa.Jj=a,this.g("toEndSegmentLength",b,a),this.ib())}},toShortLength:{configurable:!0,get:function(){return null!==this.fa?this.fa.Kj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(G&&B(a,"number",S,"toShortLength"),this.cd(),this.fa.Kj=a,this.xc(),this.g("toShortLength",b,a))}},isLabeledLink:{configurable:!0,get:function(){return null===this.Cd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);L.Ql(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.lf(f),e=2;ed&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); +a.x,c-a.y)}return a}},midPoint:{configurable:!0,get:function(){this.Hg();return this.computeMidPoint(new K)}},midAngle:{configurable:!0,get:function(){this.Hg();return this.computeMidAngle()}},flattenedLengths:{configurable:!0,get:function(){if(null===this.qq){this.md||cq(this);for(var a=this.qq=[],b=this.pointsCount,c=0;cd&&(d=-d)):L.ca(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Nf(e)); a.push(d)}}return this.qq}},flattenedTotalLength:{configurable:!0,get:function(){var a=this.It;if(isNaN(a)){for(var b=this.flattenedLengths,c=b.length,d=a=0;dthis.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!fq(this.computeSpot(!0))?1:0}}, -lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!fq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Vp&&a!==Wp&&a!==Xp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, -set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),cq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, -set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Up&&a!==Cq&&a!==Dq&&a!==lq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),cq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, +enumerable:!0,get:function(){return 4===(this.Dj.value&4)}},xk:{configurable:!0,get:function(){return 0!==(this.Va&128)},set:function(a){0!==(this.Va&128)!==a&&(this.Va^=128)}},geometry:{configurable:!0,get:function(){if(!this.xk){this.Hg();if(2>this.pointsCount)return this.xk=!0,this.Ba;this.Ba=this.makeGeometry()}return this.Ba}},firstPickIndex:{configurable:!0,get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!gq(this.computeSpot(!0))?1:0}}, +lastPickIndex:{configurable:!0,get:function(){var a=this.pointsCount;return 0===a?0:2>=a?a-1:this.isOrthogonal||!gq(this.computeSpot(!1))?a-2:a-1}},adjusting:{configurable:!0,get:function(){return this.Ck},set:function(a){var b=this.Ck;b!==a&&(G&&a!==lg&&a!==Wp&&a!==Xp&&a!==Yp&&v("Link.adjusting can only be set to Link.None, Link.End, LInk.Scale, or Link.Stretch, not: "+a),this.Ck=a,this.g("adjusting",b,a))}},corner:{configurable:!0,get:function(){return this.an}, +set:function(a){var b=this.an;b!==a&&(G&&B(a,"number",S,"corner"),this.an=a,this.xc(),this.g("corner",b,a))}},curve:{configurable:!0,get:function(){return this.cn},set:function(a){var b=this.cn;b!==a&&(G&&a!==lg&&a!==og&&a!==kg&&a!==jg&&v("Link.curve can only be set to Link.None, Link.Bezier, LInk.JumpGap, or Link.JumpOver, not: "+a),this.cn=a,this.ib(),this.xc(),dq(this,b===kg||b===jg||a===kg||a===jg),this.g("curve",b,a))}},curviness:{configurable:!0,get:function(){return this.dn}, +set:function(a){var b=this.dn;b!==a&&(G&&B(a,"number",S,"curviness"),this.dn=a,this.ib(),this.xc(),this.g("curviness",b,a))}},routing:{configurable:!0,get:function(){return this.Dj},set:function(a){var b=this.Dj;b!==a&&(G&&a!==Vp&&a!==Dq&&a!==Eq&&a!==mq&&v("Link.routing can only be set to Link.Normal, Link.Orthogonal, LInk.AvoidsNodes, not: "+a),this.Dj=a,this.hg=null,this.ib(),dq(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{configurable:!0, get:function(){return this.Bo},set:function(a){var b=this.Bo;b!==a&&(G&&B(a,"number",S,"smoothness"),this.Bo=a,this.xc(),this.g("smoothness",b,a))}},key:{configurable:!0,get:function(){var a=this.diagram;if(null!==a&&a.model.Ei())return a.model.Gc(this.data)}}});S.prototype.invalidateOtherJumpOvers=S.prototype.jp;S.prototype.findClosestSegment=S.prototype.zz;S.prototype.updateRoute=S.prototype.Hg;S.prototype.invalidateRoute=S.prototype.ib;S.prototype.rollbackRoute=S.prototype.Gv; S.prototype.commitRoute=S.prototype.Lf;S.prototype.startRoute=S.prototype.Fh;S.prototype.clearPoints=S.prototype.Rj;S.prototype.removePoint=S.prototype.Ev;S.prototype.addPointAt=S.prototype.Kf;S.prototype.addPoint=S.prototype.ve;S.prototype.insertPointAt=S.prototype.m;S.prototype.insertPoint=S.prototype.dA;S.prototype.setPointAt=S.prototype.O;S.prototype.setPoint=S.prototype.kd;S.prototype.getPoint=S.prototype.i;S.prototype.getOtherPort=S.prototype.Wz;S.prototype.getOtherNode=S.prototype.fp; -var dq=null,eq=null,Up=new F(S,"Normal",1),Cq=new F(S,"Orthogonal",2),Dq=new F(S,"AvoidsNodes",6),lq=new F(S,"AvoidsNodesStraight",7),lg=new F(S,"None",0),og=new F(S,"Bezier",9),kg=new F(S,"JumpGap",10),jg=new F(S,"JumpOver",11),Vp=new F(S,"End",17),Wp=new F(S,"Scale",18),Xp=new F(S,"Stretch",19),zn=new F(S,"OrientAlong",21),rn=new F(S,"OrientPlus90",22),tn=new F(S,"OrientMinus90",23),Yp=new F(S,"OrientOpposite",24),An=new F(S,"OrientUpright",25),sn=new F(S,"OrientPlus90Upright",26),un=new F(S,"OrientMinus90Upright", -27),vn=new F(S,"OrientUpright45",28),nq=16,mq=14,oq=8;S.className="Link";S.Normal=Up;S.Orthogonal=Cq;S.AvoidsNodes=Dq;S.AvoidsNodesStraight=lq;S.None=lg;S.Bezier=og;S.JumpGap=kg;S.JumpOver=jg;S.End=Vp;S.Scale=Wp;S.Stretch=Xp;S.OrientAlong=zn;S.OrientPlus90=rn;S.OrientMinus90=tn;S.OrientOpposite=Yp;S.OrientUpright=An;S.OrientPlus90Upright=sn;S.OrientMinus90Upright=un;S.OrientUpright45=vn;S.EndSegmentStep=8;S.CurvinessStart=nq;S.SpacingMin=mq;S.OrthoShortCut=oq; -function Bq(a,b,c,d){Ya(this);this.Pe=this.Dq=!1;this.Qs=a;this.hy=b;this.rv=c;this.iy=d;this.links=[]}Bq.prototype.fm=function(){if(!this.Dq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=tq&&(c[d]=Eq)} -zk.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; -function Fq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=tq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Fq(a,b,c,1,!e,f,g,h,k),Fq(a,b,c,-1,!e,f,g,h, -k)}}function Gq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=tq;for(a.gc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(Gq(a,h,k,q,c,f,b,n,p),Gq(a,h,k,1,!c,f,b,n,p),Gq(a,h,k,-1,!c,f,b,n,p)):Gq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(Hq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Hq(a,l,m,1,!(90===e||270===e),f,b,n,p),Hq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Hq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Iq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=tq;e=c[c.length-2];g=c[c.length-1];d[e][g]= -a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Jq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Jq){g.push(k);g.push(l);if(Iq(a,k,l, -m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Jq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -oa.Object.defineProperties(zk.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}jq.prototype.fm=function(){this.xe.length=0}; -function kq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Df?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(Ac,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Kq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Lq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= -n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(jq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;f=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Td=Math.floor((a.x-this.yc)/this.yc)*this.yc;this.Ud=Math.floor((b-this.zc)/this.zc)*this.zc;this.Qn=Math.ceil((c+2*this.yc)/this.yc)*this.yc;this.Rn=Math.ceil((d+2*this.zc)/this.zc)*this.zc;a=1+(Math.ceil((this.Qn-this.Td)/this.yc)|0);b=1+(Math.ceil((this.Rn-this.Ud)/this.zc)|0);if(null===this.gc||this.pi=uq&&(c[d]=Fq)} +Ck.prototype.ik=function(a,b,c,d){if(a>this.Qn||a+cthis.Rn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.pi)|0;for(c=Math.min(b+e-1,this.ri)|0;a<=d;a++){e=this.gc[a];for(var f=b;f<=c;f++)if(e[f]===Hk)return!1}return!0}; +function Gq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.gc[l][m];if(n>=uq&&n=a.gc[l][m]);)a.gc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)Gq(a,b,c,1,!e,f,g,h,k),Gq(a,b,c,-1,!e,f,g,h, +k)}}function Hq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Hk,m=uq;for(a.gc[b][c]=m;l===Hk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Td;n/=a.yc;d-=a.Ud;d/=a.zc;b-=a.Td;b/=a.yc;p-=a.Ud;p/=a.zc;f=Math.max(0,Math.min(a.pi,n|0));b=Math.min(a.pi,Math.max(0,b|0));n=Math.max(0,Math.min(a.ri,d|0));p=Math.min(a.ri,Math.max(0,p|0));d=a.gc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Hk?(Hq(a,h,k,q,c,f,b,n,p),Hq(a,h,k,1,!c,f,b,n,p),Hq(a,h,k,-1,!c,f,b,n,p)):Hq(a,h,k,q,c,h,k,h,k);d[l][m]===Hk?(Iq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),Iq(a,l,m,1,!(90===e||270===e),f,b,n,p),Iq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):Iq(a,l,m,q,c,l,m,l,m);c=Na();if(g&&Jq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=uq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===Kq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==Kq){g.push(k);g.push(l);if(Jq(a,k,l, +m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=Kq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} +oa.Object.defineProperties(Ck.prototype,{bounds:{configurable:!0,get:function(){return new M(this.Td,this.Ud,this.Qn-this.Td,this.Rn-this.Ud)}},To:{configurable:!0,get:function(){return this.yc},set:function(a){0=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}kq.prototype.fm=function(){this.xe.length=0}; +function lq(a,b){var c=a.xe;if(0===c.length){a:if(!a.op){c=a.op;a.op=!0;var d=null,e=a.node,f=e instanceof Cf?e:null;if(null===f||f.isSubGraphExpanded)var g=e.isTreeExpanded?e.findLinksConnected(a.port.portId):e.Ix();else{if(!f.actualBounds.u()){a.op=c;break a}d=f;g=d.av()}f=a.xe.length=0;var h=a.port.la(yc,K.alloc()),k=a.port.la(Nc,K.alloc());e=M.allocAt(h.x,h.y,0,0);e.lf(k);K.free(h);K.free(k);h=K.allocAt(e.x+e.width/2,e.y+e.height/2);k=a.port.yi();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.Zd(d),n=l.computeSpot(m,a.port);if(n.fd()&&(m=m?l.toPort:l.fromPort,null!==m)){var p=m.part;if(null!==p){var q=p.findVisibleNode();null!==q&&q!==p&&(p=q,m=p.port);m=l.computeOtherPoint(p,m);p=h.gb(m);p-=k;0>p?p+=360:360<=p&&(p-=360);n=Lq(e,n,p,l.isOrthogonal);0===n?(n=4,180p&&(p+=360));q=a.xe[f];void 0===q?(q=new Mq(l,p,n),a.xe[f]=q):(q.link=l,q.angle=p,q.Tc= +n);q.wv.set(m);f++}}}}K.free(h);a.xe.sort(kq.prototype.j);k=a.xe.length;d=-1;for(f=h=0;fMath.abs(u)?(z=Math.abs(u)/p,p=Math.abs(u)):z=1;break;case 2:q>Math.abs(A)?(z=Math.abs(A)/q,q=Math.abs(A)):z=1;break;case 1:n>Math.abs(u)?(z=Math.abs(u)/n,n=Math.abs(u)):z=1;break;default:case 4:m>Math.abs(A)?(z=Math.abs(A)/ -m,m=Math.abs(A)):z=1}w=0}var H=C.mp;if(d===Rp){C=C.link.computeThickness();C*=z;H.set(E);switch(r){case 8:H.x=E.x+u/2+p/2-w-C/2;break;case 2:H.y=E.y+A/2+q/2-w-C/2;break;case 1:H.x=E.x+u/2-n/2+w+C/2;break;default:case 4:H.y=E.y+A/2-m/2+w+C/2}w+=C}else{var T=.5;d===Cp&&(T=(C.gp+1)/(C.Ul+1));H.x=E.x+u*T;H.y=E.y+A*T}}}K.free(h);K.free(k);K.free(g);K.free(l);E=a.xe;for(f=0;fb.Tc?1:a.angleb.angle?1:0}; -jq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,zc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.yb.Tc?1:a.angleb.angle?1:0}; +kq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.node,this.port,xc,b.fromPort===this.port),d=a.gp;if(0>d)return c;var e=a.Ul;if(1>=e||!b.isOrthogonal)return c;b=a.wv;var f=a.mp;if(2===a.Tc||8===a.Tc)d=e-1-d;return((a=2===a.Tc||4===a.Tc)?b.y=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; -Gi.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)&&(Oq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Df&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Df&&a.Ch?!0:!1};function Nq(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 Df?null===k.layout?Nq(a,b,k.memberParts,!1,e,f,g,h):(Oq(k),b.add(k)):(Oq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Oq(k),b.add(k)))}} -function Oq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; -Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Nq(this,b,a.nodes,!0,null,!0,!0,!0),Nq(this,b,a.links,!0,null,!0,!0,!0),Nq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Df?Nq(this,b,a.memberParts,!1,null,!0,!0,!0):Nq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; -Gi.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.la(Ac),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; -oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Df,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, +Gi.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,this.Ch,!0,!1,!0),Oq(this,b,a.parts,!0,this.Ch,!0,!1,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,this.Ch,!0,!1,!0):b.addAll(a.iterator);0=b-1?(f=0,d=c,e+=g+20,g=0):f++}}; +Gi.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)&&(Pq(h),this.Ch(h))){var k=h.measuredBounds,l=k.width;k=k.height;h.moveTo(c,d);h instanceof Cf&&(h.Ch=!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++}}};Gi.prototype.Ch=function(a){return!a.location.u()||a instanceof Cf&&a.Ch?!0:!1};function Oq(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 Cf?null===k.layout?Oq(a,b,k.memberParts,!1,e,f,g,h):(Pq(k),b.add(k)):(Pq(k),b.add(k))):g&&k instanceof S?b.add(k):!h||!k.ed()||k instanceof V||(Pq(k),b.add(k)))}} +function Pq(a){var b=a.actualBounds;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.$a()}Gi.prototype.Ai=function(a,b){var c=this.boundsComputation;if(null!==c)return b||(b=new M),c(a,this,b);if(!b)return a.actualBounds;b.set(a.actualBounds);return b}; +Gi.prototype.vx=function(a){var b=new J;a instanceof Q?(Oq(this,b,a.nodes,!0,null,!0,!0,!0),Oq(this,b,a.links,!0,null,!0,!0,!0),Oq(this,b,a.parts,!0,null,!0,!0,!0)):a instanceof Cf?Oq(this,b,a.memberParts,!1,null,!0,!0,!0):Oq(this,b,a.iterator,!1,null,!0,!0,!0);return b}; +Gi.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.la(yc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),a=b.padding,c.x+=a.left,c.y+=a.top);return c}return a}; +oa.Object.defineProperties(Gi.prototype,{diagram:{configurable:!0,get:function(){return this.H},set:function(a){null!==a&&x(a,Q,Gi,"diagram");this.H=a}},group:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(null!==a&&x(a,Cf,Gi,"group"),this.o=a,null!==a&&(this.H=a.diagram))}},isOngoing:{configurable:!0,get:function(){return this.En},set:function(a){this.En!==a&&(B(a,"boolean",Gi,"isOngoing"),this.En=a)}},isInitial:{configurable:!0, enumerable:!0,get:function(){return this.Sh},set:function(a){B(a,"boolean",Gi,"isInitial");this.Sh=a;a||(this.Jn=!0)}},isViewportSized:{configurable:!0,get:function(){return this.Kn},set:function(a){this.Kn!==a&&(B(a,"boolean",Gi,"isViewportSized"),(this.Kn=a)&&this.F())}},isRouting:{configurable:!0,get:function(){return this.Hn},set:function(a){this.Hn!==a&&(B(a,"boolean",Gi,"isRouting"),this.Hn=a)}},isRealtime:{configurable:!0,get:function(){return this.Gn}, -set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Mq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, +set:function(a){this.Gn!==a&&(null!==a&&B(a,"boolean",Gi,"isRealtime"),this.Gn=a)}},isValidLayout:{configurable:!0,get:function(){return this.Jn},set:function(a){this.Jn!==a&&(B(a,"boolean",Gi,"isValidLayout"),this.Jn=a,a||(a=this.diagram,null!==a&&(a.Ih=!0)))}},network:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(null!==a&&x(a,Nq,Gi,"network"),this.j=a,null!==a&&(a.layout=this))}},boundsComputation:{configurable:!0,get:function(){return this.Rm}, set:function(a){this.Rm!==a&&(null!==a&&B(a,"function",Gi,"boundsComputation"),this.Rm=a,this.F())}},arrangementOrigin:{configurable:!0,get:function(){return this.Nm},set:function(a){x(a,K,Gi,"arrangementOrigin");this.Nm.D(a)||(this.Nm.assign(a),this.F())}}});Gi.prototype.collectParts=Gi.prototype.vx;Gi.prototype.getLayoutBounds=Gi.prototype.Ai;Gi.prototype.invalidateLayout=Gi.prototype.F;Gi.className="Layout"; -function Mq(a){Ya(this);G&&!a&&v("LayoutNetwork constructor requires non-null Layout argument");this.Yc=a;this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}Mq.prototype.clear=function(){if(this.If)for(var a=this.If.iterator;a.next();)a.value.clear();if(this.Ie)for(a=this.Ie.iterator;a.next();)a.value.clear();this.If=new J;this.Ie=new J;this.Rs=new vb;this.Ms=new vb}; -Mq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1=a)return b;b+=" vertexes: "+this.If.count+" edges: "+this.Ie.count;if(1b?1:0):1:null!==b?-1:0} -oa.Object.defineProperties(Pq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, -set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Pq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Df)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Pq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, -get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Pq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Pq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Pq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, +Nq.prototype.findGroupVertex=function(a){if(null===a)return null;var b=a.findVisibleNode();if(null===b)return null;a=this.xi(b);if(null!==a)return a;for(b=b.containingGroup;null!==b;){a=this.xi(b);if(null!==a)return a;b=b.containingGroup}return null};t=Nq.prototype;t.oh=function(a){if(null!==a){G&&x(a,Qq,Nq,"addVertex:vertex");this.If.add(a);var b=a.node;null!==b&&this.Rs.add(b,a);a.network=this}}; +t.Ol=function(a){if(null===a)return null;G&&x(a,V,Nq,"addNode:node");var b=this.xi(a);null===b&&(b=this.createVertex(),b.node=a,this.oh(b));return b};t.Wu=function(a){if(null!==a&&(G&&x(a,Qq,Nq,"deleteVertex:vertex"),Sq(this,a))){for(var b=a.Fg,c=b.count-1;0<=c;c--){var d=b.P(c);this.Yj(d)}b=a.yg;for(a=b.count-1;0<=a;a--)c=b.P(a),this.Yj(c)}};function Sq(a,b){if(null===b)return!1;var c=a.If.remove(b);c&&(b=b.node,null!==b&&a.Rs.remove(b));return c} +t.qz=function(a){null!==a&&(G&&x(a,V,Nq,"deleteNode:node"),a=this.xi(a),null!==a&&this.Wu(a))};t.xi=function(a){if(null===a)return null;G&&x(a,V,Nq,"findVertex:node");return this.Rs.L(a)};t.No=function(a){if(null!==a){G&&x(a,Rq,Nq,"addEdge:edge");Tq(this,a);var b=a.toVertex;null!==b&&b.Pl(a);b=a.fromVertex;null!==b&&b.Ml(a)}};function Tq(a,b){if(null!==b){a.Ie.add(b);var c=b.link;null!==c&&null===a.Xo(c)&&a.Ms.add(c,b);b.network=a}} +t.Uy=function(a){if(null===a)return null;G&&x(a,S,Nq,"addLink:link");var b=a.fromNode,c=a.toNode,d=this.Xo(a);null===d?(d=this.createEdge(),d.link=a,null!==b&&(d.fromVertex=this.Ol(b)),null!==c&&(d.toVertex=this.Ol(c)),this.No(d)):(null!==b?d.fromVertex=this.Ol(b):d.fromVertex=null,null!==c?d.toVertex=this.Ol(c):d.toVertex=null);return d};t.Yj=function(a){if(null!==a){G&&x(a,Rq,Nq,"deleteEdge:edge");var b=a.toVertex;null!==b&&b.Yl(a);b=a.fromVertex;null!==b&&b.Xl(a);Uq(this,a)}}; +function Uq(a,b){null!==b&&a.Ie.remove(b)&&(b=b.link,null!==b&&a.Ms.remove(b))}t.pz=function(a){null!==a&&(G&&x(a,S,Nq,"deleteLink:link"),a=this.Xo(a),null!==a&&this.Yj(a))};t.Xo=function(a){if(null===a)return null;G&&x(a,S,Nq,"findEdge:link");return this.Ms.L(a)}; +t.jk=function(a,b,c){if(null===a||null===b)return null;G&&(x(a,Qq,Nq,"linkVertexes:fromVertex"),x(b,Qq,Nq,"linkVertexes:toVertex"),null!==c&&x(c,S,Nq,"linkVertexes:link"));if(a.network===this&&b.network===this){var d=this.createEdge();d.link=c;d.fromVertex=a;d.toVertex=b;this.No(d);return d}return null};t.um=function(a){if(null!==a){G&&x(a,Rq,Nq,"reverseEdge:edge");var b=a.fromVertex,c=a.toVertex;null!==b&&null!==c&&(b.Xl(a),c.Yl(a),a.um(),b.Pl(a),c.Ml(a))}}; +t.Wo=function(){for(var a=Na(),b=this.Ie.iterator;b.next();){var c=b.value;c.fromVertex===c.toVertex&&a.push(c)}b=a.length;for(c=0;cb?1:0):1:null!==b?-1:0} +oa.Object.defineProperties(Qq.prototype,{sourceEdgesArrayAccess:{configurable:!0,get:function(){return this.Fg._dataArray}},destinationEdgesArrayAccess:{configurable:!0,get:function(){return this.yg._dataArray}},data:{configurable:!0,get:function(){return this.zb},set:function(a){this.zb=a;if(null!==a&&a.bounds){var b=a.bounds;a=b.x;var c=b.y,d=b.width;b=b.height;this.o.h(d/2,b/2);this.j.h(a,c,d,b)}}},node:{configurable:!0,get:function(){return this.di}, +set:function(a){if(this.di!==a){G&&null!==a&&x(a,V,Qq,"node");this.di=a;a.$a();var b=this.network.layout,c=M.alloc(),d=b.Ai(a,c);b=d.x;var e=d.y,f=d.width;d=d.height;isNaN(b)&&(b=0);isNaN(e)&&(e=0);this.j.h(b,e,f,d);M.free(c);if(!(a instanceof Cf)&&(a=a.locationObject.la(Ic),a.u())){this.o.h(a.x-b,a.y-e);return}this.o.h(f/2,d/2)}}},bounds:{configurable:!0,get:function(){return this.j},set:function(a){this.j.D(a)||(G&&x(a,M,Qq,"bounds"),this.j.assign(a))}},focus:{configurable:!0, +get:function(){return this.o},set:function(a){this.o.D(a)||(G&&x(a,K,Qq,"focus"),this.o.assign(a))}},centerX:{configurable:!0,get:function(){return this.j.x+this.o.x},set:function(a){var b=this.j;b.x+this.o.x!==a&&(G&&D(a,Qq,"centerX"),b.qa(),b.x=a-this.o.x,b.freeze())}},centerY:{configurable:!0,get:function(){return this.j.y+this.o.y},set:function(a){var b=this.j;b.y+this.o.y!==a&&(G&&D(a,Qq,"centerY"),b.qa(),b.y=a-this.o.y,b.freeze())}},focusX:{configurable:!0, get:function(){return this.o.x},set:function(a){var b=this.o;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},focusY:{configurable:!0,get:function(){return this.o.y},set:function(a){var b=this.o;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},x:{configurable:!0,get:function(){return this.j.x},set:function(a){var b=this.j;b.x!==a&&(b.qa(),b.x=a,b.freeze())}},y:{configurable:!0,get:function(){return this.j.y},set:function(a){var b=this.j;b.y!==a&&(b.qa(),b.y=a,b.freeze())}},width:{configurable:!0, -enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Mq,Pq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); +enumerable:!0,get:function(){return this.j.width},set:function(a){var b=this.j;b.width!==a&&(b.qa(),b.width=a,b.freeze())}},height:{configurable:!0,get:function(){return this.j.height},set:function(a){var b=this.j;b.height!==a&&(b.qa(),b.height=a,b.freeze())}},network:{configurable:!0,get:function(){return this.ub},set:function(a){G&&x(a,Nq,Qq,"network");this.ub=a}},sourceVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex); return a.iterator}},destinationVertexes:{configurable:!0,get:function(){for(var a=new J,b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},vertexes:{configurable:!0,get:function(){for(var a=new J,b=this.sourceEdges;b.next();)a.add(b.value.fromVertex);for(b=this.destinationEdges;b.next();)a.add(b.value.toVertex);return a.iterator}},sourceEdges:{configurable:!0,get:function(){return this.Fg.iterator}},destinationEdges:{configurable:!0, -enumerable:!0,get:function(){return this.yg.iterator}},edges:{configurable:!0,get:function(){for(var a=new I,b=this.sourceEdges;b.next();)a.add(b.value);for(b=this.destinationEdges;b.next();)a.add(b.value);return a.iterator}},edgesCount:{configurable:!0,get:function(){return this.Fg.count+this.yg.count}}});Pq.prototype.deleteDestinationEdge=Pq.prototype.Xl;Pq.prototype.addDestinationEdge=Pq.prototype.Ml;Pq.prototype.deleteSourceEdge=Pq.prototype.Yl; -Pq.prototype.addSourceEdge=Pq.prototype.Pl;Pq.className="LayoutVertex";Pq.standardComparer=Wq; -Pq.smartComparer=function(a,b){G&&x(a,Pq,Pq,"smartComparer:m");G&&x(b,Pq,Pq,"smartComparer:n");if(null!==a){if(null!==b){a=a.di;var c=b.di;if(null!==a){if(null!==c){b=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);a=c.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(c=0;c=f&&0>=g&&(f=1);b=this.spacing.width;isFinite(b)||(b=0);c=this.spacing.height;isFinite(c)||(c=0);null!==a&&a.Ka("Layout");d=[];switch(this.alignment){case er:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= -m=0;nf-1|| -0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case dr:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case dr:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Xq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} -oa.Object.defineProperties(cl.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",cl,"wrappingWidth"),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.Ka("Layout");d=[];switch(this.alignment){case fr:var h=b,k=c,l=M.alloc(),m=Math.max(this.cellSize.width,1);if(!isFinite(m))for(var n= +m=0;nf-1|| +0g)d.push(new M(0,u,g+h,w)),y=0,r=q,u+=w,w=0;w=Math.max(w,H);switch(p){case er:C=-C.width;break;default:C=0}A.moveTo(r+C,u);switch(p){case er:r-=E;break;default:r+=E}y++}d.push(new M(0,u,g+h,w));M.free(l);break;case Yq:k=g;m=f;n=b;p=c;g=M.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=K.alloc();for(r=0;r=l&&(k-=l);l=A=0;E=Math.max(this.cellSize.height,1);C=f=0;H=!0;y=K.alloc();for(T=0;Tm-1||0k){d.push(new M(0,H?z-f:z,k+n,C+f+p));for(aa=0;aal&&(f.width+=f.x-l,f.x=l);M.free(g)}for(h=f=g=e=0;hb?1:0} +oa.Object.defineProperties(el.prototype,{wrappingWidth:{configurable:!0,get:function(){return this.Lo},set:function(a){this.Lo!==a&&(B(a,"number",el,"wrappingWidth"),0n)){var u=n+Jn(r);r.wc(u,!0);Vn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; -Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;dn)){var u=n+Ln(r);r.wc(u,!0);Xn(r,u,n)}}b.isModified=!0}}finally{b.da=!0}}}}};Ci.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.Qa(a);for(b=this.nodes.iterator;b.next();)b.value.Qa(a);for(b=this.links.iterator;b.next();)b.value.Qa(a)}; +Ci.prototype.Fp=function(){for(var a=this.H.model,b=new J,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new ab;e.add("[");c&&1d)return;Ma(a.Nc,d)}Rr(a,"nodeDataArray",se,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;c=d)return"[]";var e=new bb;e.add("[");c&&1d)return;Ma(a.Nc,d)}Sr(a,"nodeDataArray",ue,"nodeDataArray",a,b,null,d,null);a.Ep(b)}t.HA=function(a){if(Ha(a))for(var b=a.length,c=0;cb&&(b=a.length);Ka(a,b,c);Rr(this,"",re,"",a,null,c,null,b)}; -t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Rr(this,"",se,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Wn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; -t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Wn(a,c);void 0===d&&(d="");d!==b&&(ik(a,c,b),Rr(this,"nodeCategory",pe,c,a,d,b))}else ik(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} -function Mr(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 Mr(a,b.constructor);return typeof b}function Pr(a){return Wr[a]?Wr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Wn(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){G&&Fa("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){G&&Fa("property set error: "+d.toString())}} +X.prototype.setDataProperty=function(a,b,c){G&&(B(a,"object",X,"setDataProperty:data"),B(b,"string",X,"setDataProperty:propname"),""===b&&v("Model.setDataProperty: property name must not be an empty string when setting "+a+" to "+c));if(this.hb(a)){if(b===this.nodeKeyProperty){this.ym(a,c);return}if(b===this.nodeCategoryProperty){this.xm(a,c);return}}else!Vr&&a instanceof P&&(Vr=!0,Fa('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Fa(" Is that really your intent?"));var d= +Yn(a,b);d!==c&&(lk(a,b,c),this.Ss(a,b,d,c))};t=X.prototype;t.set=function(a,b,c){this.setDataProperty(a,b,c)};t.Po=function(a,b){if(b){var c=this.hb(a),d;for(d in b)"__gohashid"===d||c&&d===this.nodeKeyProperty||this.setDataProperty(a,d,b[d])}};t.Ry=function(a,b){this.Gs(a,-1,b)}; +t.Gs=function(a,b,c){G&&(Ia(a,X,"insertArrayItem:arr"),D(b,X,"insertArrayItem:idx"),a===this.Nc&&v("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray"));0>b&&(b=a.length);Ka(a,b,c);Sr(this,"",te,"",a,null,c,null,b)}; +t.Dv=function(a,b){void 0===b&&(b=-1);G&&(Ia(a,X,"removeArrayItem:arr"),D(b,X,"removeArrayItem:idx"));a===this.Nc&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Ma(a,b);Sr(this,"",ue,"",a,c,null,b,null)};t.cp=function(a){if(null===a)return"";var b=this.yj;if(""===b)return"";b=Yn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b)}; +t.xm=function(a,b){B(b,"string",X,"setCategoryForNodeData:cat");if(null!==a){var c=this.yj;if(""!==c)if(this.hb(a)){var d=Yn(a,c);void 0===d&&(d="");d!==b&&(lk(a,c,b),Sr(this,"nodeCategory",re,c,a,d,b))}else lk(a,c,b)}};t.zm=function(a,b){this.xm(b,this.cp(a))};t.gm=function(){return!1};t.hk=function(){return!1};t.Ei=function(){return!1};t.Ls=function(){return!1};t.Ci=function(){return!1};function Ei(){return new X} +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 Qr(a){return Xr[a]?Xr[a]:void 0!==sa.go&&sa.go[a]?sa.go[a]:null}function Yn(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){G&&Fa("property get error: "+d.toString())}return c} +function lk(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){G&&Fa("property set error: "+d.toString())}} oa.Object.defineProperties(X.prototype,{name:{configurable:!0,get:function(){return this.Ea},set:function(a){var b=this.Ea;b!==a&&(B(a,"string",X,"name"),this.Ea=a,this.g("name",b,a))}},dataFormat:{configurable:!0,get:function(){return this.en},set:function(a){var b=this.en;b!==a&&(B(a,"string",X,"dataFormat"),this.en=a,this.g("dataFormat",b,a))}},isReadOnly:{configurable:!0,get:function(){return this.Sg},set:function(a){var b=this.Sg;b!==a&&(B(a,"boolean", -X,"isReadOnly"),this.Sg=a,this.g("isReadOnly",b,a))}},modelData:{configurable:!0,get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(B(a,"object",X,"modelData"),this.j=a,this.g("modelData",b,a),this.Qa(a))}},undoManager:{configurable:!0,get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(x(a,ue,X,"undoManager"),null!==b&&b.ky(this),this.o=a,null!==a&&a.ox(this))}},skipsUndoManager:{configurable:!0,get:function(){return this.hh}, -set:function(a){B(a,"boolean",X,"skipsUndoManager");this.hh=a}},nodeKeyProperty:{configurable:!0,get:function(){return this.ei},set:function(a){var b=this.ei;b!==a&&(Sr(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===se){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== -a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Yr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),ik(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; -t.Px=function(a){return sr(this,a,!0)};t.Lv=function(a,b){Ar(this,a,b,!0)};t.Sx=function(a){return sr(this,a,!1)};t.Qv=function(a,b){Ar(this,a,b,!1)};function sr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Wn(b,a),void 0!==a))){if(ur(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function Ar(a,b,c,d){null===c&&(c=void 0);void 0===c||ur(c)||Aa(c,"number or string",Yr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Wn(b,e);f!==c&&(yr(a,f,b),ik(b,e,c),null===a.nc(c)&&zr(a,c,b),Rr(a,d?"linkFromKey":"linkToKey",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}}t.Qx=function(a){return rr(this,a,!0)};t.Mv=function(a,b){Br(this,a,b,!0)};t.Tx=function(a){return rr(this,a,!1)}; -t.Rv=function(a,b){Br(this,a,b,!1)};function rr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Wn(b,a);return void 0===b?"":b}function Br(a,b,c,d){B(c,"string",Yr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Wn(b,e);void 0===f&&(f="");f!==c&&(ik(b,e,c),Rr(a,d?"linkFromPortId":"linkToPortId",pe,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else ik(b,e,c)}} -t.Qf=function(a){if(null===a)return as;var b=this.pe;if(""===b)return as;a=Wn(a,b);return void 0===a?as:a};t.Ys=function(a,b){Ia(b,Yr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);void 0===d&&(d=as);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(yr(this,b,a),Rr(this,"linkLabelKeys",se,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Wn(a,b),void 0!==b)){if(ur(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&ur(b)||Aa(b,"number or string",Yr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Wn(a,c);d!==b&&null===this.uh(b)&&(ik(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Rr(this,"linkKey",pe,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else ik(a,c,b)}}; -t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&ur(a)?this.Cb.L(a):null}; -t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){ik(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;ik(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;ik(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; -t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||wr(this,a,!0))};function wr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Rr(a,"linkDataArray",re,"linkDataArray",a,null,b,null,d);bs(a,b)} -t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Rr(a,"linkDataArray",se,"linkDataArray",a,b,null,d,null);c=sr(a,b,!0);yr(a,c,b);c=sr(a,b,!1);yr(a,c,b);d=a.Qf(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ue){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;Ga(a)&&"number"===typeof c&&(d=this.Gc(a),b?(this.lg.add(a),this.sd[c]!==a&&this.sd.splice(c,0,a),void 0!==d&&this.Cb.add(d,a)):(this.lg.remove(a),this.sd[c]=== +a&&this.sd.splice(c,1),void 0!==d&&this.Cb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Qf(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=Zr.prototype;t.im=function(a){if(void 0!==a){var b=this.dj;if(null!==b){var c=this.nc(a);null===c&&(c=this.copyNodeData(b),lk(c,this.nodeKeyProperty,a),this.Jf(c))}return a}}; +t.Px=function(a){return tr(this,a,!0)};t.Lv=function(a,b){Br(this,a,b,!0)};t.Sx=function(a){return tr(this,a,!1)};t.Qv=function(a,b){Br(this,a,b,!1)};function tr(a,b,c){if(null!==b&&(a=c?a.yf:a.zf,""!==a&&(a=Yn(b,a),void 0!==a))){if(vr(a))return a;v((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function Br(a,b,c,d){null===c&&(c=void 0);void 0===c||vr(c)||Aa(c,"number or string",Zr,d?"setFromKeyForLinkData:key":"setToKeyForLinkData:key");if(null!==b){var e=d?a.yf:a.zf;if(""!==e)if(c=a.im(c),a.Qc(b)){var f=Yn(b,e);f!==c&&(zr(a,f,b),lk(b,e,c),null===a.nc(c)&&Ar(a,c,b),Sr(a,d?"linkFromKey":"linkToKey",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}}t.Qx=function(a){return sr(this,a,!0)};t.Mv=function(a,b){Cr(this,a,b,!0)};t.Tx=function(a){return sr(this,a,!1)}; +t.Rv=function(a,b){Cr(this,a,b,!1)};function sr(a,b,c){if(null===b)return"";a=c?a.rj:a.sj;if(""===a)return"";b=Yn(b,a);return void 0===b?"":b}function Cr(a,b,c,d){B(c,"string",Zr,d?"setFromPortIdForLinkData:portname":"setToPortIdForLinkData:portname");if(null!==b){var e=d?a.rj:a.sj;if(""!==e)if(a.Qc(b)){var f=Yn(b,e);void 0===f&&(f="");f!==c&&(lk(b,e,c),Sr(a,d?"linkFromPortId":"linkToPortId",re,e,b,f,c),"string"===typeof e&&a.Qa(b,e))}else lk(b,e,c)}} +t.Qf=function(a){if(null===a)return bs;var b=this.pe;if(""===b)return bs;a=Yn(a,b);return void 0===a?bs:a};t.Ys=function(a,b){Ia(b,Zr,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.pe;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);void 0===d&&(d=bs);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Qc(a)&&(zr(this,b,a),Sr(this,"linkLabelKeys",ue,c,a,b,null,e,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +t.Gc=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=Yn(a,b),void 0!==b)){if(vr(b))return b;v("Key value for link data "+a+" is not a number or a string: "+b)}}};t.Xs=function(a,b){void 0!==b&&null!==b&&vr(b)||Aa(b,"number or string",Zr,"setKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(this.Qc(a)){var d=Yn(a,c);d!==b&&null===this.uh(b)&&(lk(a,c,b),void 0!==d&&this.Cb.remove(d),this.Cb.add(b,a),Sr(this,"linkKey",re,c,a,d,b),"string"===typeof c&&this.Qa(a,c))}else lk(a,c,b)}}; +t.uh=function(a){null===a&&v("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&vr(a)?this.Cb.L(a):null}; +t.Os=function(a){if(null!==a){var b=this.Vh;if(""!==b){var c=this.Gc(a);if(void 0===c||this.Cb.contains(c)){var d=this.ol;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Cb.contains(c))){lk(a,b,c);return}if("string"===typeof c){for(d=2;this.Cb.contains(c+d);)d++;lk(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.Cb.count-1;this.Cb.contains(c);)c--;lk(a,b,c)}else G&&v("GraphLinksModel.getKeyForLinkData returned something other than a string or a number: "+c)}}}}; +t.Qc=function(a){return null===a?!1:this.lg.contains(a)};t.si=function(a){null!==a&&(mb(a),this.Qc(a)||xr(this,a,!0))};function xr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Gc(b);if(void 0!==d&&a.Cb.L(d)===b)return;a.Os(b);d=a.Gc(b);void 0===d&&v("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.Cb.add(d,b)}a.lg.add(b);d=null;c&&(d=a.sd.length,a.sd.splice(d,0,b));Sr(a,"linkDataArray",te,"linkDataArray",a,null,b,null,d);cs(a,b)} +t.Vy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.sd.splice(d,1)}Sr(a,"linkDataArray",ue,"linkDataArray",a,b,null,d,null);c=tr(a,b,!0);zr(a,c,b);c=tr(a,b,!1);zr(a,c,b);d=a.Qf(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 I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ss&&k===ts?h=es:h===ss&&k!==ts&&(h=this.arrangement);if((this.direction===ns||this.direction===os)&&this.sorting!==hs){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===ns?(this.arrangement===ss&&a.reverse(),d=new I,d.addAll(a), -d.addAll(c)):(this.arrangement===ss&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ss){isNaN(b)&&(b=6);if(h!==es&&h!==ss){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==ns&&this.direction!==os||d!==ss)if(this.direction===ns||this.direction===os){g=0;switch(d){case rs:g=180*ys(this,h,p,l,k)/Math.PI;break;case es:k=b=0;g=a.first();null!==g&&(b=vs(g,Math.PI/2));g=c.first(); -null!==g&&(k=vs(g,Math.PI/2));g=180*ys(this,h,p,l,n+(b+k)/2)/Math.PI;break;case qs:g=m/b.length}if(this.direction===ns){switch(d){case rs:zs(this,a,l,ps);break;case es:As(this,a,l,ps);break;case qs:Bs(this,a,m/2,l,ps)}switch(d){case rs:zs(this,c,l+g,gs);break;case es:As(this,c,l+g,gs);break;case qs:Bs(this,c,m/2,l+g,gs)}}else{switch(d){case rs:zs(this,c,l,ps);break;case es:As(this,c,l,ps);break;case qs:Bs(this,c,m/2,l,ps)}switch(d){case rs:zs(this,a,l+g,gs);break;case es:As(this,a,l+g,gs);break;case qs:Bs(this, -a,m/2,l+g,gs)}}}else switch(d){case rs:zs(this,b,l,this.direction);break;case es:As(this,b,l,this.direction);break;case qs:Bs(this,b,m,l,this.direction);break;case ss:Cs(this,b,m,l,this.direction)}else Cs(this,b,m,l-m/2,gs)}this.updateParts();this.network=null;this.isValidLayout=!0}; -function Bs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===gs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Fs(a,k,l,m,n,e,f)||Gs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? -0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Fs(a,k,l,n,p,e,m)||Gs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} -function Gs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===gs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}ds.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; -ds.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; -ds.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function xs(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} -function ws(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?xs(a,1,c,d,e):xs(a,1,c))}function ys(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} -ds.prototype.sort=function(a){switch(this.sorting){case ls:break;case ms:a.reverse();break;case js:a.sort(this.comparer);break;case ks:a.sort(this.comparer);a.reverse();break;case hs:return this.lk(Hs(a));default:v("Invalid sorting type.")}return a}; -function Hs(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} -ds.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;c=a.count)1===a.count&&(a=a.first(),a.centerX=0,a.centerY=0);else{var b=new I;b.addAll(a.iterator);a=new I;var c=new I;var d=this.sort(b);var e,f,g=this.Wp;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===ts&&k===us?h=fs:h===ts&&k!==us&&(h=this.arrangement);if((this.direction===os||this.direction===ps)&&this.sorting!==is){for(k=0;!(k>=d.length);k+=2){a.add(d.P(k));if(k+1>=d.length)break;c.add(d.P(k+1))}this.direction===os?(this.arrangement===ts&&a.reverse(),d=new I,d.addAll(a), +d.addAll(c)):(this.arrangement===ts&&c.reverse(),d=new I,d.addAll(c),d.addAll(a))}k=d.length;for(var q=f=e=0;qp&&(0===q||q===d.length-1)&&(u/=2);e+=u;f++}if(isNaN(l)||h===ts){isNaN(b)&&(b=6);if(h!==fs&&h!==ts){f=-Infinity;for(g=0;gl?(l=e,f=l*m):g=q/(360<=p?k:k-1)}this.zw=h;this.sc=l;this.mn=m;this.Aw=n;this.jq=p;this.fj=b;this.ue=f;this.Wp=g;b=d;d=this.zw;h=this.sc;l=this.Aw;m=this.jq;n=this.fj;p=this.ue;k=this.Wp;if(this.direction!==os&&this.direction!==ps||d!==ts)if(this.direction===os||this.direction===ps){g=0;switch(d){case ss:g=180*zs(this,h,p,l,k)/Math.PI;break;case fs:k=b=0;g=a.first();null!==g&&(b=ws(g,Math.PI/2));g=c.first(); +null!==g&&(k=ws(g,Math.PI/2));g=180*zs(this,h,p,l,n+(b+k)/2)/Math.PI;break;case rs:g=m/b.length}if(this.direction===os){switch(d){case ss:As(this,a,l,qs);break;case fs:Bs(this,a,l,qs);break;case rs:Cs(this,a,m/2,l,qs)}switch(d){case ss:As(this,c,l+g,hs);break;case fs:Bs(this,c,l+g,hs);break;case rs:Cs(this,c,m/2,l+g,hs)}}else{switch(d){case ss:As(this,c,l,qs);break;case fs:Bs(this,c,l,qs);break;case rs:Cs(this,c,m/2,l,qs)}switch(d){case ss:As(this,a,l+g,hs);break;case fs:Bs(this,a,l+g,hs);break;case rs:Cs(this, +a,m/2,l+g,hs)}}}else switch(d){case ss:As(this,b,l,this.direction);break;case fs:Bs(this,b,l,this.direction);break;case rs:Cs(this,b,m,l,this.direction);break;case ts:Ds(this,b,m,l,this.direction)}else Ds(this,b,m,l-m/2,hs)}this.updateParts();this.network=null;this.isValidLayout=!0}; +function Cs(a,b,c,d,e){var f=a.jq,g=a.sc;a=a.ue;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===hs?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Gs(a,k,l,m,n,e,f)||Hs(a,k,l,m,n,e,f);k=f.x;l=f.y}K.free(f);a.zj++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)? +0:p;k=Math.abs(f)>Math.abs(n)?0n:0a.zj?a.sc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Gs(a,k,l,n,p,e,m)||Hs(a,k,l,n,p,e,m);k=m.x;l=m.y}K.free(m);a.zj++;if(!(23a.zj?a.sc-f/(2*Math.PI):a.sc-(0h){f=b-a;if(f<-h)return g.x=f,g.y=l,!1;m=!0}}else if(f=b-a,f<-h){f=b+a;if(f>h)return g.x=f,g.y=l,!1;m=!0}l=Math.sqrt(1-Math.min(1,f*f/(h*h)))*k;0>c!==m&&(l=-l);if(Math.abs(c-l)>(d[e].height+d[e+1].height)/2)return g.x=f,g.y=l,!1;g.x=f;g.y=l;return!0} +function Hs(a,b,c,d,e,f,g){var h=a.sc,k=a.ue,l=0;a=(d[e].height+d[e+1].height)/2+a.fj;d=!1;if(0<=b!==(f===hs)){if(f=c-a,f<-k){f=c+a;if(f>k){g.x=l;g.y=f;return}d=!0}}else if(f=c+a,f>k){f=c-a;if(f<-k){g.x=l;g.y=f;return}d=!0}l=Math.sqrt(1-Math.min(1,f*f/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=f}es.prototype.commitLayout=function(){this.commitNodes();this.isRouting&&this.commitLinks()}; +es.prototype.commitNodes=function(){var a=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,b=a?this.group.location.copy():null,c=this.actualCenter;a?c=new K(0,0):(c.x=this.arrangementOrigin.x+this.sc,c.y=this.arrangementOrigin.y+this.ue);for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;e.x+=c.x;e.y+=c.y;e.commit()}a&&(this.group.$a(),a=this.group.position.copy(),c=this.group.location.copy(),b=b.ze(c.ze(a)),this.group.move(b),this.nw=b.ze(a))}; +es.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function ys(a,b,c,d,e){var f=a.Ky;if(.001>Math.abs(a.mn-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;var g=0;var h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1));for(var k=0,l=0;l<=f;l++){void 0!==d&&void 0!==e?k=d+l*e/f:k=l*Math.PI/(2*f);var m=Math.sin(k);g+=Math.sqrt(1-a*a*m*m)*h}return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g} +function xs(a,b,c,d,e){return b/(void 0!==d&&void 0!==e?ys(a,1,c,d,e):ys(a,1,c))}function zs(a,b,c,d,e){if(.001>Math.abs(a.mn-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a);g+=(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +es.prototype.sort=function(a){switch(this.sorting){case ms:break;case ns:a.reverse();break;case ks:a.sort(this.comparer);break;case ls:a.sort(this.comparer);a.reverse();break;case is:return this.lk(Is(a));default:v("Invalid sorting type.")}return a}; +function Is(a){for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);c.add(a.P(f));b[f]=-1;f=a.P(f);for(g=f.sourceEdges;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++;for(f=f.destinationEdges;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}return c} +es.prototype.lk=function(a){for(var b=[],c=0;cb[c].indexOf(e)&&b[c].push(e);for(d=d.sourceEdges;d.next();)e=a.indexOf(d.value.fromVertex),e!==c&&0>b[c].indexOf(e)&&b[c].push(e)}f=[];for(c=0;cb[c[r]].indexOf(c[r===c.length-1?0:r+1])&&q.push(r===c.length-1?0:r+1);if(0===q.length)for(r=0;rc.indexOf(H)||Ec.indexOf(H)||E=u?E+1:E)),w+=E=u&&E++,A>=u&&A++,E>A&&(C=A,A=E,E=C),A-E<(c.length+2)/2===(Eq||q===m||(r=q>m?q-m:m-q,n+=qg-r?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.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,ds,ds,"arrangement"),a===ss||a===es||a===rs||a===qs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,ds,ds,"direction"), -a===gs||a===ps||a===ns||a===os)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,ds,ds,"sorting"),a===ls||a===ms||a===js||ks||a===hs)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",ds,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", -ds,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,ds,ds,"nodeDiameterFormula"),a===is||a===ts)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); -var es=new F(ds,"ConstantSpacing",0),rs=new F(ds,"ConstantDistance",1),qs=new F(ds,"ConstantAngle",2),ss=new F(ds,"Packed",3),gs=new F(ds,"Clockwise",4),ps=new F(ds,"Counterclockwise",5),ns=new F(ds,"BidirectionalLeft",6),os=new F(ds,"BidirectionalRight",7),ls=new F(ds,"Forwards",8),ms=new F(ds,"Reverse",9),js=new F(ds,"Ascending",10),ks=new F(ds,"Descending",11),hs=new F(ds,"Optimized",12),is=new F(ds,"Pythagorean",13),ts=new F(ds,"Circular",14);ds.className="CircularLayout";ds.ConstantSpacing=es; -ds.ConstantDistance=rs;ds.ConstantAngle=qs;ds.Packed=ss;ds.Clockwise=gs;ds.Counterclockwise=ps;ds.BidirectionalLeft=ns;ds.BidirectionalRight=os;ds.Forwards=ls;ds.Reverse=ms;ds.Ascending=js;ds.Descending=ks;ds.Optimized=hs;ds.Pythagorean=is;ds.Circular=ts;function fs(){this.cm=-Infinity;this.Gm=this.zk=null} -fs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ -p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Ns(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=a?this.Hl=a:this.Hl=360,this.F())}},arrangement:{configurable:!0,get:function(){return this.Yb},set:function(a){this.Yb!==a&&($a(a,es,es,"arrangement"),a===ts||a===fs||a===ss||a===rs)&&(this.Yb=a,this.F())}},direction:{configurable:!0,get:function(){return this.N},set:function(a){this.N!==a&&($a(a,es,es,"direction"), +a===hs||a===qs||a===os||a===ps)&&(this.N=a,this.F())}},sorting:{configurable:!0,get:function(){return this.td},set:function(a){this.td!==a&&($a(a,es,es,"sorting"),a===ms||a===ns||a===ks||ls||a===is)&&(this.td=a,this.F())}},comparer:{configurable:!0,get:function(){return this.od},set:function(a){this.od!==a&&(B(a,"function",es,"comparer"),this.od=a,this.F())}},spacing:{configurable:!0,get:function(){return this.Ff},set:function(a){this.Ff!==a&&(B(a,"number", +es,"spacing"),this.Ff=a,this.F())}},nodeDiameterFormula:{configurable:!0,get:function(){return this.Zn},set:function(a){this.Zn!==a&&($a(a,es,es,"nodeDiameterFormula"),a===js||a===us)&&(this.Zn=a,this.F())}},actualXRadius:{configurable:!0,get:function(){return this.sc}},actualYRadius:{configurable:!0,get:function(){return this.ue}},actualSpacing:{configurable:!0,get:function(){return this.fj}},actualCenter:{configurable:!0,get:function(){return this.nw}}}); +var fs=new F(es,"ConstantSpacing",0),ss=new F(es,"ConstantDistance",1),rs=new F(es,"ConstantAngle",2),ts=new F(es,"Packed",3),hs=new F(es,"Clockwise",4),qs=new F(es,"Counterclockwise",5),os=new F(es,"BidirectionalLeft",6),ps=new F(es,"BidirectionalRight",7),ms=new F(es,"Forwards",8),ns=new F(es,"Reverse",9),ks=new F(es,"Ascending",10),ls=new F(es,"Descending",11),is=new F(es,"Optimized",12),js=new F(es,"Pythagorean",13),us=new F(es,"Circular",14);es.className="CircularLayout";es.ConstantSpacing=fs; +es.ConstantDistance=ss;es.ConstantAngle=rs;es.Packed=ts;es.Clockwise=hs;es.Counterclockwise=qs;es.BidirectionalLeft=os;es.BidirectionalRight=ps;es.Forwards=ms;es.Reverse=ns;es.Ascending=ks;es.Descending=ls;es.Optimized=is;es.Pythagorean=js;es.Circular=us;function gs(){this.cm=-Infinity;this.Gm=this.zk=null} +gs.prototype.compare=function(a,b){if(0this.cm||Math.abs(a)a&&0h?(e=p.x+p.width/2,f=p.y+ +p.height/2,l[0]=new K(p.x+p.width+d.width,p.y),l[1]=new K(p.x,p.y+p.height+d.height),h=2):(k=Os(l,h,e,f,p.width,p.height,d),n=l[k],q=new K(n.x+p.width+d.width,n.y),p=new K(n.x,n.y+p.height+d.height),k+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().bounds,d=this.network.vertexes.iterator;d.next();){if(d.value.bounds.dd(c)&&(a++,2a.network.vertexes.count)return!1;a.mh=a.network.vertexes.La();a=a.mh;a.sort(function(a,b){return null===a||null===b||a===b?0:b.ae-a.ae});for(b=a.length-1;0<=b&&1>=a[b].ae;)b--;return 1=g))){for(var l=h=0,m=k.count-g;mq&&(q=1);h=L.sqrt((h+q+l*l*4/(g*g))/q);g=(h-1)*m/2;h=(h-1)*n/2;e.bounds=new M(f-p.x-g,k-p.y-h,m+2*g,n+2*h);e.focus=new K(p.x+g,p.y+h)}}a.network=d;return c} -function Ss(a,b,c){G&&(x(b,Ls,Ks,"popNetwork:oldnet"),D(c,Ks,"popNetwork:level"));for(c=a.network.vertexes.iterator;c.next();){var d=c.value;d.network=b;if(null!==d.jf){var e=d.jf.P(d.Hv);d.ae=e.dt;var f=e.gw,g=e.hw;d.bounds=new M(d.centerX-f,d.centerY-g,e.et,e.ct);d.focus=new K(f,g);d.Hv--}}for(c=a.network.edges.iterator;c.next();)c.value.network=b;a.network=b} -function Ts(a,b,c){G&&(x(b,Vs,Ks,"surroundNode:oldnet"),D(c,Ks,"surroundNode:level"));var d=b.Tj;if(null!==d&&0!==d.count){c=b.centerX;var e=b.centerY,f=b.width,g=b.height;null!==b.jf&&0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0=n.ae?k++:(h=!0,l++,g+=Math.atan2(b.centerY-n.centerY,b.centerX-n.centerX))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.centerX=c+m*Math.cos(n);k.centerY=e+m*Math.sin(n);h++}}} -function Ns(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= -0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Ws(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Ys),r=d.random(), +function Os(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yb+f?(c=d+e-g,a=a-b-f,L.sqrt(c*c+a*a)):a+cg+h?a>b+f?(c=d-g-h,a=a-b-f,L.sqrt(c*c+a*a)):a+cb+f?a-(b+f):a+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.centerX,e=d,f=c=c.centerY,g=1;gf-c)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerX-b.centerX}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.centerY-b.centerY});c=a.kg;var l=d=h=0;for(f= +0;fc||l-k>c){if(e)break}else if(m-q>c||q-m>c){if(!e)break}else{var r=Xs(g,p);1>r?(d=a.randomNumberGenerator,null===d&&(a.randomNumberGenerator=d=new Zs),r=d.random(), h=d.random(),k>l?(d=Math.abs(p.bounds.right-g.bounds.x),d=(1+d)*r):kq?(l=Math.abs(p.bounds.bottom-g.bounds.y),l=(1+l)*h):kn?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Ys),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ks.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ks.prototype.moveFixedVertex=function(){};Ks.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; -Ks.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=gd,b.toSpot=gd)}};Ks.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; -Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ks.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ks.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ks.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ks.prototype.electricalFieldX=function(){return 0};Ks.prototype.electricalFieldY=function(){return 0}; -Ks.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ks.prototype.gravitationalFieldX=function(){return 0};Ks.prototype.gravitationalFieldY=function(){return 0};Ks.prototype.isFixed=function(a){return a.isFixed}; -oa.Object.defineProperties(Ks.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ks,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ks,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, -get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ks,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ks,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ks,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, -set:function(a){this.nn!==a&&(B(a,"number",Ks,"epsilonDistance"),0n?(n=a.randomNumberGenerator,null===n&&(a.randomNumberGenerator=n=new Zs),h=n.random(),n=n.random(),d=(d>k?1:-1)*(1+(f.width>c.width?f.width:c.width))*h,l=(g>m?1:-1)*(1+(f.height>c.height?f.height:c.height))*n):(h=h.stiffness*(n-h.length),d=(k-d)/n*h,l=(m-g)/n*h),c.forceX+=d,c.forceY+=l,f.forceX-=d,f.forceY-=l;for(e=d=0;ea.epsilonDistance*a.epsilonDistance}Ls.prototype.moveVertex=function(a){var b=a.forceX,c=a.forceY,d=this.moveLimit;b<-d?b=-d:b>d&&(b=d);c<-d?c=-d:c>d&&(c=d);a.centerX+=b;a.centerY+=c;return b*b+c*c};Ls.prototype.moveFixedVertex=function(){};Ls.prototype.commitLayout=function(){this.Nv();this.commitNodes();this.isRouting&&this.commitLinks()}; +Ls.prototype.Nv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var b=a.value.link;null!==b&&(b.fromSpot=hd,b.toSpot=hd)}};Ls.prototype.commitNodes=function(){var a=0,b=0;if(this.arrangesToOrigin){var c=M.alloc();this.computeBounds(this.network,c);b=this.arrangementOrigin;a=b.x-c.x;b=b.y-c.y;M.free(c)}c=M.alloc();for(var d=this.network.vertexes.iterator;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.bounds),c.x+=a,c.y+=b,e.bounds=c;e.commit()}M.free(c)}; +Ls.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};Ls.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Tk:a};Ls.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Sk:a};Ls.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Qk:a};Ls.prototype.electricalFieldX=function(){return 0};Ls.prototype.electricalFieldY=function(){return 0}; +Ls.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Rk:a};Ls.prototype.gravitationalFieldX=function(){return 0};Ls.prototype.gravitationalFieldY=function(){return 0};Ls.prototype.isFixed=function(a){return a.isFixed}; +oa.Object.defineProperties(Ls.prototype,{currentIteration:{configurable:!0,get:function(){return this.Mn}},arrangementSpacing:{configurable:!0,get:function(){return this.fe},set:function(a){x(a,Gb,Ls,"arrangementSpacing");this.fe.D(a)||(this.fe.assign(a),this.F())}},arrangesToOrigin:{configurable:!0,get:function(){return this.Om},set:function(a){this.Om!==a&&(B(a,"boolean",Ls,"arrangesToOrigin"),this.Om=a,this.F())}},setsPortSpots:{configurable:!0, +get:function(){return this.Ef},set:function(a){this.Ef!==a&&(B(a,"boolean",Ls,"setsPortSpots"),this.Ef=a,this.F())}},comments:{configurable:!0,get:function(){return this.zd},set:function(a){this.zd!==a&&(B(a,"boolean",Ls,"comments"),this.zd=a,this.F())}},maxIterations:{configurable:!0,get:function(){return this.pl},set:function(a){this.pl!==a&&(B(a,"number",Ls,"maxIterations"),0<=a&&(this.pl=a,this.F()))}},epsilonDistance:{configurable:!0,get:function(){return this.nn}, +set:function(a){this.nn!==a&&(B(a,"number",Ls,"epsilonDistance"),0w&&0w&&0a[this.Sd]&&(this.Vq=a[c]-1,this.Sd=c),a[c]u||l===u&&p>r)&&h++;yl||u===l&&r>p)&&h++}}}}}if(0>=c)for(n=d[g].destinationEdgesArrayAccess,k=0;ku||l===u&&q>y)&&h++,rl||u===l&&y>q)&&h++);f[g*e+g]=h;for(h= g+1;h=c)for(n=d[g].destinationEdgesArrayAccess,A=d[h].destinationEdgesArrayAccess,k=0;k=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}kt(a,b,d);return f} -function st(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&st(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&st(a,k,c,d,e,f)}} -function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)tt(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)tt(a,b.value.fromVertex,c,d,e,f)}} -$s.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case ut:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==vt(a);){for(e=wt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=wt(a);for(e=xt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=xt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& -k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case at:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& -yt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&yt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&st(a,h,0,-1,!0,!1)}for(st(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; -e=p.length;for(var q=0;q=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.sourceEdgesArrayAccess);var l=null;0<=c&&(l=h.destinationEdgesArrayAccess);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);h=void 0;if(null!==k)for(p=0;p>1,f[g]=0!==(m&1)?n[l]:n[l-1]+n[l]>>1)}lt(a,b,d);return f} +function tt(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();){var h=g.value;var k=h.toVertex;var l=b.layer-k.layer;h=a.linkMinLength(h);l===h&&tt(a,k,c,d,e,f)}if(f)for(g=b.sourceEdges;g.next();)h=g.value,k=h.fromVertex,l=k.layer-b.layer,h=a.linkMinLength(h),l===h&&tt(a,k,c,d,e,f)}} +function ut(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.destinationEdges;g.next();)ut(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.sourceEdges;b.next();)ut(a,b.value.fromVertex,c,d,e,f)}} +at.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Pk){default:case vt:a=this.network;var b=0,c=a.vertexes.count-1,d=[];d.length=c+1;for(var e=a.vertexes.iterator;e.next();)e.value.valid=!0;for(;null!==wt(a);){for(e=xt(a);null!==e;)d[c]=e,c--,e.valid=!1,e=xt(a);for(e=yt(a);null!==e;)d[b]=e,b++,e.valid=!1,e=yt(a);e=null;for(var f=0,g=this.network.vertexes.iterator;g.next();){var h=g.value;if(h.valid){for(var k=0,l=h.destinationEdges;l.next();)l.value.toVertex.valid&& +k++;l=0;for(var m=h.sourceEdges;m.next();)m.value.fromVertex.valid&&l++;if(null===e||fb.toVertex.index&&(a.um(b),b.rev=!0);break;case bt:for(d=this.network.vertexes.iterator;d.next();)a=d.value,a.Zl=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;this.Wn=0;for(d.reset();d.next();)b=d.value,0===b.sourceEdges.count&& +zt(this,b);for(d.reset();d.next();)b=d.value,-1===b.Zl&&zt(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Zld){if(0>d)for(b.reset();b.next();)b.value.layer-=d;d=[];for(b.reset();b.next();)c=b.value,e=d[c.layer],void 0===e?d[c.layer]=[c]:e.push(c);for(c=b=0;cg&&tt(a,h,0,-1,!0,!1)}for(tt(a,b,1,-1,!0,!0);0!==b.component;){f=0;d=Infinity;h=0;k=null;for(g=a.network.vertexes.iterator;g.next();){var l=g.value;if(1===l.component){var m=0,n=!1,p=l.sourceEdgesArrayAccess; +e=p.length;for(var q=0;qf)&&!m&&(h=g,f=l)}if(0>d){for(c.reset();c.next();)d=c.value,1===d.component&&(d.layer-=e);b.component=0}else h.component=0}}} -function ht(a,b,c){return 90===a.N?c&&!b.rev||!c&&b.rev?270:90:180===a.N?c&&!b.rev||!c&&b.rev?0:180:270===a.N?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}function it(a,b,c){for(var d=c[c.length-1].sourceEdges.iterator;d.next();){var e=d.value;if(!e.rev&&e.valid){e=e.fromVertex;c.push(e);if(e===b||it(a,b,c))return!0;c.pop()}}return!1} -$s.prototype.initializeIndices=function(){switch(this.bl){default:case Ft:Gt(this);break;case ct:var a=null,b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();){var c=b.value;if(c.near&&(null===a&&(a=new vb),c.layer===c.near.layer)){var d=a.get(c.near)||[];d.push(c);a.set(c.near,d)}}for(c=this.Oa;0<=c;c--)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Ht(this,d,a);break;case It:a=null;b=this.network.vertexes.iterator;if(this._experimental)for(;b.next();)c=b.value,c.near&& -(null===a&&(a=new vb),c.layer===c.near.layer&&(d=a.get(c.near)||[],d.push(c),a.set(c.near,d)));for(c=0;c<=this.Oa;c++)for(b.reset();b.next();)d=b.value,d.layer===c&&-1===d.index&&Jt(this,d,a)}}; -function Gt(a){var b=null,c=a.network.vertexes.iterator;if(a._experimental){for(;c.next();){var d=c.value;if(d.near&&(null===b&&(b=new vb),d.layer===d.near.layer)){var e=b.get(d.near)||[];e.push(d);b.set(d.near,e)}}c.reset()}for(d={};c.next();)e=c.value,b&&e.near||(d.layer=e.layer,e.index=a.Ab[d.layer],a.Ab[d.layer]++,b&&(e=b.get(e),Array.isArray(e)&&e.forEach(function(b){return function(c){c.index=a.Ab[b.layer];a.Ab[b.layer]++}}(d)))),d={layer:d.layer}} -function Ht(a,b,c){if(!c||!b.near){var d=b.layer;b.index=a.Ab[d];a.Ab[d]++;if(c){var e=c.get(b);Array.isArray(e)&&e.forEach(function(b){b.index=a.Ab[d];a.Ab[d]++})}b=b.destinationEdgesArrayAccess;for(e=!0;e;){e=!1;for(var f=0;fh.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= -Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}break;default:case dt:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Lt(this,d,-1)||f;e=this.countCrossings();e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,1)||f;e=this.countCrossings();e>=a?nt(this,b): -(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,-1)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Lt(this,d,0)||f;e>=a?nt(this,b):(a=e,b=mt(this))}}nt(this,b)}; -function Kt(a,b,c){G&&(D(b,$s,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,$s,"medianBarycenterCrossingReduction:direction"));var d=jt(a,b),e=a.Ab[b],f=rt(a,b,c),g=qt(a,b,c);for(c=0;ch.portFromColOffset&&(e=!0,b[f]=h,b[f+1]=g)}}for(e=0;eh.portToColOffset&&(f=!0,b[e]=h,b[e+1]=g)}for(e=0;e=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f= +Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}break;default:case et:for(c=this.Oa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Mt(this,d,-1)||f;e=this.countCrossings();e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,1)||f;e=this.countCrossings();e>=a?ot(this,b): +(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,-1)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Mt(this,d,0)||f;e>=a?ot(this,b):(a=e,b=nt(this))}}ot(this,b)}; +function Lt(a,b,c){G&&(D(b,at,"medianBarycenterCrossingReduction:unfixedLayer"),D(c,at,"medianBarycenterCrossingReduction:direction"));var d=kt(a,b),e=a.Ab[b],f=st(a,b,c),g=rt(a,b,c);for(c=0;cf+1&&(p+=4*(z-f),q+=4*(z-(f+1)))}C=d[f].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;zf+1&&(p+=4*(z-(f+1)),q+= 4*(z-f))}C=d[f+1].destinationEdges.iterator;for(C.reset();C.next();)if(z=C.value,A=z.toVertex,z.valid&&A.layer===b){for(z=0;z>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= -0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=lt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=lt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ -C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}kt(a,b, -d);a.normalize()}function Ut(a,b){G&&(D(b,$s,"packAux:column"),D(1,$s,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} -function Vt(a,b){G&&(D(b,$s,"tightPackAux:column"),D(1,$s,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} -function Rt(a,b){G&&D(b,$s,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Ut(a,c););a.normalize();for(c=0;cf?nt(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=mt(a),f=pt(a),d=f+1;ff?nt(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(tt(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;f>1)+8*d;this.Wa*=8}if(0!==(this.ng&2))for(c=!0,d=0;c&&dc)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?q=m-1:q=m;n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m;var r=p=0,u= +0;if(0>=c)for(var y=e[d].sourceEdges.iterator;y.next();){var w=y.value;var z=w.fromVertex;if(w.valid&&z.layer!==b){var A=mt(w);var C=w.portFromColOffset;w=w.portToColOffset;z=z.column;p+=(Math.abs(m+w-(z+C))+1)*A;r+=(Math.abs(q+w-(z+C))+1)*A;u+=(Math.abs(n+w-(z+C))+1)*A}}if(0<=c)for(y=e[d].destinationEdges.iterator;y.next();)w=y.value,z=w.toVertex,w.valid&&z.layer!==b&&(A=mt(w),C=w.portFromColOffset,w=w.portToColOffset,z=z.column,p+=(Math.abs(m+C-(z+w))+1)*A,r+=(Math.abs(q+C-(z+w))+1)*A,u+=(Math.abs(n+ +C-(z+w))+1)*A);w=C=A=0;y=g[e[d].index];z=h[e[d].index];-1!==y&&(A+=Math.abs(y-m),C+=Math.abs(y-q),w+=Math.abs(y-n));-1!==z&&(A+=Math.abs(z-m),C+=Math.abs(z-q),w+=Math.abs(z-n));if(r=g[c]?m=k:l<=g[c]&&(m=l));m!==h&&(f=!0,d[c].column=m)}lt(a,b, +d);a.normalize()}function Vt(a,b){G&&(D(b,at,"packAux:column"),D(1,at,"packAux:direction"));for(var c=!0,d=a.network.vertexes.iterator;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}a=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(--c.column,a=!0);return a} +function Wt(a,b){G&&(D(b,at,"tightPackAux:column"),D(1,at,"tightPackAux:direction"));var c=b+1;var d,e=[],f=[];for(d=0;d<=a.Oa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.iterator;g.next();){d=g.value;var h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Oa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)a=g.value,a.column>b&&(--a.column,c=!0);return c} +function St(a,b){G&&D(b,at,"componentPack:direction");for(var c=0;c<=a.Wa;c++)for(;Vt(a,c););a.normalize();for(c=0;cf?ot(a,e):gb)for(c=a.Wa;0<=c;c--)for(e=nt(a),f=qt(a),d=f+1;ff?ot(a,e):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.re);a.re++;for(d.reset();d.next();)b=d.value,-1===b.component&&(ut(a,b,a.re,-1,!0,!0),a.re++);var f;b=[];for(f=0;fc)for(g=a.Wa;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -function St(a){for(var b=Na(),c=a.rl.length,d=0;d<=c;d++)b[d]=[];for(d=a.network.vertexes.iterator;d.next();){var e=d.value;b[c-e.layer][e.index]=e}c=new J;Xt(b,c);var f=null,g=null,h=null,k=null,l=0!==(a.Ee&1),m=0!==(a.Ee&2),n=0!==(a.Ee&4),p=0!==(a.Ee&8);l&&(a.verticalAlignment(b,c,!0),f=Yt(a,b,!0,!1));b.reverse();n&&(a.verticalAlignment(b,c,!1),h=Yt(a,b,!1,!1));d=ca(b);for(e=d.next();!e.done;e=d.next())e.value.reverse();p&&(a.verticalAlignment(b,c,!1),k=Yt(a,b,!1,!0));b.reverse();m&&(a.verticalAlignment(b, -c,!0),g=Yt(a,b,!0,!0));Pa(b);a.v(f,g,h,k);a.network.vertexes.each(function(a){var b=Na();l&&b.push(f.get(a));m&&b.push(g.get(a));n&&b.push(h.get(a));p&&b.push(k.get(a));b.sort(function(a,b){return a-b});var c=b.length;c=(b[Math.floor((c-1)/2)]+b[Math.ceil((c-1)/2)])/2;Pa(b);a.Fc=c})} -function Xt(a,b){for(var c=a.length,d=1;dm)&&b.add(n);f++}e= -m}}}$s.prototype.verticalAlignment=function(a,b,c){$t(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?Zt(f):au(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} -$s.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=eu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; -function eu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}$s.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=gt(this,!0),b=gt(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; -function gt(a,b){return 270===a.N?b?ld:od:90===a.N?b?od:ld:180===a.N?b?md:nd:b?nd:md} -$s.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0m)&&b.add(n);f++}e= +m}}}at.prototype.verticalAlignment=function(a,b,c){au(a);a=ca(a);for(var d=a.next();!d.done;d=a.next()){var e=-1;d=ca(d.value);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c?$t(f):bu(f),h=g.length;if(0=b[c].length)&&(g=b[c][0],g.yd===g)){Infinity===g.yd.shift&&(g.yd.shift=0);g=c;h=0;do{for(f=b[g][h];f.align!==f.root;)f=f.align,g++,0a&&v("Could not determine previous vertex in layer");return b[c][a-1]} +at.prototype.v=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=fu(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Pa(d);Pa(e)}; +function fu(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.N||270===a.N?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}at.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=ht(this,!0),b=ht(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Uu();this.isRouting&&this.commitLinks()}; +function ht(a,b){return 270===a.N?b?md:pd:90===a.N?b?pd:md:180===a.N?b?nd:od:b?od:nd} +at.prototype.commitNodes=function(){this.ne=[];this.Rd=[];this.Qd=[];this.Ya=[];for(var a=0;a<=this.Oa;a++)this.ne[a]=0,this.Rd[a]=0,this.Qd[a]=0,this.Ya[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.ne[c]=Math.max(this.ne[c],this.nodeMinLayerSpace(b,!0));this.Rd[c]=Math.max(this.Rd[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.oe;for(var d=0;d<=this.Oa;d++){var e=c;0>=this.ne[d]+this.Rd[d]&&(e=0);0=n.bounds.bottom?(n=n.bounds.y+ n.bounds.height,b.m(u++,C,n+H),b.m(u++,C,n),b.m(u++,C,n-A)):(b.m(u++,C,E+H),b.m(u++,C,E),b.m(u++,C,E-A)):270===this.N?E<=n.bounds.y?(n=n.bounds.y,b.m(u++,C,n-A),b.m(u++,C,n),b.m(u++,C,n+H)):(b.m(u++,C,E-A),b.m(u++,C,E),b.m(u++,C,E+H)):0===this.N&&(C>=n.bounds.right?(n=n.bounds.x+n.bounds.width,b.m(u++,n+H,E),b.m(u++,n,E),b.m(u++,n-A,E)):(b.m(u++,C+H,E),b.m(u++,C,E),b.m(u++,C-A,E)));else{b.m(u++,w,z);var T=0;if(180===this.N||0===this.N){if(180===this.N?C>=n.bounds.right:C<=n.bounds.x)T=(0===this.N? -A:H)/2;b.m(u++,w+T,E)}else{if(270===this.N?E>=n.bounds.bottom:E<=n.bounds.y)T=(90===this.N?-A:H)/2;b.m(u++,C,z+T)}b.m(u++,C,E)}}else A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):90===this.N?(b.m(u++,C,E+H+r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):270===this.N?(b.m(u++,C,E-A- -r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):b.m(u++,C,E)}n=y}if(null===h||l!==zc||q)if(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,q)r=this.Rd[m.layer],180===this.N||0===this.N?(q=z,q>=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.y&&q<=m.bounds.bottom&&(180===this.N?C>=m.bounds.x:C<=m.bounds.right)&&(n=m.centerX+(180===this.N?-r:r),q=m.bounds.x&&q<=m.bounds.right&&(270===this.N?E>=m.bounds.y:E<=m.bounds.bottom)&&(n=m.centerY+(270===this.N?-r:r),q=m.bounds.x?(n=m.bounds.x+m.bounds.width,b.O(u- 2,n,z),b.O(u-1,n+H,z)):90===this.N&&E<=m.bounds.bottom?(n=m.bounds.y,b.O(u-2,w,n),b.O(u-1,w,n-A)):270===this.N&&E>=m.bounds.y?(n=m.bounds.y+m.bounds.height,b.O(u-2,w,n),b.O(u-1,w,n+H)):0===this.N&&C<=m.bounds.right&&(n=m.bounds.x,b.O(u-2,n,z),b.O(u-1,n-A,z));else{A=Math.max(10,this.ne[m.layer]);H=Math.max(10,this.Rd[m.layer]);q=0;if(180===this.N||0===this.N){if(180===this.N?C<=m.bounds.x:C>=m.bounds.right)q=(0===this.N?H:-A)/2;b.m(u++,C+q,z)}else{if(270===this.N?E<=m.bounds.y:E>=m.bounds.bottom)q= (90===this.N?H:-A)/2;b.m(u++,w,E+q)}b.m(u++,C,E)}}else{for(;null!==m&&m!==n;){A=y=null;for(m=m.destinationEdges.iterator;m.next()&&(w=m.value,w.link!==c.link||(y=w.toVertex,A=w.fromVertex,null!==A.node&&(A=null),null!==y.node)););if(null===y)break;y!==n&&(w=b.i(u-1).x,z=b.i(u-1).y,C=y.centerX,E=y.centerY,q?180===this.N||0===this.N?(null!==A?A.centerY:z)!==E&&(A=this.Ya[y.layer]+this.cg.x,u===b.firstPickIndex+1&&(A=0===this.N?Math.max(A,w):Math.min(A,w)),b.m(u++,A,z),b.m(u++,A,E)):(null!==A?A.centerX: w)!==C&&(A=this.Ya[y.layer]+this.cg.y,u===b.firstPickIndex+1&&(A=90===this.N?Math.max(A,z):Math.min(A,z)),b.m(u++,w,A),b.m(u++,C,A)):(A=Math.max(10,this.ne[y.layer]),H=Math.max(10,this.Rd[y.layer]),p?180===this.N?(b.m(u++,C+H+r,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C-A-r,E)):90===this.N?(b.m(u++,C,E-A-r),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E+H+r)):270===this.N?(b.m(u++,C,E+H+ r),b.m(u++,C,Math.max(E+H-r/2,E)),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,C,Math.min(E-A+r/2,E)),b.m(u++,C,E-A-r)):(b.m(u++,C-A-r,E),b.m(u++,Math.min(C-A+r/2,C),E),b.m(u++,C,E),b.m(u++,C,E),b.m(u++,Math.max(C+H-r/2,C),E),b.m(u++,C+H+r,E)):180===this.N?(b.m(u++,C+H,E),b.m(u++,C-A,E)):90===this.N?(b.m(u++,C,E-A),b.m(u++,C,E+H)):270===this.N?(b.m(u++,C,E+H),b.m(u++,C,E-A)):(b.m(u++,C-A,E),b.m(u++,C+H,E))));m=y}q&&(w=b.i(u-1).x,z=b.i(u-1).y,C=b.i(u).x,E=b.i(u).y,180===this.N||0===this.N?z!==E&&(A=0===this.N? -Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===zc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===zc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), -b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===zc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===zc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), +Math.min(Math.max((C+w)/2,this.Ya[n.layer]+this.cg.x),C):Math.max(Math.min((C+w)/2,this.Ya[n.layer]+this.cg.x),C),b.m(u++,A,z),b.m(u++,A,E)):w!==C&&(A=90===this.N?Math.min(Math.max((E+z)/2,this.Ya[n.layer]+this.cg.y),E):Math.max(Math.min((E+z)/2,this.Ya[n.layer]+this.cg.y),E),b.m(u++,w,A),b.m(u++,C,A)))}null!==d&&p&&4<=b.pointsCount&&(null!==g&&(g=l===xc?b.getLinkPointFromPoint(e,g,g.la(Ic),b.i(3),!0):b.i(0),l===xc&&(l=b.i(2),d=b.i(3),90===this.direction||270===this.direction?(b.O(1,(g.x+l.x)/2,l.y), +b.O(2,d.x,(l.y+d.y)/2)):(b.O(1,l.x,(g.y+l.y)/2),b.O(2,(l.x+d.x)/2,d.y))),g.u()||g.set(e.actualBounds.center),b.O(0,g.x,g.y)),null!==h&&(e=k===xc?b.getLinkPointFromPoint(f,h,h.la(Ic),b.i(b.pointsCount-4),!1):b.i(b.pointsCount-1),k===xc&&(h=b.i(b.pointsCount-3),k=b.i(b.pointsCount-4),90===this.direction||270===this.direction?(b.O(b.pointsCount-2,(e.x+h.x)/2,h.y),b.O(b.pointsCount-2,k.x,(h.y+k.y)/2)):(b.O(b.pointsCount-2,h.x,(e.y+h.y)/2),b.O(b.pointsCount-3,(h.x+k.x)/2,k.y))),e.u()||e.set(f.actualBounds.center), b.O(b.pointsCount-1,e.x,e.y)));b.Lf();c.commit()}}}this.avoidOrthogonalOverlaps()}; -$s.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new I,b=this.network.edges.iterator;b.next();){var c=b.value.link;null!==c&&c.isOrthogonal&&!a.contains(c)&&a.add(c)}if(0=this.linkSpacing)){for(var a=new I,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.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; -t.Ws=function(a,b){return a instanceof fu&&b instanceof fu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,$s,"isApprox:a"),D(b,$s,"isApprox:b"));a-=b;return-1a}; +f.x+r,f.y),q.O(p.index+1,g.x+r,g.y),q.Lf()}f=e}a=d}}}};t=at.prototype;t.oy=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.layerb.layer?1:a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.ny=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.firstb.first||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0}; +t.Ws=function(a,b){return a instanceof gu&&b instanceof gu&&a!==b?a.qcb.qc||a.jb.j||a.xdb.xd?1:a.Pcb.Pc?1:0:0};t.C=function(a,b){G&&(D(a,at,"isApprox:a"),D(b,at,"isApprox:b"));a-=b;return-1a}; t.Mi=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.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",$s,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== -a&&(B(a,"boolean",$s,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",$s,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, -maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var at=new F($s,"CycleDepthFirst",0),ut=new F($s,"CycleGreedy",1),ft=new F($s,"CycleFromLayers",2),bt=new F($s,"LayerOptimalLinkLength",0),zt=new F($s,"LayerLongestPathSink",1),Bt=new F($s,"LayerLongestPathSource",2),ct=new F($s,"InitDepthFirstOut",0),It=new F($s,"InitDepthFirstIn",1),Ft=new F($s,"InitNaive",2),Mt=new F($s,"AggressiveNone",0),dt=new F($s,"AggressiveLess",1),Nt=new F($s,"AggressiveMore",2),Ot=8; -$s.className="LayeredDigraphLayout";$s.CycleDepthFirst=at;$s.CycleGreedy=ut;$s.CycleFromLayers=ft;$s.LayerOptimalLinkLength=bt;$s.LayerLongestPathSink=zt;$s.LayerLongestPathSource=Bt;$s.InitDepthFirstOut=ct;$s.InitDepthFirstIn=It;$s.InitNaive=Ft;$s.AggressiveNone=Mt;$s.AggressiveLess=dt;$s.AggressiveMore=Nt;$s.PackNone=0;$s.PackExpand=1;$s.PackStraighten=2;$s.PackMedian=4;$s.PackAll=15;$s.AlignNone=0;$s.AlignUpperLeft=1;$s.AlignUpperRight=2;$s.AlignLowerLeft=4;$s.AlignLowerRight=8;$s.AlignAll=15; -function fu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}fu.className="SegInfo";function et(a){Mq.call(this,a)}na(et,Mq);et.prototype.createVertex=function(){return new gu(this)};et.prototype.createEdge=function(){return new hu(this)};et.className="LayeredDigraphNetwork";function gu(a){Pq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} -na(gu,Pq);function iu(a,b){return a.index-b.index}function bu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} -function Zt(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(iu);a.qo=b}return a.qo}function au(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(iu);a.oo=b}return a.oo}gu.prototype.Pl=function(a){Pq.prototype.Pl.call(this,a);this.po=this.qo=null}; -gu.prototype.Yl=function(a){Pq.prototype.Yl.call(this,a);this.po=this.qo=null};gu.prototype.Ml=function(a){Pq.prototype.Ml.call(this,a);this.no=this.oo=null};gu.prototype.Xl=function(a){Pq.prototype.Xl.call(this,a);this.no=this.oo=null}; -oa.Object.defineProperties(gu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",gu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",gu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",gu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, -set:function(a){this.v!==a&&(B(a,"number",gu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,gu,gu,"near"),this.G=a)}}});gu.prototype.deleteDestinationEdge=gu.prototype.Xl;gu.prototype.addDestinationEdge=gu.prototype.Ml;gu.prototype.deleteSourceEdge=gu.prototype.Yl;gu.prototype.addSourceEdge=gu.prototype.Pl;gu.className="LayeredDigraphVertex"; -function hu(a){Qq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(hu,Qq); -oa.Object.defineProperties(hu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,gu,hu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,gu,hu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",hu,"valid"),this.Na=a)}},rev:{configurable:!0, -enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",hu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",hu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",hu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", -hu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",hu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",hu,"portToColOffset"),this.G=a)}}});hu.className="LayeredDigraphEdge"; -function Z(a){Gi.call(this);this.ac=new J;this.jo=ju;this.Ad=ku;this.Ho=lu;this.Oq=mu;this.ow=[];this.zd=!0;this.Yb=nu;this.fe=(new Gb(10,10)).freeze();var b=new ou(this);this.$=new pu(b);this.aa=new pu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; -Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new ou(this)}; -Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Df?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; -Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==qu&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ju&&null!==b?this.Ad=b.isTreePathToChildren?ku:ru:this.Ad=this.path===ju?ku:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} -Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,pu,Z,"removeChild:p");G&&x(b,pu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Yu(this,a,g,ha,w,z):Zu(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Mu:for(C=0;Cn&&(aawb&&(dv(a,-wb,0,la,ya-1),ev(C,-wb,0),ev(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(dv(a,0,-wb,la,ya-1),ev(C,0,-wb),ev(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Pu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=jv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=hv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=jv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=iv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< -R)e=$u(this,4),R=$u(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=$u(this,C.length+2);R=$u(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ +function kt(a,b){var c=a.Ab[b];if(c>=a.Se.length){var d=[];for(var e=0;ea&&(this.ng=a,this.F()))}},packIterations:{configurable:!0,get:function(){return this.xl},set:function(a){this.xl=a}},alignOption:{configurable:!0,get:function(){return this.Ee},set:function(a){this.Ee!==a&&(B(a,"number",at,"align"),0<=a&&16>a&&(this.Ee=a,this.F()))}},setsPortSpots:{configurable:!0,get:function(){return this.Ef},set:function(a){this.Ef!== +a&&(B(a,"boolean",at,"setsPortSpots"),this.Ef=a,this.F())}},linkSpacing:{configurable:!0,get:function(){return this.On},set:function(a){this.On!==a&&(B(a,"number",at,"linkSpacing"),0<=a&&(this.On=a,this.F()))}},maxLayer:{configurable:!0,get:function(){return this.Oa}},maxIndex:{configurable:!0,get:function(){return this.Vq}},maxColumn:{configurable:!0,get:function(){return this.Wa}},minIndexLayer:{configurable:!0,get:function(){return this.Tn}}, +maxIndexLayer:{configurable:!0,get:function(){return this.Sd}}});var bt=new F(at,"CycleDepthFirst",0),vt=new F(at,"CycleGreedy",1),gt=new F(at,"CycleFromLayers",2),ct=new F(at,"LayerOptimalLinkLength",0),At=new F(at,"LayerLongestPathSink",1),Ct=new F(at,"LayerLongestPathSource",2),dt=new F(at,"InitDepthFirstOut",0),Jt=new F(at,"InitDepthFirstIn",1),Gt=new F(at,"InitNaive",2),Nt=new F(at,"AggressiveNone",0),et=new F(at,"AggressiveLess",1),Ot=new F(at,"AggressiveMore",2),Pt=8; +at.className="LayeredDigraphLayout";at.CycleDepthFirst=bt;at.CycleGreedy=vt;at.CycleFromLayers=gt;at.LayerOptimalLinkLength=ct;at.LayerLongestPathSink=At;at.LayerLongestPathSource=Ct;at.InitDepthFirstOut=dt;at.InitDepthFirstIn=Jt;at.InitNaive=Gt;at.AggressiveNone=Nt;at.AggressiveLess=et;at.AggressiveMore=Ot;at.PackNone=0;at.PackExpand=1;at.PackStraighten=2;at.PackMedian=4;at.PackAll=15;at.AlignNone=0;at.AlignUpperLeft=1;at.AlignUpperRight=2;at.AlignLowerLeft=4;at.AlignLowerRight=8;at.AlignAll=15; +function gu(){this.index=this.Pc=this.xd=this.qc=this.first=this.layer=0;this.link=null;this.j=0}gu.className="SegInfo";function ft(a){Nq.call(this,a)}na(ft,Nq);ft.prototype.createVertex=function(){return new hu(this)};ft.prototype.createEdge=function(){return new iu(this)};ft.className="LayeredDigraphNetwork";function hu(a){Qq.call(this,a);this.no=this.po=this.oo=this.qo=null;this.fb=this.Mg=this.Ug=-1;this.v=NaN;this.G=null;this.valid=!1;this.finish=this.Zl=NaN;this.Qu=0;this.sv=this.tv=null} +na(hu,Qq);function ju(a,b){return a.index-b.index}function cu(a,b){if(!a.no){for(var c=[],d=ca(a.destinationEdgesArrayAccess),e=d.next();!e.done;e=d.next())e=e.value,e.valid&&c.push(e);a.no=c}a=ca(a.no);for(c=a.next();!c.done;c=a.next())if(c=c.value,c.toVertex===b)return c;v("Unable to find destination edge to given vertex")} +function $t(a){if(!a.qo){for(var b=[],c=ca(a.sourceEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.fromVertex);b.sort(ju);a.qo=b}return a.qo}function bu(a){if(!a.oo){for(var b=[],c=ca(a.destinationEdgesArrayAccess),d=c.next();!d.done;d=c.next())d=d.value,!d.valid||d.fromVertex.layer<=d.toVertex.layer||b.push(d.toVertex);b.sort(ju);a.oo=b}return a.oo}hu.prototype.Pl=function(a){Qq.prototype.Pl.call(this,a);this.po=this.qo=null}; +hu.prototype.Yl=function(a){Qq.prototype.Yl.call(this,a);this.po=this.qo=null};hu.prototype.Ml=function(a){Qq.prototype.Ml.call(this,a);this.no=this.oo=null};hu.prototype.Xl=function(a){Qq.prototype.Xl.call(this,a);this.no=this.oo=null}; +oa.Object.defineProperties(hu.prototype,{layer:{configurable:!0,get:function(){return this.Ug},set:function(a){this.Ug!==a&&(B(a,"number",hu,"layer"),this.Ug=a)}},column:{configurable:!0,get:function(){return this.Mg},set:function(a){this.Mg!==a&&(B(a,"number",hu,"column"),this.Mg=a)}},index:{configurable:!0,get:function(){return this.fb},set:function(a){this.fb!==a&&(B(a,"number",hu,"index"),this.fb=a)}},component:{configurable:!0,get:function(){return this.v}, +set:function(a){this.v!==a&&(B(a,"number",hu,"component"),this.v=a)}},near:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(G&&null!==a&&x(a,hu,hu,"near"),this.G=a)}}});hu.prototype.deleteDestinationEdge=hu.prototype.Xl;hu.prototype.addDestinationEdge=hu.prototype.Ml;hu.prototype.deleteSourceEdge=hu.prototype.Yl;hu.prototype.addSourceEdge=hu.prototype.Pl;hu.className="LayeredDigraphVertex"; +function iu(a){Rq.call(this,a);this.j=this.oa=this.Na=!1;this.Z=this.v=NaN;this.G=this.o=0}na(iu,Rq); +oa.Object.defineProperties(iu.prototype,{fromVertex:{configurable:!0,get:function(){return this.qd},set:function(a){this.qd!==a&&(G&&null!==a&&x(a,hu,iu,"fromVertex"),this.qd=a)}},toVertex:{configurable:!0,get:function(){return this.wd},set:function(a){this.wd!==a&&(G&&null!==a&&x(a,hu,iu,"toVertex"),this.wd=a)}},valid:{configurable:!0,get:function(){return this.Na},set:function(a){this.Na!==a&&(B(a,"boolean",iu,"valid"),this.Na=a)}},rev:{configurable:!0, +enumerable:!0,get:function(){return this.oa},set:function(a){this.oa!==a&&(B(a,"boolean",iu,"rev"),this.oa=a)}},forest:{configurable:!0,get:function(){return this.j},set:function(a){this.j!==a&&(B(a,"boolean",iu,"forest"),this.j=a)}},portFromPos:{configurable:!0,get:function(){return this.v},set:function(a){this.v!==a&&(B(a,"number",iu,"portFromPos"),this.v=a)}},portToPos:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"number", +iu,"portToPos"),this.Z=a)}},portFromColOffset:{configurable:!0,get:function(){return this.o},set:function(a){this.o!==a&&(B(a,"number",iu,"portFromColOffset"),this.o=a)}},portToColOffset:{configurable:!0,get:function(){return this.G},set:function(a){this.G!==a&&(B(a,"number",iu,"portToColOffset"),this.G=a)}}});iu.className="LayeredDigraphEdge"; +function Z(a){Gi.call(this);this.ac=new J;this.jo=ku;this.Ad=lu;this.Ho=mu;this.Oq=nu;this.ow=[];this.zd=!0;this.Yb=ou;this.fe=(new Gb(10,10)).freeze();var b=new pu(this);this.$=new qu(b);this.aa=new qu(b);this.Eu=[];a&&Object.assign(this,a)}na(Z,Gi);Z.prototype.cloneProtected=function(a){Gi.prototype.cloneProtected.call(this,a);a.jo=this.jo;a.Ho=this.Ho;a.Oq=this.Oq;a.zd=this.zd;a.Yb=this.Yb;a.fe.assign(this.fe);a.$.copyInheritedPropertiesFrom(this.$);a.aa.copyInheritedPropertiesFrom(this.aa)}; +Z.prototype.wb=function(a){a.classType===Z?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:v("Unknown enum value: "+a):Gi.prototype.wb.call(this,a)};Z.prototype.createNetwork=function(){return new pu(this)}; +Z.prototype.makeNetwork=function(a){function b(a){if(a instanceof V)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 Q?(c.xg(a.nodes,!0,b),c.xg(a.links,!0,b)):a instanceof Cf?c.xg(a.memberParts,!1,b):c.xg(a.iterator,!1,b);return c}; +Z.prototype.doLayout=function(a){G&&null===a&&v("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));this.arrangement!==ru&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var b=this.diagram;null===b&&a instanceof Q&&(b=a);this.path===ku&&null!==b?this.Ad=b.isTreePathToChildren?lu:su:this.Ad=this.path===ku?lu:this.path;if(0b.level)return!1;a.removeChild(c.parent,c)}return!0} +Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){G&&x(a,qu,Z,"removeChild:p");G&&x(b,qu,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ee?Zu(this,a,g,ha,w,z):$u(this,a,g,ha,w,z);ha=z.x;w=z.width;z=z.height;break;case Nu:for(C=0;Cn&&(aawb&&(ev(a,-wb,0,la,ya-1),fv(C,-wb,0),fv(E,-wb,0),wb=0)}La.W.h(wb,Y);w=Math.max(w,H);z=Math.max(z,A+(0===R?0:r)+sb.height);aa=H}else{0n&&(Ywb&&(ev(a,0,-wb,la,ya-1),fv(C,0,-wb),fv(E,0,-wb),wb=0);La.W.h(aa,wb);z=Math.max(z,T);w=Math.max(w,A+(0===R?0:r)+sb.width);Y=T}O++}0l&&(l=0),135u&&(u=0),k===Qu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>w&&(w=kv(k,d-w,0),g=w.x,h=w.y,w=d,l=0):w=iv(a,w,l),0>l&&(g-=l,l=0),135z&&(z=kv(k,0,y-z),g=z.x,h=z.y,z=y,u=0):z=jv(a,z,u),0>u&&(h-=u,u=0),g+=d+c);if(0< +R)e=av(this,4),R=av(this,4),b?(e[2].h(0,y+c),e[3].h(e[2].x,z),R[2].h(w,e[2].y),R[3].h(R[2].x,e[3].y)):(e[2].h(d+c,0),e[3].h(w,e[2].y),R[2].h(e[2].x,z),R[3].h(e[3].x,R[2].y));else{e=av(this,C.length+2);R=av(this,E.length+2);for(k=0;ke[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])),R[0].h(l+ d,0),R[1].h(R[0].x,y),R[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])),R[0].h(0,u+y),R[1].h(d,R[0].y),R[2].xd?Yu(a,b,e,O,A,C):Zu(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Mu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Yu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Vu(b),m=0,n=0,p=0,q=0;qd?Zu(a,b,e,O,A,C):$u(a,b,e,O,A,C);O=C.x;A=C.width;C=C.height;break;case Nu:for(p=0;pp&&(Hp&&(Tn&&(n=0),135w&&(w=0));b.ra.h(n,w);b.Ja.h(A,C)}}Z.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Zu(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenPosDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return b=c[0],e=b.Ja.width,f=b.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Wu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=lv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=lv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} -function Zu(a,b,c,d,e,f){G&&x(b,pu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Vu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.W.x&&(d=mv(b,c.W.x,!1,d,h))):(c.W.h(e+a,d+h/2-c.focus.y-c.ra.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.ra.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.W.y&&(d=mv(b,c.W.y,!0,d,h))));return new M(d,0,e,f)} +function $u(a,b,c,d,e,f){G&&x(b,qu,Z,"layoutBusChildrenNegDir:v");var g=c.length;if(0===g)return new M(d,0,e,f);if(1===g)return c=c[0],e=c.Ja.width,f=c.Ja.height,new M(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Wu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=lv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=lv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Wu:return a.width>b?a.width:b;case Xu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Lu:case Bu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Mu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Pu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function iv(a,b,c){G&&x(a,pu,Z,"calculateSubheight:v");switch(a.alignment){case gv:case fv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Wu:return a.height>b?a.height:b;case Xu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Lu:case Bu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Mu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Pu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function jv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case fv:b/=2;c/=2;break;case gv:b/=2;c/=2;break;case Wu:c=b=0;break;case Xu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function av(a,b,c,d,e,f){G&&x(a,pu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=jv(b,c,d);dv(a,b.x,b.y,e,f)}function dv(a,b,c,d,e){G&&x(a,pu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} -function bv(a,b,c,d){G&&(x(b,pu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case ku:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case ru:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function ev(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= -0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, -k.y);f=$u(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=$u(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=$u(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=$u(a,n.length+f.length); -for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=$u(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.W.x&&(d=mv(b,k.W.x,!1,d,h))):(k.W.h(-e-m.width-a,d+h/2-k.focus.y-k.ra.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.ra.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.W.y&&(d=mv(b,k.W.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Xu:return a.width>b?a.width:b;case Yu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case Mu:case Cu:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case Nu:return a.width-a.focus.x+a.nodeSpacing/2+b;case Qu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function jv(a,b,c){G&&x(a,qu,Z,"calculateSubheight:v");switch(a.alignment){case hv:case gv:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Xu:return a.height>b?a.height:b;case Yu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case Mu:case Cu:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case Nu:return a.height-a.focus.y+a.nodeSpacing/2+b;case Qu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function kv(a,b,c){G&&x(a,F,Z,"alignOffset:align");switch(a){case gv:b/=2;c/=2;break;case hv:b/=2;c/=2;break;case Xu:c=b=0;break;case Yu:break;default:v("Unhandled alignment value "+a.toString())}return new K(b,c)}function bv(a,b,c,d,e,f){G&&x(a,qu,Z,"shiftRelPosAlign:v");G&&x(b,F,Z,"shiftRelPosAlign:align");b=kv(b,c,d);ev(a,b.x,b.y,e,f)}function ev(a,b,c,d,e){G&&x(a,qu,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} +function cv(a,b,c,d){G&&(x(b,qu,Z,"recordMidPoints:v"),B(c,"number",Z,"recordMidPoints:x"),B(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.Ad){case lu:for(a=b.sourceEdges;a.next();)b=a.value,b.fromVertex===e&&b.relativePoint.h(c,d);break;case su:for(a=b.destinationEdges;a.next();)b=a.value,b.toVertex===e&&b.relativePoint.h(c,d);break;default:v("Unhandled path value "+a.Ad.toString())}}function fv(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c= +0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x, +k.y);f=av(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=av(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=av(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=av(a,n.length+f.length); +for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=av(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,pu,Z,"computeLayerSpacing:v");var b=Vu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Z.prototype.computeLayerSpacing=function(a){G&&x(a,qu,Z,"computeLayerSpacing:v");var b=Wu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.$.nodeIndentPastParent=a,this.F()))}},nodeSpacing:{configurable:!0,get:function(){return this.$.nodeSpacing},set:function(a){this.$.nodeSpacing!==a&&(B(a,"number",Z,"nodeSpacing"),this.$.nodeSpacing=a,this.F())}},layerSpacing:{configurable:!0,get:function(){return this.$.layerSpacing},set:function(a){this.$.layerSpacing!==a&&(B(a,"number",Z,"layerSpacing"),this.$.layerSpacing=a,this.F())}},layerSpacingParentOverlap:{configurable:!0, -enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Su||a===Uu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, +enumerable:!0,get:function(){return this.$.layerSpacingParentOverlap},set:function(a){this.$.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.$.layerSpacingParentOverlap=a,this.F()))}},compaction:{configurable:!0,get:function(){return this.$.compaction},set:function(a){this.$.compaction!==a&&($a(a,Z,Z,"compaction"),a===Tu||a===Vu)&&(this.$.compaction=a,this.F())}},breadthLimit:{configurable:!0,get:function(){return this.$.breadthLimit}, set:function(a){this.$.breadthLimit!==a&&(B(a,"number",Z,"breadthLimit"),0<=a&&(this.$.breadthLimit=a,this.F()))}},rowSpacing:{configurable:!0,get:function(){return this.$.rowSpacing},set:function(a){this.$.rowSpacing!==a&&(B(a,"number",Z,"rowSpacing"),this.$.rowSpacing=a,this.F())}},rowIndent:{configurable:!0,get:function(){return this.$.rowIndent},set:function(a){this.$.rowIndent!==a&&(B(a,"number",Z,"rowIndent"),0<=a&&(this.$.rowIndent=a,this.F()))}},commentSpacing:{configurable:!0, enumerable:!0,get:function(){return this.$.commentSpacing},set:function(a){this.$.commentSpacing!==a&&(B(a,"number",Z,"commentSpacing"),this.$.commentSpacing=a,this.F())}},commentMargin:{configurable:!0,get:function(){return this.$.commentMargin},set:function(a){this.$.commentMargin!==a&&(B(a,"number",Z,"commentMargin"),this.$.commentMargin=a,this.F())}},setsPortSpot:{configurable:!0,get:function(){return this.$.setsPortSpot},set:function(a){this.$.setsPortSpot!==a&&(B(a, "boolean",Z,"setsPortSpot"),this.$.setsPortSpot=a,this.F())}},portSpot:{configurable:!0,get:function(){return this.$.portSpot},set:function(a){x(a,Hb,Z,"portSpot");this.$.portSpot.D(a)||(this.$.portSpot=a,this.F())}},setsChildPortSpot:{configurable:!0,get:function(){return this.$.setsChildPortSpot},set:function(a){this.$.setsChildPortSpot!==a&&(B(a,"boolean",Z,"setsChildPortSpot"),this.$.setsChildPortSpot=a,this.F())}},childPortSpot:{configurable:!0,get:function(){return this.$.childPortSpot}, -set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Gu||a===Hu||a===Iu||Ju)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= +set:function(a){x(a,Hb,Z,"childPortSpot");this.$.childPortSpot.D(a)||(this.$.childPortSpot=a,this.F())}},alternateSorting:{configurable:!0,get:function(){return this.aa.sorting},set:function(a){this.aa.sorting!==a&&($a(a,Z,Z,"alternateSorting"),a===Hu||a===Iu||a===Ju||Ku)&&(this.aa.sorting=a,this.F())}},alternateComparer:{configurable:!0,get:function(){return this.aa.comparer},set:function(a){this.aa.comparer!==a&&(B(a,"function",Z,"alternateComparer"),this.aa.comparer= a,this.F())}},alternateAngle:{configurable:!0,get:function(){return this.aa.angle},set:function(a){this.aa.angle!==a&&(B(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.aa.angle=a,this.F())}},alternateAlignment:{configurable:!0,get:function(){return this.aa.alignment},set:function(a){this.aa.alignment!==a&&($a(a,Z,Z,"alternateAlignment"),this.aa.alignment=a,this.F())}},alternateNodeIndent:{configurable:!0,get:function(){return this.aa.nodeIndent}, set:function(a){this.aa.nodeIndent!==a&&(B(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.aa.nodeIndent=a,this.F()))}},alternateNodeIndentPastParent:{configurable:!0,get:function(){return this.aa.nodeIndentPastParent},set:function(a){this.aa.nodeIndentPastParent!==a&&(B(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.aa.nodeIndentPastParent=a,this.F()))}},alternateNodeSpacing:{configurable:!0,get:function(){return this.aa.nodeSpacing},set:function(a){this.aa.nodeSpacing!== a&&(B(a,"number",Z,"alternateNodeSpacing"),this.aa.nodeSpacing=a,this.F())}},alternateLayerSpacing:{configurable:!0,get:function(){return this.aa.layerSpacing},set:function(a){this.aa.layerSpacing!==a&&(B(a,"number",Z,"alternateLayerSpacing"),this.aa.layerSpacing=a,this.F())}},alternateLayerSpacingParentOverlap:{configurable:!0,get:function(){return this.aa.layerSpacingParentOverlap},set:function(a){this.aa.layerSpacingParentOverlap!==a&&(B(a,"number",Z,"alternateLayerSpacingParentOverlap"), -0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Su||a===Uu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, +0<=a&&1>=a&&(this.aa.layerSpacingParentOverlap=a,this.F()))}},alternateCompaction:{configurable:!0,get:function(){return this.aa.compaction},set:function(a){this.aa.compaction!==a&&($a(a,Z,Z,"alternateCompaction"),a===Tu||a===Vu)&&(this.aa.compaction=a,this.F())}},alternateBreadthLimit:{configurable:!0,get:function(){return this.aa.breadthLimit},set:function(a){this.aa.breadthLimit!==a&&(B(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.aa.breadthLimit=a,this.F()))}}, alternateRowSpacing:{configurable:!0,get:function(){return this.aa.rowSpacing},set:function(a){this.aa.rowSpacing!==a&&(B(a,"number",Z,"alternateRowSpacing"),this.aa.rowSpacing=a,this.F())}},alternateRowIndent:{configurable:!0,get:function(){return this.aa.rowIndent},set:function(a){this.aa.rowIndent!==a&&(B(a,"number",Z,"alternateRowIndent"),0<=a&&(this.aa.rowIndent=a,this.F()))}},alternateCommentSpacing:{configurable:!0,get:function(){return this.aa.commentSpacing}, set:function(a){this.aa.commentSpacing!==a&&(B(a,"number",Z,"alternateCommentSpacing"),this.aa.commentSpacing=a,this.F())}},alternateCommentMargin:{configurable:!0,get:function(){return this.aa.commentMargin},set:function(a){this.aa.commentMargin!==a&&(B(a,"number",Z,"alternateCommentMargin"),this.aa.commentMargin=a,this.F())}},alternateSetsPortSpot:{configurable:!0,get:function(){return this.aa.setsPortSpot},set:function(a){this.aa.setsPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsPortSpot"), this.aa.setsPortSpot=a,this.F())}},alternatePortSpot:{configurable:!0,get:function(){return this.aa.portSpot},set:function(a){x(a,Hb,Z,"alternatePortSpot");this.aa.portSpot.D(a)||(this.aa.portSpot=a,this.F())}},alternateSetsChildPortSpot:{configurable:!0,get:function(){return this.aa.setsChildPortSpot},set:function(a){this.aa.setsChildPortSpot!==a&&(B(a,"boolean",Z,"alternateSetsChildPortSpot"),this.aa.setsChildPortSpot=a,this.F())}},alternateChildPortSpot:{configurable:!0, enumerable:!0,get:function(){return this.aa.childPortSpot},set:function(a){x(a,Hb,Z,"alternateChildPortSpot");this.aa.childPortSpot.D(a)||(this.aa.childPortSpot=a,this.F())}}}); -var ju=new F(Z,"PathDefault",-1),ku=new F(Z,"PathDestination",0),ru=new F(Z,"PathSource",1),Gu=new F(Z,"SortingForwards",10),Hu=new F(Z,"SortingReverse",11),Iu=new F(Z,"SortingAscending",12),Ju=new F(Z,"SortingDescending",13),fv=new F(Z,"AlignmentCenterSubtrees",20),gv=new F(Z,"AlignmentCenterChildren",21),Wu=new F(Z,"AlignmentStart",22),Xu=new F(Z,"AlignmentEnd",23),Lu=new F(Z,"AlignmentBus",24),Bu=new F(Z,"AlignmentBusBranching",25),Mu=new F(Z,"AlignmentTopLeftBus",26),Pu=new F(Z,"AlignmentBottomRightBus", -27),Su=new F(Z,"CompactionNone",30),Uu=new F(Z,"CompactionBlock",31),lu=new F(Z,"StyleLayered",40),Fu=new F(Z,"StyleLastParents",41),Eu=new F(Z,"StyleAlternating",42),Du=new F(Z,"StyleRootOnly",43),nu=new F(Z,"ArrangementVertical",50),nv=new F(Z,"ArrangementHorizontal",51),qu=new F(Z,"ArrangementFixedRoots",52),mu=new F(Z,"LayerIndividual",60),zu=new F(Z,"LayerSiblings",61),yu=new F(Z,"LayerUniform",62);Z.className="TreeLayout";Z.PathDefault=ju;Z.PathDestination=ku;Z.PathSource=ru; -Z.SortingForwards=Gu;Z.SortingReverse=Hu;Z.SortingAscending=Iu;Z.SortingDescending=Ju;Z.AlignmentCenterSubtrees=fv;Z.AlignmentCenterChildren=gv;Z.AlignmentStart=Wu;Z.AlignmentEnd=Xu;Z.AlignmentBus=Lu;Z.AlignmentBusBranching=Bu;Z.AlignmentTopLeftBus=Mu;Z.AlignmentBottomRightBus=Pu;Z.CompactionNone=Su;Z.CompactionBlock=Uu;Z.StyleLayered=lu;Z.StyleLastParents=Fu;Z.StyleAlternating=Eu;Z.StyleRootOnly=Du;Z.ArrangementVertical=nu;Z.ArrangementHorizontal=nv;Z.ArrangementFixedRoots=qu;Z.LayerIndividual=mu; -Z.LayerSiblings=zu;Z.LayerUniform=yu;function ou(a){Mq.call(this,a)}na(ou,Mq);ou.prototype.createVertex=function(){return new pu(this)};ou.prototype.createEdge=function(){return new pv(this)};ou.className="TreeNetwork"; -function pu(a){Pq.call(this,a);this.Z=!1;this.ob=null;this.v=[];this.tb=this.Na=this.G=this.oa=0;this.zd=null;this.W=new K(0,0);this.Ja=new Gb(0,0);this.ra=new K(0,0);this.wm=this.vm=this.KA=!1;this.yp=this.lp=null;this.td=Gu;this.od=Wq;this.Qb=0;this.Pb=gv;this.hr=this.gr=0;this.ir=20;this.oe=50;this.Nq=0;this.Up=Uu;this.Np=0;this.Br=25;this.Tp=this.Ar=10;this.Sp=20;this.Kr=!0;this.rr=gd;this.Jr=!0;this.Qp=gd}na(pu,Pq); -pu.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.td=a.sorting,this.od=a.comparer,this.Qb=a.angle,this.Pb=a.alignment,this.gr=a.nodeIndent,this.hr=a.nodeIndentPastParent,this.ir=a.nodeSpacing,this.oe=a.layerSpacing,this.Nq=a.layerSpacingParentOverlap,this.Up=a.compaction,this.Np=a.breadthLimit,this.Br=a.rowSpacing,this.Ar=a.rowIndent,this.Tp=a.commentSpacing,this.Sp=a.commentMargin,this.Kr=a.setsPortSpot,this.rr=a.portSpot,this.Jr=a.setsChildPortSpot,this.Qp=a.childPortSpot)}; -oa.Object.defineProperties(pu.prototype,{initialized:{configurable:!0,get:function(){return this.Z},set:function(a){this.Z!==a&&(B(a,"boolean",pu,"initialized"),this.Z=a)}},parent:{configurable:!0,get:function(){return this.ob},set:function(a){this.ob!==a&&(G&&null!==a&&x(a,pu,pu,"parent"),this.ob=a)}},children:{configurable:!0,get:function(){return this.v},set:function(a){if(this.v!==a){null===a||Array.isArray(a)||Aa(a,"Array",pu,"children:value");if(null!== -a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Wu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Wu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Xu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Xu?(f=d.left+e.x,0===e.x&&n.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go-module.js b/release/go-module.js index 46eb88853..9c984477d 100644 --- a/release/go-module.js +++ b/release/go-module.js @@ -1,8 +1,8 @@ /* - * GoJS v2.3.12 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.3.13 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-2023 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.12/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.13/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;g=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; +t.clear=function(){this._isFrozen&&va(this);this.Ub={};this.Tb=0;null!==this.Sa&&this.Sa.reset();this.kf=this.ea=null;this.yb()};H.prototype.copy=function(){var a=new H,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};H.prototype.Fa=function(){var a=Array(this.Tb),b=this.Ub,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};H.prototype.Iv=function(){var a=new F,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};function Qa(a){a.__gohashid=ib++} +function fb(a){var b=a.__gohashid;void 0===b&&(b=ib++,a.__gohashid=b);return b}function bb(a){return a.__gohashid}ma.Object.defineProperties(H.prototype,{count:{get:function(){return this.Tb}},size:{get:function(){return this.Tb}},iterator:{get:function(){if(0>=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; H.prototype.clear=H.prototype.clear;H.prototype.retainAll=H.prototype.qA;H.prototype.removeAll=H.prototype.hp;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.first=H.prototype.first;H.prototype.containsAny=H.prototype.Uy;H.prototype.containsAll=H.prototype.Ty;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.addAll=H.prototype.addAll;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.ka;H.prototype.freeze=H.prototype.freeze; -var jb=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; +var ib=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; kb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.value=this.key=a=a.key):null};kb.prototype.any=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(a(b.key))return!0;b=b.va}return!1};kb.prototype.all=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(!a(b.key))return!1;b=b.va}return!0};kb.prototype.each=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;)a(b.key),b=b.va;return this}; kb.prototype.map=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.key)),b=b.va;return c.iterator};kb.prototype.filter=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;){var d=b.key;a(d)&&c.add(d);b=b.va}return c.iterator};kb.prototype.de=function(){this.value=this.key=null;this.qa=-1};kb.prototype.toString=function(){return null!==this.sa?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"}; ma.Object.defineProperties(kb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="MapKeySetIterator";function lb(a){H.call(this);Qa(this);this._isFrozen=!0;this.ma=a}la(lb,H);t=lb.prototype;t.freeze=function(){return this};t.ka=function(){return this}; @@ -72,16 +72,16 @@ lb.prototype.remove=lb.prototype.remove;lb.prototype.has=lb.prototype.has;lb.pro mb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=b.value,this.key=b.key,!0;this.de();return!1};mb.prototype.Ad=function(){return this.next()};mb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;if(null!==a){this.sa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; mb.prototype.any=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.va}return!1};mb.prototype.all=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.va}return!0};mb.prototype.each=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;)a(b.value),b=b.va;return this};mb.prototype.map=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.va;return c.iterator}; mb.prototype.filter=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.va}return c.iterator};mb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.jf=this};mb.prototype.toString=function(){return null!==this.sa?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"};ma.Object.defineProperties(mb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}}); -mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function ib(a,b){this.key=a;this.value=b;this.ll=this.va=null}ib.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ib.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; +mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function hb(a,b){this.key=a;this.value=b;this.ll=this.va=null}hb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};hb.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; nb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.key=b.key,this.value=b.value,!0;this.de();return!1};nb.prototype.Ad=function(){return this.next()};nb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.key=a.key,this.value=a.value,a):null};nb.prototype.any=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.va}return!1}; nb.prototype.all=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.va}return!0};nb.prototype.each=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;)a(b),b=b.va;return this};nb.prototype.map=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b)),b=b.va;return c.iterator};nb.prototype.filter=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.va;return c.iterator}; nb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.Sa=this};nb.prototype.toString=function(){return null!==this.sa?"MapIterator@"+this.sa:"MapIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.Ad;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset; nb.className="MapIterator";function ob(a){Qa(this);this._isFrozen=!1;this.Ub={};this.Tb=0;this.jf=this.Sa=null;this.Ja=0;this.kf=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=ob.prototype;t.yb=function(){var a=this.Ja;a++;999999999=this.count)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new nb(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ya:new kb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ya; var a=this.jf;return null!==a?(a.reset(),a):new mb(this)}}});ob.prototype.toKeySet=ob.prototype.Lf;ob.prototype.toArray=ob.prototype.Fa;ob.prototype.clear=ob.prototype.clear;ob.prototype["delete"]=ob.prototype.delete;ob.prototype.remove=ob.prototype.remove;ob.prototype.get=ob.prototype.get;ob.prototype.getValue=ob.prototype.I;ob.prototype.has=ob.prototype.has;ob.prototype.contains=ob.prototype.contains;ob.prototype.first=ob.prototype.first;ob.prototype.addAll=ob.prototype.addAll; ob.prototype.set=ob.prototype.set;ob.prototype.add=ob.prototype.add;ob.prototype.thaw=ob.prototype.ka;ob.prototype.freeze=ob.prototype.freeze;ob.className="Map";function J(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var pb,qb,rb,sb,tb;J.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};J.prototype.h=function(a,b){this.x=a;this.y=b;return this}; @@ -106,36 +106,36 @@ b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._is t.dd=function(a){this.x=a.x;this.y=a.y;return this};t.uA=function(a){this.width=a.width;this.height=a.height;return this};N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=N.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Qb(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 N(c,e,f,g)}return new N} function Rb(a){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.D=function(a){return a instanceof N?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.hi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.Xa=function(a){return K.B(this.x,a.x)&&K.B(this.y,a.y)&&K.B(this.width,a.width)&&K.B(this.height,a.height)}; -function Ub(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -t.Bc=function(a,b){return Vb(this,b,a,b,a)};t.Co=function(a){return Vb(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Vb(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Vb(this,a,b,c,d)};function Vb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Wb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Wb(this,a,b,c,d)}; -function Wb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Xb(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.Ye=function(a){return Yb(this,a.x,a.y,0,0)};t.ed=function(a){return Yb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Yb(this,a,b,c,d)}; -function Yb(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.yi=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 Zb(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 $b(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=ac.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=ac.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){ac.push(a)}; +function Tb(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +t.Bc=function(a,b){return Ub(this,b,a,b,a)};t.Co=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Vb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Vb(this,a,b,c,d)}; +function Vb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Wb(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.Ye=function(a){return Xb(this,a.x,a.y,0,0)};t.ed=function(a){return Xb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Xb(this,a,b,c,d)}; +function Xb(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.yi=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 Yb(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 Zb(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=$b.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=$b.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){$b.push(a)}; ma.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 L(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.Nz;N.prototype.isReal=N.prototype.w;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return K.Gx(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.yi;N.prototype.union=N.prototype.Lv;N.prototype.unionRect=N.prototype.ed;N.prototype.unionPoint=N.prototype.Ye;N.prototype.intersects=N.prototype.Wu; N.prototype.intersectsRect=N.prototype.Yc;N.prototype.intersect=N.prototype.Vu;N.prototype.intersectRect=N.prototype.Fx;N.prototype.grow=N.prototype.Iz;N.prototype.subtractMargin=N.prototype.Gv;N.prototype.addMargin=N.prototype.Co;N.prototype.inflate=N.prototype.Bc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Re;N.prototype.containsPoint=N.prototype.ca;N.prototype.equalsApprox=N.prototype.Xa;N.prototype.equalTo=N.prototype.hi; -N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var bc=null,cc=null,ac=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b;N.ZeroRect=bc=(new N(0,0,0,0)).ja();N.NoRect=cc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b; -function dc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}dc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -dc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};dc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};dc.prototype.copy=function(){var a=new dc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=dc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var ac=null,bc=null,$b=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb;N.ZeroRect=ac=(new N(0,0,0,0)).ja();N.NoRect=bc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb; +function cc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}cc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +cc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};cc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};cc.prototype.copy=function(){var a=new cc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=cc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function ic(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 dc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new dc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new dc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new dc(c,e):new dc(c,e,f,g)}return new dc} -function jc(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.D=function(a){return a instanceof dc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};dc.alloc=function(){var a=kc.pop();return void 0===a?new dc:a};dc.free=function(a){kc.push(a)};dc.prototype.isReal=dc.prototype.w;dc.prototype.equalsApprox=dc.prototype.Xa;dc.prototype.equalTo=dc.prototype.hi;dc.prototype.equals=dc.prototype.D;dc.prototype.set=dc.prototype.set; -dc.prototype.setTo=dc.prototype.sg;var lc=null,mc=null,kc=[];dc.className="Margin";dc.parse=ic;dc.stringify=jc;dc.ZeroMargin=lc=(new dc(0,0,0,0)).ja();dc.TwoMargin=mc=(new dc(2,2,2,2)).ja();dc.parse=ic;dc.stringify=jc;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._isFrozen=!1} -var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,dd,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.sg=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}; +function gc(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 cc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new cc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new cc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new cc(c,e):new cc(c,e,f,g)}return new cc} +function hc(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.D=function(a){return a instanceof cc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};cc.alloc=function(){var a=ic.pop();return void 0===a?new cc:a};cc.free=function(a){ic.push(a)};cc.prototype.isReal=cc.prototype.w;cc.prototype.equalsApprox=cc.prototype.Xa;cc.prototype.equalTo=cc.prototype.hi;cc.prototype.equals=cc.prototype.D;cc.prototype.set=cc.prototype.set; +cc.prototype.setTo=cc.prototype.sg;var jc=null,kc=null,ic=[];cc.className="Margin";cc.parse=gc;cc.stringify=hc;cc.ZeroMargin=jc=(new cc(0,0,0,0)).ja();cc.TwoMargin=kc=(new cc(2,2,2,2)).ja();cc.parse=gc;cc.stringify=hc;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._isFrozen=!1} +var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Xc,Yc,Zc,$c,ad,bd,cd,dd,ed,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.sg=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.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function id(a){if("string"===typeof a){a=a.trim();if("None"===a)return rc;if("TopLeft"===a)return sc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return tc;if("TopRight"===a)return uc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return vc;if("Center"===a)return wc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return yc;if("BottomLeft"===a)return zc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Ac;if("BottomRight"===a)return Bc;if("TopSide"===a)return Cc;if("LeftSide"=== a)return Dc;if("RightSide"===a)return Ec;if("BottomSide"===a)return Fc;if("TopBottomSides"===a)return Gc;if("LeftRightSides"===a)return Ic;if("TopLeftSides"===a)return Jc;if("TopRightSides"===a)return Kc;if("BottomLeftSides"===a)return Lc;if("BottomRightSides"===a)return Mc;if("NotTopSide"===a)return Nc;if("NotLeftSide"===a)return Oc;if("NotRightSide"===a)return Pc;if("NotBottomSide"===a)return Qc;if("AllSides"===a)return Rc;if("Default"===a)return Sc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=K.Vv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.Vv=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(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},cs:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Zb(a,b,g,h,n,c,d)&&K.Zb(a,b,g,h,n,e,f))return K.Zb(a,b,g,h,n,l,m);var p=(a+c)/2,q=(b+d)/2,r=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+r)/2;c=(q+u)/2;r=(r+e)/2;u=(u+f)/2;var w=(d+r)/2,v=(c+u)/2;return K.cs(a, -b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Yb(l,a,b,0,0),Yb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ +b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Xb(l,a,b,0,0),Xb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ 2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Dl(a,b,m,n,d,c,r,u,k,l);K.Dl(r,u,p,q,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(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,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Qe(a,b,m,n,d,c,r,u,k,l);K.Qe(r,u,p,q,e,f,g,h,k,l)}return l},kv:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,e,f,l,c,d))return K.Zb(a, -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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Yb(h,a,b,0,0),Yb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), +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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Xb(h,a,b,0,0),Xb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), 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.ep(a,b,k,l,m,n,g,h);K.ep(m,n,c,d,e,f,g,h)}return h},Eo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){if(K.Zb(a,b,g,h,p,c,d)&&K.Zb(a,b,g,h,p,e,f)){if(!K.Rl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;q.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 r=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2,A=Infinity,B=!1,D=0,M=0;K.Eo(a,b,r,u,d,c,y,z,k,l,m,n,p,q)&&(a=(q.x-k)*(q.x-k)+(q.y-l)*(q.y-l),a=m)return q; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return q}else if(aa)return q;0p&&q--}else{r=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2;q+=K.Fo(a,b,r,u,d,c,y,z,k,l,m,n,p);q+=K.Fo(y,z,w,v,e,f,g,h,k,l,m,n,p)}return q},qh:function(a,b,c,d,e,f,g){if(K.$(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.$(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e k.h(a,c);return!0}g=(d-b)/(c-a);if(K.$(h,g))return K.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.$(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.qh(a,b,c,d,e,g*(e-a)+b,k)},NA:function(a,b,c,d,e){return K.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},LA: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},Ff:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ve(a,b,a,d,e,f,g, h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},us:function(a,b,c){return K.Gx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Gx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):Zb(a,b,c,d,e,f)||Zb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); +k&&g<=l&&f>=b):f===h?(e=a):Yb(a,b,c,d,e,f)||Yb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); 360<=a&&(a-=360);return a},kx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 P.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?z:new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); -a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(wd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z=new J((w===w.toLowerCase()?z.x:0)+parseFloat(d()), -z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z=new J(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();xd(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),xd(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)y=r=h(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d());var S=parseFloat(d()), -R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()),w===w.toLowerCase()&& -(I=z.x+I,G=z.y+G),z.h(I,G),zd(a,r,D,M,S,R,I,G);break;case "Z":Ad(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new J(z.x,z.y):new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k, +"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(td(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z.h((w===w.toLowerCase()?z.x:0)+parseFloat(d()), +z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z.h(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();ud(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),ud(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),vd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)r=h(),y.assign(r),D=f(),vd(a,r.x,r.y,D.x,D.y),y.assign(D);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d()); +var S=parseFloat(d()),R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()), +w===w.toLowerCase()&&(I=z.x+I,G=z.y+G),z.h(I,G),wd(a,r,D,M,S,R,I,G);break;case "Z":xd(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Md:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case P.j:case P.u:case P.F:var g=this.od;var h=this.pd;this.od=g*a+h*c+e;this.pd=g*b+h*d+f;g=this.Dc;h=this.Ec;this.Dc=g*a+h*c+e;this.Ec=g*b+h*d+f;break;case P.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Jd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ca=function(a,b){void 0===b&&(b=0);var c=this.od,d=this.pd,e=this.Dc,f=this.Ec;switch(this.type){case P.j:return K.Zb(c,d,e,f,b,a.x,a.y);case P.u:var g=N.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ca(a);N.free(g);return a;case P.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Pd(this,a,b,!0,!1);default:return!1}}; -function Pd(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Md(this,a,b,!0,!1);default:return!1}}; +function Md(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.xx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -201,176 +201,176 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.yx=function(a){if(this.type===P.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=J.alloc();K.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;J.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===P.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=J.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Ld&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== -Ld&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Xd.prototype.copy=function(){var a=new Xd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Xd.prototype; -t.Xa=function(a){if(!(a instanceof Xd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Dd:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Ed: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 Kd: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 Ld: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 Md: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.qb=function(a){a.classType===Xd&&(this.type=a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Dd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ed: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 Kd: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 Ld: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 Md: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)+ +this.pd=a;this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&va(this,a);this.pl=a;this._isInvalidBounds=!0}}});Xd.prototype.add=Xd.prototype.add;Xd.prototype.equalsApprox=Xd.prototype.Xa;Xd.className="PathFigure"; +function Yd(a,b,c,d,e,f,g,h){Qa(this);void 0===a&&(a=pd);this.na=a;this.l=2;void 0!==b?this.Dc=b:this.Dc=0;void 0!==c?this.Ec=c:this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Jd?(a=f%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Id&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== +Id&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Yd.prototype.copy=function(){var a=new Yd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Yd.prototype; +t.Xa=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ad:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Bd: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 Hd: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 Id: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 Jd: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.qb=function(a){a.classType===Yd&&(this.type=a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Ad:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Bd: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 Hd: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 Id: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 Jd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Nd(a,b){if(null!==a.ae&&!1===b._isInvalidBounds)return a.ae;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ae=[],a.ae;b=a.Ne;var e=a.Vh,f=K.kx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=K.kx(0,0,b>f?b:f,m,m+g,!0);f=ld.alloc();f.reset();f.translate(c,d);f.rotate(a.Ne,0,0);f.scale(k,q);P.Ha(b,f); ld.free(f);a.ae=b;return a.ae} -ma.Object.defineProperties(Xd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&& va(this,a);this.Ne=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Xd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, -set:function(a){0>a&&xa(a,">= zero",Xd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, +set:function(a){0>a&&xa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.l&16)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ne=a;this._isInvalidBounds= -!0}}});Xd.prototype.equalsApprox=Xd.prototype.Xa;var Dd=new E(Xd,"Move",0),pd=new E(Xd,"Line",1),Ed=new E(Xd,"Bezier",2),Kd=new E(Xd,"QuadraticBezier",3),Ld=new E(Xd,"Arc",4),Md=new E(Xd,"SvgArc",4);Xd.className="PathSegment";Xd.Move=Dd;Xd.Line=pd;Xd.Bezier=Ed;Xd.QuadraticBezier=Kd;Xd.Arc=Ld;Xd.SvgArc=Md; -function Zd(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}Zd.prototype.copy=function(){var a=new Zd;return this.clone(a)}; -Zd.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; -Zd.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};Zd.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);return b}; -Zd.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);b.assign(c.Ps(b));return b}; -ma.Object.defineProperties(Zd.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, +!0}}});Yd.prototype.equalsApprox=Yd.prototype.Xa;var Ad=new E(Yd,"Move",0),pd=new E(Yd,"Line",1),Bd=new E(Yd,"Bezier",2),Hd=new E(Yd,"QuadraticBezier",3),Id=new E(Yd,"Arc",4),Jd=new E(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Ad;Yd.Line=pd;Yd.Bezier=Bd;Yd.QuadraticBezier=Hd;Yd.Arc=Id;Yd.SvgArc=Jd; +function $d(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; +$d.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};$d.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);return b}; +$d.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);b.assign(c.Ps(b));return b}; +ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, set:function(a){this.Bp=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.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr= a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{ get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd= 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}}});Zd.prototype.getMultiTouchDocumentPoint=Zd.prototype.Cz; -Zd.prototype.getMultiTouchViewPoint=Zd.prototype.So;Zd.className="InputEvent";function ae(){this.H=null;this.xa="";this.ar=this.Lr=null}ae.prototype.copy=function(){var a=new ae;a.H=this.H;a.xa=this.xa;a.Lr=this.Lr;a.ar=this.ar;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}; -ma.Object.defineProperties(ae.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}});ae.className="DiagramEvent"; -function be(){this.Fm=ce;this.rf=this.Qq="";this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}be.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}; -be.prototype.copy=function(){var a=new be;a.Fm=this.Fm;a.Qq=this.Qq;a.rf=this.rf;a.dc=this.dc;a.H=this.H;a.Qn=this.Qn;var b=this.Sn;a.Sn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Rn;a.Rn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Mn;a.Mn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Ln;a.Ln=za(b)&&"function"===typeof b.J?b.J():b;return a};be.prototype.qb=function(a){a.classType===be&&(this.change=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+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};be.prototype.I=function(a){return a?this.oldValue:this.newValue};be.prototype.Ez=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))}; -ma.Object.defineProperties(be.prototype,{model:{get:function(){return this.dc},set:function(a){this.dc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf}, -set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===de&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}}, -newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=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.Ez;be.prototype.getValue=be.prototype.I;be.prototype.clear=be.prototype.clear; -var de=new E(be,"Transaction",-1),ce=new E(be,"Property",0),ee=new E(be,"Insert",1),fe=new E(be,"Remove",2);be.className="ChangedEvent";be.Transaction=de;be.Property=ce;be.Insert=ee;be.Remove=fe;function ge(){this.o=(new F).freeze();this.xa="";this.j=!1}ge.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(ge.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});ge.prototype.optimize=ge.prototype.$j;ge.prototype.redo=ge.prototype.redo;ge.prototype.canRedo=ge.prototype.canRedo;ge.prototype.undo=ge.prototype.undo;ge.prototype.canUndo=ge.prototype.canUndo; -ge.prototype.clear=ge.prototype.clear;ge.className="Transaction";function he(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} -he.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.$j;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} +ie.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&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.M(0),null!==f&&f.clear(),b.mb(0),a.Ce--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++),b.freeze()),a.isInternalTransaction||a.Pb("CommittedTransaction",c,e);else{a.Fe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Pb("RolledBackTransaction",c,e),a.Fe=!1}null!== e&&e.clear()}a.Np=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.M(e),null!==b&&b.undo(),c.ka(),c.mb(e);c.freeze()}return!1}t.mx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.M(b);null!==c&&c.clear();a.mb(b);this.rq=!0}a.freeze()}}; -he.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; -he.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -ma.Object.defineProperties(he.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; +ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -ma.Object.defineProperties(je.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, -set:function(a){this.wm=a}}});je.prototype.startTransaction=je.prototype.Ea;je.className="Tool";function La(){je.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=se;this.u=ue;this.Mp=this.j=null;this.zj=-1}la(La,je);La.prototype.initializeStandardTools=function(){}; -La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof te&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ve&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===we){b.bubbles=!0;return}if(this.gestureBehavior===ve)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de||Math.abs(b.y-a.y)>d}; +ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, +set:function(a){this.wm=a}}});ke.prototype.startTransaction=ke.prototype.Ea;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=ve;this.u=xe;this.Mp=this.j=null;this.zj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof we&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ye&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===ze){b.bubbles=!0;return}if(this.gestureBehavior===ye)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Oe;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=sf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=sf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}Ae.prototype.doDragOver=function(){}; -function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Te(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==De){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==De){a=N.alloc();for(b= +d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}De.prototype.doDragOver=function(){}; +function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Ve(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ge){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ge){a=N.alloc();for(b= c.selection.iterator;b.next();)d=b.value,d instanceof V&&wf(c,d,a);N.free(a)}}}function vf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof pf||(c=a.mouseDrop,null!==c&&c(b))}function wf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Td(b)&&c.isAvoiding&&c.bb()} -Ae.prototype.doDropOnto=function(){};Ae.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(af(this,!1),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts)):this.mayMove()?(We(this),cf(this,this.draggedParts,!0)):this.mayDragOut()?(af(this,!1),cf(this,this.copiedParts,!1)):We(this),nf(this,a.lastInput.documentPoint))}}; -Ae.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(We(this),af(this,!0),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,We(this),this.mayMove()&&(cf(this,this.draggedParts, -!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();Ue(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; -Ae.prototype.simulatedMouseMove=function(a,b,c){if(null===De)return!1;var d=De.diagram;c instanceof Q||(c=null);var e=He;c!==e&&(null!==e&&e!==d&&(e.ug(),De.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),He=c,null!==c&&c!==d&&(Ze(),e=c.toolManager.findTool("Dragging"),null!==e&&(Ce.contains(e)||Ce.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +De.prototype.doDropOnto=function(){};De.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(cf(this,!1),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts)):this.mayMove()?(Ye(this),ef(this,this.draggedParts,!0)):this.mayDragOut()?(cf(this,!1),ef(this,this.copiedParts,!1)):Ye(this),nf(this,a.lastInput.documentPoint))}}; +De.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Ye(this),cf(this,!0),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Ye(this),this.mayMove()&&(ef(this,this.draggedParts, +!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();We(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; +De.prototype.simulatedMouseMove=function(a,b,c){if(null===Ge)return!1;var d=Ge.diagram;c instanceof Q||(c=null);var e=Ke;c!==e&&(null!==e&&e!==d&&(e.ug(),Ge.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ke=c,null!==c&&c!==d&&(af(),e=c.toolManager.findTool("Dragging"),null!==e&&(Fe.contains(e)||Fe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,bf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;Ee(a,g.Lf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,bf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ae.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};Ae.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; -ma.Object.defineProperties(Ae.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= +f=a.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;He(a,g.Lf());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/ +2)));a.doUpdateCursor(null)}}}De.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};De.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; +ma.Object.defineProperties(De.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V}, set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Lf():null!==this.draggedParts?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= -a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});Ae.prototype.getDraggingSource=Ae.prototype.Bz;var De=null,He=null;Ae.className="DraggingTool";Ce=new F; -Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==De&&De.doCancel();je.prototype.doCancel.call(this)}; -function Af(){je.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,je);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});De.prototype.getDraggingSource=De.prototype.Bz;var Ge=null,Ke=null;De.className="DraggingTool";Fe=new F; +Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ge&&Ge.doCancel();ke.prototype.doCancel.call(this)}; +function Af(){ke.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,ke);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; Af.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.Df(),g=L.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;L.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=wc;f=J.alloc();c.location=b.ga(wc,f);J.free(f);d.angle=b.li();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; Af.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Gb,b.fromSpot=rc,b.toSpot=rc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Af.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Af.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, @@ -403,30 +403,30 @@ this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLi Tf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Tf.prototype.doNoLink=function(){}; ma.Object.defineProperties(Tf.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}}); var Uf=new E(Tf,"Either",0),Vf=new E(Tf,"ForwardsOnly",0),Wf=new E(Tf,"BackwardsOnly",0);Tf.className="LinkingTool";Tf.Either=Uf;Tf.ForwardsOnly=Vf;Tf.BackwardsOnly=Wf; -function Ie(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Ie,Af); -Ie.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& -(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Ie.prototype.makeAdornment=function(a,b){var c=new te;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; -Ie.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; -Ie.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 te&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +function Le(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Le,Af); +Le.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& +(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Le.prototype.makeAdornment=function(a,b){var c=new we;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +Le.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; +Le.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 we&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(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.Fw.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 W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};gg.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}; gg.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.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.hv())),this.Tn.set(this.adornedObject.part.location),this.Ew.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt= -this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; +this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; gg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};gg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.bd();J.free(e)}}; gg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(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.Ya();this.transactionResult=this.name;a.S("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Be;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; +gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ee;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; gg.prototype.computeResize=function(a,b,c,d,e,f){b.Mc()&&(b=wc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=J.alloc();K.No(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -457,125 +457,125 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig gg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};gg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; ng.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};ng.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Ya();this.transactionResult=this.name;a.S("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; ng.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Va();var c=b.locationObject,d=b.rotateObject;if(c===d||c.rg(d))c=this.Tn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.bd()}}; ng.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.li());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof te))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof te)throw Error("new handle must not be in an Adornment: "+ +ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof we))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof we)throw Error("new handle must not be in an Adornment: "+ a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Dw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= -a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){je.call(this);this.name="ClickSelecting"}la(og,je);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; -og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){je.call(this);this.name="Action";this.nk=null}la(pg,je); +a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){ke.call(this);this.name="ClickSelecting"}la(og,ke);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; +og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){ke.call(this);this.name="Action";this.nk=null}la(pg,ke); pg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.jc(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.nk=c;a.Bk=a.jc(b.documentPoint,null,null);return!0}return!1};pg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; pg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};pg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){je.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,je); +pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){ke.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,ke); qg.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.nw=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.nw))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.Ol(a.lastInput.documentPoint,!0)?!1:!0}; qg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&zg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= +qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&xg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= this.name;b.S("PartCreated",d)}finally{this.stopTransaction(),b.S("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(qg.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});qg.className="ClickCreatingTool"; -function Ag(){je.call(this);this.name="DragSelecting";this.Hk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Bf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Ag,je); -Ag.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.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Og.prototype.doStart=function(){Yg=this;null!==this.textBlock&&this.doActivate()}; -Og.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Pg&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Vg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Og.prototype.doCancel=function(){this.stopTool()}; -Og.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Og.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Zg)};Og.prototype.acceptText=function(a){switch(a){case Zg:if(this.qa===ah)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this);break;case dh:case Tg:case Ug:if(Tg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this)}}; -function ch(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.qa=ah,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Xg,a.doError(e,f))}} -Og.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)};Og.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Og.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Rg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Og.prototype.doStop=function(){Yg=null}; -Og.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};Og.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; -ma.Object.defineProperties(Og.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, -set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Og.prototype.measureTemporaryTextBlock=Og.prototype.Mx; -var dh=new E(Og,"LostFocus",0),Zg=new E(Og,"MouseDown",1),Ug=new E(Og,"Tab",2),Tg=new E(Og,"Enter",3),eh=new E(Og,"SingleClick",0),Qg=new E(Og,"SingleClickSelected",1),$g=new E(Og,"DoubleClick",2),Rg=new E(Og,"StateNone",0),Vg=new E(Og,"StateActive",1),Wg=new E(Og,"StateEditing",2),bh=new E(Og,"StateValidating",3),Xg=new E(Og,"StateInvalid",4),ah=new E(Og,"StateValidated",5),Yg=null;Og.className="TextEditingTool";Og.LostFocus=dh;Og.MouseDown=Zg;Og.Tab=Ug;Og.Enter=Tg;Og.SingleClick=eh; -Og.SingleClickSelected=Qg;Og.DoubleClick=$g;Og.StateNone=Rg;Og.StateActive=Vg;Og.StateEditing=Wg;Og.StateValidating=bh;Og.StateInvalid=Xg;Og.StateValidated=ah;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function fh(a){gh||(hh(),gh=!0);this.H=ke;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=ih;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new jh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}fh.prototype.Xe=function(a){this.H=a};fh.prototype.canStart=function(){return!0};function kh(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),lh(a.H),a.Ab=!0)} -function mh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===ih?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===nh&&b.vc.clear(),a.Rw=a.Ok===oh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),ph(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==qh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Fe(c),rh(c),a.Ab=!1,b.start(),b.cc&&(sh(a),c.Ya(),th(b,0),yf(c,!0),uh(a),c.S("AnimationStarting",a)))}))}}function vh(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function wh(a,b,c,d){a.isTicking||vh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=fh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; -function Hh(a,b){function c(){0a.lastInput.clickCount?!1:!0};Mg.prototype.doStart=function(){Wg=this;null!==this.textBlock&&this.doActivate()}; +Mg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Ng&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Tg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Mg.prototype.doCancel=function(){this.stopTool()}; +Mg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Mg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xg)};Mg.prototype.acceptText=function(a){switch(a){case Xg:if(this.qa===Zg)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this);break;case bh:case Rg:case Sg:if(Rg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this)}}; +function ah(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.qa=Zg,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Vg,a.doError(e,f))}} +Mg.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)};Mg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Mg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Pg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Mg.prototype.doStop=function(){Wg=null}; +Mg.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};Mg.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; +ma.Object.defineProperties(Mg.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, +set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Mg.prototype.measureTemporaryTextBlock=Mg.prototype.Mx; +var bh=new E(Mg,"LostFocus",0),Xg=new E(Mg,"MouseDown",1),Sg=new E(Mg,"Tab",2),Rg=new E(Mg,"Enter",3),ch=new E(Mg,"SingleClick",0),Og=new E(Mg,"SingleClickSelected",1),Yg=new E(Mg,"DoubleClick",2),Pg=new E(Mg,"StateNone",0),Tg=new E(Mg,"StateActive",1),Ug=new E(Mg,"StateEditing",2),$g=new E(Mg,"StateValidating",3),Vg=new E(Mg,"StateInvalid",4),Zg=new E(Mg,"StateValidated",5),Wg=null;Mg.className="TextEditingTool";Mg.LostFocus=bh;Mg.MouseDown=Xg;Mg.Tab=Sg;Mg.Enter=Rg;Mg.SingleClick=ch; +Mg.SingleClickSelected=Og;Mg.DoubleClick=Yg;Mg.StateNone=Pg;Mg.StateActive=Tg;Mg.StateEditing=Ug;Mg.StateValidating=$g;Mg.StateInvalid=Vg;Mg.StateValidated=Zg;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); +function dh(a){eh||(fh(),eh=!0);this.H=le;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=gh;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new hh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}dh.prototype.Xe=function(a){this.H=a};dh.prototype.canStart=function(){return!0};function ih(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),jh(a.H),a.Ab=!0)} +function kh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===gh?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===lh&&b.vc.clear(),a.Rw=a.Ok===mh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),nh(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==oh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Ie(c),ph(c),a.Ab=!1,b.start(),b.cc&&(qh(a),c.Ya(),rh(b,0),yf(c,!0),sh(a),c.S("AnimationStarting",a)))}))}}function th(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function uh(a,b,c,d){a.isTicking||th(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=dh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; +function Hh(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 hh(){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 ob;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&xa(a,">= 1",fh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, -isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});fh.prototype.stopAnimation=fh.prototype.Cc; -var Ph=null,gh=!1,ih=new E(fh,"Default",1),oh=new E(fh,"AnimateLocations",2),nh=new E(fh,"None",3);fh.className="AnimationManager";fh.defineAnimationEffect=function(a,b){gh||(hh(),gh=!0);Ph.add(a,b)};fh.Default=ih;fh.AnimateLocations=oh;fh.None=nh; -function jh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}jh.prototype.suspend=function(){this.Wk=!0};jh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);sh(this.Yd);yf(this.H);uh(this.Yd);this.H.redraw()}; -function ph(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a&&xa(a,">= 1",dh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, +isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});dh.prototype.stopAnimation=dh.prototype.Cc; +var Ph=null,eh=!1,gh=new E(dh,"Default",1),mh=new E(dh,"AnimateLocations",2),lh=new E(dh,"None",3);dh.className="AnimationManager";dh.defineAnimationEffect=function(a,b){eh||(fh(),eh=!0);Ph.add(a,b)};dh.Default=gh;dh.AnimateLocations=mh;dh.None=lh; +function hh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}hh.prototype.suspend=function(){this.Wk=!0};hh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);qh(this.Yd);yf(this.H);sh(this.Yd);this.H.redraw()}; +function nh(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} -function th(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; -t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;sh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Xe(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);uh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),ph(this,null),c.Ml(this),b.ac())}}; +function Ih(a,b){if(!a.Wk||b){var c=a.Yd;if(!1!==a.cc){var d=+new Date,e=d>a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} +function rh(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; +t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;qh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Ze(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);sh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),nh(this,null),c.Ml(this),b.ac())}}; t.Cj=function(a,b){var c=b.actualBounds,d=null;b instanceof pf&&(d=b.placeholder);null!==d?(c=d.ga(sc),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 pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Cj(d,b)}; t.Aj=function(a,b){if(a.isVisible()){var c=null;b instanceof pf&&(c=b.placeholder);if(null!==c){var d=c.ga(sc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.vc;d.contains(a)&&(d.I(a).ov=!0);if(a instanceof pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Aj(d,b)}};t.Fz=function(a){var b=this.Tt.get(a);null===b&&(b={},this.Tt.add(a,b));return b}; -ma.Object.defineProperties(jh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",jh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}jh.className="Animation";jh.EaseLinear=function(a,b,c,d){return c*a/d+b};jh.EaseInOutQuad=Qh;jh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};jh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};jh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};jh.EaseOutExpo=Sh; +ma.Object.defineProperties(hh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",hh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}hh.className="Animation";hh.EaseLinear=function(a,b,c,d){return c*a/d+b};hh.EaseInOutQuad=Qh;hh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};hh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};hh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};hh.EaseOutExpo=Sh; function Yh(a,b,c){this.start=a;this.end=b;this.Lu={};this.Iu=c;this.ov=!1}Yh.className="AnimationState";function Zh(a,b,c){this.xd=null;this.rf=a;this.so=c||$h;this.tk=null;void 0!==b&&(this.tk=b,void 0===c&&(this.so=ai))}Zh.prototype.copy=function(){var a=new Zh(this.rf);a.so=this.so;var b=this.tk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.tk=c}return a}; function bi(a,b){a=a.tk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.tk},set:function(a){this.tk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}}); var $h=new E(Zh,"Default",1),ai=new E(Zh,"Immediate",2),ci=new E(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Qa(this);this.H=null;this.Pa=new F;this.xa="";this.pb=1;this.o=!1;this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0;this.Zq=[];a&&Object.assign(this,a)}t=di.prototype; t.clear=function(){for(var a=this.Pa,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof te?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof we?g++:c++}h="";0c.Oq||h.height*e>c.Oq?b.hc(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&&(ji(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ji(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),ji(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.ws()||(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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(ce,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; +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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(de,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; t.qc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.qc(a,b,c);var d=this.Pa;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.Wo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.qc(b));b.Ig=null;ei(b);return a}; function ki(a,b,c){b=li(a,b,c);if(c instanceof pf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Pa.s,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.mb(b);a.Hb(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.mb(b);a.Hb(h,c);return h}for(k=NaN;++h< @@ -587,135 +587,135 @@ a&&(this.j=a,null!==this.diagram&&this.diagram.Ya())}},allowCopy:{get:function() a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var b=this.Hi;b!==a&&(this.Hi=a,this.g("allowGroup",b,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var b=this.Qi;b!==a&&(this.Qi=a,this.g("allowUngroup",b,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var b=this.Ii;b!==a&&(this.Ii=a,this.g("allowLink",b,a))}},allowRelink:{get:function(){return this.Ki}, set:function(a){var b=this.Ki;b!==a&&(this.Ki=a,this.g("allowRelink",b,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var b=this.Ji;b!==a&&(this.Ji=a,this.g("allowMove",b,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var b=this.Li;b!==a&&(this.Li=a,this.g("allowReshape",b,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var b=this.Mi;b!==a&&(this.Mi=a,this.g("allowResize", b,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var b=this.Ni;b!==a&&(this.Ni=a,this.g("allowRotate",b,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var b=this.Oi;b!==a&&(this.Oi=a,this.g("allowSelect",b,a))}}});di.prototype.findObjectsNear=di.prototype.og;di.prototype.findObjectsIn=di.prototype.Cf;di.prototype.findObjectsAt=di.prototype.ji;di.prototype.findObjectAt=di.prototype.jc;di.className="Layer"; -function Q(a,b){mi||(ni(),mi=!0);Qa(this);ke=this;this.wb=!0;this.Ka=null;this.ya=this.Aa=0;this.ta=null;if(Ng){var c=this,d=function(){c.removeEventListener(x.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==x.document.body?this.setRTL():c.addEventListener(x.document,"DOMContentLoaded",d,!1)}this.ol=null;oi.add("Model",pi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.aa){b.diagram.aa=!1;try{var c=a.change;""===a.modelChange&&c===ce&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.aa=!0}}};this.Oc=function(a){e.partManager.doModelChanged(a)};this.hu=this.ku=null;qi(this);this.model=ri();this.Wg=!0;si(this);this.layout=new ti;this.Wg=!1;this.bk=this.dk=this.ek=this.ck=this.ui=this.bA=this.Zj=this.Pv=null;this.gk=function(){};this.preventDefault=null;this.rn=!1;this.Yf=new ui;void 0!==a&&("string"===typeof a||x.Element&&a instanceof Element?vi(this,a):b=a);this.wb=!1;b&&this.nm(b);return this}var wi,ke; -function qi(a){a.Yd=new fh;a.Yd.Xe(a);a.Eb=17;a.Hw=!1;a.tn=!1;a.bu="default";a.Wa=new F;a.pj=new ob;a.nl="default";a.Ux();a.Tx();a.pb=1;a.pa=(new J(NaN,NaN)).freeze();a.du=new J(NaN,NaN);a.Ca=1;a.Pp=1;a.zt=(new J(NaN,NaN)).freeze();a.At=NaN;a.Ot=1E-4;a.Mt=100;a.Bb=new ld;a.zu=(new J(NaN,NaN)).freeze();a.ut=(new N(NaN,NaN,NaN,NaN)).freeze();a.rj=(new dc(0,0,0,0)).freeze();a.sj=Rh;a.nu=!1;a.Zt=null;a.fu=null;a.yh=qh;a.yk=Sc;a.Fg=qh;a.pq=Sc;a.yt=sc;a.Bt=sc;a.Fc=!0;a.pn=!1;a.De=new H;a.Eh=new ob;a.Xm= -!0;a.vp=250;a.uk=-1;a.xp=(new dc(16,16,16,16)).freeze();a.kg=!1;a.Ik=!1;a.fn=!0;a.bq=new Zd;a.bq.diagram=a;a.Qg=new Zd;a.Qg.diagram=a;a.cj=new Zd;a.cj.diagram=a;a.zg=null;a.pf=null;a.qu=!1;xi(a);a.ai=new H;a.Ht=!0;a.uu=yi;a.qw=!1;a.wu=Df;a.it="auto";a.Op="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Qh=null;a.Oh=null;a.Nh=null;a.Qt=null;a.Lh=null;a.xt=!1;a.Mh=null;a.Ph=null;a.$h=null;a.Ch=null;a.Rt=!1;a.Yt={};a.oj=[null,null];a.Wg=!1;a.Jw=!1;a.ou=!1;a.lt=!1;a.sw=!0;a.ld=!1;a.$i=!1;a.Uw=!0;a.Ce=-2;a.Og=new ob; -a.Xn=new F;a.Gg=!1;a.Jd=!0;a.Us=!0;a.Fi=!0;a.Gi=!0;a.Vs=!1;a.Ws=!0;a.Pi=!0;a.Hi=!0;a.Qi=!0;a.Ys=!0;a.Ii=!0;a.Ki=!0;a.Ji=!0;a.Li=!0;a.Mi=!0;a.Ni=!0;a.Oi=!0;a.Zs=!0;a.at=!0;a.rw=!1;a.Uk=!1;a.mn=!0;a.nn=!0;a.Xs=!0;a.$s=!0;a.iu=16;a.mu=16;a.qr=!1;a.gu=!1;a.lu=0;a.ju=0;a.zb=(new dc(5)).freeze();a.Iw=(new H).freeze();a.Nt=999999999;a.ow=(new H).freeze();a.Zi=!0;a.Ee=!0;a.vd=!0;a.Be=!1;a.gf=!1;a.xh=!0;a.hf=!1;a.ty=new H;a.pw=new H;a.Xh=null;a.bw=new L(8,8);a.cw=999;a.Cw=1;a.Kw=0;a.gc={scale:1,position:new J, -bounds:new N,Qy:new L,cA:new L,Pz:!1};a.gc.canvasSize=a.gc.Qy;a.gc.newCanvasSize=a.gc.cA;a.gc.isScroll=!1;a.Sw=(new N(NaN,NaN,NaN,NaN)).freeze();a.wo=(new L(NaN,NaN)).freeze();a.Sp=(new N(NaN,NaN,NaN,NaN)).freeze();a.It=!1;a.Lg=new ob;var b=new V,c=new Pg;c.bind(new Gi("text","",Ia));b.add(c);a.oy=b;a.Lg.add("",b);b=new V;c=new Pg;c.stroke="brown";c.bind(new Gi("text","",Ia));b.add(c);a.Lg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Bf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new L(3,3)).ja();b.add(c);a.Lg.add("LinkLabel",b);a.Yi=new ob;b=new pf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new Pg;c.font="bold 12pt sans-serif";c.bind(new Gi("text","",Ia));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Bf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new ig;d.padding=(new dc(5,5,5,5)).ja();c.add(d);b.add(c);a.my=b;a.Yi.add("",b);a.Kh=new ob;b=new T;c=new Bf;c.isPanelMain=!0;b.add(c);c=new Bf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ny=b;a.Kh.add("",b);b=new T;c=new Bf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Kh.add("Comment",b);b=new te;b.type=W.Auto;c=new Bf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new ig;c.margin=(new dc(1.5,1.5,1.5,1.5)).ja();b.add(c);a.St=b;a.wt=b;b=new te;b.type=W.Link;c=new Bf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Kt=b;a.fe=null;a.mq=!1;a.Bk=null;a.partManager=new pi;a.toolManager= -new La;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.nt=null;a.Wm=new Be;a.Vt=null;a.Wt=null;a.Mr=!1;a.commandHandler=Ii();a.eq=null;a.fq=tb;a.Qw=!1;a.Nb=1;a.Yh=null;a.Oq=1;a.Sq=0;a.Aw=[0,0,0,0,0];a.Tq=0;a.yq=1;a.uw=0;a.vw=new J;a.Ay=500;a.wp=new J;a.wq=!1}Q.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Ji=null;Ki="";Li(this,!1);this.Xn.clear();Mi();this.Og.clear();this.Xh=null;this.Ya();this.Va();this.N()}; -function Li(a,b){a.animationManager.Cc(!0);a.Iw=(new H).freeze();a.ow=(new H).freeze();var c=a.skipsUndoManager,d=null!==a.dc&&void 0!==a.dc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.fe&&(e=a.fe.part,null!==e&&a.remove(e));var f=[],g=a.Wa.length;if(b){for(b=0;b=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function vi(a,b){if(Ng){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); -a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Pi(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= -"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Qi(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Pi(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Ng){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= -"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Ri;e.addEventListener("pointerdown",Si);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){rh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Ti(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 -Math.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=0c|| -Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Ui(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Vi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;Wi(a,f,c);c.targetObject=null;a.doMouseMove();Ui(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=Vi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&Wi(e.H,b,d);null===e&&(e=b.target);Wi(a,b,d);d.clickCount=a.yq;d.targetDiagram=Xi(b,e);d.targetObject=null;a.doMouseUp();Ui(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; -c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+Yi[1]+Yi[2]+"wI"+Zi.slice(1,5)]["b"+$i.slice(1,b)](d.Z,aj,b,b);d.Vc(!0);bj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), +Q.prototype.setScrollWidth=function(a){a=void 0===a?this.div:a;null===a&&(a=x.document.body);var b=0;if(Lg){var c=Si;b=wi;null===c&&(c=Si=ua("p"),c.style.width="100%",c.style.height="200px",c.style.boxSizing="content-box",b=wi=ua("div"),b.style.position="absolute",b.style.visibility="hidden",b.style.width="200px",b.style.height="150px",b.style.boxSizing="content-box",b.appendChild(c));b.style.overflow="hidden";a.appendChild(b);var d=c.offsetWidth;b.style.overflow="scroll";c=c.offsetWidth;d===c&&(c= +b.clientWidth);a.removeChild(b);b=d-c;0!==b||Pa||(b=11)}this.Eb=b;this.Hw=!0};Q.prototype.qb=function(a){a.classType===Q&&(this.autoScale=a)};Q.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.div&&this.div.id&&(b=this.div.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; +function vi(a,b){if(Lg){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); +a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Ti(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= +"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Ui(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Ti(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Lg){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= +"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Vi;e.addEventListener("pointerdown",Wi);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){ph(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Xi(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 +Math.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=0c|| +Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Yi(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Zi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;$i(a,f,c);c.targetObject=null;a.doMouseMove();Yi(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=Zi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&$i(e.H,b,d);null===e&&(e=b.target);$i(a,b,d);d.clickCount=a.yq;d.targetDiagram=aj(b,e);d.targetObject=null;a.doMouseUp();Yi(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; +c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+bj[1]+bj[2]+"wI"+cj.slice(1,5)]["b"+dj.slice(1,b)](d.Z,ej,b,b);d.Vc(!0);fj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), a.ib=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function bj(a){var b=a.ta.Oa;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.ui,!1);a.addEventListener(b,"pointermove",a.ck,!1);a.addEventListener(b,"pointerup",a.ek,!1);a.addEventListener(b,"pointerout",a.dk,!1);a.addEventListener(b,"pointercancel",a.bk,!1);a.addEventListener(b,"pointerenter",a.cz,!1);a.addEventListener(b,"pointerleave",a.dz,!1);a.addEventListener(b,"wheel",a.Zj,!1);a.addEventListener(b,"keydown",a.Rz,!1);a.addEventListener(b,"keyup",a.Sz,!1);a.addEventListener(b, -"blur",a.Oy,!1);a.addEventListener(b,"focus",a.Py,!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(x,"resize",a.Pv,!1)}function Fe(a){30r&&(this.position=w.h(-(b.scrollWidth-this.Aa)+v-this.Aa/e+m,this.position.y))),a.wy&&this.allowVerticalScroll&&(hu&&(this.position= -w.h(this.position.x,-(b.scrollHeight-this.ya)+a.scrollTop-this.ya/e+f))),J.free(w),this.vd=!0,this.Ee=this.qr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);lh(this);return ej(this,a)}; -function ej(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);jh(this);return ij(this,a)}; +function ij(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===jj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=gj(this,ij);a!==Rh&&(fj(this,!1),hj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; -t.CA=function(a,b){void 0===b&&(b=ij);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===ij||b===jj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===jj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function jj(a,b){if((b||a.hf)&&!a.wb&&null!==a.ta&&a.documentBounds.w()){a.wb=!0;if(b){var c=a.initialPosition;if(c.w()){a.wb=!1;a.position=c;return}c=J.alloc();c.xi(a.documentBounds,a.initialDocumentSpot);var d=a.viewportBounds;d=N.allocAt(0,0,d.width,d.height);var e=J.alloc();e.xi(d,a.initialViewportSpot);e.h(c.x-e.x,c.y-e.y);a.position=e;N.free(d);J.free(e);J.free(c)}c=a.yh;b&&a.Fg!==oh&&(c=a.Fg);var f=c!==oh?kj(a,c):a.scale;c=a.pa.x;d=a.pa.y;e=a.Aa/f;var g=a.ya/f,h=a.yk,k=a.pq;b&&!h.sb()&&(k.sb()|| +k.Yb())&&(h=k.Yb()?wc:k);lj(a,a.documentBounds,e,g,h,b);b=a.scale;a.scale=f;a.wb=!1;f=a.viewportBounds;if(!(K.B(f.x,c)&&K.B(f.y,d)&&K.B(f.width,e)&&K.B(f.height,g)))a.onViewportBoundsChanged(new N(c,d,e,g),f,b,!1)}} +function kj(a,b){var c=a.Pp;if(null===a.ta)return c;a.Va();var d=a.documentBounds;if(!d.w())return c;var e=d.width;d=d.height;var f=a.Aa+(a.gf?a.Eb:0),g=a.ya+(a.Be?a.Eb:0),h=f/e,k=g/d;return b===mj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===nj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=kj(this,mj);a!==Rh&&(jj(this,!1),lj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; +t.CA=function(a,b){void 0===b&&(b=mj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===mj||b===nj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===nj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Ky=function(a,b){this.Va();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.Az=function(a){if(a instanceof Y){this.eq=a;var b=J.alloc();this.fq=this.op(a.ga(sc,b));J.free(b)}else this.eq=null,this.fq=tb}; -function hj(a,b,c,d,e,f){var g=J.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.eq){var l=J.alloc();l=a.eq.ga(sc,l);h=l.x-a.fq.x/a.scale;k=l.y-a.fq.y/a.scale;e=rc;J.free(l)}if(f||a.scrollMode===Rh)e.sb()&&(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.rj,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.rj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} -t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof te&&c.isVisible()&&(c.si()?(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 pf?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} +t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&xj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof we&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function xj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof pf?(yj(f)||zj(f)||Aj(f))&&xj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eB&&(v=M.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));xb(m,u);xb(q,u);d.push(new N(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Ej(this.Yf,this)&&(e=0B&&(v=M.left, y=M.right),w.height>D&&(z=M.top,A=M.bottom)):(v=M.left,y=M.right,z=M.top,A=M.bottom);var S=w.width+v+y,R=w.height+z+A;M=a.scale;var I=S>k/M,G=R>l/M;if(!(f||a.gf||a.Be||I||G))return!0;v=w.x-v;k=m.x;y=w.right+y;l=m.right+g;z=w.y-z;var ca=m.y;w=w.bottom+A;m=m.bottom+h;var X="1px";A="1px";a.scrollMode===Rh&&(I||G)&&(I&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(I=1,v+1l+1&&(I=Math.max((y-l)*M+a.Aa,I)),B+g+1m+1&&(I=Math.max((w-m)*M+a.ya,I)),D+h+1l+1&&(g=Math.max((y-l)*M+a.Aa,g)),B+1m+1&&(h=Math.max((w-m)*M+g,h)),D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1m+1&&(r.scrollTop=a.position.y*M));k=a.Aa;l=a.ya;r.style.width=k+(a.gf?a.Eb:0)+"px";r.style.height=l+(a.Be?a.Eb:0)+"px";return c!==k||d!==l||a.animationManager.Ab?(c=N.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,M,f),N.free(c),!1):!0}t=Q.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(ee,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oi=function(a){this.partManager.oi(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof te||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.De.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()}; -t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.De.remove(a);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()};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.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(fe,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; -t.Dy=function(a,b){Tj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(fe,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; -t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(fe,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; +t.oi=function(a){this.partManager.oi(a);var b=this;Lj(a,function(a){Mj(b,a)});(a instanceof we||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Lj(a,function(a){Nj(b.partManager,a)});!0!==zj(a)&&!0!==Aj(a)||this.De.add(a);Oj(a,!0,this);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()}; +t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Lj(a,function(a){Qj(b.partManager,a,b)});this.De.remove(a);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()};t.remove=function(a){Rj(this,a,!0)}; +function Rj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; +t.Dy=function(a,b){Xj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; +t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(ge,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Zw=function(a){null===this.pf&&(this.pf=new F);this.pf.add(a);this.model.Pe(a);return this};t.nA=function(a){null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.hk(a)};t.Pe=function(a){null===this.zg&&(this.zg=new F);this.zg.add(a);return this};t.hk=function(a){null!==this.zg&&(this.zg.remove(a),0===this.zg.count&&(this.zg=null))}; -t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==de&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==de&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ea=function(a){return this.undoManager.Ea(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Kf=function(){return this.undoManager.Kf()};Q.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.eb(b):this.undoManager.Kf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.rp=function(){this.partManager.rp()}; -function Yj(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ni(a),a.N(),a.Ee=!0,d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ni(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ni(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);fj(a,!1);d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==qh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),xe(e,this));this.wb||this.invalidateViewport(a,b);qj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= +function ck(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ri(a),a.N(),a.Ee=!0,d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ri(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ri(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);jj(a,!1);d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==oh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Ae(e,this));this.wb||this.invalidateViewport(a,b);uj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= Math.round(a.width*c);this.gc.canvasSize.height=Math.round(a.height*c);this.gc.newCanvasSize.width=this.Aa;this.gc.newCanvasSize.height=this.ya;this.gc.isScroll=d;this.S("ViewportBoundsChanged",this.gc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.bb()})}}; -function qj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, +function uj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(dk(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);L.free(d);c.part.location=b;J.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.S("ChangingSelection",b);for(var c=b.Fa(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||kh(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)hk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),lh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||mh(f),a.aa=c}}}function hk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)hk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; +t.ms=function(a){for(var b=[],c=0;c=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||ih(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)lk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||kh(f),a.aa=c}}}function lk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)lk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),xj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; function xi(a){function b(a){var b=a.toLowerCase(),e=new F;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new ob,d=new ob;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.jw=c;a.iw=d} -function Dj(a,b){var c=a.iw.I(b);return null!==c?c:a.iw.I(b.toLowerCase())}function ik(a,b){var c=a.jw.I(b);if(null!==c)return c;c=a.jw.I(b.toLowerCase());if(null!==c)return c;C("Unknown DiagramEvent name: "+b)}t.Bj=function(a,b){a=ik(this,a);null!==a&&a.add(b);return this};t.am=function(a,b){a=ik(this,a);null!==a&&a.remove(b)}; -t.S=function(a,b,c){var d=ik(this,a),e=new ae;e.diagram=this;a=Dj(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.Fa(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=N.allocAt(0,0,d.width*e,d.height*e);var f=J.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.Xa(pb)||(b=new J(b.x+f.x/e,b.y+f.y/e)); N.free(d);J.free(f);return b};t=Q.prototype;t.Cs=function(){return null};t.bv=function(){return null};t.bs=function(a,b){this.pj.add(a,b)};t.Gu=function(a){(this.Qw=a)||this.nodes.each(function(a){a instanceof pf&&(a.$p=null)})}; -function Ek(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Ng)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; -t.Kx=function(a){void 0===a&&(a={});return Ek(this,this.Yz,a)}; -t.Yz=function(a,b,c){var d=Fk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Zi+"data":e=d.getImageData(0,0,c.width,c.height);break;case Zi:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Lg)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; +t.Kx=function(a){void 0===a&&(a={});return Hk(this,this.Yz,a)}; +t.Yz=function(a,b,c){var d=Ik(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case cj+"data":e=d.getImageData(0,0,c.width,c.height);break;case cj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Fk(a,b,c,d){a.animationManager.Cc();a.bd();if(null===a.ta)return null;"object"!==typeof b&&C("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 L(Infinity,Infinity):new L(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,q=b.elementFinished||null,r=b.showTemporary; -void 0===r&&(r=!n);b=b.showGrid;void 0===b&&(b=r);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new dc(l):l instanceof dc||C("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.ib.Vc(!0);n=new Pi(null,p,void 0,!0);var u=n.context;if(!(e||f||k||h)){n.width=a.Aa+Math.ceil(l.left+l.right);n.height=a.ya+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.hs=q;Bj(a,d.context,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);a.Xm=!0;return n.context}var w=a.Pp,v=a.documentBounds.copy();v.Gv(a.zb);if(r)for(var y=a.Wa.s,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+=z):l=new dc(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.hs=q;Bj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Gk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Fj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, -0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Fj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), +f&&(f=w),e.w()?(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.w()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.w()?(f=Math.min((g.width-h)/v.width,(g.height-z)/v.height),f>w?(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+=z):l=new cc(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.hs=q;Fj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Fj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} +ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Jk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Jj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, +0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Jj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), this.removeEventListener(b,"pointerdown",this.ui,!1),this.removeEventListener(b,"pointerup",this.ek,!1),this.removeEventListener(b,"pointerout",this.dk,!1),this.removeEventListener(b,"pointercancel",this.bk,!1),this.ta.nx()),this.ol&&(this.ol.disconnect(),this.ol=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.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),ke===this&&(ke=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, +this.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),le===this&&(le=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, this.Wt=a.toPort))}},Nx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Ox:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.dc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a;this.dc.skipsUndoManager= a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var b=this.pb;b!==a&&((0>a||1a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("allowZoom",b,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var b=this.nn;b!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",b,a),jj(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var b=this.mn;b!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",b,a),jj(this,!1))}},allowHorizontalScroll:{ +get:function(){return this.Xs},set:function(a){var b=this.Xs;b!==a&&(this.Xs=a,this.g("allowHorizontalScroll",b,a),jj(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(this.$s=a,this.g("allowVerticalScroll",b,a),jj(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var b=this.iu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{ get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){""===a&&(a=this.Op);if(this.it!==a){var b=this.ta,c=this.Ka;if(null!==b&&null!==c){this.it=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.Op},set:function(a){""===a&&(a="auto");var b=this.Op;b!==a&&(this.Op=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(this.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ @@ -784,29 +784,29 @@ set:function(a){var b=this.Ch;b!==a&&(this.Ch=a,this.g("contextMenu",b,a))}},com a))}},currentTool:{get:function(){return this.hb},set:function(a){var b=this.hb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Iw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var b=this.Nt;if(b!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount", b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var b=this.St;b!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{ get:function(){return this.wt},set:function(a){var b=this.wt;b!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.ow}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction? -!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.dc},set:function(a){var b=this.dc;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Li(this,!0);this.hf=!1;this.fn= -!0;this.Ce=-2;this.kg=!1;var d=this.wb;this.wb=!0;kh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){return b.hk(a)}),b.hk(this.Oc));this.dc=a;this.partManager=bk(this.dc.type);for(var e=0;ethis.scale&&(this.scale=a)):xa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var b=this.Mt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.yk}, -set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),fj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ +set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),jj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Pc=a,a.Xe(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.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Hk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= -this.uu;b!==a&&(a!==yi&&a!==Ik&&a!==Jk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Kk.kc()},set:function(a){Kk.add(a.replace(/\s/g,""))}},version:{get:function(){return Lk}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; +get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Kk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= +this.uu;b!==a&&(a!==yi&&a!==Lk&&a!==Mk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Nk.kc()},set:function(a){Nk.add(a.replace(/\s/g,""))}},version:{get:function(){return Ok}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; Q.prototype.doAutoScroll=Q.prototype.gs;Q.prototype.isUnoccupied=Q.prototype.Xj;Q.prototype.raiseDiagramEvent=Q.prototype.S;Q.prototype.removeDiagramListener=Q.prototype.am;Q.prototype.addDiagramListener=Q.prototype.Bj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Vz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.Va;Q.prototype.findLinksByExample=Q.prototype.ls; Q.prototype.findNodesByExample=Q.prototype.ms;Q.prototype.findLinkForData=Q.prototype.Kc;Q.prototype.findNodeForData=Q.prototype.ii;Q.prototype.findPartForData=Q.prototype.Lc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Wb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Wd;Q.prototype.transformViewToDoc=Q.prototype.Ps;Q.prototype.transformRectDocToView=Q.prototype.AA;Q.prototype.transformDocToView=Q.prototype.op; Q.prototype.centerRect=Q.prototype.es;Q.prototype.scrollToRect=Q.prototype.uv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Kz;Q.prototype.highlight=Q.prototype.Jz;Q.prototype.selectCollection=Q.prototype.sA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.rp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Kf; @@ -814,493 +814,494 @@ Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.Xw;Q.prototype.addLayer=Q.prototype.Al;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Jj;Q.prototype.removeParts=Q.prototype.Is;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ex;Q.prototype.setProperties=Q.prototype.nm;Q.prototype.attach=Q.prototype.Eu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Tx;Q.prototype.setInputOption=Q.prototype.tA; Q.prototype.getInputOption=Q.prototype.Ql;Q.prototype.resetRenderingHints=Q.prototype.Ux;Q.prototype.setRenderingHint=Q.prototype.Yx;Q.prototype.getRenderingHint=Q.prototype.Gf;Q.prototype.maybeUpdate=Q.prototype.bd;Q.prototype.requestUpdate=Q.prototype.ac;Q.prototype.delayInitialization=Q.prototype.Yy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.Ya;Q.prototype.findObjectsNear=Q.prototype.og;Q.prototype.findPartsNear=Q.prototype.nz; Q.prototype.findObjectsIn=Q.prototype.Cf;Q.prototype.findPartsIn=Q.prototype.vx;Q.prototype.findObjectsAt=Q.prototype.ji;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Ol;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Ky;Q.prototype.zoomToRect=Q.prototype.CA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.lx;Q.prototype.focus=Q.prototype.focus; -var oi=new ob,Oi=null,Ng=void 0!==x.document,Ji=null,Ki="",qh=new E(Q,"None",0),ij=new E(Q,"Uniform",1),jj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Ik=new E(Q,"AllParentsCollapsed",22),Jk=new E(Q,"AnyParentsCollapsed", -23),Kk=new F,Lk="2.3.12",Zi="image",aj=null,mi=!1; -function ni(){if(Ng){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; -aj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Ng=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Ng};Q.None=qh;Q.Uniform=ij; -Q.UniformToFill=jj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Ik;Q.AnyParentsCollapsed=Jk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} -function Aj(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Ng){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Kk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +var oi=new ob,Si=null,Lg=void 0!==x.document,Ni=null,Oi="",oh=new E(Q,"None",0),mj=new E(Q,"Uniform",1),nj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Lk=new E(Q,"AllParentsCollapsed",22),Mk=new E(Q,"AnyParentsCollapsed", +23),Nk=new F,Ok="2.3.13",cj="image",ej=null,mi=!1; +function ni(){if(Lg){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; +ej=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Lg=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Lg};Q.None=oh;Q.Uniform=mj; +Q.UniformToFill=nj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Lk;Q.AnyParentsCollapsed=Mk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} +function Ej(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Lg){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Nk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("2bfa41fdb3784bca12")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.Rc=!(0<=g&&gh),!a.Rc))break;if("#"===f[0]){g=x.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g);k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Rc=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Of=function(){null!==d.observed&&Qk(d)};c.autoScale=ij;c.wb=!1;b&&Object.assign(c,b);return c}la(Gk,Q);Gk.prototype.computePixelRatio=function(){return 1}; -Gk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){xj(this);if(null===this.ql){var c=new Pi(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Rk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; -Gk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Fj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){xj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Rk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Rc&&a!==a.xy?!0:!1}ui.className="DiagramHelper";function Me(a){this.j=void 0===a?new J:a;this.o=new J}ma.Object.defineProperties(Me.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var bj="DraggingInfo";Me.className="DraggingInfo";function Vj(a,b,c){this.node=a;this.info=b;this.Tu=c}Vj.className="DraggingNodeInfoPair"; +function Ee(){this.reset()}Ee.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new L(NaN,NaN)).freeze();this.gridSnapCellSpot=sc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ee.className="DraggingOptions"; +function Pk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Qk(c);b&&c.nm(b);return c}la(Pk,Q);function Qk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=tc;a.layout=new Rk}Pk.prototype.reset=function(){Q.prototype.reset.call(this);Qk(this)};Pk.className="Palette"; +function Jk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.V=null;c.mn=!1;c.nn=!1;c.F=!0;c.u=!0;c.ia=0;c.o=!1;c.ql=null;c.Yx("drawShadows",!1);a=new U;var e=new Bf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new cc(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Sk,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new J(c.x-b.width/2,c.y-b.height/2)}};c.Pf=function(){d.Ya();Tk(d)};c.Xd=function(){null!==d.observed&&(d.Ya(),d.N())};c.Ha=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Of=function(){null!==d.observed&&Tk(d)};c.autoScale=mj;c.wb=!1;b&&Object.assign(c,b);return c}la(Jk,Q);Jk.prototype.computePixelRatio=function(){return 1}; +Jk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){Bj(this);if(null===this.ql){var c=new Ti(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Uk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; +Jk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Jj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Bj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Uk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,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.Nb,this.Nb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.yc());b=this.Wa.s;for(var c=b.length,d=0;da&&(a=0);this.ia!==a&&(this.ia=a)}}});Gk.className="Overview";function Pk(){Ae.call(this);this.j=null}la(Pk,Ae); -Pk.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.timestampa&&(a=0);this.ia!==a&&(this.ia=a)}}});Jk.className="Overview";function Sk(){De.call(this);this.j=null}la(Sk,De); +Sk.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))};Sk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===qh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Sk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Sk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; -Sk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;kh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=bc):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());mh(b)};Sk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Sk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0b.maxScale||(b.scale=a))};Vk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===oh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Vk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Vk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Vk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;ih(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=ac):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());kh(b)};Vk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +Vk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0a&&(a+=360));return a}; +t.mi=function(a){void 0===a&&(a=new N);var b=this.naturalBounds,c=this.oe,d=J.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Xb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Xb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Xb(a,d.x,d.y,0,0);J.free(d);return a};t.li=function(){var a=this.oe;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; t.Df=function(){if(0!==(this.l&4096)===!1)return this.Jk;var a=this.Ca;return null!==this.panel?a*this.panel.Df():a};t.qs=function(a,b){void 0===b&&(b=new J);b.assign(a);this.oe.Cd(b);return b};t.rs=function(a,b,c){return this.Rj(a.x,a.y,b.x,b.y,c)}; t.Rj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,K.Ff(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=K.Ff(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -Y.prototype.measure=function(a,b,c,d){if(!1!==uj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(jl(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Wk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Xk: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.Db> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ll(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; -function ml(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=jl(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:pj(a,!0);a.measure(d,e,0,0);break;case Wk:pj(a,!0);a.measure(d,f,0,0);break;case Xk:pj(a,!0),a.measure(c,e,0,0)}}} -t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||nl(c,!0),this.N(),Ub(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(nl(a,!0),a instanceof V&&ol(a,this))}; -t.hc=function(a,b){if(!pl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&kl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof ql&&l.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, -a,m,!0,!1,k,h),m instanceof ql&&m.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&sl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, +Y.prototype.measure=function(a,b,c,d){if(!1!==yj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(ml(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Zk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case $k: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.Db> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ol(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; +function pl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ml(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)tj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:tj(a,!0);a.measure(d,e,0,0);break;case Zk:tj(a,!0);a.measure(d,f,0,0);break;case $k:tj(a,!0),a.measure(c,e,0,0)}}} +t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ql(c,!0),this.N(),Tb(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(ql(a,!0),a instanceof V&&rl(a,this))}; +t.hc=function(a,b){if(!sl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&nl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof tl&&l.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, +a,m,!0,!1,k,h),m instanceof tl&&m.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&vl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, y=p.m22,z=p.dy,A,B=A=0;p=A*r+B*u+w;var D=A*v+B*y+z;A=q.width+n;B=0;var M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);var S=Math.min(D,A);var R=Math.max(p+0,M)-B;var I=Math.max(D+0,A)-S;p=B;D=S;A=q.width+n;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;A=0;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;n=b.viewportBounds;q=n.x;r=n.y;p=!(p>n.width+q||q>R+p||D>n.height+ -r||r>I+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Pg&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); -""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),tl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?tl(a):k&&!1===this.shadowVisible&&ul(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),vl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&wl(this,h)&&null===this.shadowVisible&&ul(a);null!==this.Ma&&(a.yc(),xl(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||wl(this,h))? -(yl(this,!0),null===this.shadowVisible&&ul(a)):yl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&tl(a);m&&k&&ul(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function wl(a,b){if(null===b)return!1;kl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; -function vl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof ql&&a.areaBackground.type===rl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function xl(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof ql&&a.Ma.type===rl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} -function zl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;gI+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Ng&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); +""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),wl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?wl(a):k&&!1===this.shadowVisible&&xl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),yl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&zl(this,h)&&null===this.shadowVisible&&xl(a);null!==this.Ma&&(a.yc(),Al(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||zl(this,h))? +(Bl(this,!0),null===this.shadowVisible&&xl(a)):Bl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&wl(a);m&&k&&xl(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function zl(a,b){if(null===b)return!1;nl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; +function yl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof tl&&a.areaBackground.type===ul?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function Al(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof tl&&a.Ma.type===ul?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} +function Cl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;ge)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ta;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Cj(a,e)}else Cj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function $l(a,b){Wl.add(a,b)} -function am(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new dl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new dl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(cl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(cl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ -get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1e)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ua;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Gj(a,e)}else Gj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function cm(a,b){Zl.add(a,b)} +function dm(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} +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new gl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new gl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(fl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(fl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ +get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",b,a))}},angle:{get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&& -(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Sl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),fl(this)&&(a=this.part,null!==a&&(gl(this,a,"width"),gl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, -set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&&(a=this.part,null!==a&&gl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&& -(a=this.part,null!==a&&gl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),cl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& -(a.height=Infinity),a.freeze(),cl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== -!0&&sl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&sl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(cl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(cl(this),this.A.Pf=a)}},alignment:{ -get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Nl(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== -this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),cl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); -var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),cl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(cl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ -get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&dm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,em(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Rl(this))}},toEndSegmentLength:{ -get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Rl(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Rl(this))}},toLinkable:{get:function(){return null!== +(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Vl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),il(this)&&(a=this.part,null!==a&&(jl(this,a,"width"),jl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, +set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&&(a=this.part,null!==a&&jl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&& +(a=this.part,null!==a&&jl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),fl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& +(a.height=Infinity),a.freeze(),fl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== +!0&&vl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&vl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(fl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(fl(this),this.A.Pf=a)}},alignment:{ +get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Ql(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== +this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),fl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); +var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),fl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(fl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ +get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&gm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,hm(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Ul(this))}},toEndSegmentLength:{ +get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Ul(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Ul(this))}},toLinkable:{get:function(){return null!== this.ba?this.ba.Tr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.ba?this.ba.Ur:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.ba?this.ba.Xi:rc},set:function(a){var b=this.fromSpot;b.D(a)||(a=a.J(),this.Xc(), -this.ba.Xi=a,this.g("fromSpot",b,a),Rl(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Rl(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", -b,a),Rl(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== -this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(cl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(cl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(cl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ -get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(cl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(cl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(cl(this), -this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(cl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(cl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: -null},set:function(a){var b=this.mouseHold;b!==a&&(cl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(cl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(cl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, -mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(cl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(cl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; -b!==a&&(cl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(cl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(cl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== -this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(cl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(cl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; +this.ba.Xi=a,this.g("fromSpot",b,a),Ul(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Ul(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", +b,a),Ul(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== +this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(fl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(fl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(fl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ +get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(fl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(fl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(fl(this), +this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(fl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(fl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: +null},set:function(a){var b=this.mouseHold;b!==a&&(fl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(fl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(fl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, +mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(fl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(fl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; +b!==a&&(fl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(fl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(fl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== +this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(fl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(fl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; Y.prototype.attach=Y.prototype.Eu;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.If;Y.prototype.isVisibleObject=Y.prototype.Ed;Y.prototype.isContainedBy=Y.prototype.rg;Y.prototype.getNearestIntersectionPoint=Y.prototype.rs;Y.prototype.getLocalPoint=Y.prototype.qs;Y.prototype.getDocumentScale=Y.prototype.Df;Y.prototype.getDocumentAngle=Y.prototype.li;Y.prototype.getDocumentBounds=Y.prototype.mi;Y.prototype.getDocumentPoint=Y.prototype.ga;Y.prototype.intersectsRect=Y.prototype.Yc; -Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Wl=null;Y.className="GraphObject";Wl=new ob; -$l("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Vl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Vl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Zl=null;Y.className="GraphObject";Zl=new ob; +cm("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Yl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Yl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; b.mouseLeave=function(a,b){b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.If()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Bf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= d}}};b.actionUp=function(b,d){if(d.If()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Bf))){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}); -$l("TreeExpanderButton",function(){var a=Vl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Gi("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +cm("TreeExpanderButton",function(){var a=Yl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Ki("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof we&&(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}); -$l("SubGraphExpanderButton",function(){var a=Vl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof pf){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});$l("ToolTip",function(){return Vl(te,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Vl(Bf,{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)}))}); -$l("ContextMenu",function(){return Vl(te,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Gi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});$l("ContextMenuButton",function(){var a=Vl("Button");a.stretch=Wk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -$l("PanelExpanderButton",function(a){var b=am(a,"COLLAPSIBLE"),c=Vl("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},Vl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Gi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); +cm("SubGraphExpanderButton",function(){var a=Yl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof we&&(c=c.adornedPart);if(c instanceof pf){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});cm("ToolTip",function(){return Yl(we,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Yl(Bf,{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)}))}); +cm("ContextMenu",function(){return Yl(we,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ki("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});cm("ContextMenuButton",function(){var a=Yl("Button");a.stretch=Zk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +cm("PanelExpanderButton",function(a){var b=dm(a,"COLLAPSIBLE"),c=Yl("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},Yl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Ki("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); a=c.fb("ButtonBorder");a instanceof Bf&&(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.ih();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -$l("CheckBoxButton",function(a){var b=am(a);a=Vl("Button",{desiredSize:new L(14,14)},Vl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Gi("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +cm("CheckBoxButton",function(a){var b=dm(a);a=Yl("Button",{desiredSize:new L(14,14)},Yl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Ki("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -$l("CheckBox",function(a){a=am(a);a=Vl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new dc(0,1,0,0)});var b=Vl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new dc(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=kg=new E(Y,"None",0);Y.Default=Yk=new E(Y,"Default",0);Y.Vertical=Xk=new E(Y,"Vertical",4);Y.Horizontal=Wk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); -Y.UniformToFill=Zk=new E(Y,"UniformToFill",2);Y.FlipVertical=$k=new E(Y,"FlipVertical",1);Y.FlipHorizontal=al=new E(Y,"FlipHorizontal",2);Y.FlipBoth=bl=new E(Y,"FlipBoth",3);Y.make=Vl;Y.getBuilders=function(){var a=new ob,b;for(b in Wl)if(b!==b.toLowerCase()){var c=Wl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=$l; -Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};fm.className="STransform"; -function gm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}gm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};gm.className="SGradient"; -function Fj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, -c)}Fj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Fj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Fj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Fj.prototype.focus=function(){this.Oa.focus()};Fj.prototype.nx=function(){this.ownerDocument=null}; -ma.Object.defineProperties(Fj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Fj.className="SVGSurface"; +cm("CheckBox",function(a){a=dm(a);a=Yl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new cc(0,1,0,0)});var b=Yl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new cc(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=kg=new E(Y,"None",0);Y.Default=al=new E(Y,"Default",0);Y.Vertical=$k=new E(Y,"Vertical",4);Y.Horizontal=Zk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); +Y.UniformToFill=bl=new E(Y,"UniformToFill",2);Y.FlipVertical=cl=new E(Y,"FlipVertical",1);Y.FlipHorizontal=dl=new E(Y,"FlipHorizontal",2);Y.FlipBoth=el=new E(Y,"FlipBoth",3);Y.make=Yl;Y.getBuilders=function(){var a=new ob,b;for(b in Zl)if(b!==b.toLowerCase()){var c=Zl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=cm; +Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};im.className="STransform"; +function jm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}jm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};jm.className="SGradient"; +function Jj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, +c)}Jj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Jj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Jj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Jj.prototype.focus=function(){this.Oa.focus()};Jj.prototype.nx=function(){this.ownerDocument=null}; +ma.Object.defineProperties(Jj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Jj.className="SVGSurface"; function ii(a,b){this.Hv=a;this.svg=a.Oa;this.stack=[];this.nh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Il=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.Vg=this.Br=this.Ar=0;this.yd=this.ad=null;this.path=[];this.Yl={};this.Ct=!1; -this.Yg=null;this.uj=0;this.rb=new fm;this.j=Dl(this);this.Mj=Dl(this,"gojs-diagram");this.Hl=this.ti=null;var c=jb++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} -function yj(a,b,c,d,e,f,g){void 0===a.Mj?Bl(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; +this.Yg=null;this.uj=0;this.rb=new im;this.j=Gl(this);this.Mj=Gl(this,"gojs-diagram");this.Hl=this.ti=null;var c=ib++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} +function Cj(a,b,c,d,e,f,g){void 0===a.Mj?El(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.Yl={stroke:"none",fill:"none"}};t.Se=function(a){this.addPath(this.path,this.rb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new gm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+jb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(Zi,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new gm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function El(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;El(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";hm(this,Zi,f,this.rb);this.addElement(Zi,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");im(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};hm(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};hm(this,"fill",a,this.rb);im(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};hm(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new jm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ib++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(cj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new jm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Hl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Hl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";km(this,cj,f,this.rb);this.addElement(cj,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");lm(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};km(this,"fill",a,this.rb);lm(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};km(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.rb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.ak= a.ak}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,ak:this.ak});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; -t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; -ma.Object.defineProperties(Il.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, +t.ng=function(a,b){if(a instanceof tl&&a.type===ul){var c=a.xk;a=a.ft;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; +t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(pm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; +ma.Object.defineProperties(Ll.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter= -""===a?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mm=Object.freeze([]);Il.className="CanvasSurfaceContext";function nm(){this.F=this.o=this.u=this.j=0}nm.className="ColorNumbers"; -function ql(a,b){om||(pm(),om=!0);Qa(this);this._isFrozen=!1;void 0===a?(this.na=Hl,this.wk="black"):"string"===typeof a?(this.na=Hl,this.wk=a):(this.na=a,this.wk="black");a=this.na;a===Kl?(this.Qd=tc,this.Kk=Ac):this.Kk=a===rl?this.Qd=wc:this.Qd=rc;this.Gr=0;this.Xp=NaN;this.xe=this.cr=this.we=null;this.ft=this.xk=0;b&&Object.assign(this,b)} -ql.prototype.copy=function(){var a=new ql;a.na=this.na;a.wk=this.wk;a.Qd=this.Qd.J();a.Kk=this.Kk.J();a.Gr=this.Gr;a.Xp=this.Xp;null!==this.we&&(a.we=this.we.copy());a.cr=this.cr;return a};t=ql.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.ka();return this};t.qb=function(a){a.classType===ql&&(this.type=a)}; -t.toString=function(){var a="Brush(";if(this.type===Hl)a+=this.color;else if(a=this.type===Kl?a+"Linear ":this.type===rl?a+"Radial ":this.type===Jl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&xa(a,"0 <= loc <= 1",ql,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Hl&&(this.type=Kl);this.xe=null;return this}; -t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(a,b));return this};function sm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(b,c)} -t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(-a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(-a,b));return this};function tm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(-b,c)} -function um(a,b,c){Uh(a);a=vm.j;var d=vm.u,e=vm.o,f=vm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((vm.j-a)*c+a)+", "+Math.round((vm.u-d)*c+d)+", "+Math.round((vm.o-e)*c+e)+", "+Math.round((vm.F-f)*c+f)+")"} -t.Hx=function(){if(this.type===Hl)return wm(this.color);if((this.type===Kl||this.type===rl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===rl)return wm(a.first().value);if(null!==a.get(.5))return wm(a.get(.5));if(2===a.count)return a=a.Fa(),wm(um(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 wm(um(a.get(c),a.get(d),1-f/e))}return!1}; -function wm(a){if(!a)return!1;if(a instanceof ql)return a.Hx();Uh(a);return 128>(299*vm.j+587*vm.u+114*vm.o)/1E3} -function rm(a,b){switch(b){case qm:b=100*xm(vm.j);var c=100*xm(vm.u),d=100*xm(vm.o);ym.j=.4124564*b+.3575761*c+.1804375*d;ym.u=.2126729*b+.7151522*c+.072175*d;ym.o=.0193339*b+.119192*c+.9503041*d;ym.F=vm.F;b=zm(ym.j/Am[0]);c=zm(ym.u/Am[1]);d=zm(ym.o/Am[2]);Bm.j=116*c-16;Bm.u=500*(b-c);Bm.o=200*(c-d);Bm.F=ym.F;Bm.j=Math.min(100,Math.max(0,Bm.j+100*a));a=(Bm.j+16)/116;b=a-Bm.o/200;ym.j=Am[0]*Cm(Bm.u/500+a);ym.u=Am[1]*(Bm.j>Dm*Em?Math.pow(a,3):Bm.j/Dm);ym.o=Am[2]*Cm(b);ym.F=Bm.F;a=-.969266*ym.j+1.8760108* -ym.u+.041556*ym.o;b=.0556434*ym.j+-.2040259*ym.u+1.0572252*ym.o;vm.j=255*Fm((3.2404542*ym.j+-1.5371385*ym.u+-.4985314*ym.o)/100);vm.u=255*Fm(a/100);vm.o=255*Fm(b/100);vm.F=ym.F;vm.j=Math.round(vm.j);255vm.j&&(vm.j=0);vm.u=Math.round(vm.u);255vm.u&&(vm.u=0);vm.o=Math.round(vm.o);255vm.o&&(vm.o=0);return"rgba("+vm.j+", "+vm.u+", "+vm.o+", "+vm.F+")";case Gm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){om||(pm(),om=!0);var b=Hm;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,vm.j=a[0],vm.u=a[1],vm.o=a[2],vm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,vm.j=0,vm.u=0,vm.o=0,vm.F=1)}} -function Vh(){var a=vm.j/255,b=vm.u/255,c=vm.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=vm.F}function xm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Fm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function zm(a){return a>Em?Math.pow(a,1/3):(Dm*a+16)/116}function Cm(a){var b=a*a*a;return b>Em?b:(116*a-16)/Dm}function cm(a,b){"string"!==typeof a&&(a instanceof ql||C("Value for "+b+" must be a color string or a Brush, not "+a))}function pm(){Hm=Ng?(new Pi(null,void 0,{willReadFrequently:!0})).context:null} -ma.Object.defineProperties(ql.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Kl?this.start=tc:a===rl&&(this.start=wc));this.end.Mc()&&(a===Kl?this.end=Ac:a===rl&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, -set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",ql,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, -a);0>a&&xa(a,">= zero",ql,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});ql.prototype.isDark=ql.prototype.Hx;ql.prototype.darkenBy=ql.prototype.Xy;ql.prototype.lightenBy=ql.prototype.Wz;ql.prototype.addColorStop=ql.prototype.addColorStop; -var Em=216/24389,Dm=24389/27,Am=[95.047,100,108.883],Hm=null,vm=new nm,Wh=new nm,ym=new nm,Bm=new nm,om=!1;ql.className="Brush";var Hl;ql.Solid=Hl=new E(ql,"Solid",0);var Kl;ql.Linear=Kl=new E(ql,"Linear",1);var rl;ql.Radial=rl=new E(ql,"Radial",2);var Jl;ql.Pattern=Jl=new E(ql,"Pattern",4);var qm;ql.Lab=qm=new E(ql,"Lab",5);var Gm;ql.HSL=Gm=new E(ql,"HSL",6); -ql.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}; -ql.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;om||(pm(),om=!0);var b=Hm;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};ql.lighten=function(a){return sm(a)};ql.lightenBy=sm;ql.darken=function(a){return tm(a)};ql.darkenBy=tm;ql.mix=um;ql.isDark=wm;function Zl(){this.xa="Base"}Zl.prototype.measure=function(){}; -Zl.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};Zl.prototype.arrange=function(){};Zl.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Zl.prototype.jA=function(a){a.Tj()};Zl.prototype.hc=function(){};ma.Object.defineProperties(Zl.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});Zl.prototype.remeasureObject=Zl.prototype.jA;Zl.prototype.arrangeElement=Zl.prototype.My; -Zl.prototype.measureElement=Zl.prototype.Zz;Zl.className="PanelLayout";function Im(){this.xa="Base"}la(Im,Zl); -Im.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Jm(a);for(var k=0;ka)&&xa(a,"0 <= loc <= 1",tl,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Kl&&(this.type=Nl);this.xe=null;return this}; +t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(b,c)} +t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(-a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(-a,b));return this};function wm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(-b,c)} +function xm(a,b,c){Uh(a);a=ym.j;var d=ym.u,e=ym.o,f=ym.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((ym.j-a)*c+a)+", "+Math.round((ym.u-d)*c+d)+", "+Math.round((ym.o-e)*c+e)+", "+Math.round((ym.F-f)*c+f)+")"} +t.Hx=function(){if(this.type===Kl)return zm(this.color);if((this.type===Nl||this.type===ul)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ul)return zm(a.first().value);if(null!==a.get(.5))return zm(a.get(.5));if(2===a.count)return a=a.Fa(),zm(xm(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 zm(xm(a.get(c),a.get(d),1-f/e))}return!1}; +function zm(a){if(!a)return!1;if(a instanceof tl)return a.Hx();Uh(a);return 128>(299*ym.j+587*ym.u+114*ym.o)/1E3} +function um(a,b){switch(b){case tm:b=100*Am(ym.j);var c=100*Am(ym.u),d=100*Am(ym.o);Bm.j=.4124564*b+.3575761*c+.1804375*d;Bm.u=.2126729*b+.7151522*c+.072175*d;Bm.o=.0193339*b+.119192*c+.9503041*d;Bm.F=ym.F;b=Cm(Bm.j/Dm[0]);c=Cm(Bm.u/Dm[1]);d=Cm(Bm.o/Dm[2]);Em.j=116*c-16;Em.u=500*(b-c);Em.o=200*(c-d);Em.F=Bm.F;Em.j=Math.min(100,Math.max(0,Em.j+100*a));a=(Em.j+16)/116;b=a-Em.o/200;Bm.j=Dm[0]*Fm(Em.u/500+a);Bm.u=Dm[1]*(Em.j>Gm*Hm?Math.pow(a,3):Em.j/Gm);Bm.o=Dm[2]*Fm(b);Bm.F=Em.F;a=-.969266*Bm.j+1.8760108* +Bm.u+.041556*Bm.o;b=.0556434*Bm.j+-.2040259*Bm.u+1.0572252*Bm.o;ym.j=255*Im((3.2404542*Bm.j+-1.5371385*Bm.u+-.4985314*Bm.o)/100);ym.u=255*Im(a/100);ym.o=255*Im(b/100);ym.F=Bm.F;ym.j=Math.round(ym.j);255ym.j&&(ym.j=0);ym.u=Math.round(ym.u);255ym.u&&(ym.u=0);ym.o=Math.round(ym.o);255ym.o&&(ym.o=0);return"rgba("+ym.j+", "+ym.u+", "+ym.o+", "+ym.F+")";case Jm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){rm||(sm(),rm=!0);var b=Km;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,ym.j=a[0],ym.u=a[1],ym.o=a[2],ym.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,ym.j=0,ym.u=0,ym.o=0,ym.F=1)}} +function Vh(){var a=ym.j/255,b=ym.u/255,c=ym.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=ym.F}function Am(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Im(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Cm(a){return a>Hm?Math.pow(a,1/3):(Gm*a+16)/116}function Fm(a){var b=a*a*a;return b>Hm?b:(116*a-16)/Gm}function fm(a,b){"string"!==typeof a&&(a instanceof tl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function sm(){Km=Lg?(new Ti(null,void 0,{willReadFrequently:!0})).context:null} +ma.Object.defineProperties(tl.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Nl?this.start=tc:a===ul&&(this.start=wc));this.end.Mc()&&(a===Nl?this.end=Ac:a===ul&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, +set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",tl,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, +a);0>a&&xa(a,">= zero",tl,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});tl.prototype.isDark=tl.prototype.Hx;tl.prototype.darkenBy=tl.prototype.Xy;tl.prototype.lightenBy=tl.prototype.Wz;tl.prototype.addColorStop=tl.prototype.addColorStop; +var Hm=216/24389,Gm=24389/27,Dm=[95.047,100,108.883],Km=null,ym=new qm,Wh=new qm,Bm=new qm,Em=new qm,rm=!1;tl.className="Brush";var Kl;tl.Solid=Kl=new E(tl,"Solid",0);var Nl;tl.Linear=Nl=new E(tl,"Linear",1);var ul;tl.Radial=ul=new E(tl,"Radial",2);var Ml;tl.Pattern=Ml=new E(tl,"Pattern",4);var tm;tl.Lab=tm=new E(tl,"Lab",5);var Jm;tl.HSL=Jm=new E(tl,"HSL",6); +tl.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}; +tl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;rm||(sm(),rm=!0);var b=Km;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};tl.lighten=function(a){return vm(a)};tl.lightenBy=vm;tl.darken=function(a){return wm(a)};tl.darkenBy=wm;tl.mix=xm;tl.isDark=zm;function bm(){this.xa="Base"}bm.prototype.measure=function(){}; +bm.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};bm.prototype.arrange=function(){};bm.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};bm.prototype.jA=function(a){a.Tj()};bm.prototype.hc=function(){};ma.Object.defineProperties(bm.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});bm.prototype.remeasureObject=bm.prototype.jA;bm.prototype.arrangeElement=bm.prototype.My; +bm.prototype.measureElement=bm.prototype.Zz;bm.className="PanelLayout";function Lm(){this.xa="Base"}la(Lm,bm); +Lm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Mm(a);for(var k=0;kS&&(eb=Math.max(S-ff,0));var nk=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(nk?ff:0)),0)}if(1===ec.columnSpan&&(Fb===kg||Fb===Xk)){G=a.Fb(Eb);var Ai=G.Wc();eb=Math.max(Lf-G.actual,0);eb+Ai>M&&(eb=Math.max(M-Ai,0));var Pn=0===G.oa;G.pc=G.pc+eb;G.actual= -G.oa+eb;M=Math.max(M-(eb+(Pn?Ai:0)),0)}ef&&ec.Tj()}}}}}Ga(y);var Td=0,ne=0;f=a.columnCount;for(var sg=0;sg=a.rowCount);Oe++)G=a.Gb(Pa.row+Oe),eb=0,eb=Fb===nd||Fb===Xk?Math.max(G.minimum, -0===ud[Pa.row+Oe]?G.maximum:Math.min(ud[Pa.row+Oe],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.height+=eb,qc+=G.minimum;for(var Vc=1;Vc=a.columnCount);Vc++)G=a.Fb(Pa.column+Vc),eb=0,eb=Fb===nd||Fb===Wk?Math.max(G.minimum,0===Hc[Pa.column+Vc]?G.maximum:Math.min(Hc[Pa.column+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.width+=eb,rk+=G.minimum;hb.width+=Id.width;hb.height+=Id.height;var Eh=Pa.margin, -lf=Eh.right+Eh.left,Ci=Eh.top+Eh.bottom;Pa.measure(hb.width,hb.height,rk,qc);for(var Fh=Pa.measuredBounds,Jd=Math.max(Fh.width+lf,0),Pf=Math.max(Fh.height+Ci,0),mf=0,Gh=0;Gh=a.rowCount);Gh++)G=a.Gb(Pa.row+Gh),mf+=G.total||0;if(mf=Pe)&&!(Pa.row+qe>=a.rowCount);qe++){G=a.Gb(Pa.row+qe);var Re=G.oa||0,Qf=Qe(Pa,G,Vd);G.actual=Math.min(G.maximum,Re+Qf);G.oa!==Re&&(Pe-=G.oa- -Re)}for(;0vd&&(G.actual=Math.min(G.maximum,vd+Pe),G.oa!==vd&&(Pe-=G.oa-vd));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var vg=0,Se=0;Se=a.columnCount);Se++)G=a.Fb(Pa.column+Se),vg+=G.total||0;if(vg=wg)&&!(Pa.column+Rf>=a.columnCount);Rf++){G=a.Fb(Pa.column+Rf);var Di=G.oa||0,Sn=re(Pa,G,Rn);G.actual=Math.min(G.maximum, -Di+Sn);G.oa!==Di&&(wg-=G.oa-Di)}for(;0sk&&(G.actual=Math.min(G.maximum,sk+wg),G.oa!==sk&&(wg-=G.oa-sk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Id);L.free(hb);void 0!==ud&&Ga(ud);void 0!==Hc&&Ga(Hc);var xg=0,yg=0,tk=a.desiredSize,Fr=a.maxSize;Fb=jl(a,!0);var Ei=ne=Td=0,Fi=0;f=a.columnCount;for(var uk=0;uk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= -1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ke=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ke=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Yb()){Ua=a.defaultAlignment;Ua.sb()||(Ua=wc);var rd=Ua.x;var Eb=Ua.y;var Le=Ua.offsetX;Ua=Ua.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Le=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Ua=Tc.offsetY)}else rd=Ua.x,Eb=Ua.y,Le= -Ua.offsetX,Ua=Ua.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Ua=Le=0;xc=I.width;Tc=I.height;var nc=R.margin,ec=nc.left+nc.right,ef=nc.top+nc.bottom,sd=Ol(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Wk||(xc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==Xk||(Tc=Math.max(na-ef,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+ef;G+=wa*rd-(xc+ec)*rd+Le+nc.left;ca+=db*Eb-X*Eb+Ua+nc.top;R.visible&& -(Zb(gb,Db,eb,Ke,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ke)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(B))}}}}r= +function Qm(a,b,c){var d=null;a instanceof W&&""!==a.$e&&(d=a.fb(a.$e),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.pp(b),d=d.panel}function Rm(){this.xa="Base"}la(Rm,bm); +Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Qb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Bf&&(u=k,r=u.strokeWidth*u.scale);var w=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var v=Sm(k),y=v.x*w+v.offsetX;v=v.y*l+v.offsetY;var z=Tm(k),A=z.x*w+z.offsetX;z=z.y*l+z.offsetY;isFinite(b)&&(m=Math.max(Math.abs(y-A)-r,0));isFinite(c)&&(n=Math.max(Math.abs(v-z)-r,0));r=L.alloc();r.h(0,0);a=Mm(a);for(z=0;zS&&(eb=Math.max(S-vh,0));var Sn=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(Sn?vh:0)),0)}if(1===dc.columnSpan&&(Fb===kg||Fb===$k)){G=a.Fb(Eb);var zi=G.Wc();eb=Math.max(oc-G.actual,0);eb+zi>M&&(eb=Math.max(M-zi,0));var sk=0===G.oa; +G.pc=G.pc+eb;G.actual=G.oa+eb;M=Math.max(M-(eb+(sk?zi:0)),0)}(Pe||sd)&&dc.Tj()}}}}}Ga(y);var oe=0,Dd=0;f=a.columnCount;for(var wh=0;wh=a.rowCount);Vc++)G=a.Gb(Na.row+Vc),eb=0,eb=Fb=== +nd||Fb===$k?Math.max(G.minimum,0===Hc[Na.row+Vc]?G.maximum:Math.min(Hc[Na.row+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.height+=eb,Dh+=G.minimum;for(var Of=1;Of=a.columnCount);Of++)G=a.Fb(Na.column+Of),eb=0,eb=Fb===nd||Fb===Zk?Math.max(G.minimum,0===re[Na.column+Of]?G.maximum:Math.min(re[Na.column+Of],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.width+=eb,qc+=G.minimum;jb.width+=Gd.width; +jb.height+=Gd.height;var Vd=Na.margin,Ei=Vd.right+Vd.left,Fi=Vd.top+Vd.bottom;Na.measure(jb.width,jb.height,qc,Dh);for(var Wd=Na.measuredBounds,Pf=Math.max(Wd.width+Ei,0),Qf=Math.max(Wd.height+Fi,0),Eh=0,mf=0;mf=a.rowCount);mf++)G=a.Gb(Na.row+mf),Eh+=G.total||0;if(Eh=Wc)&&!(Na.row+se>=a.rowCount);se++){G=a.Gb(Na.row+se);var Te=G.oa||0,te=Rf(Na,G,Se);G.actual=Math.min(G.maximum, +Te+te);G.oa!==Te&&(Wc-=G.oa-Te)}for(;0tg&&(G.actual=Math.min(G.maximum,tg+Wc),G.oa!==tg&&(Wc-=G.oa-tg));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var Ue=0,Fh=0;Fh=a.columnCount);Fh++)G=a.Fb(Na.column+Fh),Ue+=G.total||0;if(Ue=ug)&&!(Na.column+Gh>=a.columnCount);Gh++){G=a.Fb(Na.column+Gh);var Hi=G.oa||0,tu=Gi(Na, +G,ue);G.actual=Math.min(G.maximum,Hi+tu);G.oa!==Hi&&(ug-=G.oa-Hi)}for(;0vk&&(G.actual=Math.min(G.maximum,vk+ug),G.oa!==vk&&(ug-=G.oa-vk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Gd);L.free(jb);void 0!==Hc&&Ga(Hc);void 0!==re&&Ga(re);var vg=0,wg=0,wk=a.desiredSize,Fr=a.maxSize;Fb=ml(a,!0);var Ii=Dd=oe=0,Ji=0;f=a.columnCount;for(var xk=0;xk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= +1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ne=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ne=Math.max(c.height-k,0));var Va=R.alignment;if(Va.Yb()){Va=a.defaultAlignment;Va.sb()||(Va=wc);var rd=Va.x;var Eb=Va.y;var Oe=Va.offsetX;Va=Va.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Oe=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Va=Tc.offsetY)}else rd=Va.x,Eb=Va.y,Oe= +Va.offsetX,Va=Va.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Va=Oe=0;xc=I.width;Tc=I.height;var lc=R.margin,dc=lc.left+lc.right,Pe=lc.top+lc.bottom,sd=Rl(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Zk||(xc=Math.max(X-dc,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==$k||(Tc=Math.max(na-Pe,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+Pe;G+=wa*rd-(xc+dc)*rd+Oe+lc.left;ca+=db*Eb-X*Eb+Va+lc.top;R.visible&& +(Yb(gb,Db,eb,Ne,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ne)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=dk(v.figure);for(var A=0;Az&&y.push(B))}}}}r= a.O.s;u=r.length;for(w=0;we*v*c))){z=D.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=D.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=q[w];var M=!1,S=D.strokeDashArray;null!==S&&(M=!0,b.js(S,D.strokeDashOffset));if("LineV"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== +e);S<=D+l;S++){var R=S*e+p;0<=R&&R<=h&&an(S,y,z,B)&&(b.moveTo(R,0),b.lineTo(R,k))}b.stroke();b.Se()}else if("LineH"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== P.j?I.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&I.offset(-R.startX,-R.startY));R=z[2];if(M!==Zf){var G=k.computeAngle(y,M,R);y.Lb=G}G=I.x-b.x;var ca=I.y-b.y;J.free(I);Ga(z)}else if(A<-n||A>=n)z=J.alloc(),k.vg(),k.computeMidPoint(z),R=k.midAngle,M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G),G=z.x-b.x,ca=z.y-b.y,J.free(z);else{G=0;0<=A?(ca=m.M(A),z=AX+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==an&&M!==bn||r.rotate(90, -X/2,wa/2);M!==cn&&M!==dn||r.rotate(-90,X/2,wa/2);M===en&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); +2):z);I=R.Bf(ca);var X=z.Bf(G);R=I>X+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==dn&&M!==en||r.rotate(90, +X/2,wa/2);M!==fn&&M!==gn||r.rotate(-90,X/2,wa/2);M===hn&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); G+=w.x;ca+=w.y;I.set(z);I.h(G+D,ca+y,z.width,z.height);q.push(I);c.ed(I)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.jg=c;a.position.h(b.x+c.x,b.y+c.y);Pb(e,c.width||0,c.height||0);ld.free(r);J.free(u);J.free(w)}}}}; -Zm.prototype.arrange=function(a,b){var c=b.length;if(a instanceof te||a instanceof T){var d=a,e=null;a instanceof te&&(e=a,d=e.adornedPart);var f=a instanceof te?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=J.alloc(),q=n,w=r,q.vg(),q.computeMidPoint(w),q=n.midAngle,l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,w=r.y, J.free(r);else{u=0;0<=h?(r=b.s[h],w=hy+10?0<=h?q.ab(r):r.ab(q):y>v+10?0<=h?w.ab(u):u.ab(w):0<=h?q.ab(u):u.ab(q)}else q=0<=h?r.ab(w):w.ab(r);l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(w.x-r.x)*k;w=r.y+(w.y-r.y)*k}if(p.ys())g.location=new J(n,w);else{p.Mc()&&(p=wc);r=ld.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var z=g.naturalBounds;u=N.allocAt(0,0,z.width,z.height);v=J.alloc();v.xi(u,p);r.Ga(v);p=-v.x;y=-v.y;var A=z.width,B=z.height;z=J.alloc();z.assign(m);var D=isNaN(m.x),M=isNaN(m.y);if(D||M){A=A/2+3;B=B/2+3;var S=45<=q&&135>=q,R=225<=q&&315>=q;l===Zf&&(S||R)?(z.x=M?A:m.y,z.y=D?B:m.x,S?0<=h||isNaN(h)&&.5>k||!D||(z.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&D&&(z.y=-B),M&&(z.x=-A))):(D&&(z.x=0<=h||isNaN(h)&&.5>k?A:-A),M&&(z.y=-B),z.rotate(q))}else z.rotate(q);n+=z.x;w+=z.y;r.pp(u);p+=u.x;y+=u.y;h=J.allocAt(n+ -p,w+y);g.move(h);J.free(h);J.free(z);J.free(v);N.free(u);ld.free(r)}}null!==e?e.Ul(!1):d.Ul(!1);d=fn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);J.free(d)}}; -function $m(a,b,c,d){if(!1!==uj(d)){var e=d.strokeWidth;0===e&&a instanceof te&&a.type===W.Link&&a.adornedObject instanceof Bf&&(e=a.adornedObject.strokeWidth);e*=d.Ca;a instanceof T&&null!==a.ua?(a=a.geometry.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof te&&null!==a.adornedPart.ua?(a=a.adornedPart.ua.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.w()||null===d.ua?d.ec.h(0,0,e.width,e.height):d.ec.assign(d.ua.bounds);pj(d,!1)}} -function gn(){this.xa="Base"}la(gn,Zl); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Qb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new N(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,w=q.flattenedLengths,v=q.flattenedTotalLength,y=u.length,z=0,A=0,B=Ea(),D=0;DX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbKe))for(var Ua=0;UaKe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Le=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,nc=0,ec=0,ef=v;a.graduatedMarks=[];for(var sd, -xh=0;xhzi*Fb*v/a.graduatedRange&&null===oc.graduatedSkip)){var rg=w[0][0],Fd=0,fc=0;ec=v*oc.graduatedStart-1E-4;ef=v*oc.graduatedEnd+1E-4;var Lf=zi*Fb,pc=a.graduatedTickBase;if(pca.graduatedMin+Lf&&(pc-=Math.floor((pc-a.graduatedMin)/Lf)*Lf);for(var nk=Le[xh],Ai=pc,Pn=1E-6*a.graduatedMax,Td= -1;pc<=a.graduatedMax+Pn;Td++){a:{for(var ne=nk.length,sg=0;sg-yh){var hf=!1;break a}}hf=!0}if(hf&&(pc>a.graduatedMax&&(pc=a.graduatedMax),null===oc.graduatedSkip||oc instanceof Pg&&!oc.graduatedSkip(pc,oc)||oc instanceof Bf&&!oc.graduatedSkip(pc,oc))&&(nc=(pc-a.graduatedMin)*v/a.graduatedRange,nc>v&&(nc=v),ec<=nc&&nc<=ef)){for(var Ud=B[Fd][fc],Me=w[Fd][fc];Fdrg&&fcoe&&.4995oe?0oe||.9995tg){var Ah=1-Math.abs(.5-oe);Ud=(td*Ah+Hd*(1-Ah))%360;break a}}}Ud=td}if(oc instanceof Pg){var ed="";null!==oc.graduatedFunction?(ed=oc.graduatedFunction(pc,oc),ed=null!==ed&&void 0!==ed?ed.toString():""):ed=(+pc.toFixed(2)).toString();""!==ed&&sd.push({$l:zh,angle:Ud,text:ed})}else sd.push({$l:zh,angle:Ud})}pc=Ai+Td*Lf}}}a.graduatedMarks.push(sd)}Ga(B); -var hb=a.graduatedMarks;if(null!==hb)for(var Bi=d.length,Sb=0;Sbfd;fd++){switch(fd){case 0:hc.h(Id,ud);break;case 1:hc.h(Id+Bh,ud);break;case 2:hc.h(Id,ud+Of);break;case 3:hc.h(Id+Bh,ud+Of)}hc.rotate(Pa+Va.angle);hc.offset(qk,Dh);0===Ch&&0===fd?Hc.h(hc.x,hc.y,0,0):Hc.Ye(hc);hc.offset(-qk,-Dh);hc.rotate(-Pa-Va.angle)}J.free(hc);null!==pe.graduatedBounds&&pe.graduatedBounds.push(Hc);Yb(Ne,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Va instanceof Pg){var Uc=a,rk=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Pg);var qc=Uc.temporaryTextBlock;hn(qc,Va); -var Oe=Va.alignmentFocus;Oe.Mc()&&(Oe=tc);for(var Vc=Va.segmentOrientation,Eh=Va.segmentOffset,lf=new N,Ci=0,Fh=0,Jd=0,Pf=0,mf=0,Gh=Tb.length,Pe=0;PeJd||225Jd)&&vd.rotate(-Jd,Re/2,Qf/2);var vg=N.allocAt(0,0,Re,Qf),Se=J.alloc();Se.xi(vg,Oe);vd.Ga(Se);var wg=-Se.x,Rn=-Se.y,re=J.alloc();re.assign(Eh);isNaN(re.x)&&(re.x=Re/2+3);isNaN(re.y)&&(re.y=-(Qf/2+3));re.rotate(Jd);Ci+=re.x+wg;Fh+=re.y+Rn;var Rf=new N(Ci,Fh,Qe.width,Qe.height),Di=new N(Qe.x,Qe.y,Qe.width,Qe.height),Sn=new N(qe.x,qe.y,qe.width,qe.height); -Vd.Tz=Pf;Vd.lineCount=qc.lineCount;Vd.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Vd.actualBounds=Rf;Vd.measuredBounds=Di;Vd.naturalBounds=Sn;0===Pe?lf.assign(Rf):lf.ed(Rf);J.free(re);J.free(Se);N.free(vg);ld.free(vd)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(lf);Yb(rk,lf.x,lf.y,lf.width,lf.height)}pj(Va,!1)}}}; -gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbNe))for(var Va=0;VaNe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Oe=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,lc=0,dc=0,Pe=v;a.graduatedMarks=[];for(var sd, +gf=0;gfFb*rk*v/a.graduatedRange&&null===mc.graduatedSkip)){var Lf=w[0][0],Cd=0,nc=0;dc=v*mc.graduatedStart-1E-4;Pe=v*mc.graduatedEnd+1E-4;var hf=Fb*rk,oc=a.graduatedTickBase;if(oca.graduatedMin+hf&&(oc-=Math.floor((oc-a.graduatedMin)/hf)*hf);for(var vh=Oe[gf],Sn=oc,zi=1E-6*a.graduatedMax,sk= +1;oc<=a.graduatedMax+zi;sk++){a:{for(var oe=vh.length,Dd=0;Dd-jf){var xh=!1;break a}}xh=!0}if(xh&&(oc>a.graduatedMax&&(oc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Ng&&!mc.graduatedSkip(oc,mc)||mc instanceof Bf&&!mc.graduatedSkip(oc,mc))&&(lc=(oc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),dc<=lc&&lc<=Pe)){for(var fd=B[Cd][nc],Qe=w[Cd][nc];CdLf&&ncpe&&.4995pe?0pe||.9995Bi){var zh=1-Math.abs(.5-pe);fd=(Qd*zh+Fd*(1-zh))%360;break a}}}fd=Qd}if(mc instanceof Ng){var Rd="";null!==mc.graduatedFunction?(Rd=mc.graduatedFunction(oc,mc),Rd=null!==Rd&&void 0!==Rd?Rd.toString():""):Rd=(+oc.toFixed(2)).toString();""!==Rd&&sd.push({$l:Ai,angle:fd,text:Rd})}else sd.push({$l:Ai,angle:fd})}oc=Sn+sk*hf}}}a.graduatedMarks.push(sd)}Ga(B); +var kf=a.graduatedMarks;if(null!==kf)for(var jb=d.length,Mf=0;MfNa;Na++){switch(Na){case 0:fc.h(lf,Gd);break;case 1:fc.h(lf+Ci,Gd);break;case 2:fc.h(lf,Gd+Bh);break;case 3:fc.h(lf+Ci,Gd+Bh)}fc.rotate(Ch+Ra.angle);fc.offset(Nf,uk);0===Td&&0===Na?Hc.h(fc.x,fc.y,0,0):Hc.Ye(fc);fc.offset(-Nf,-uk);fc.rotate(-Ch-Ra.angle)}J.free(fc);null!==pc.graduatedBounds&&pc.graduatedBounds.push(Hc);Xb(Re,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Ra instanceof Ng){var Uc=a,Ud=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Ng);var qc=Uc.temporaryTextBlock;ln(qc,Ra); +var Dh=Ra.alignmentFocus;Dh.Mc()&&(Dh=tc);for(var Vc=Ra.segmentOrientation,Of=Ra.segmentOffset,Vd=new N,Ei=0,Fi=0,Wd=0,Pf=0,Qf=0,Eh=Sb.length,mf=0;mfWd||225Wd)&&te.rotate(-Wd,se/2,Te/2);var tg=N.allocAt(0,0,se,Te),Ue=J.alloc();Ue.xi(tg,Dh);te.Ga(Ue);var Fh=-Ue.x,ug=-Ue.y,ue=J.alloc();ue.assign(Of);isNaN(ue.x)&&(ue.x=se/2+3);isNaN(ue.y)&&(ue.y=-(Te/2+3));ue.rotate(Wd);Ei+=ue.x+Fh;Fi+=ue.y+ug;var Gi=new N(Ei,Fi,Se.width,Se.height),Gh=new N(Se.x,Se.y,Se.width,Se.height),Hi=new N(Rf.x,Rf.y,Rf.width,Rf.height); +Wc.Tz=Pf;Wc.lineCount=qc.lineCount;Wc.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Wc.actualBounds=Gi;Wc.measuredBounds=Gh;Wc.naturalBounds=Hi;0===mf?Vd.assign(Gi):Vd.ed(Gi);J.free(ue);J.free(Ue);N.free(tg);ld.free(te)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(Vd);Xb(Ud,Vd.x,Vd.y,Vd.width,Vd.height)}tj(Ra,!1)}}}; +kn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +t.hh=function(a,b){if(this.na===W.Grid)a.yc(),this.na.hc(this,a,b);else if(this.na===W.Graduated)a.yc(),this.na.hc(this,a,b);else{if(this.na===W.Table)if(a.yc(),a instanceof ii){var c=a.yd;a.yd=Gl(a,"gojs-ts");on(this,a);a.nh.pop();a.yd=c}else on(this,a);(c=this.isClipping&&this.na===W.Spot)&&a.save();for(var d=this.Qb(),e=this.O.s,f=e.length,g=0;gg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.js(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.Se();n&&b.fs()}}}} -function mn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=on(a,!0),l=on(a,!1),m=0;mp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function on(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function rn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),J.free(r));J.free(m);f&&e.transform(g);return l}; -t.Fj=function(){for(var a=this.O.s,b=a.length,c=0;cc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Wk:this.v(!0);this.measure(c+h,f+g,0,0);break;case Xk:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; -t.gh=function(a){var b=this.naturalBounds,c=Jm(this);if(Zb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Zk:this.v(!0);this.measure(c+h,f+g,0,0);break;case $k:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; +t.gh=function(a){var b=this.naturalBounds,c=Mm(this);if(Yb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); -if(null!==m?m.Cf(a,b,c,d,e,p):il(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function vn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&vn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Mm(this),k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); +if(null!==m?m.Cf(a,b,c,d,e,p):ll(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function yn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&yn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.og=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:xb(J.allocAt(a.x,a.y),this.transform),l=h?b:xb(J.allocAt(b.x,b.y),this.transform),m=k.Bf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; -function Pm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Qm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;cw.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; +function Sm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Tm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;uj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||wn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.cb(fe,"elements",this,b,null,d,null),c.cb(ee,"elements",this,null,b,null,a)))};function xn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(ee,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"rowdefs",this,c,null,a,null);this.v()}}}; -function Wj(a,b,c){var d=a.rowDefs;if(!(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.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(ee,"coldefs",this,null,c,null,a)}return b[a]}; -t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"coldefs",this,c,null,a,null);this.v()}}};function Xj(a,b,c){var d=a.colDefs;if(!(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.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&Yl(b,a);return this}; -t.Iy=function(a,b){(a=this.Gb(a))&&Yl(a,new Vj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&Yl(a,new Vj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;yj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||zn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.cb(ge,"elements",this,b,null,d,null),c.cb(fe,"elements",this,null,b,null,a)))};function An(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(fe,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"rowdefs",this,c,null,a,null);this.v()}}}; +function ak(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(fe,"coldefs",this,null,c,null,a)}return b[a]}; +t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"coldefs",this,c,null,a,null);this.v()}}};function bk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&am(b,a);return this}; +t.Iy=function(a,b){(a=this.Gb(a))&&am(a,new Zj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&am(a,new Zj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.qc(this.O.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=tn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&xn(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+tn(a);a.Hb(f,e);d&&(e.ub=b,En(a,f,c),e.ub=null);e.data=b}}} -function En(a,b,c){for(a=a.O;ba;)this.qc(this.O.length-1,!1);Dn(this,this.itemArray)}; +function Dn(a,b){var c=wn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Fn(a,b);e=Gn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&An(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+wn(a);a.Hb(f,e);d&&(e.ub=b,Hn(a,f,c),e.ub=null);e.data=b}}} +function Hn(a,b,c){for(a=a.O;ba&&xa(a,">= 0",W,"padding"), -a=new dc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:lc},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Jn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== -this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof ql)&&(a instanceof ql&&a.freeze(),null===this.U&&(this.U=new Jn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Jn),this.U.Ha=a,this.v(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Jn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.U&&(this.U=new Jn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof te);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), -null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, -set:function(a){var b=this.Hh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););cl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(cl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, +a=new cc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:jc},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Mn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof tl)&&(a instanceof tl&&a.freeze(),null===this.U&&(this.U=new Mn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Mn),this.U.Ha=a,this.v(), +this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Mn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ +a),null===this.U&&(this.U=new Mn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof we);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), +null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, +set:function(a){var b=this.Hh;if(b!==a||null!==a&&Cn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Qj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Nj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Dn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););fl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(fl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this instanceof pf&&(this.tb=null),this.v(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){var c=null===this.panel||this.panel.If(); -this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&wn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); -ma.Object.defineProperties(W,{Position:{get:function(){return Xl.I("Position")}},Horizontal:{get:function(){return Xl.I("Horizontal")}},Vertical:{get:function(){return Xl.I("Vertical")}},Spot:{get:function(){return Xl.I("Spot")}},Auto:{get:function(){return Xl.I("Auto")}},Table:{get:function(){return Xl.I("Table")}},Viewbox:{ -get:function(){return Xl.I("Viewbox")}},TableRow:{get:function(){return Xl.I("TableRow")}},TableColumn:{get:function(){return Xl.I("TableColumn")}},Link:{get:function(){return Xl.I("Link")}},Grid:{get:function(){return Xl.I("Grid")}},Graduated:{get:function(){return Xl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; +this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&zn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); +ma.Object.defineProperties(W,{Position:{get:function(){return $l.I("Position")}},Horizontal:{get:function(){return $l.I("Horizontal")}},Vertical:{get:function(){return $l.I("Vertical")}},Spot:{get:function(){return $l.I("Spot")}},Auto:{get:function(){return $l.I("Auto")}},Table:{get:function(){return $l.I("Table")}},Viewbox:{ +get:function(){return $l.I("Viewbox")}},TableRow:{get:function(){return $l.I("TableRow")}},TableColumn:{get:function(){return $l.I("TableColumn")}},Link:{get:function(){return $l.I("Link")}},Grid:{get:function(){return $l.I("Grid")}},Graduated:{get:function(){return $l.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; W.prototype.findItemPanelForData=W.prototype.tx;W.prototype.updateTargetBindings=W.prototype.La;W.prototype.copyTemplate=W.prototype.Vy;W.prototype.graduatedValueForPoint=W.prototype.Hz;W.prototype.graduatedPointForValue=W.prototype.Gz;W.prototype.findColumnForLocalX=W.prototype.gz;W.prototype.findRowForLocalY=W.prototype.oz;W.prototype.addColumnDefinition=W.prototype.Cy;W.prototype.addRowDefinition=W.prototype.Iy;W.prototype.addRowColumnDefinition=W.prototype.Hy; W.prototype.removeColumnDefinition=W.prototype.kA;W.prototype.getColumnDefinition=W.prototype.Fb;W.prototype.removeRowDefinition=W.prototype.pA;W.prototype.getRowDefinition=W.prototype.Gb;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Hb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.Nl;W.prototype.walkVisualTreeFrom=W.prototype.qm; -W.prototype.findMainElement=W.prototype.Qb;var Gn=!1,Hn=null,Xl=new ob;W.className="Panel";W.definePanelLayout=In;In("Position",new Im);In("Vertical",new Lm);In("Auto",new Om);In("Link",new Zm);function Kn(){this.lq=0;this.F=100;this.ia=10;this.V=0;this.Zh=this.o=this.j=this.u=null}Kn.prototype.copy=function(){var a=new Kn;a.lq=this.lq;a.F=this.F;a.ia=this.ia;a.V=this.V;a.u=this.u;a.j=this.j;a.o=this.o;a.Zh=this.Zh;return a};Kn.className="GradPanelSettings"; -function Jn(){this.Pc=[];this.Oc=[];this.j=this.ob=Ln;this.hb=this.Ib=0;this.Qp=lc;this.Ha=1;this.V=this.ia=null;this.F=1;this.nb=this.o=this.u=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Pc,d=c.length,e=b.Pc,f=0;fa&&xa(a,">= 0",Vj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), -this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Vj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Vj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ -get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Vj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= -a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&cm(a,"RowColumnDefinition.separatorStroke"), -a instanceof ql&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&xa(a,">= 0",Zj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), +this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Zj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Zj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ +get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Zj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= +a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&fm(a,"RowColumnDefinition.separatorStroke"), +a instanceof tl&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;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,q,r,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;r=w[v];n=r[0];q=r[1];p=r[2];r=r[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){Ga(w);return}e>r?(y=e-r,e=r):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(q);a.translate(-(g/2),-(f/2));0===y&&d.hh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==y){v++;if(v===w.length){Ga(w);return}r=w[v];n=r[0];q=r[1];p=r[2];r=r[3];e=y}}Ga(w)}} -t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof te&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof we&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Gf("drawShadows")&&(f=h.isShadowed);!1===a.Il&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.js(k,this.strokeDashOffset));if(e.type===P.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.ik(),a.Se();else if(e.type===P.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.ng(d);null!==c&&(h&&f&&ul(a),a.ik(),h&&f&&tl(a));a.Se()}else if(e.type===P.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+K.wg*e,k-p,l+e,k-K.wg*p,l+e,k),a.bezierCurveTo(l+e,k+K.wg*p,l+K.wg*e,k+p,l,k+p),a.bezierCurveTo(l-K.wg*e,k+p,l-e,k+K.wg*p,l-e,k),a.bezierCurveTo(l-e,k-K.wg*p,l-K.wg*e,k-p,l,k-p),a.closePath(),null!==d&&a.ng(d),null!==c&& -(h&&f&&ul(a),a.ik(),h&&f&&tl(a)),a.Se();else if(e.type===P.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Nd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;vu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Kd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;N.free(f);return K.Zb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== P.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ca(a))return N.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ca(a);N.free(f);return a}if(c.type===P.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return N.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);N.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Rd(c,a.x,a.y,e):Pd(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Od(c,a.x,a.y,e):Md(c,a,e,1=this.strokeWidth)m=K.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Ea();a=new J;K.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),v-=r,y-= -u;q.contains(v,y);)v-=r,y-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||K.$(k.y,a))&&(k.yb||K.$(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} t.ux=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.gh(a,!0))return!0;var e=a.Bf(b),f=e;1.5=e||zb(b,f,0,-n)>=e||zb(b, -f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Rd(b,a.x,a.y,f):Pd(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Ed:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Kd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Ld:case Md:p=n.type===Ld?Nd(n,f):Od(n,f,g,m);var q=p.length;if(0===q){g=n.type===Ld?n.centerX:n.endX;m=n.type===Ld?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; +f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Od(b,a.x,a.y,f):Md(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Bd:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Hd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Id:case Jd:p=n.type===Id?Kd(n,f):Ld(n,f,g,m);var q=p.length;if(0===q){g=n.type===Id?n.centerX:n.endX;m=n.type===Id?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; break}n=null;for(var r=Ea(),u=0;u= 0",Bf,"strokeWidth:value")}},strokeCap:{ -get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Nn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', -Bf,"strokeJoin"):(Nn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Nn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;e= 0",Bf,"strokeWidth:value")}},strokeCap:{ +get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Qn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', +Bf,"strokeJoin"):(Qn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Qn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.ib!==a&&(c=!1);b.ib instanceof ii&& -(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case al:a.translate(e,0);a.scale(-1,1);break;case $k:a.translate(0,f);a.scale(1,-1);break;case bl:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case al:a.scale(-1,1);a.translate(-e,0);break;case $k:a.scale(1,-1);a.translate(0,-f);break;case bl:a.scale(-1,-1),a.translate(-e,-f)}}}; +(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case dl:a.translate(e,0);a.scale(-1,1);break;case cl:a.translate(0,f);a.scale(1,-1);break;case el:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case dl:a.scale(-1,1);a.translate(-e,0);break;case cl:a.scale(1,-1);a.translate(0,-f);break;case el:a.scale(-1,-1),a.translate(-e,-f)}}}; t.Nj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==ko?ko(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);if(l){h=null!==lo?lo(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.Se();b instanceof ii&&b.ad.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.Se(),b instanceof ii&&b.ad.classList.add("gojs-td"))}}; -t.jk=function(a,b,c){if(!Y.prototype.jk.call(this,a,b,c))return!1;ji(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Rb.length))){this.l|=16777216; l=this.Rb[k];for(b=Math.max(1,a-b);oo(l)>b&&1a.maxLines&&(a.l|=16777216)}} +t.eh=function(a,b,c,d){pl(this,a,b,c,d)};function uo(a,b,c){if(null===a.ze)a.ze=b,a.Db=c;else{if(null===a.Rb||null===a.Qc)a.Rb=[],a.Qc=[],a.Rb.push(a.ze),a.Qc.push(a.Db);a.Rb.push(b);a.Qc.push(c);a.Rb.length>a.maxLines&&(a.l|=16777216)}} function vo(a,b,c,d){var e=a.formatting===no;e&&(b=b.trim());var f=0,g=a.Ae,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,jo(a)+h);var k=a.overflow===qo?ro(g):0;if(a.Gc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Gc+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===go?8*a.length:go.measureText(a).width}function jo(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===go){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*go.measureText("M").width,Bo[b]=c,Co++);return a.df=c} function ro(a){if(null===go)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=go.measureText(so).width,Do[a]=b,Eo++;return b} function po(a,b){var c=a.fc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,jo(a)+d);if(0===c.length)return a.Db=0,a.Gc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Gc=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.wrap!==wo){a.Le=0;var k=L.alloc();vo(a,f,b,k);e+=k.height;L.free(k);a.Gc+=a.Le}else vo(a,f,b,null),e+=d,a.Gc++;a.Gc===a.maxLines&&(h=!0)}f=g+1}return a.Lq=e} -ma.Object.defineProperties(Pg.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Yc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= -a,Nl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, +ma.Object.defineProperties(Ng.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Zc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= +a,Ql(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, a))}},isUnderline:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.$r: -Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&cm(a, -"TextBlock.stroke"),a instanceof ql&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: +Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&fm(a, +"TextBlock.stroke"),a instanceof tl&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: null},set:function(a){var b=this.textEditor;b!==a&&(ho(this),this.da.Qr=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return null!==this.da?this.da.Hd:null},set:function(a){var b=this.errorFunction;b!==a&&(ho(this),this.da.Hd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Sk:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa= new eo);this.fa.Sk=a;this.v();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&xa(a,"> 0",Pg,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ -get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Pg,"None",0),to=new E(Pg,"WrapFit",1),Fo=new E(Pg,"WrapDesiredSize",2),yo=new E(Pg,"WrapBreakAll",3),Go=new E(Pg,"OverflowClip",0),qo=new E(Pg,"OverflowEllipsis",1),no=new E(Pg,"FormatTrim",0),Ao=new E(Pg,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ta,Co=0,Do=new Ta,Eo=0,so="...",mo="",go=null,fo=!1;Pg.className="TextBlock"; -function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Yc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Pg.getEllipsis=function(){return so};Pg.setEllipsis=function(a){so=a;Do=new Ta;Eo=0};Pg.getBaseline=function(){return ko}; -Pg.setBaseline=function(a){ko=a};Pg.getUnderline=function(){return lo};Pg.setUnderline=function(a){lo=a};Pg.isValidFont=function(a){fo||(go=Ng?(new Pi(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Pg.FormatNone=Ao;Pg.FormatTrim=no;Pg.None=wo;Pg.OverflowClip=Go; -Pg.OverflowEllipsis=qo;Pg.WrapBreakAll=yo;Pg.WrapDesiredSize=Fo;Pg.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; -function dk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=cc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};dk.prototype.qb=function(a){a===kg||a===mg||a===Zk?this.imageStretch=a:Y.prototype.qb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Mi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ta,Io=0)} -function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case Zk:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===Zk&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;m=a&&xa(a,"> 0",Ng,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ +get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Ng,"None",0),to=new E(Ng,"WrapFit",1),Fo=new E(Ng,"WrapDesiredSize",2),yo=new E(Ng,"WrapBreakAll",3),Go=new E(Ng,"OverflowClip",0),qo=new E(Ng,"OverflowEllipsis",1),no=new E(Ng,"FormatTrim",0),Ao=new E(Ng,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ua,Co=0,Do=new Ua,Eo=0,so="...",mo="",go=null,fo=!1;Ng.className="TextBlock"; +function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Zc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Ng.getEllipsis=function(){return so};Ng.setEllipsis=function(a){so=a;Do=new Ua;Eo=0};Ng.getBaseline=function(){return ko}; +Ng.setBaseline=function(a){ko=a};Ng.getUnderline=function(){return lo};Ng.setUnderline=function(a){lo=a};Ng.isValidFont=function(a){fo||(go=Lg?(new Ti(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Ng.FormatNone=Ao;Ng.FormatTrim=no;Ng.None=wo;Ng.OverflowClip=Go; +Ng.OverflowEllipsis=qo;Ng.WrapBreakAll=yo;Ng.WrapDesiredSize=Fo;Ng.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; +function hk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=bc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(hk,Y); +hk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};hk.prototype.qb=function(a){a===kg||a===mg||a===bl?this.imageStretch=a:Y.prototype.qb.call(this,a)};hk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Qi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ua,Io=0)} +function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case bl:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===bl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Wd(a,0,!0)).add(new Xd(pd,b-a,0)).add(new Xd(Ed,b,a,b-f,0,b,f)).add(new Xd(pd,b,c-a)).add(new Xd(Ed,b-a,c,b,c-f,b-f,c)).add(new Xd(pd,a,c)).add(new Xd(Ed,0,c-a,f,c,0,c-f)).add(new Xd(pd,0,a)).add((new Xd(Ed,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Xd(a,0,!0)).add(new Yd(pd,b-a,0)).add(new Yd(Bd,b,a,b-f,0,b,f)).add(new Yd(pd,b,c-a)).add(new Yd(Bd,b-a,c,b,c-f,b-f,c)).add(new Yd(pd,a,c)).add(new Yd(Bd,0,c-a,f,c,0,c-f)).add(new Yd(pd,0,a)).add((new Yd(Bd,a,0,0,f,f,0)).close()));1e.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.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Mo():a.Sd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.fd||m.bb(),m=m.To(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.$b(!0);m.oh();var n=c?m.Oo():m.Po();l.wv=a;n.all(function(a){return function(b){return b===a.wv||!b.isTreeExpanded}}(l))&&e.Cj(m,f)}if(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; +ig.prototype.computeMemberBounds=function(a){if(!(this.part instanceof pf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof T){if(!b.computesBoundsIncludingLinks)continue;if(yj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; function T(a){U.call(this,W.Link);this.Qa=8;this.ef=null;this.ff="";this.uf=this.gn=null;this.vf="";this.uo=null;this.pk=Zf;this.Om=0;this.Qm=Zf;this.Rm=NaN;this.qj=Dp;this.po=.5;this.wd=null;this.Ob=(new F).freeze();this.Tg=this.Mg=null;this.ml=new N;this.ua=new P;this.u=this.o=this.Sf=this.Wf=null;this.su=new J;this.cq=this.Nw=this.Mw=null;this.vt=NaN;this.ba=null;this.j=[];a&&Object.assign(this,a)}la(T,U); T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Qa=this.Qa&-113;a.ff=this.ff;a.gn=this.gn;a.vf=this.vf;a.uo=this.uo;a.pk=this.pk;a.Om=this.Om;a.Qm=this.Qm;a.Rm=this.Rm;a.qj=this.qj;a.po=this.po;null!==this.ba&&(a.ba=this.ba.copy())};t=T.prototype;t.Af=function(a){U.prototype.Af.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Mg=null;a.bb();a.Sf=this.Sf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new el)};t.si=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.Av=function(){return!1}; -t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case jn:a=b;break;case an:a=b+90;break;case cn:a=b-90;break;case Hp:a=b+180;break;case kn:a=K.bp(b);90a&&(a-=180);break;case bn:a=K.bp(b+90);90a&&(a-=180);break;case dn:a=K.bp(b-90);90a&&(a-=180);break;case en:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; +t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new hl)};t.si=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(zj(a)||Aj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),zj(a)||Aj(a))?!1:!0};t.Av=function(){return!1}; +t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case mn:a=b;break;case dn:a=b+90;break;case fn:a=b-90;break;case Hp:a=b+180;break;case nn:a=K.bp(b);90a&&(a-=180);break;case en:a=K.bp(b+90);90a&&(a-=180);break;case gn:a=K.bp(b-90);90a&&(a-=180);break;case hn:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.qx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.aa,g.aa=!0);e(a,c,b);null!==g&&(g.aa=f)}!a.fd||a.Mw!==c&&a.Nw!==c||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.oh.call(this)};t.To=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.wd&&(a.wd=new H);a.wd.add(b);a.v()} t.Vo=function(a){U.prototype.Vo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Wo=function(a){U.prototype.Wo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Kj=function(){this.fd=!0;if(null!==this.wd){var a=this.diagram;if(null!==a)for(var b=this.wd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; -T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));bf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));df(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(tb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.Qu(.5,a),a.add(this.i(0)),c=this.ua.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===bg){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);K.bx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);K.bx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1563,7 +1564,7 @@ b.y)));return a}; T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.xx(.5);if(this.computeCurve()===bg&&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 K.Ny(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.ab(d)};t=T.prototype;t.i=function(a){return this.Ob.s[a]};t.dd=function(a,b){this.Ob.cd(a,b)};t.L=function(a,b,c){this.Ob.cd(a,new J(b,c))};t.Lz=function(a,b){this.Ob.Hb(a,b)}; t.m=function(a,b,c){this.Ob.Hb(a,new J(b,c))};t.ne=function(a){this.Ob.add(a)};t.yf=function(a,b){this.Ob.add(new J(a,b))};t.qv=function(a){this.Ob.mb(a)};t.Ej=function(){this.Ob.clear()}; -function bf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Nl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function df(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Ql(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Ab&&Nh(g.animationManager,a,e);a.g("points",f,e)}}t.uh=function(){null===this.Mg&&(this.Mg=this.Ob,this.Ob=this.Ob.copy())}; t.zf=function(){if(null!==this.Mg){for(var a=this.Mg,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gd.y k.x?0:180:h.y>=k.y?90:270;J.free(k);k=c}g&&d.Mc()&&g.Td(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.li();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Ku;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=wc:(b=this.fromSpot,b.Yb()&&(b=a.fromSpot),a=b===Sc?rc:b)):(a=b?b:this.toPort,null===a?a=wc:(b=this.toSpot,b.Yb()&&(b=a.toSpot),a=b===Sc?rc:b));return a};function Pp(a){return a===rc||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:wc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==Zf&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); +T.prototype.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); if(m instanceof W)h=m.Cf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Bf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.fh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.Re(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var w=J.alloc(),v=J.alloc(),y=J.alloc(),z=ld.alloc();z.set(r);z.cv(m.transform);z.Uj();v.x=p;v.y=u;v.transform(z);w.x=h;w.y=u;w.transform(z);r=!1;$n(m,w,v,y)?r=!0:(w.x=p,w.y=q,w.transform(z),$n(m,w,v,y)?r=!0:(v.x= -h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=il(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; +h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=ll(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; T.prototype.computeCurve=function(){if(null===this.Wf){var a=this.fromPort,b=this.isOrthogonal;this.Wf=null!==a&&a===this.toPort&&!b}return this.Wf?bg:this.curve};T.prototype.computeCorner=function(){if(this.curve===bg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.O.s,c=b.length,d=0;dk?-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.$(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.dd(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.dd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.Xa(b)||!n.Xa(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.dd(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.w()&&k.w()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ye(a);k.Ye(c);var l=J.alloc(),m=J.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ca(a)||h.ca(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(zk(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(Ck(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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.L(2,a.x,h),this.L(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=q.Ho/2&&(this.L(2,a.x,h.y),this.L(3,a.x,g.y)),this.m(2,a.x,h.y)):this.L(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!==r&&(0===d||180===d?this.yf(f.x,r.y):this.yf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));J.free(l);J.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function Sj(a){if(null===a.diagram||!a.isAvoiding||!jk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=kk(a.diagram,!0,a.containingGroup,null);for(var d=1;dc)return!1;a=ok(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(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>cq)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>cq&&(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),$p(b,g,m)===l-1?bq(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),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)}T.prototype.fz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=yb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.kk=!0:this.ua=this.makeGeometry();a=this.path;if(null!==a){a.ua=this.ua;for(var b=this.O.s,c=b.length,d=0;d=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;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?r>q?(f.x=v-z,f.y=q-z,e.x=v+u,e.y=q+u):(f.x=v-z,f.y=q+z,e.x=v+u,e.y=q-u):r>q?(f.x=v+z,f.y=q-z,e.x=v-u,e.y=q+u):(f.x=v+z,f.y=q+z,e.x=v-u,e.y=q-u));K.$(w,v)&&K.$(q,r)&&(q>p?(y>v?(f.x=v-z,f.y=q-z,e.x=v+u):(f.x=v+z,f.y=q-z,e.x=v-u),e.y=q+u):(y>v?(f.x=v-z,f.y=q+z,e.x=v+u):(f.x=v+z,f.y=q+z,e.x=v-u),e.y=q-u));if(K.$(w,v)&&K.$(v,y)||K.$(p,q)&&K.$(q,r))w=.5*(w+y),p=.5*(p+r),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&K.$(g.x,this.i(0).x)&&K.$(g.y,this.i(0).y)&& -(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));xd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);xd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),xd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f= +(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));ud(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);ud(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),ud(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.D(m))0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb)),gq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);yd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),yd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, -p,u),f.assign(p));e.assign(m);n=l}J.free(f)}Bd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} +n,w,f,p,u),f.assign(p);else{var A=p.x,B=p.y;q=A;y=B;p.x>f.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);vd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),vd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, +p,u),f.assign(p));e.assign(m);n=l}J.free(f)}yd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} function dq(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=fq(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=fq(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 eq(a,b,c,d){for(var e=a.pointsCount,f=b;K.$(b.x,f.x)&&K.$(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.$(b.x,f.x)&&!K.$(b.y,f.y))return c-1;for(var g=f;K.$(b.x,f.x)&&K.$(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.$(b.y,f.y)&&K.$(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}T.prototype.computeJumpLength=function(){return 10}; -function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?wd(b,n,q,!1):xd(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?wd(b,q,m,!1):xd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?td(b,n,q,!1):ud(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?td(b,q,m,!1):ud(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Pa.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,w)n&&!K.B(g,w)){h.x=r;h.y=n;m=!0;break a}}else if(!K.B(n,q)&& K.B(g,w)&&Math.min(n,q)g&&Math.min(r,u)m&&!K.B(r,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 Ip(a){a=a.curve;return a===Xf||a===Yf}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ml.width&&0===a.ml.height||b.Eh.add(a,a.ml.copy())} @@ -1648,7 +1649,7 @@ a,this.g("toPortChanged",b,a))}},fromSpot:{get:function(){return null!==this.ba? this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),this.bb())}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.rc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:Sc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&& pp(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return null!==this.ba?this.ba.wj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",T,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),this.bb())}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.rc(),this.g("toShortLength",b, a))}},isLabeledLink:{get:function(){return null===this.wd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);K.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):K.$(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Bf(e)); @@ -1661,22 +1662,22 @@ a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{g Mp(this,b===Yf||b===Xf||a===Yf||a===Xf),this.g("curve",b,a))}},curviness:{get:function(){return this.Rm},set:function(a){var b=this.Rm;b!==a&&(this.Rm=a,this.bb(),this.rc(),this.g("curviness",b,a))}},routing:{get:function(){return this.qj},set:function(a){var b=this.qj;b!==a&&(this.qj=a,this.Wf=null,this.bb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.po}, set:function(a){var b=this.po;b!==a&&(this.po=a,this.rc(),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram;if(null!==a&&a.model.ri())return a.model.Ac(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Xo;T.prototype.findClosestSegment=T.prototype.fz;T.prototype.updateRoute=T.prototype.vg;T.prototype.invalidateRoute=T.prototype.bb;T.prototype.rollbackRoute=T.prototype.sv;T.prototype.commitRoute=T.prototype.zf;T.prototype.startRoute=T.prototype.uh; T.prototype.clearPoints=T.prototype.Ej;T.prototype.removePoint=T.prototype.qv;T.prototype.addPointAt=T.prototype.yf;T.prototype.addPoint=T.prototype.ne;T.prototype.insertPointAt=T.prototype.m;T.prototype.insertPoint=T.prototype.Lz;T.prototype.setPointAt=T.prototype.L;T.prototype.setPoint=T.prototype.dd;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.Dz;T.prototype.getOtherNode=T.prototype.To; -var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),jn=new E(T,"OrientAlong",21),an=new E(T,"OrientPlus90",22),cn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),kn=new E(T,"OrientUpright",25),bn=new E(T,"OrientPlus90Upright",26),dn=new E(T,"OrientMinus90Upright", -27),en=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=jn;T.OrientPlus90=an;T.OrientMinus90=cn;T.OrientOpposite=Hp;T.OrientUpright=kn;T.OrientPlus90Upright=bn;T.OrientMinus90Upright=dn;T.OrientUpright45=en;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; +var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),mn=new E(T,"OrientAlong",21),dn=new E(T,"OrientPlus90",22),fn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),nn=new E(T,"OrientUpright",25),en=new E(T,"OrientPlus90Upright",26),gn=new E(T,"OrientMinus90Upright", +27),hn=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=mn;T.OrientPlus90=dn;T.OrientMinus90=fn;T.OrientOpposite=Hp;T.OrientUpright=nn;T.OrientPlus90Upright=en;T.OrientMinus90Upright=gn;T.OrientUpright45=hn;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; function kq(a,b,c,d){Qa(this);this.Fe=this.qq=!1;this.Ds=a;this.Px=b;this.dv=c;this.Qx=d;this.links=[]}kq.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} -lk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Bk)return!1}return!0}; +function pk(a){Qa(this);this.Zx=this.group=null;this.vs=!0;this.abort=!1;this.Od=this.Nd=1;this.Fn=this.En=-1;this.sc=a.width;this.tc=a.height;this.bc=null;this.ei=this.di=0;this.Os=11;this.Jx=this.Ix=22} +pk.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} +pk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; function oq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.bc[l][m];if(n>=cq&&n=a.bc[l][m]);)a.bc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h, -k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Bk,m=cq;for(a.bc[b][c]=m;l===Bk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Bk?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Bk?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=cq;for(a.bc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -ma.Object.defineProperties(lk.prototype,{bounds:{get:function(){return new N(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.sc},set:function(a){0=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}Tp.prototype.Sl=function(){this.pe.length=0}; @@ -1730,42 +1731,42 @@ yq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Sh;var c=b.Sh;if(nu b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}return null!==c?-1:0}return 1}return null!==b?-1:0};function zq(a){Qa(this);this.nb=a;this.qd=this.kd=this.Zk=this.ub=null}zq.prototype.clear=function(){this.qd=this.kd=this.Zk=this.ub=null};zq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+bb(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.Ea("Layout");d=[];switch(this.alignment){case Oq: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,r=q,u+=v,v=0;v=Math.max(v,D);switch(p){case Nq:A=-A.width;break;default:A= 0}z.moveTo(r+A,u);switch(p){case Nq:r-=B;break;default:r+=B}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case Gq:k=g;m=f;n=b;p=c;g=N.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(r=0;r=l&&(k-=l);l=z=0;B=Math.max(this.cellSize.height,1);A=f=0;D=!0;w=J.alloc();for(M=0;Mm-1||0k){d.push(new N(0,D?y-f:y,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Ok.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0b?1:0} +ma.Object.defineProperties(Rk.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0n)){var u=n+tn(r);r.qc(u,!0);En(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; +pi.prototype.doModelChanged=function(a){if(this.H){var b=this.H;if(a.model===b.model){var c=a.change;b.doModelChanged(a);if(b.aa){b.aa=!1;try{var d=a.modelChange;if(""!==d)if(c===de){if("nodeCategory"===d){var e=this.Lc(a.object),f=a.newValue;null!==e&&"string"===typeof f&&(e.category=f)}else"nodeDataArray"===d&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));b.isModified=!0}else if(c===fe){var g=a.newValue;"nodeDataArray"===d&&za(g)&&Pq(this,g);b.isModified=!0}else if(c===ge){var h=a.oldValue; +"nodeDataArray"===d&&za(h)&&this.ip(h);b.isModified=!0}else c===ee&&("SourceChanged"===d?null!==a.object?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):"ModelDisplaced"===d&&this.Wd());else if(c===de){var k=a.propertyName,l=a.object;if(l===b.model){if("nodeKeyProperty"===k||"nodeCategoryProperty"===k)b.undoManager.isUndoingRedoing||this.Wd()}else this.updateDataBindings(l,k);b.isModified=!0}else if(c===fe||c===ge){var m=a.change===fe,n=m?a.newParam:a.oldParam, +p=m?a.newValue:a.oldValue,q=this.aj.I(a.object);if(Array.isArray(q))for(a=0;an)){var u=n+wn(r);r.qc(u,!0);Hn(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; pi.prototype.rp=function(){for(var a=this.H.model,b=new H,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Sa;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",fe,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cd)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",ee,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",fe,"",a,c,null,b,null)}; -t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),Ar(this,"nodeCategory",ce,c,a,d,b))}else Uj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; +function Br(a,b,c){if(a.copiesArrays&&Array.isArray(b)){var d=[];for(c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",fe,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",ge,"",a,c,null,b,null)}; +t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=In(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=In(a,c);void 0===d&&(d="");d!==b&&(Yj(a,c,b),Ar(this,"nodeCategory",de,c,a,d,b))}else Yj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; t.xs=function(){return!1};t.Wj=function(){return!1};function ri(){return new Z}function vr(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 vr(a,b.constructor);return typeof b}function zr(a){return Dr[a]?Dr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} -function Fn(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){}} +function In(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 Yj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.xa},set:function(a){var b=this.xa;b!==a&&(this.xa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var b=this.Sm;b!==a&&(this.Sm=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var b=this.Gg;b!==a&&(this.Gg=a,this.g("isReadOnly",b,a))}},modelData:{ get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.Sx(this),this.o=a,null!==a&&a.Yw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var b=this.Th; b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===fe){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== -a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(hr(a,f,b),Uj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; -function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=Fn(a,b);return void 0===a?Jr:a}; -t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",fe,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.jh(b)&&(Uj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",ce,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Uj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; -t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Uj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; -function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",ee,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",fe,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== +a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Yj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; +t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=In(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=In(b,e);f!==c&&(hr(a,f,b),Yj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; +function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=In(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=In(b,e);void 0===f&&(f="");f!==c&&(Yj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=In(a,b);return void 0===a?Jr:a}; +t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=In(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=In(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=In(a,c);d!==b&&null===this.jh(b)&&(Yj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Yj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; +t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Yj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Yj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Yj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; +function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;f=b[c].length)&&(g=b[c][0],g.sd===g)){Inf g.height,a.add(g,d?-g.zc-f:g.zc);return a}function Kt(a,b,c){if(isNaN(b.zc)){b.zc=0;var d=b;do{if(0a&&C("Could not determine previous vertex in layer");return b[c][a-1]} Hs.prototype.u=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=Mt(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Ga(d);Ga(e)}; function Mt(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.K||270===a.K?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}Hs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Os(this,!0),b=Os(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Hu();this.isRouting&&this.commitLinks()}; -function Os(a,b){return 270===a.K?b?$c:cd:90===a.K?b?cd:$c:180===a.K?b?ad:bd:b?bd:ad} +function Os(a,b){return 270===a.K?b?ad:dd:90===a.K?b?dd:ad:180===a.K?b?bd:cd:b?cd:bd} Hs.prototype.commitNodes=function(){this.he=[];this.Ld=[];this.Kd=[];this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.he[c]=Math.max(this.he[c],this.nodeMinLayerSpace(b,!0));this.Ld[c]=Math.max(this.Ld[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ie;for(var d=0;d<=this.Ia;d++){var e=c;0>=this.he[d]+this.Ld[d]&&(e=0);0e?Gu(this,a,g,X,v,y):Hu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case wu:for(A=0;An&&(Sgb&&(Mu(a,-gb,0,ca,na-1),Nu(A,-gb,0),Nu(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Mu(a,0,-gb,ca,na-1),Nu(A,0,-gb),Nu(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===xu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Su(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Qu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Su(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Ru(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xe?Hu(this,a,g,X,v,y):Iu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case xu:for(A=0;An&&(Sgb&&(Nu(a,-gb,0,ca,na-1),Ou(A,-gb,0),Ou(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Nu(a,0,-gb,ca,na-1),Ou(A,0,-gb),Ou(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===yu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Tu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Ru(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Tu(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Su(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xd?Gu(a,b,e,G,z,A):Hu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case wu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Gu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Du(b),m=0,n=0,p=0,q=0;qd?Hu(a,b,e,G,z,A):Iu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case xu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Eu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Uu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Uu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} -function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Du(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Vu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Vu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} +function Iu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Eu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Uu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Uu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Eu:return a.width>b?a.width:b;case Fu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case vu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case wu:return a.width-a.focus.x+a.nodeSpacing/2+b;case xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function Ru(a,b,c){switch(a.alignment){case Pu:case Ou:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Eu:return a.height>b?a.height:b;case Fu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case vu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case wu:return a.height-a.focus.y+a.nodeSpacing/2+b;case xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function Su(a,b,c){switch(a){case Ou:b/=2;c/=2;break;case Pu:b/=2;c/=2;break;case Eu:c=b=0;break;case Fu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ju(a,b,c,d,e,f){b=Su(b,c,d);Mu(a,b.x,b.y,e,f)}function Mu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} -function Ku(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Nu(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Vu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Vu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Fu:return a.width>b?a.width:b;case Gu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case wu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case xu:return a.width-a.focus.x+a.nodeSpacing/2+b;case yu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function Su(a,b,c){switch(a.alignment){case Qu:case Pu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Fu:return a.height>b?a.height:b;case Gu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case wu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case xu:return a.height-a.focus.y+a.nodeSpacing/2+b;case yu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function Tu(a,b,c){switch(a){case Pu:b/=2;c/=2;break;case Qu:b/=2;c/=2;break;case Fu:c=b=0;break;case Gu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ku(a,b,c,d,e,f){b=Tu(b,c,d);Nu(a,b.x,b.y,e,f)}function Nu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} +function Lu(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Ou(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Du(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Eu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!== -a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Au&&a!==Cu||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, +a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Bu&&a!==Du||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!== a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot= a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==ou&&a!==pu&& a!==qu&&!ru||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ -get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Au&&a!==Cu||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Bu&&a!==Du||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{ get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}}); -var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Ou=new E(Rt,"AlignmentCenterSubtrees",20),Pu=new E(Rt,"AlignmentCenterChildren",21),Eu=new E(Rt,"AlignmentStart",22),Fu=new E(Rt,"AlignmentEnd",23),vu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),wu=new E(Rt,"AlignmentTopLeftBus",26),xu=new E(Rt, -"AlignmentBottomRightBus",27),Au=new E(Rt,"CompactionNone",30),Cu=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Wu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; -Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Ou;Rt.AlignmentCenterChildren=Pu;Rt.AlignmentStart=Eu;Rt.AlignmentEnd=Fu;Rt.AlignmentBus=vu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=wu;Rt.AlignmentBottomRightBus=xu;Rt.CompactionNone=Au;Rt.CompactionBlock=Cu;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; -Rt.ArrangementHorizontal=Wu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Yu(this)};Xt.className="TreeNetwork"; -function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Pu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Cu;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); +var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Pu=new E(Rt,"AlignmentCenterSubtrees",20),Qu=new E(Rt,"AlignmentCenterChildren",21),Fu=new E(Rt,"AlignmentStart",22),Gu=new E(Rt,"AlignmentEnd",23),wu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),xu=new E(Rt,"AlignmentTopLeftBus",26),yu=new E(Rt, +"AlignmentBottomRightBus",27),Bu=new E(Rt,"CompactionNone",30),Du=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Xu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; +Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Pu;Rt.AlignmentCenterChildren=Qu;Rt.AlignmentStart=Fu;Rt.AlignmentEnd=Gu;Rt.AlignmentBus=wu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=xu;Rt.AlignmentBottomRightBus=yu;Rt.CompactionNone=Bu;Rt.CompactionBlock=Du;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; +Rt.ArrangementHorizontal=Xu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Zu(this)};Xt.className="TreeNetwork"; +function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Qu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Du;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); Yt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.nd=a.sorting,this.hd=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)}; ma.Object.defineProperties(Yt.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.x * Definitions: https://github.com/NorthwoodsSoftware/GoJS diff --git a/release/go.js b/release/go.js index c162dd78b..f4a43aa3e 100644 --- a/release/go.js +++ b/release/go.js @@ -1,8 +1,8 @@ /* - * GoJS v2.3.12 JavaScript Library for HTML Diagrams, https://gojs.net + * GoJS v2.3.13 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-2023 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.12/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.3.13/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;g=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; +t.clear=function(){this._isFrozen&&va(this);this.Ub={};this.Tb=0;null!==this.Sa&&this.Sa.reset();this.kf=this.ea=null;this.yb()};H.prototype.copy=function(){var a=new H,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};H.prototype.Fa=function(){var a=Array(this.Tb),b=this.Ub,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};H.prototype.Iv=function(){var a=new F,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};function Qa(a){a.__gohashid=ib++} +function fb(a){var b=a.__gohashid;void 0===b&&(b=ib++,a.__gohashid=b);return b}function bb(a){return a.__gohashid}ma.Object.defineProperties(H.prototype,{count:{get:function(){return this.Tb}},size:{get:function(){return this.Tb}},iterator:{get:function(){if(0>=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; H.prototype.clear=H.prototype.clear;H.prototype.retainAll=H.prototype.qA;H.prototype.removeAll=H.prototype.hp;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.first=H.prototype.first;H.prototype.containsAny=H.prototype.Uy;H.prototype.containsAll=H.prototype.Ty;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.addAll=H.prototype.addAll;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.ka;H.prototype.freeze=H.prototype.freeze; -var jb=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; +var ib=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; kb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.value=this.key=a=a.key):null};kb.prototype.any=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(a(b.key))return!0;b=b.va}return!1};kb.prototype.all=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(!a(b.key))return!1;b=b.va}return!0};kb.prototype.each=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;)a(b.key),b=b.va;return this}; kb.prototype.map=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.key)),b=b.va;return c.iterator};kb.prototype.filter=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;){var d=b.key;a(d)&&c.add(d);b=b.va}return c.iterator};kb.prototype.de=function(){this.value=this.key=null;this.qa=-1};kb.prototype.toString=function(){return null!==this.sa?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"}; ma.Object.defineProperties(kb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="MapKeySetIterator";function lb(a){H.call(this);Qa(this);this._isFrozen=!0;this.ma=a}la(lb,H);t=lb.prototype;t.freeze=function(){return this};t.ka=function(){return this}; @@ -72,16 +72,16 @@ lb.prototype.remove=lb.prototype.remove;lb.prototype.has=lb.prototype.has;lb.pro mb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=b.value,this.key=b.key,!0;this.de();return!1};mb.prototype.Ad=function(){return this.next()};mb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;if(null!==a){this.sa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; mb.prototype.any=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.va}return!1};mb.prototype.all=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.va}return!0};mb.prototype.each=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;)a(b.value),b=b.va;return this};mb.prototype.map=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.va;return c.iterator}; mb.prototype.filter=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.va}return c.iterator};mb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.jf=this};mb.prototype.toString=function(){return null!==this.sa?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"};ma.Object.defineProperties(mb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}}); -mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function ib(a,b){this.key=a;this.value=b;this.ll=this.va=null}ib.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ib.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; +mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function hb(a,b){this.key=a;this.value=b;this.ll=this.va=null}hb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};hb.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; nb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.key=b.key,this.value=b.value,!0;this.de();return!1};nb.prototype.Ad=function(){return this.next()};nb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.key=a.key,this.value=a.value,a):null};nb.prototype.any=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.va}return!1}; nb.prototype.all=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.va}return!0};nb.prototype.each=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;)a(b),b=b.va;return this};nb.prototype.map=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b)),b=b.va;return c.iterator};nb.prototype.filter=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.va;return c.iterator}; nb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.Sa=this};nb.prototype.toString=function(){return null!==this.sa?"MapIterator@"+this.sa:"MapIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.Ad;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset; nb.className="MapIterator";function ob(a){Qa(this);this._isFrozen=!1;this.Ub={};this.Tb=0;this.jf=this.Sa=null;this.Ja=0;this.kf=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=ob.prototype;t.yb=function(){var a=this.Ja;a++;999999999=this.count)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new nb(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ya:new kb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ya; var a=this.jf;return null!==a?(a.reset(),a):new mb(this)}}});ob.prototype.toKeySet=ob.prototype.Lf;ob.prototype.toArray=ob.prototype.Fa;ob.prototype.clear=ob.prototype.clear;ob.prototype["delete"]=ob.prototype.delete;ob.prototype.remove=ob.prototype.remove;ob.prototype.get=ob.prototype.get;ob.prototype.getValue=ob.prototype.I;ob.prototype.has=ob.prototype.has;ob.prototype.contains=ob.prototype.contains;ob.prototype.first=ob.prototype.first;ob.prototype.addAll=ob.prototype.addAll; ob.prototype.set=ob.prototype.set;ob.prototype.add=ob.prototype.add;ob.prototype.thaw=ob.prototype.ka;ob.prototype.freeze=ob.prototype.freeze;ob.className="Map";function J(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var pb,qb,rb,sb,tb;J.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};J.prototype.h=function(a,b){this.x=a;this.y=b;return this}; @@ -106,36 +106,36 @@ b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._is t.dd=function(a){this.x=a.x;this.y=a.y;return this};t.uA=function(a){this.width=a.width;this.height=a.height;return this};N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=N.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Qb(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 N(c,e,f,g)}return new N} function Rb(a){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.D=function(a){return a instanceof N?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.hi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.Xa=function(a){return K.B(this.x,a.x)&&K.B(this.y,a.y)&&K.B(this.width,a.width)&&K.B(this.height,a.height)}; -function Ub(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -t.Bc=function(a,b){return Vb(this,b,a,b,a)};t.Co=function(a){return Vb(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Vb(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Vb(this,a,b,c,d)};function Vb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Wb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Wb(this,a,b,c,d)}; -function Wb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Xb(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.Ye=function(a){return Yb(this,a.x,a.y,0,0)};t.ed=function(a){return Yb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Yb(this,a,b,c,d)}; -function Yb(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.yi=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 Zb(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 $b(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=ac.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=ac.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){ac.push(a)}; +function Tb(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +t.Bc=function(a,b){return Ub(this,b,a,b,a)};t.Co=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Vb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Vb(this,a,b,c,d)}; +function Vb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Wb(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.Ye=function(a){return Xb(this,a.x,a.y,0,0)};t.ed=function(a){return Xb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Xb(this,a,b,c,d)}; +function Xb(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.yi=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 Yb(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 Zb(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=$b.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=$b.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){$b.push(a)}; ma.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 L(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.Nz;N.prototype.isReal=N.prototype.w;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return K.Gx(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.yi;N.prototype.union=N.prototype.Lv;N.prototype.unionRect=N.prototype.ed;N.prototype.unionPoint=N.prototype.Ye;N.prototype.intersects=N.prototype.Wu; N.prototype.intersectsRect=N.prototype.Yc;N.prototype.intersect=N.prototype.Vu;N.prototype.intersectRect=N.prototype.Fx;N.prototype.grow=N.prototype.Iz;N.prototype.subtractMargin=N.prototype.Gv;N.prototype.addMargin=N.prototype.Co;N.prototype.inflate=N.prototype.Bc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Re;N.prototype.containsPoint=N.prototype.ca;N.prototype.equalsApprox=N.prototype.Xa;N.prototype.equalTo=N.prototype.hi; -N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var bc=null,cc=null,ac=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b;N.ZeroRect=bc=(new N(0,0,0,0)).ja();N.NoRect=cc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b; -function dc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}dc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -dc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};dc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};dc.prototype.copy=function(){var a=new dc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=dc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var ac=null,bc=null,$b=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb;N.ZeroRect=ac=(new N(0,0,0,0)).ja();N.NoRect=bc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb; +function cc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}cc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +cc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};cc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};cc.prototype.copy=function(){var a=new cc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=cc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function ic(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 dc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new dc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new dc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new dc(c,e):new dc(c,e,f,g)}return new dc} -function jc(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.D=function(a){return a instanceof dc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};dc.alloc=function(){var a=kc.pop();return void 0===a?new dc:a};dc.free=function(a){kc.push(a)};dc.prototype.isReal=dc.prototype.w;dc.prototype.equalsApprox=dc.prototype.Xa;dc.prototype.equalTo=dc.prototype.hi;dc.prototype.equals=dc.prototype.D;dc.prototype.set=dc.prototype.set; -dc.prototype.setTo=dc.prototype.sg;var lc=null,mc=null,kc=[];dc.className="Margin";dc.parse=ic;dc.stringify=jc;dc.ZeroMargin=lc=(new dc(0,0,0,0)).ja();dc.TwoMargin=mc=(new dc(2,2,2,2)).ja();dc.parse=ic;dc.stringify=jc;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._isFrozen=!1} -var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,dd,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.sg=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}; +function gc(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 cc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new cc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new cc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new cc(c,e):new cc(c,e,f,g)}return new cc} +function hc(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.D=function(a){return a instanceof cc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};cc.alloc=function(){var a=ic.pop();return void 0===a?new cc:a};cc.free=function(a){ic.push(a)};cc.prototype.isReal=cc.prototype.w;cc.prototype.equalsApprox=cc.prototype.Xa;cc.prototype.equalTo=cc.prototype.hi;cc.prototype.equals=cc.prototype.D;cc.prototype.set=cc.prototype.set; +cc.prototype.setTo=cc.prototype.sg;var jc=null,kc=null,ic=[];cc.className="Margin";cc.parse=gc;cc.stringify=hc;cc.ZeroMargin=jc=(new cc(0,0,0,0)).ja();cc.TwoMargin=kc=(new cc(2,2,2,2)).ja();cc.parse=gc;cc.stringify=hc;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._isFrozen=!1} +var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Xc,Yc,Zc,$c,ad,bd,cd,dd,ed,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.sg=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.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function id(a){if("string"===typeof a){a=a.trim();if("None"===a)return rc;if("TopLeft"===a)return sc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return tc;if("TopRight"===a)return uc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return vc;if("Center"===a)return wc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return yc;if("BottomLeft"===a)return zc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Ac;if("BottomRight"===a)return Bc;if("TopSide"===a)return Cc;if("LeftSide"=== a)return Dc;if("RightSide"===a)return Ec;if("BottomSide"===a)return Fc;if("TopBottomSides"===a)return Gc;if("LeftRightSides"===a)return Ic;if("TopLeftSides"===a)return Jc;if("TopRightSides"===a)return Kc;if("BottomLeftSides"===a)return Lc;if("BottomRightSides"===a)return Mc;if("NotTopSide"===a)return Nc;if("NotLeftSide"===a)return Oc;if("NotRightSide"===a)return Pc;if("NotBottomSide"===a)return Qc;if("AllSides"===a)return Rc;if("Default"===a)return Sc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=K.Vv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.Vv=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(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},cs:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Zb(a,b,g,h,n,c,d)&&K.Zb(a,b,g,h,n,e,f))return K.Zb(a,b,g,h,n,l,m);var p=(a+c)/2,q=(b+d)/2,r=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+r)/2;c=(q+u)/2;r=(r+e)/2;u=(u+f)/2;var w=(d+r)/2,v=(c+u)/2;return K.cs(a, -b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Yb(l,a,b,0,0),Yb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ +b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Xb(l,a,b,0,0),Xb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ 2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Dl(a,b,m,n,d,c,r,u,k,l);K.Dl(r,u,p,q,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(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,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Qe(a,b,m,n,d,c,r,u,k,l);K.Qe(r,u,p,q,e,f,g,h,k,l)}return l},kv:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,e,f,l,c,d))return K.Zb(a, -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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Yb(h,a,b,0,0),Yb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), +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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Xb(h,a,b,0,0),Xb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), 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.ep(a,b,k,l,m,n,g,h);K.ep(m,n,c,d,e,f,g,h)}return h},Eo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){if(K.Zb(a,b,g,h,p,c,d)&&K.Zb(a,b,g,h,p,e,f)){if(!K.Rl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;q.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 r=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2,A=Infinity,B=!1,D=0,M=0;K.Eo(a,b,r,u,d,c,y,z,k,l,m,n,p,q)&&(a=(q.x-k)*(q.x-k)+(q.y-l)*(q.y-l),a=m)return q; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return q}else if(aa)return q;0p&&q--}else{r=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2;q+=K.Fo(a,b,r,u,d,c,y,z,k,l,m,n,p);q+=K.Fo(y,z,w,v,e,f,g,h,k,l,m,n,p)}return q},qh:function(a,b,c,d,e,f,g){if(K.$(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.$(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e k.h(a,c);return!0}g=(d-b)/(c-a);if(K.$(h,g))return K.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.$(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.qh(a,b,c,d,e,g*(e-a)+b,k)},NA:function(a,b,c,d,e){return K.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},LA: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},Ff:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ve(a,b,a,d,e,f,g, h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},us:function(a,b,c){return K.Gx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Gx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):Zb(a,b,c,d,e,f)||Zb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); +k&&g<=l&&f>=b):f===h?(e=a):Yb(a,b,c,d,e,f)||Yb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); 360<=a&&(a-=360);return a},kx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 P.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?z:new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); -a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(wd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z=new J((w===w.toLowerCase()?z.x:0)+parseFloat(d()), -z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z=new J(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();xd(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),xd(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)y=r=h(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d());var S=parseFloat(d()), -R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()),w===w.toLowerCase()&& -(I=z.x+I,G=z.y+G),z.h(I,G),zd(a,r,D,M,S,R,I,G);break;case "Z":Ad(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new J(z.x,z.y):new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k, +"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(td(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z.h((w===w.toLowerCase()?z.x:0)+parseFloat(d()), +z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z.h(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();ud(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),ud(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),vd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)r=h(),y.assign(r),D=f(),vd(a,r.x,r.y,D.x,D.y),y.assign(D);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d()); +var S=parseFloat(d()),R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()), +w===w.toLowerCase()&&(I=z.x+I,G=z.y+G),z.h(I,G),wd(a,r,D,M,S,R,I,G);break;case "Z":xd(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Md:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case P.j:case P.u:case P.F:var g=this.od;var h=this.pd;this.od=g*a+h*c+e;this.pd=g*b+h*d+f;g=this.Dc;h=this.Ec;this.Dc=g*a+h*c+e;this.Ec=g*b+h*d+f;break;case P.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Jd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ca=function(a,b){void 0===b&&(b=0);var c=this.od,d=this.pd,e=this.Dc,f=this.Ec;switch(this.type){case P.j:return K.Zb(c,d,e,f,b,a.x,a.y);case P.u:var g=N.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ca(a);N.free(g);return a;case P.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Pd(this,a,b,!0,!1);default:return!1}}; -function Pd(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Md(this,a,b,!0,!1);default:return!1}}; +function Md(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.xx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -201,176 +201,176 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.yx=function(a){if(this.type===P.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=J.alloc();K.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;J.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===P.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=J.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Ld&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== -Ld&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Xd.prototype.copy=function(){var a=new Xd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Xd.prototype; -t.Xa=function(a){if(!(a instanceof Xd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Dd:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Ed: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 Kd: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 Ld: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 Md: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.qb=function(a){a.classType===Xd&&(this.type=a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Dd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ed: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 Kd: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 Ld: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 Md: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)+ +this.pd=a;this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&va(this,a);this.pl=a;this._isInvalidBounds=!0}}});Xd.prototype.add=Xd.prototype.add;Xd.prototype.equalsApprox=Xd.prototype.Xa;Xd.className="PathFigure"; +function Yd(a,b,c,d,e,f,g,h){Qa(this);void 0===a&&(a=pd);this.na=a;this.l=2;void 0!==b?this.Dc=b:this.Dc=0;void 0!==c?this.Ec=c:this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Jd?(a=f%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Id&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== +Id&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Yd.prototype.copy=function(){var a=new Yd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Yd.prototype; +t.Xa=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ad:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Bd: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 Hd: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 Id: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 Jd: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.qb=function(a){a.classType===Yd&&(this.type=a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Ad:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Bd: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 Hd: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 Id: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 Jd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Nd(a,b){if(null!==a.ae&&!1===b._isInvalidBounds)return a.ae;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ae=[],a.ae;b=a.Ne;var e=a.Vh,f=K.kx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=K.kx(0,0,b>f?b:f,m,m+g,!0);f=ld.alloc();f.reset();f.translate(c,d);f.rotate(a.Ne,0,0);f.scale(k,q);P.Ha(b,f); ld.free(f);a.ae=b;return a.ae} -ma.Object.defineProperties(Xd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&& va(this,a);this.Ne=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Xd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, -set:function(a){0>a&&xa(a,">= zero",Xd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, +set:function(a){0>a&&xa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.l&16)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ne=a;this._isInvalidBounds= -!0}}});Xd.prototype.equalsApprox=Xd.prototype.Xa;var Dd=new E(Xd,"Move",0),pd=new E(Xd,"Line",1),Ed=new E(Xd,"Bezier",2),Kd=new E(Xd,"QuadraticBezier",3),Ld=new E(Xd,"Arc",4),Md=new E(Xd,"SvgArc",4);Xd.className="PathSegment";Xd.Move=Dd;Xd.Line=pd;Xd.Bezier=Ed;Xd.QuadraticBezier=Kd;Xd.Arc=Ld;Xd.SvgArc=Md; -function Zd(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}Zd.prototype.copy=function(){var a=new Zd;return this.clone(a)}; -Zd.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; -Zd.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};Zd.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);return b}; -Zd.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);b.assign(c.Ps(b));return b}; -ma.Object.defineProperties(Zd.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, +!0}}});Yd.prototype.equalsApprox=Yd.prototype.Xa;var Ad=new E(Yd,"Move",0),pd=new E(Yd,"Line",1),Bd=new E(Yd,"Bezier",2),Hd=new E(Yd,"QuadraticBezier",3),Id=new E(Yd,"Arc",4),Jd=new E(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Ad;Yd.Line=pd;Yd.Bezier=Bd;Yd.QuadraticBezier=Hd;Yd.Arc=Id;Yd.SvgArc=Jd; +function $d(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; +$d.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};$d.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);return b}; +$d.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);b.assign(c.Ps(b));return b}; +ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, set:function(a){this.Bp=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.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr= a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{ get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd= 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}}});Zd.prototype.getMultiTouchDocumentPoint=Zd.prototype.Cz; -Zd.prototype.getMultiTouchViewPoint=Zd.prototype.So;Zd.className="InputEvent";function ae(){this.H=null;this.xa="";this.ar=this.Lr=null}ae.prototype.copy=function(){var a=new ae;a.H=this.H;a.xa=this.xa;a.Lr=this.Lr;a.ar=this.ar;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}; -ma.Object.defineProperties(ae.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}});ae.className="DiagramEvent"; -function be(){this.Fm=ce;this.rf=this.Qq="";this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}be.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}; -be.prototype.copy=function(){var a=new be;a.Fm=this.Fm;a.Qq=this.Qq;a.rf=this.rf;a.dc=this.dc;a.H=this.H;a.Qn=this.Qn;var b=this.Sn;a.Sn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Rn;a.Rn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Mn;a.Mn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Ln;a.Ln=za(b)&&"function"===typeof b.J?b.J():b;return a};be.prototype.qb=function(a){a.classType===be&&(this.change=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+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};be.prototype.I=function(a){return a?this.oldValue:this.newValue};be.prototype.Ez=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))}; -ma.Object.defineProperties(be.prototype,{model:{get:function(){return this.dc},set:function(a){this.dc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf}, -set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===de&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}}, -newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=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.Ez;be.prototype.getValue=be.prototype.I;be.prototype.clear=be.prototype.clear; -var de=new E(be,"Transaction",-1),ce=new E(be,"Property",0),ee=new E(be,"Insert",1),fe=new E(be,"Remove",2);be.className="ChangedEvent";be.Transaction=de;be.Property=ce;be.Insert=ee;be.Remove=fe;function ge(){this.o=(new F).freeze();this.xa="";this.j=!1}ge.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(ge.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});ge.prototype.optimize=ge.prototype.$j;ge.prototype.redo=ge.prototype.redo;ge.prototype.canRedo=ge.prototype.canRedo;ge.prototype.undo=ge.prototype.undo;ge.prototype.canUndo=ge.prototype.canUndo; -ge.prototype.clear=ge.prototype.clear;ge.className="Transaction";function he(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} -he.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.$j;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} +ie.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&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.M(0),null!==f&&f.clear(),b.mb(0),a.Ce--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++),b.freeze()),a.isInternalTransaction||a.Pb("CommittedTransaction",c,e);else{a.Fe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Pb("RolledBackTransaction",c,e),a.Fe=!1}null!== e&&e.clear()}a.Np=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.M(e),null!==b&&b.undo(),c.ka(),c.mb(e);c.freeze()}return!1}t.mx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.M(b);null!==c&&c.clear();a.mb(b);this.rq=!0}a.freeze()}}; -he.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; -he.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -ma.Object.defineProperties(he.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; +ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -ma.Object.defineProperties(je.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, -set:function(a){this.wm=a}}});je.prototype.startTransaction=je.prototype.Ea;je.className="Tool";function La(){je.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=se;this.u=ue;this.Mp=this.j=null;this.zj=-1}la(La,je);La.prototype.initializeStandardTools=function(){}; -La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof te&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ve&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===we){b.bubbles=!0;return}if(this.gestureBehavior===ve)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de||Math.abs(b.y-a.y)>d}; +ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, +set:function(a){this.wm=a}}});ke.prototype.startTransaction=ke.prototype.Ea;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=ve;this.u=xe;this.Mp=this.j=null;this.zj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof we&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ye&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===ze){b.bubbles=!0;return}if(this.gestureBehavior===ye)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Oe;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=sf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=sf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}Ae.prototype.doDragOver=function(){}; -function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Te(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==De){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==De){a=N.alloc();for(b= +d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}De.prototype.doDragOver=function(){}; +function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Ve(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ge){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ge){a=N.alloc();for(b= c.selection.iterator;b.next();)d=b.value,d instanceof V&&wf(c,d,a);N.free(a)}}}function vf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof pf||(c=a.mouseDrop,null!==c&&c(b))}function wf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Td(b)&&c.isAvoiding&&c.bb()} -Ae.prototype.doDropOnto=function(){};Ae.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(af(this,!1),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts)):this.mayMove()?(We(this),cf(this,this.draggedParts,!0)):this.mayDragOut()?(af(this,!1),cf(this,this.copiedParts,!1)):We(this),nf(this,a.lastInput.documentPoint))}}; -Ae.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(We(this),af(this,!0),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,We(this),this.mayMove()&&(cf(this,this.draggedParts, -!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();Ue(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; -Ae.prototype.simulatedMouseMove=function(a,b,c){if(null===De)return!1;var d=De.diagram;c instanceof Q||(c=null);var e=He;c!==e&&(null!==e&&e!==d&&(e.ug(),De.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),He=c,null!==c&&c!==d&&(Ze(),e=c.toolManager.findTool("Dragging"),null!==e&&(Ce.contains(e)||Ce.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +De.prototype.doDropOnto=function(){};De.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(cf(this,!1),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts)):this.mayMove()?(Ye(this),ef(this,this.draggedParts,!0)):this.mayDragOut()?(cf(this,!1),ef(this,this.copiedParts,!1)):Ye(this),nf(this,a.lastInput.documentPoint))}}; +De.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Ye(this),cf(this,!0),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Ye(this),this.mayMove()&&(ef(this,this.draggedParts, +!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();We(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; +De.prototype.simulatedMouseMove=function(a,b,c){if(null===Ge)return!1;var d=Ge.diagram;c instanceof Q||(c=null);var e=Ke;c!==e&&(null!==e&&e!==d&&(e.ug(),Ge.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ke=c,null!==c&&c!==d&&(af(),e=c.toolManager.findTool("Dragging"),null!==e&&(Fe.contains(e)||Fe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,bf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;Ee(a,g.Lf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,bf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ae.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};Ae.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; -ma.Object.defineProperties(Ae.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= +f=a.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;He(a,g.Lf());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/ +2)));a.doUpdateCursor(null)}}}De.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};De.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; +ma.Object.defineProperties(De.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V}, set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Lf():null!==this.draggedParts?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= -a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});Ae.prototype.getDraggingSource=Ae.prototype.Bz;var De=null,He=null;Ae.className="DraggingTool";Ce=new F; -Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==De&&De.doCancel();je.prototype.doCancel.call(this)}; -function Af(){je.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,je);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});De.prototype.getDraggingSource=De.prototype.Bz;var Ge=null,Ke=null;De.className="DraggingTool";Fe=new F; +Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ge&&Ge.doCancel();ke.prototype.doCancel.call(this)}; +function Af(){ke.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,ke);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; Af.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.Df(),g=L.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;L.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=wc;f=J.alloc();c.location=b.ga(wc,f);J.free(f);d.angle=b.li();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; Af.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Gb,b.fromSpot=rc,b.toSpot=rc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Af.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Af.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, @@ -403,30 +403,30 @@ this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLi Tf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Tf.prototype.doNoLink=function(){}; ma.Object.defineProperties(Tf.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}}); var Uf=new E(Tf,"Either",0),Vf=new E(Tf,"ForwardsOnly",0),Wf=new E(Tf,"BackwardsOnly",0);Tf.className="LinkingTool";Tf.Either=Uf;Tf.ForwardsOnly=Vf;Tf.BackwardsOnly=Wf; -function Ie(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Ie,Af); -Ie.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& -(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Ie.prototype.makeAdornment=function(a,b){var c=new te;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; -Ie.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; -Ie.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 te&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +function Le(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Le,Af); +Le.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& +(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Le.prototype.makeAdornment=function(a,b){var c=new we;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +Le.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; +Le.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 we&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(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.Fw.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 W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};gg.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}; gg.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.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.hv())),this.Tn.set(this.adornedObject.part.location),this.Ew.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt= -this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; +this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; gg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};gg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.bd();J.free(e)}}; gg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(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.Ya();this.transactionResult=this.name;a.S("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Be;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; +gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ee;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; gg.prototype.computeResize=function(a,b,c,d,e,f){b.Mc()&&(b=wc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=J.alloc();K.No(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -457,125 +457,125 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig gg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};gg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; ng.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};ng.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Ya();this.transactionResult=this.name;a.S("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; ng.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Va();var c=b.locationObject,d=b.rotateObject;if(c===d||c.rg(d))c=this.Tn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.bd()}}; ng.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.li());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof te))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof te)throw Error("new handle must not be in an Adornment: "+ +ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof we))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof we)throw Error("new handle must not be in an Adornment: "+ a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Dw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= -a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){je.call(this);this.name="ClickSelecting"}la(og,je);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; -og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){je.call(this);this.name="Action";this.nk=null}la(pg,je); +a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){ke.call(this);this.name="ClickSelecting"}la(og,ke);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; +og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){ke.call(this);this.name="Action";this.nk=null}la(pg,ke); pg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.jc(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.nk=c;a.Bk=a.jc(b.documentPoint,null,null);return!0}return!1};pg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; pg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};pg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){je.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,je); +pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){ke.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,ke); qg.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.nw=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.nw))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.Ol(a.lastInput.documentPoint,!0)?!1:!0}; qg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&zg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= +qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&xg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= this.name;b.S("PartCreated",d)}finally{this.stopTransaction(),b.S("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(qg.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});qg.className="ClickCreatingTool"; -function Ag(){je.call(this);this.name="DragSelecting";this.Hk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Bf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Ag,je); -Ag.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.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Og.prototype.doStart=function(){Yg=this;null!==this.textBlock&&this.doActivate()}; -Og.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Pg&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Vg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Og.prototype.doCancel=function(){this.stopTool()}; -Og.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Og.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Zg)};Og.prototype.acceptText=function(a){switch(a){case Zg:if(this.qa===ah)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this);break;case dh:case Tg:case Ug:if(Tg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this)}}; -function ch(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.qa=ah,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Xg,a.doError(e,f))}} -Og.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)};Og.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Og.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Rg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Og.prototype.doStop=function(){Yg=null}; -Og.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};Og.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; -ma.Object.defineProperties(Og.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, -set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Og.prototype.measureTemporaryTextBlock=Og.prototype.Mx; -var dh=new E(Og,"LostFocus",0),Zg=new E(Og,"MouseDown",1),Ug=new E(Og,"Tab",2),Tg=new E(Og,"Enter",3),eh=new E(Og,"SingleClick",0),Qg=new E(Og,"SingleClickSelected",1),$g=new E(Og,"DoubleClick",2),Rg=new E(Og,"StateNone",0),Vg=new E(Og,"StateActive",1),Wg=new E(Og,"StateEditing",2),bh=new E(Og,"StateValidating",3),Xg=new E(Og,"StateInvalid",4),ah=new E(Og,"StateValidated",5),Yg=null;Og.className="TextEditingTool";Og.LostFocus=dh;Og.MouseDown=Zg;Og.Tab=Ug;Og.Enter=Tg;Og.SingleClick=eh; -Og.SingleClickSelected=Qg;Og.DoubleClick=$g;Og.StateNone=Rg;Og.StateActive=Vg;Og.StateEditing=Wg;Og.StateValidating=bh;Og.StateInvalid=Xg;Og.StateValidated=ah;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function fh(a){gh||(hh(),gh=!0);this.H=ke;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=ih;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new jh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}fh.prototype.Xe=function(a){this.H=a};fh.prototype.canStart=function(){return!0};function kh(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),lh(a.H),a.Ab=!0)} -function mh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===ih?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===nh&&b.vc.clear(),a.Rw=a.Ok===oh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),ph(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==qh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Fe(c),rh(c),a.Ab=!1,b.start(),b.cc&&(sh(a),c.Ya(),th(b,0),yf(c,!0),uh(a),c.S("AnimationStarting",a)))}))}}function vh(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function wh(a,b,c,d){a.isTicking||vh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=fh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; -function Hh(a,b){function c(){0a.lastInput.clickCount?!1:!0};Mg.prototype.doStart=function(){Wg=this;null!==this.textBlock&&this.doActivate()}; +Mg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Ng&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Tg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Mg.prototype.doCancel=function(){this.stopTool()}; +Mg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Mg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xg)};Mg.prototype.acceptText=function(a){switch(a){case Xg:if(this.qa===Zg)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this);break;case bh:case Rg:case Sg:if(Rg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this)}}; +function ah(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.qa=Zg,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Vg,a.doError(e,f))}} +Mg.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)};Mg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Mg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Pg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Mg.prototype.doStop=function(){Wg=null}; +Mg.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};Mg.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; +ma.Object.defineProperties(Mg.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, +set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Mg.prototype.measureTemporaryTextBlock=Mg.prototype.Mx; +var bh=new E(Mg,"LostFocus",0),Xg=new E(Mg,"MouseDown",1),Sg=new E(Mg,"Tab",2),Rg=new E(Mg,"Enter",3),ch=new E(Mg,"SingleClick",0),Og=new E(Mg,"SingleClickSelected",1),Yg=new E(Mg,"DoubleClick",2),Pg=new E(Mg,"StateNone",0),Tg=new E(Mg,"StateActive",1),Ug=new E(Mg,"StateEditing",2),$g=new E(Mg,"StateValidating",3),Vg=new E(Mg,"StateInvalid",4),Zg=new E(Mg,"StateValidated",5),Wg=null;Mg.className="TextEditingTool";Mg.LostFocus=bh;Mg.MouseDown=Xg;Mg.Tab=Sg;Mg.Enter=Rg;Mg.SingleClick=ch; +Mg.SingleClickSelected=Og;Mg.DoubleClick=Yg;Mg.StateNone=Pg;Mg.StateActive=Tg;Mg.StateEditing=Ug;Mg.StateValidating=$g;Mg.StateInvalid=Vg;Mg.StateValidated=Zg;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); +function dh(a){eh||(fh(),eh=!0);this.H=le;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=gh;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new hh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}dh.prototype.Xe=function(a){this.H=a};dh.prototype.canStart=function(){return!0};function ih(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),jh(a.H),a.Ab=!0)} +function kh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===gh?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===lh&&b.vc.clear(),a.Rw=a.Ok===mh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),nh(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==oh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Ie(c),ph(c),a.Ab=!1,b.start(),b.cc&&(qh(a),c.Ya(),rh(b,0),yf(c,!0),sh(a),c.S("AnimationStarting",a)))}))}}function th(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function uh(a,b,c,d){a.isTicking||th(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=dh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; +function Hh(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 hh(){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 ob;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&xa(a,">= 1",fh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, -isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});fh.prototype.stopAnimation=fh.prototype.Cc; -var Ph=null,gh=!1,ih=new E(fh,"Default",1),oh=new E(fh,"AnimateLocations",2),nh=new E(fh,"None",3);fh.className="AnimationManager";fh.defineAnimationEffect=function(a,b){gh||(hh(),gh=!0);Ph.add(a,b)};fh.Default=ih;fh.AnimateLocations=oh;fh.None=nh; -function jh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}jh.prototype.suspend=function(){this.Wk=!0};jh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);sh(this.Yd);yf(this.H);uh(this.Yd);this.H.redraw()}; -function ph(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a&&xa(a,">= 1",dh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, +isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});dh.prototype.stopAnimation=dh.prototype.Cc; +var Ph=null,eh=!1,gh=new E(dh,"Default",1),mh=new E(dh,"AnimateLocations",2),lh=new E(dh,"None",3);dh.className="AnimationManager";dh.defineAnimationEffect=function(a,b){eh||(fh(),eh=!0);Ph.add(a,b)};dh.Default=gh;dh.AnimateLocations=mh;dh.None=lh; +function hh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}hh.prototype.suspend=function(){this.Wk=!0};hh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);qh(this.Yd);yf(this.H);sh(this.Yd);this.H.redraw()}; +function nh(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} -function th(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; -t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;sh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Xe(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);uh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),ph(this,null),c.Ml(this),b.ac())}}; +function Ih(a,b){if(!a.Wk||b){var c=a.Yd;if(!1!==a.cc){var d=+new Date,e=d>a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} +function rh(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; +t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;qh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Ze(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);sh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),nh(this,null),c.Ml(this),b.ac())}}; t.Cj=function(a,b){var c=b.actualBounds,d=null;b instanceof pf&&(d=b.placeholder);null!==d?(c=d.ga(sc),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 pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Cj(d,b)}; t.Aj=function(a,b){if(a.isVisible()){var c=null;b instanceof pf&&(c=b.placeholder);if(null!==c){var d=c.ga(sc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.vc;d.contains(a)&&(d.I(a).ov=!0);if(a instanceof pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Aj(d,b)}};t.Fz=function(a){var b=this.Tt.get(a);null===b&&(b={},this.Tt.add(a,b));return b}; -ma.Object.defineProperties(jh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",jh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}jh.className="Animation";jh.EaseLinear=function(a,b,c,d){return c*a/d+b};jh.EaseInOutQuad=Qh;jh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};jh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};jh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};jh.EaseOutExpo=Sh; +ma.Object.defineProperties(hh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",hh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}hh.className="Animation";hh.EaseLinear=function(a,b,c,d){return c*a/d+b};hh.EaseInOutQuad=Qh;hh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};hh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};hh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};hh.EaseOutExpo=Sh; function Yh(a,b,c){this.start=a;this.end=b;this.Lu={};this.Iu=c;this.ov=!1}Yh.className="AnimationState";function Zh(a,b,c){this.xd=null;this.rf=a;this.so=c||$h;this.tk=null;void 0!==b&&(this.tk=b,void 0===c&&(this.so=ai))}Zh.prototype.copy=function(){var a=new Zh(this.rf);a.so=this.so;var b=this.tk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.tk=c}return a}; function bi(a,b){a=a.tk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.tk},set:function(a){this.tk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}}); var $h=new E(Zh,"Default",1),ai=new E(Zh,"Immediate",2),ci=new E(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Qa(this);this.H=null;this.Pa=new F;this.xa="";this.pb=1;this.o=!1;this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0;this.Zq=[];a&&Object.assign(this,a)}t=di.prototype; t.clear=function(){for(var a=this.Pa,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof te?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof we?g++:c++}h="";0c.Oq||h.height*e>c.Oq?b.hc(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&&(ji(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ji(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),ji(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.ws()||(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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(ce,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; +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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(de,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; t.qc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.qc(a,b,c);var d=this.Pa;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.Wo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.qc(b));b.Ig=null;ei(b);return a}; function ki(a,b,c){b=li(a,b,c);if(c instanceof pf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Pa.s,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.mb(b);a.Hb(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.mb(b);a.Hb(h,c);return h}for(k=NaN;++h< @@ -587,135 +587,135 @@ a&&(this.j=a,null!==this.diagram&&this.diagram.Ya())}},allowCopy:{get:function() a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var b=this.Hi;b!==a&&(this.Hi=a,this.g("allowGroup",b,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var b=this.Qi;b!==a&&(this.Qi=a,this.g("allowUngroup",b,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var b=this.Ii;b!==a&&(this.Ii=a,this.g("allowLink",b,a))}},allowRelink:{get:function(){return this.Ki}, set:function(a){var b=this.Ki;b!==a&&(this.Ki=a,this.g("allowRelink",b,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var b=this.Ji;b!==a&&(this.Ji=a,this.g("allowMove",b,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var b=this.Li;b!==a&&(this.Li=a,this.g("allowReshape",b,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var b=this.Mi;b!==a&&(this.Mi=a,this.g("allowResize", b,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var b=this.Ni;b!==a&&(this.Ni=a,this.g("allowRotate",b,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var b=this.Oi;b!==a&&(this.Oi=a,this.g("allowSelect",b,a))}}});di.prototype.findObjectsNear=di.prototype.og;di.prototype.findObjectsIn=di.prototype.Cf;di.prototype.findObjectsAt=di.prototype.ji;di.prototype.findObjectAt=di.prototype.jc;di.className="Layer"; -function Q(a,b){mi||(ni(),mi=!0);Qa(this);ke=this;this.wb=!0;this.Ka=null;this.ya=this.Aa=0;this.ta=null;if(Ng){var c=this,d=function(){c.removeEventListener(x.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==x.document.body?this.setRTL():c.addEventListener(x.document,"DOMContentLoaded",d,!1)}this.ol=null;oi.add("Model",pi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.aa){b.diagram.aa=!1;try{var c=a.change;""===a.modelChange&&c===ce&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.aa=!0}}};this.Oc=function(a){e.partManager.doModelChanged(a)};this.hu=this.ku=null;qi(this);this.model=ri();this.Wg=!0;si(this);this.layout=new ti;this.Wg=!1;this.bk=this.dk=this.ek=this.ck=this.ui=this.bA=this.Zj=this.Pv=null;this.gk=function(){};this.preventDefault=null;this.rn=!1;this.Yf=new ui;void 0!==a&&("string"===typeof a||x.Element&&a instanceof Element?vi(this,a):b=a);this.wb=!1;b&&this.nm(b);return this}var wi,ke; -function qi(a){a.Yd=new fh;a.Yd.Xe(a);a.Eb=17;a.Hw=!1;a.tn=!1;a.bu="default";a.Wa=new F;a.pj=new ob;a.nl="default";a.Ux();a.Tx();a.pb=1;a.pa=(new J(NaN,NaN)).freeze();a.du=new J(NaN,NaN);a.Ca=1;a.Pp=1;a.zt=(new J(NaN,NaN)).freeze();a.At=NaN;a.Ot=1E-4;a.Mt=100;a.Bb=new ld;a.zu=(new J(NaN,NaN)).freeze();a.ut=(new N(NaN,NaN,NaN,NaN)).freeze();a.rj=(new dc(0,0,0,0)).freeze();a.sj=Rh;a.nu=!1;a.Zt=null;a.fu=null;a.yh=qh;a.yk=Sc;a.Fg=qh;a.pq=Sc;a.yt=sc;a.Bt=sc;a.Fc=!0;a.pn=!1;a.De=new H;a.Eh=new ob;a.Xm= -!0;a.vp=250;a.uk=-1;a.xp=(new dc(16,16,16,16)).freeze();a.kg=!1;a.Ik=!1;a.fn=!0;a.bq=new Zd;a.bq.diagram=a;a.Qg=new Zd;a.Qg.diagram=a;a.cj=new Zd;a.cj.diagram=a;a.zg=null;a.pf=null;a.qu=!1;xi(a);a.ai=new H;a.Ht=!0;a.uu=yi;a.qw=!1;a.wu=Df;a.it="auto";a.Op="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Qh=null;a.Oh=null;a.Nh=null;a.Qt=null;a.Lh=null;a.xt=!1;a.Mh=null;a.Ph=null;a.$h=null;a.Ch=null;a.Rt=!1;a.Yt={};a.oj=[null,null];a.Wg=!1;a.Jw=!1;a.ou=!1;a.lt=!1;a.sw=!0;a.ld=!1;a.$i=!1;a.Uw=!0;a.Ce=-2;a.Og=new ob; -a.Xn=new F;a.Gg=!1;a.Jd=!0;a.Us=!0;a.Fi=!0;a.Gi=!0;a.Vs=!1;a.Ws=!0;a.Pi=!0;a.Hi=!0;a.Qi=!0;a.Ys=!0;a.Ii=!0;a.Ki=!0;a.Ji=!0;a.Li=!0;a.Mi=!0;a.Ni=!0;a.Oi=!0;a.Zs=!0;a.at=!0;a.rw=!1;a.Uk=!1;a.mn=!0;a.nn=!0;a.Xs=!0;a.$s=!0;a.iu=16;a.mu=16;a.qr=!1;a.gu=!1;a.lu=0;a.ju=0;a.zb=(new dc(5)).freeze();a.Iw=(new H).freeze();a.Nt=999999999;a.ow=(new H).freeze();a.Zi=!0;a.Ee=!0;a.vd=!0;a.Be=!1;a.gf=!1;a.xh=!0;a.hf=!1;a.ty=new H;a.pw=new H;a.Xh=null;a.bw=new L(8,8);a.cw=999;a.Cw=1;a.Kw=0;a.gc={scale:1,position:new J, -bounds:new N,Qy:new L,cA:new L,Pz:!1};a.gc.canvasSize=a.gc.Qy;a.gc.newCanvasSize=a.gc.cA;a.gc.isScroll=!1;a.Sw=(new N(NaN,NaN,NaN,NaN)).freeze();a.wo=(new L(NaN,NaN)).freeze();a.Sp=(new N(NaN,NaN,NaN,NaN)).freeze();a.It=!1;a.Lg=new ob;var b=new V,c=new Pg;c.bind(new Gi("text","",Ia));b.add(c);a.oy=b;a.Lg.add("",b);b=new V;c=new Pg;c.stroke="brown";c.bind(new Gi("text","",Ia));b.add(c);a.Lg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Bf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new L(3,3)).ja();b.add(c);a.Lg.add("LinkLabel",b);a.Yi=new ob;b=new pf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new Pg;c.font="bold 12pt sans-serif";c.bind(new Gi("text","",Ia));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Bf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new ig;d.padding=(new dc(5,5,5,5)).ja();c.add(d);b.add(c);a.my=b;a.Yi.add("",b);a.Kh=new ob;b=new T;c=new Bf;c.isPanelMain=!0;b.add(c);c=new Bf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ny=b;a.Kh.add("",b);b=new T;c=new Bf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Kh.add("Comment",b);b=new te;b.type=W.Auto;c=new Bf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new ig;c.margin=(new dc(1.5,1.5,1.5,1.5)).ja();b.add(c);a.St=b;a.wt=b;b=new te;b.type=W.Link;c=new Bf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Kt=b;a.fe=null;a.mq=!1;a.Bk=null;a.partManager=new pi;a.toolManager= -new La;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.nt=null;a.Wm=new Be;a.Vt=null;a.Wt=null;a.Mr=!1;a.commandHandler=Ii();a.eq=null;a.fq=tb;a.Qw=!1;a.Nb=1;a.Yh=null;a.Oq=1;a.Sq=0;a.Aw=[0,0,0,0,0];a.Tq=0;a.yq=1;a.uw=0;a.vw=new J;a.Ay=500;a.wp=new J;a.wq=!1}Q.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Ji=null;Ki="";Li(this,!1);this.Xn.clear();Mi();this.Og.clear();this.Xh=null;this.Ya();this.Va();this.N()}; -function Li(a,b){a.animationManager.Cc(!0);a.Iw=(new H).freeze();a.ow=(new H).freeze();var c=a.skipsUndoManager,d=null!==a.dc&&void 0!==a.dc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.fe&&(e=a.fe.part,null!==e&&a.remove(e));var f=[],g=a.Wa.length;if(b){for(b=0;b=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function vi(a,b){if(Ng){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); -a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Pi(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= -"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Qi(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Pi(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Ng){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= -"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Ri;e.addEventListener("pointerdown",Si);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){rh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Ti(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 -Math.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=0c|| -Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Ui(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Vi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;Wi(a,f,c);c.targetObject=null;a.doMouseMove();Ui(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=Vi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&Wi(e.H,b,d);null===e&&(e=b.target);Wi(a,b,d);d.clickCount=a.yq;d.targetDiagram=Xi(b,e);d.targetObject=null;a.doMouseUp();Ui(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; -c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+Yi[1]+Yi[2]+"wI"+Zi.slice(1,5)]["b"+$i.slice(1,b)](d.Z,aj,b,b);d.Vc(!0);bj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), +Q.prototype.setScrollWidth=function(a){a=void 0===a?this.div:a;null===a&&(a=x.document.body);var b=0;if(Lg){var c=Si;b=wi;null===c&&(c=Si=ua("p"),c.style.width="100%",c.style.height="200px",c.style.boxSizing="content-box",b=wi=ua("div"),b.style.position="absolute",b.style.visibility="hidden",b.style.width="200px",b.style.height="150px",b.style.boxSizing="content-box",b.appendChild(c));b.style.overflow="hidden";a.appendChild(b);var d=c.offsetWidth;b.style.overflow="scroll";c=c.offsetWidth;d===c&&(c= +b.clientWidth);a.removeChild(b);b=d-c;0!==b||Pa||(b=11)}this.Eb=b;this.Hw=!0};Q.prototype.qb=function(a){a.classType===Q&&(this.autoScale=a)};Q.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.div&&this.div.id&&(b=this.div.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; +function vi(a,b){if(Lg){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); +a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Ti(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= +"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Ui(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Ti(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Lg){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= +"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Vi;e.addEventListener("pointerdown",Wi);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){ph(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Xi(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 +Math.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=0c|| +Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Yi(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Zi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;$i(a,f,c);c.targetObject=null;a.doMouseMove();Yi(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=Zi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&$i(e.H,b,d);null===e&&(e=b.target);$i(a,b,d);d.clickCount=a.yq;d.targetDiagram=aj(b,e);d.targetObject=null;a.doMouseUp();Yi(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; +c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+bj[1]+bj[2]+"wI"+cj.slice(1,5)]["b"+dj.slice(1,b)](d.Z,ej,b,b);d.Vc(!0);fj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), a.ib=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function bj(a){var b=a.ta.Oa;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.ui,!1);a.addEventListener(b,"pointermove",a.ck,!1);a.addEventListener(b,"pointerup",a.ek,!1);a.addEventListener(b,"pointerout",a.dk,!1);a.addEventListener(b,"pointercancel",a.bk,!1);a.addEventListener(b,"pointerenter",a.cz,!1);a.addEventListener(b,"pointerleave",a.dz,!1);a.addEventListener(b,"wheel",a.Zj,!1);a.addEventListener(b,"keydown",a.Rz,!1);a.addEventListener(b,"keyup",a.Sz,!1);a.addEventListener(b, -"blur",a.Oy,!1);a.addEventListener(b,"focus",a.Py,!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(x,"resize",a.Pv,!1)}function Fe(a){30r&&(this.position=w.h(-(b.scrollWidth-this.Aa)+v-this.Aa/e+m,this.position.y))),a.wy&&this.allowVerticalScroll&&(hu&&(this.position= -w.h(this.position.x,-(b.scrollHeight-this.ya)+a.scrollTop-this.ya/e+f))),J.free(w),this.vd=!0,this.Ee=this.qr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);lh(this);return ej(this,a)}; -function ej(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);jh(this);return ij(this,a)}; +function ij(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===jj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=gj(this,ij);a!==Rh&&(fj(this,!1),hj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; -t.CA=function(a,b){void 0===b&&(b=ij);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===ij||b===jj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===jj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function jj(a,b){if((b||a.hf)&&!a.wb&&null!==a.ta&&a.documentBounds.w()){a.wb=!0;if(b){var c=a.initialPosition;if(c.w()){a.wb=!1;a.position=c;return}c=J.alloc();c.xi(a.documentBounds,a.initialDocumentSpot);var d=a.viewportBounds;d=N.allocAt(0,0,d.width,d.height);var e=J.alloc();e.xi(d,a.initialViewportSpot);e.h(c.x-e.x,c.y-e.y);a.position=e;N.free(d);J.free(e);J.free(c)}c=a.yh;b&&a.Fg!==oh&&(c=a.Fg);var f=c!==oh?kj(a,c):a.scale;c=a.pa.x;d=a.pa.y;e=a.Aa/f;var g=a.ya/f,h=a.yk,k=a.pq;b&&!h.sb()&&(k.sb()|| +k.Yb())&&(h=k.Yb()?wc:k);lj(a,a.documentBounds,e,g,h,b);b=a.scale;a.scale=f;a.wb=!1;f=a.viewportBounds;if(!(K.B(f.x,c)&&K.B(f.y,d)&&K.B(f.width,e)&&K.B(f.height,g)))a.onViewportBoundsChanged(new N(c,d,e,g),f,b,!1)}} +function kj(a,b){var c=a.Pp;if(null===a.ta)return c;a.Va();var d=a.documentBounds;if(!d.w())return c;var e=d.width;d=d.height;var f=a.Aa+(a.gf?a.Eb:0),g=a.ya+(a.Be?a.Eb:0),h=f/e,k=g/d;return b===mj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===nj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=kj(this,mj);a!==Rh&&(jj(this,!1),lj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; +t.CA=function(a,b){void 0===b&&(b=mj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===mj||b===nj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===nj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Ky=function(a,b){this.Va();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.Az=function(a){if(a instanceof Y){this.eq=a;var b=J.alloc();this.fq=this.op(a.ga(sc,b));J.free(b)}else this.eq=null,this.fq=tb}; -function hj(a,b,c,d,e,f){var g=J.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.eq){var l=J.alloc();l=a.eq.ga(sc,l);h=l.x-a.fq.x/a.scale;k=l.y-a.fq.y/a.scale;e=rc;J.free(l)}if(f||a.scrollMode===Rh)e.sb()&&(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.rj,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.rj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} -t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof te&&c.isVisible()&&(c.si()?(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 pf?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} +t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&xj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof we&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function xj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof pf?(yj(f)||zj(f)||Aj(f))&&xj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eB&&(v=M.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));xb(m,u);xb(q,u);d.push(new N(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Ej(this.Yf,this)&&(e=0B&&(v=M.left, y=M.right),w.height>D&&(z=M.top,A=M.bottom)):(v=M.left,y=M.right,z=M.top,A=M.bottom);var S=w.width+v+y,R=w.height+z+A;M=a.scale;var I=S>k/M,G=R>l/M;if(!(f||a.gf||a.Be||I||G))return!0;v=w.x-v;k=m.x;y=w.right+y;l=m.right+g;z=w.y-z;var ca=m.y;w=w.bottom+A;m=m.bottom+h;var X="1px";A="1px";a.scrollMode===Rh&&(I||G)&&(I&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(I=1,v+1l+1&&(I=Math.max((y-l)*M+a.Aa,I)),B+g+1m+1&&(I=Math.max((w-m)*M+a.ya,I)),D+h+1l+1&&(g=Math.max((y-l)*M+a.Aa,g)),B+1m+1&&(h=Math.max((w-m)*M+g,h)),D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1m+1&&(r.scrollTop=a.position.y*M));k=a.Aa;l=a.ya;r.style.width=k+(a.gf?a.Eb:0)+"px";r.style.height=l+(a.Be?a.Eb:0)+"px";return c!==k||d!==l||a.animationManager.Ab?(c=N.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,M,f),N.free(c),!1):!0}t=Q.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(ee,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oi=function(a){this.partManager.oi(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof te||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.De.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()}; -t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.De.remove(a);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()};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.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(fe,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; -t.Dy=function(a,b){Tj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(fe,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; -t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(fe,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; +t.oi=function(a){this.partManager.oi(a);var b=this;Lj(a,function(a){Mj(b,a)});(a instanceof we||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Lj(a,function(a){Nj(b.partManager,a)});!0!==zj(a)&&!0!==Aj(a)||this.De.add(a);Oj(a,!0,this);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()}; +t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Lj(a,function(a){Qj(b.partManager,a,b)});this.De.remove(a);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()};t.remove=function(a){Rj(this,a,!0)}; +function Rj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; +t.Dy=function(a,b){Xj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; +t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(ge,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Zw=function(a){null===this.pf&&(this.pf=new F);this.pf.add(a);this.model.Pe(a);return this};t.nA=function(a){null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.hk(a)};t.Pe=function(a){null===this.zg&&(this.zg=new F);this.zg.add(a);return this};t.hk=function(a){null!==this.zg&&(this.zg.remove(a),0===this.zg.count&&(this.zg=null))}; -t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==de&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==de&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ea=function(a){return this.undoManager.Ea(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Kf=function(){return this.undoManager.Kf()};Q.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.eb(b):this.undoManager.Kf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.rp=function(){this.partManager.rp()}; -function Yj(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ni(a),a.N(),a.Ee=!0,d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ni(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ni(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);fj(a,!1);d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==qh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),xe(e,this));this.wb||this.invalidateViewport(a,b);qj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= +function ck(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ri(a),a.N(),a.Ee=!0,d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ri(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ri(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);jj(a,!1);d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==oh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Ae(e,this));this.wb||this.invalidateViewport(a,b);uj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= Math.round(a.width*c);this.gc.canvasSize.height=Math.round(a.height*c);this.gc.newCanvasSize.width=this.Aa;this.gc.newCanvasSize.height=this.ya;this.gc.isScroll=d;this.S("ViewportBoundsChanged",this.gc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.bb()})}}; -function qj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, +function uj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(dk(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);L.free(d);c.part.location=b;J.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.S("ChangingSelection",b);for(var c=b.Fa(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||kh(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)hk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),lh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||mh(f),a.aa=c}}}function hk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)hk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; +t.ms=function(a){for(var b=[],c=0;c=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||ih(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)lk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||kh(f),a.aa=c}}}function lk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)lk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),xj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; function xi(a){function b(a){var b=a.toLowerCase(),e=new F;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new ob,d=new ob;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.jw=c;a.iw=d} -function Dj(a,b){var c=a.iw.I(b);return null!==c?c:a.iw.I(b.toLowerCase())}function ik(a,b){var c=a.jw.I(b);if(null!==c)return c;c=a.jw.I(b.toLowerCase());if(null!==c)return c;C("Unknown DiagramEvent name: "+b)}t.Bj=function(a,b){a=ik(this,a);null!==a&&a.add(b);return this};t.am=function(a,b){a=ik(this,a);null!==a&&a.remove(b)}; -t.S=function(a,b,c){var d=ik(this,a),e=new ae;e.diagram=this;a=Dj(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.Fa(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=N.allocAt(0,0,d.width*e,d.height*e);var f=J.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.Xa(pb)||(b=new J(b.x+f.x/e,b.y+f.y/e)); N.free(d);J.free(f);return b};t=Q.prototype;t.Cs=function(){return null};t.bv=function(){return null};t.bs=function(a,b){this.pj.add(a,b)};t.Gu=function(a){(this.Qw=a)||this.nodes.each(function(a){a instanceof pf&&(a.$p=null)})}; -function Ek(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Ng)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; -t.Kx=function(a){void 0===a&&(a={});return Ek(this,this.Yz,a)}; -t.Yz=function(a,b,c){var d=Fk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Zi+"data":e=d.getImageData(0,0,c.width,c.height);break;case Zi:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Lg)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; +t.Kx=function(a){void 0===a&&(a={});return Hk(this,this.Yz,a)}; +t.Yz=function(a,b,c){var d=Ik(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case cj+"data":e=d.getImageData(0,0,c.width,c.height);break;case cj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Fk(a,b,c,d){a.animationManager.Cc();a.bd();if(null===a.ta)return null;"object"!==typeof b&&C("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 L(Infinity,Infinity):new L(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,q=b.elementFinished||null,r=b.showTemporary; -void 0===r&&(r=!n);b=b.showGrid;void 0===b&&(b=r);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new dc(l):l instanceof dc||C("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.ib.Vc(!0);n=new Pi(null,p,void 0,!0);var u=n.context;if(!(e||f||k||h)){n.width=a.Aa+Math.ceil(l.left+l.right);n.height=a.ya+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.hs=q;Bj(a,d.context,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);a.Xm=!0;return n.context}var w=a.Pp,v=a.documentBounds.copy();v.Gv(a.zb);if(r)for(var y=a.Wa.s,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+=z):l=new dc(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.hs=q;Bj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Gk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Fj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, -0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Fj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), +f&&(f=w),e.w()?(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.w()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.w()?(f=Math.min((g.width-h)/v.width,(g.height-z)/v.height),f>w?(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+=z):l=new cc(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.hs=q;Fj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Fj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} +ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Jk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Jj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, +0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Jj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), this.removeEventListener(b,"pointerdown",this.ui,!1),this.removeEventListener(b,"pointerup",this.ek,!1),this.removeEventListener(b,"pointerout",this.dk,!1),this.removeEventListener(b,"pointercancel",this.bk,!1),this.ta.nx()),this.ol&&(this.ol.disconnect(),this.ol=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.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),ke===this&&(ke=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, +this.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),le===this&&(le=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, this.Wt=a.toPort))}},Nx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Ox:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.dc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a;this.dc.skipsUndoManager= a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var b=this.pb;b!==a&&((0>a||1a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("allowZoom",b,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var b=this.nn;b!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",b,a),jj(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var b=this.mn;b!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",b,a),jj(this,!1))}},allowHorizontalScroll:{ +get:function(){return this.Xs},set:function(a){var b=this.Xs;b!==a&&(this.Xs=a,this.g("allowHorizontalScroll",b,a),jj(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(this.$s=a,this.g("allowVerticalScroll",b,a),jj(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var b=this.iu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{ get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){""===a&&(a=this.Op);if(this.it!==a){var b=this.ta,c=this.Ka;if(null!==b&&null!==c){this.it=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.Op},set:function(a){""===a&&(a="auto");var b=this.Op;b!==a&&(this.Op=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(this.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ @@ -784,29 +784,29 @@ set:function(a){var b=this.Ch;b!==a&&(this.Ch=a,this.g("contextMenu",b,a))}},com a))}},currentTool:{get:function(){return this.hb},set:function(a){var b=this.hb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Iw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var b=this.Nt;if(b!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount", b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var b=this.St;b!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{ get:function(){return this.wt},set:function(a){var b=this.wt;b!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.ow}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction? -!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.dc},set:function(a){var b=this.dc;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Li(this,!0);this.hf=!1;this.fn= -!0;this.Ce=-2;this.kg=!1;var d=this.wb;this.wb=!0;kh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){return b.hk(a)}),b.hk(this.Oc));this.dc=a;this.partManager=bk(this.dc.type);for(var e=0;ethis.scale&&(this.scale=a)):xa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var b=this.Mt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.yk}, -set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),fj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ +set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),jj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Pc=a,a.Xe(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.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Hk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= -this.uu;b!==a&&(a!==yi&&a!==Ik&&a!==Jk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Kk.kc()},set:function(a){Kk.add(a.replace(/\s/g,""))}},version:{get:function(){return Lk}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; +get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Kk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= +this.uu;b!==a&&(a!==yi&&a!==Lk&&a!==Mk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Nk.kc()},set:function(a){Nk.add(a.replace(/\s/g,""))}},version:{get:function(){return Ok}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; Q.prototype.doAutoScroll=Q.prototype.gs;Q.prototype.isUnoccupied=Q.prototype.Xj;Q.prototype.raiseDiagramEvent=Q.prototype.S;Q.prototype.removeDiagramListener=Q.prototype.am;Q.prototype.addDiagramListener=Q.prototype.Bj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Vz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.Va;Q.prototype.findLinksByExample=Q.prototype.ls; Q.prototype.findNodesByExample=Q.prototype.ms;Q.prototype.findLinkForData=Q.prototype.Kc;Q.prototype.findNodeForData=Q.prototype.ii;Q.prototype.findPartForData=Q.prototype.Lc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Wb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Wd;Q.prototype.transformViewToDoc=Q.prototype.Ps;Q.prototype.transformRectDocToView=Q.prototype.AA;Q.prototype.transformDocToView=Q.prototype.op; Q.prototype.centerRect=Q.prototype.es;Q.prototype.scrollToRect=Q.prototype.uv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Kz;Q.prototype.highlight=Q.prototype.Jz;Q.prototype.selectCollection=Q.prototype.sA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.rp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Kf; @@ -814,493 +814,494 @@ Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.Xw;Q.prototype.addLayer=Q.prototype.Al;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Jj;Q.prototype.removeParts=Q.prototype.Is;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ex;Q.prototype.setProperties=Q.prototype.nm;Q.prototype.attach=Q.prototype.Eu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Tx;Q.prototype.setInputOption=Q.prototype.tA; Q.prototype.getInputOption=Q.prototype.Ql;Q.prototype.resetRenderingHints=Q.prototype.Ux;Q.prototype.setRenderingHint=Q.prototype.Yx;Q.prototype.getRenderingHint=Q.prototype.Gf;Q.prototype.maybeUpdate=Q.prototype.bd;Q.prototype.requestUpdate=Q.prototype.ac;Q.prototype.delayInitialization=Q.prototype.Yy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.Ya;Q.prototype.findObjectsNear=Q.prototype.og;Q.prototype.findPartsNear=Q.prototype.nz; Q.prototype.findObjectsIn=Q.prototype.Cf;Q.prototype.findPartsIn=Q.prototype.vx;Q.prototype.findObjectsAt=Q.prototype.ji;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Ol;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Ky;Q.prototype.zoomToRect=Q.prototype.CA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.lx;Q.prototype.focus=Q.prototype.focus; -var oi=new ob,Oi=null,Ng=void 0!==x.document,Ji=null,Ki="",qh=new E(Q,"None",0),ij=new E(Q,"Uniform",1),jj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Ik=new E(Q,"AllParentsCollapsed",22),Jk=new E(Q,"AnyParentsCollapsed", -23),Kk=new F,Lk="2.3.12",Zi="image",aj=null,mi=!1; -function ni(){if(Ng){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; -aj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Ng=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Ng};Q.None=qh;Q.Uniform=ij; -Q.UniformToFill=jj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Ik;Q.AnyParentsCollapsed=Jk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} -function Aj(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Ng){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Kk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +var oi=new ob,Si=null,Lg=void 0!==x.document,Ni=null,Oi="",oh=new E(Q,"None",0),mj=new E(Q,"Uniform",1),nj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Lk=new E(Q,"AllParentsCollapsed",22),Mk=new E(Q,"AnyParentsCollapsed", +23),Nk=new F,Ok="2.3.13",cj="image",ej=null,mi=!1; +function ni(){if(Lg){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; +ej=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Lg=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Lg};Q.None=oh;Q.Uniform=mj; +Q.UniformToFill=nj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Lk;Q.AnyParentsCollapsed=Mk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} +function Ej(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Lg){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Nk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("2bfa41fdb3784bca12")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.Rc=!(0<=g&&gh),!a.Rc))break;if("#"===f[0]){g=x.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g);k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Rc=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Of=function(){null!==d.observed&&Qk(d)};c.autoScale=ij;c.wb=!1;b&&Object.assign(c,b);return c}la(Gk,Q);Gk.prototype.computePixelRatio=function(){return 1}; -Gk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){xj(this);if(null===this.ql){var c=new Pi(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Rk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; -Gk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Fj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){xj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Rk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Rc&&a!==a.xy?!0:!1}ui.className="DiagramHelper";function Me(a){this.j=void 0===a?new J:a;this.o=new J}ma.Object.defineProperties(Me.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var bj="DraggingInfo";Me.className="DraggingInfo";function Vj(a,b,c){this.node=a;this.info=b;this.Tu=c}Vj.className="DraggingNodeInfoPair"; +function Ee(){this.reset()}Ee.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new L(NaN,NaN)).freeze();this.gridSnapCellSpot=sc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ee.className="DraggingOptions"; +function Pk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Qk(c);b&&c.nm(b);return c}la(Pk,Q);function Qk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=tc;a.layout=new Rk}Pk.prototype.reset=function(){Q.prototype.reset.call(this);Qk(this)};Pk.className="Palette"; +function Jk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.V=null;c.mn=!1;c.nn=!1;c.F=!0;c.u=!0;c.ia=0;c.o=!1;c.ql=null;c.Yx("drawShadows",!1);a=new U;var e=new Bf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new cc(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Sk,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new J(c.x-b.width/2,c.y-b.height/2)}};c.Pf=function(){d.Ya();Tk(d)};c.Xd=function(){null!==d.observed&&(d.Ya(),d.N())};c.Ha=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Of=function(){null!==d.observed&&Tk(d)};c.autoScale=mj;c.wb=!1;b&&Object.assign(c,b);return c}la(Jk,Q);Jk.prototype.computePixelRatio=function(){return 1}; +Jk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){Bj(this);if(null===this.ql){var c=new Ti(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Uk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; +Jk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Jj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Bj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Uk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,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.Nb,this.Nb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.yc());b=this.Wa.s;for(var c=b.length,d=0;da&&(a=0);this.ia!==a&&(this.ia=a)}}});Gk.className="Overview";function Pk(){Ae.call(this);this.j=null}la(Pk,Ae); -Pk.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.timestampa&&(a=0);this.ia!==a&&(this.ia=a)}}});Jk.className="Overview";function Sk(){De.call(this);this.j=null}la(Sk,De); +Sk.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))};Sk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===qh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Sk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Sk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; -Sk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;kh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=bc):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());mh(b)};Sk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Sk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0b.maxScale||(b.scale=a))};Vk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===oh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Vk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Vk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Vk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;ih(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=ac):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());kh(b)};Vk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +Vk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0a&&(a+=360));return a}; +t.mi=function(a){void 0===a&&(a=new N);var b=this.naturalBounds,c=this.oe,d=J.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Xb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Xb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Xb(a,d.x,d.y,0,0);J.free(d);return a};t.li=function(){var a=this.oe;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; t.Df=function(){if(0!==(this.l&4096)===!1)return this.Jk;var a=this.Ca;return null!==this.panel?a*this.panel.Df():a};t.qs=function(a,b){void 0===b&&(b=new J);b.assign(a);this.oe.Cd(b);return b};t.rs=function(a,b,c){return this.Rj(a.x,a.y,b.x,b.y,c)}; t.Rj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,K.Ff(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=K.Ff(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -Y.prototype.measure=function(a,b,c,d){if(!1!==uj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(jl(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Wk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Xk: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.Db> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ll(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; -function ml(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=jl(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:pj(a,!0);a.measure(d,e,0,0);break;case Wk:pj(a,!0);a.measure(d,f,0,0);break;case Xk:pj(a,!0),a.measure(c,e,0,0)}}} -t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||nl(c,!0),this.N(),Ub(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(nl(a,!0),a instanceof V&&ol(a,this))}; -t.hc=function(a,b){if(!pl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&kl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof ql&&l.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, -a,m,!0,!1,k,h),m instanceof ql&&m.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&sl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, +Y.prototype.measure=function(a,b,c,d){if(!1!==yj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(ml(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Zk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case $k: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.Db> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ol(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; +function pl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ml(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)tj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:tj(a,!0);a.measure(d,e,0,0);break;case Zk:tj(a,!0);a.measure(d,f,0,0);break;case $k:tj(a,!0),a.measure(c,e,0,0)}}} +t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ql(c,!0),this.N(),Tb(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(ql(a,!0),a instanceof V&&rl(a,this))}; +t.hc=function(a,b){if(!sl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&nl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof tl&&l.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, +a,m,!0,!1,k,h),m instanceof tl&&m.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&vl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, y=p.m22,z=p.dy,A,B=A=0;p=A*r+B*u+w;var D=A*v+B*y+z;A=q.width+n;B=0;var M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);var S=Math.min(D,A);var R=Math.max(p+0,M)-B;var I=Math.max(D+0,A)-S;p=B;D=S;A=q.width+n;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;A=0;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;n=b.viewportBounds;q=n.x;r=n.y;p=!(p>n.width+q||q>R+p||D>n.height+ -r||r>I+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Pg&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); -""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),tl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?tl(a):k&&!1===this.shadowVisible&&ul(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),vl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&wl(this,h)&&null===this.shadowVisible&&ul(a);null!==this.Ma&&(a.yc(),xl(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||wl(this,h))? -(yl(this,!0),null===this.shadowVisible&&ul(a)):yl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&tl(a);m&&k&&ul(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function wl(a,b){if(null===b)return!1;kl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; -function vl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof ql&&a.areaBackground.type===rl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function xl(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof ql&&a.Ma.type===rl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} -function zl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;gI+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Ng&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); +""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),wl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?wl(a):k&&!1===this.shadowVisible&&xl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),yl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&zl(this,h)&&null===this.shadowVisible&&xl(a);null!==this.Ma&&(a.yc(),Al(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||zl(this,h))? +(Bl(this,!0),null===this.shadowVisible&&xl(a)):Bl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&wl(a);m&&k&&xl(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function zl(a,b){if(null===b)return!1;nl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; +function yl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof tl&&a.areaBackground.type===ul?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function Al(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof tl&&a.Ma.type===ul?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} +function Cl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;ge)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ta;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Cj(a,e)}else Cj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function $l(a,b){Wl.add(a,b)} -function am(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new dl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new dl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(cl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(cl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ -get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1e)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ua;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Gj(a,e)}else Gj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function cm(a,b){Zl.add(a,b)} +function dm(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} +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new gl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new gl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(fl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(fl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ +get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",b,a))}},angle:{get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&& -(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Sl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),fl(this)&&(a=this.part,null!==a&&(gl(this,a,"width"),gl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, -set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&&(a=this.part,null!==a&&gl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&& -(a=this.part,null!==a&&gl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),cl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& -(a.height=Infinity),a.freeze(),cl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== -!0&&sl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&sl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(cl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(cl(this),this.A.Pf=a)}},alignment:{ -get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Nl(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== -this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),cl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); -var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),cl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(cl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ -get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&dm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,em(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Rl(this))}},toEndSegmentLength:{ -get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Rl(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Rl(this))}},toLinkable:{get:function(){return null!== +(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Vl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),il(this)&&(a=this.part,null!==a&&(jl(this,a,"width"),jl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, +set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&&(a=this.part,null!==a&&jl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&& +(a=this.part,null!==a&&jl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),fl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& +(a.height=Infinity),a.freeze(),fl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== +!0&&vl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&vl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(fl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(fl(this),this.A.Pf=a)}},alignment:{ +get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Ql(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== +this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),fl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); +var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),fl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(fl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ +get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&gm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,hm(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Ul(this))}},toEndSegmentLength:{ +get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Ul(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Ul(this))}},toLinkable:{get:function(){return null!== this.ba?this.ba.Tr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.ba?this.ba.Ur:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.ba?this.ba.Xi:rc},set:function(a){var b=this.fromSpot;b.D(a)||(a=a.J(),this.Xc(), -this.ba.Xi=a,this.g("fromSpot",b,a),Rl(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Rl(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", -b,a),Rl(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== -this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(cl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(cl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(cl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ -get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(cl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(cl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(cl(this), -this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(cl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(cl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: -null},set:function(a){var b=this.mouseHold;b!==a&&(cl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(cl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(cl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, -mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(cl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(cl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; -b!==a&&(cl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(cl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(cl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== -this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(cl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(cl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; +this.ba.Xi=a,this.g("fromSpot",b,a),Ul(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Ul(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", +b,a),Ul(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== +this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(fl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(fl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(fl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ +get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(fl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(fl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(fl(this), +this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(fl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(fl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: +null},set:function(a){var b=this.mouseHold;b!==a&&(fl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(fl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(fl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, +mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(fl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(fl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; +b!==a&&(fl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(fl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(fl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== +this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(fl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(fl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; Y.prototype.attach=Y.prototype.Eu;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.If;Y.prototype.isVisibleObject=Y.prototype.Ed;Y.prototype.isContainedBy=Y.prototype.rg;Y.prototype.getNearestIntersectionPoint=Y.prototype.rs;Y.prototype.getLocalPoint=Y.prototype.qs;Y.prototype.getDocumentScale=Y.prototype.Df;Y.prototype.getDocumentAngle=Y.prototype.li;Y.prototype.getDocumentBounds=Y.prototype.mi;Y.prototype.getDocumentPoint=Y.prototype.ga;Y.prototype.intersectsRect=Y.prototype.Yc; -Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Wl=null;Y.className="GraphObject";Wl=new ob; -$l("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Vl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Vl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Zl=null;Y.className="GraphObject";Zl=new ob; +cm("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Yl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Yl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; b.mouseLeave=function(a,b){b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.If()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Bf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= d}}};b.actionUp=function(b,d){if(d.If()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Bf))){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}); -$l("TreeExpanderButton",function(){var a=Vl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Gi("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +cm("TreeExpanderButton",function(){var a=Yl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Ki("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof we&&(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}); -$l("SubGraphExpanderButton",function(){var a=Vl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof pf){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});$l("ToolTip",function(){return Vl(te,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Vl(Bf,{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)}))}); -$l("ContextMenu",function(){return Vl(te,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Gi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});$l("ContextMenuButton",function(){var a=Vl("Button");a.stretch=Wk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -$l("PanelExpanderButton",function(a){var b=am(a,"COLLAPSIBLE"),c=Vl("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},Vl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Gi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); +cm("SubGraphExpanderButton",function(){var a=Yl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof we&&(c=c.adornedPart);if(c instanceof pf){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});cm("ToolTip",function(){return Yl(we,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Yl(Bf,{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)}))}); +cm("ContextMenu",function(){return Yl(we,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ki("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});cm("ContextMenuButton",function(){var a=Yl("Button");a.stretch=Zk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +cm("PanelExpanderButton",function(a){var b=dm(a,"COLLAPSIBLE"),c=Yl("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},Yl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Ki("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); a=c.fb("ButtonBorder");a instanceof Bf&&(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.ih();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -$l("CheckBoxButton",function(a){var b=am(a);a=Vl("Button",{desiredSize:new L(14,14)},Vl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Gi("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +cm("CheckBoxButton",function(a){var b=dm(a);a=Yl("Button",{desiredSize:new L(14,14)},Yl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Ki("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -$l("CheckBox",function(a){a=am(a);a=Vl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new dc(0,1,0,0)});var b=Vl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new dc(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=kg=new E(Y,"None",0);Y.Default=Yk=new E(Y,"Default",0);Y.Vertical=Xk=new E(Y,"Vertical",4);Y.Horizontal=Wk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); -Y.UniformToFill=Zk=new E(Y,"UniformToFill",2);Y.FlipVertical=$k=new E(Y,"FlipVertical",1);Y.FlipHorizontal=al=new E(Y,"FlipHorizontal",2);Y.FlipBoth=bl=new E(Y,"FlipBoth",3);Y.make=Vl;Y.getBuilders=function(){var a=new ob,b;for(b in Wl)if(b!==b.toLowerCase()){var c=Wl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=$l; -Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};fm.className="STransform"; -function gm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}gm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};gm.className="SGradient"; -function Fj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, -c)}Fj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Fj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Fj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Fj.prototype.focus=function(){this.Oa.focus()};Fj.prototype.nx=function(){this.ownerDocument=null}; -ma.Object.defineProperties(Fj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Fj.className="SVGSurface"; +cm("CheckBox",function(a){a=dm(a);a=Yl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new cc(0,1,0,0)});var b=Yl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new cc(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=kg=new E(Y,"None",0);Y.Default=al=new E(Y,"Default",0);Y.Vertical=$k=new E(Y,"Vertical",4);Y.Horizontal=Zk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); +Y.UniformToFill=bl=new E(Y,"UniformToFill",2);Y.FlipVertical=cl=new E(Y,"FlipVertical",1);Y.FlipHorizontal=dl=new E(Y,"FlipHorizontal",2);Y.FlipBoth=el=new E(Y,"FlipBoth",3);Y.make=Yl;Y.getBuilders=function(){var a=new ob,b;for(b in Zl)if(b!==b.toLowerCase()){var c=Zl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=cm; +Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};im.className="STransform"; +function jm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}jm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};jm.className="SGradient"; +function Jj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, +c)}Jj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Jj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Jj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Jj.prototype.focus=function(){this.Oa.focus()};Jj.prototype.nx=function(){this.ownerDocument=null}; +ma.Object.defineProperties(Jj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Jj.className="SVGSurface"; function ii(a,b){this.Hv=a;this.svg=a.Oa;this.stack=[];this.nh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Il=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.Vg=this.Br=this.Ar=0;this.yd=this.ad=null;this.path=[];this.Yl={};this.Ct=!1; -this.Yg=null;this.uj=0;this.rb=new fm;this.j=Dl(this);this.Mj=Dl(this,"gojs-diagram");this.Hl=this.ti=null;var c=jb++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} -function yj(a,b,c,d,e,f,g){void 0===a.Mj?Bl(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; +this.Yg=null;this.uj=0;this.rb=new im;this.j=Gl(this);this.Mj=Gl(this,"gojs-diagram");this.Hl=this.ti=null;var c=ib++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} +function Cj(a,b,c,d,e,f,g){void 0===a.Mj?El(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.Yl={stroke:"none",fill:"none"}};t.Se=function(a){this.addPath(this.path,this.rb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new gm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+jb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(Zi,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new gm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function El(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;El(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";hm(this,Zi,f,this.rb);this.addElement(Zi,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");im(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};hm(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};hm(this,"fill",a,this.rb);im(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};hm(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new jm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ib++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(cj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new jm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Hl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Hl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";km(this,cj,f,this.rb);this.addElement(cj,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");lm(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};km(this,"fill",a,this.rb);lm(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};km(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.rb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.ak= a.ak}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,ak:this.ak});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; -t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; -ma.Object.defineProperties(Il.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, +t.ng=function(a,b){if(a instanceof tl&&a.type===ul){var c=a.xk;a=a.ft;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; +t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(pm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; +ma.Object.defineProperties(Ll.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter= -""===a?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mm=Object.freeze([]);Il.className="CanvasSurfaceContext";function nm(){this.F=this.o=this.u=this.j=0}nm.className="ColorNumbers"; -function ql(a,b){om||(pm(),om=!0);Qa(this);this._isFrozen=!1;void 0===a?(this.na=Hl,this.wk="black"):"string"===typeof a?(this.na=Hl,this.wk=a):(this.na=a,this.wk="black");a=this.na;a===Kl?(this.Qd=tc,this.Kk=Ac):this.Kk=a===rl?this.Qd=wc:this.Qd=rc;this.Gr=0;this.Xp=NaN;this.xe=this.cr=this.we=null;this.ft=this.xk=0;b&&Object.assign(this,b)} -ql.prototype.copy=function(){var a=new ql;a.na=this.na;a.wk=this.wk;a.Qd=this.Qd.J();a.Kk=this.Kk.J();a.Gr=this.Gr;a.Xp=this.Xp;null!==this.we&&(a.we=this.we.copy());a.cr=this.cr;return a};t=ql.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.ka();return this};t.qb=function(a){a.classType===ql&&(this.type=a)}; -t.toString=function(){var a="Brush(";if(this.type===Hl)a+=this.color;else if(a=this.type===Kl?a+"Linear ":this.type===rl?a+"Radial ":this.type===Jl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&xa(a,"0 <= loc <= 1",ql,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Hl&&(this.type=Kl);this.xe=null;return this}; -t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(a,b));return this};function sm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(b,c)} -t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(-a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(-a,b));return this};function tm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(-b,c)} -function um(a,b,c){Uh(a);a=vm.j;var d=vm.u,e=vm.o,f=vm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((vm.j-a)*c+a)+", "+Math.round((vm.u-d)*c+d)+", "+Math.round((vm.o-e)*c+e)+", "+Math.round((vm.F-f)*c+f)+")"} -t.Hx=function(){if(this.type===Hl)return wm(this.color);if((this.type===Kl||this.type===rl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===rl)return wm(a.first().value);if(null!==a.get(.5))return wm(a.get(.5));if(2===a.count)return a=a.Fa(),wm(um(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 wm(um(a.get(c),a.get(d),1-f/e))}return!1}; -function wm(a){if(!a)return!1;if(a instanceof ql)return a.Hx();Uh(a);return 128>(299*vm.j+587*vm.u+114*vm.o)/1E3} -function rm(a,b){switch(b){case qm:b=100*xm(vm.j);var c=100*xm(vm.u),d=100*xm(vm.o);ym.j=.4124564*b+.3575761*c+.1804375*d;ym.u=.2126729*b+.7151522*c+.072175*d;ym.o=.0193339*b+.119192*c+.9503041*d;ym.F=vm.F;b=zm(ym.j/Am[0]);c=zm(ym.u/Am[1]);d=zm(ym.o/Am[2]);Bm.j=116*c-16;Bm.u=500*(b-c);Bm.o=200*(c-d);Bm.F=ym.F;Bm.j=Math.min(100,Math.max(0,Bm.j+100*a));a=(Bm.j+16)/116;b=a-Bm.o/200;ym.j=Am[0]*Cm(Bm.u/500+a);ym.u=Am[1]*(Bm.j>Dm*Em?Math.pow(a,3):Bm.j/Dm);ym.o=Am[2]*Cm(b);ym.F=Bm.F;a=-.969266*ym.j+1.8760108* -ym.u+.041556*ym.o;b=.0556434*ym.j+-.2040259*ym.u+1.0572252*ym.o;vm.j=255*Fm((3.2404542*ym.j+-1.5371385*ym.u+-.4985314*ym.o)/100);vm.u=255*Fm(a/100);vm.o=255*Fm(b/100);vm.F=ym.F;vm.j=Math.round(vm.j);255vm.j&&(vm.j=0);vm.u=Math.round(vm.u);255vm.u&&(vm.u=0);vm.o=Math.round(vm.o);255vm.o&&(vm.o=0);return"rgba("+vm.j+", "+vm.u+", "+vm.o+", "+vm.F+")";case Gm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){om||(pm(),om=!0);var b=Hm;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,vm.j=a[0],vm.u=a[1],vm.o=a[2],vm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,vm.j=0,vm.u=0,vm.o=0,vm.F=1)}} -function Vh(){var a=vm.j/255,b=vm.u/255,c=vm.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=vm.F}function xm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Fm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function zm(a){return a>Em?Math.pow(a,1/3):(Dm*a+16)/116}function Cm(a){var b=a*a*a;return b>Em?b:(116*a-16)/Dm}function cm(a,b){"string"!==typeof a&&(a instanceof ql||C("Value for "+b+" must be a color string or a Brush, not "+a))}function pm(){Hm=Ng?(new Pi(null,void 0,{willReadFrequently:!0})).context:null} -ma.Object.defineProperties(ql.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Kl?this.start=tc:a===rl&&(this.start=wc));this.end.Mc()&&(a===Kl?this.end=Ac:a===rl&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, -set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",ql,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, -a);0>a&&xa(a,">= zero",ql,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});ql.prototype.isDark=ql.prototype.Hx;ql.prototype.darkenBy=ql.prototype.Xy;ql.prototype.lightenBy=ql.prototype.Wz;ql.prototype.addColorStop=ql.prototype.addColorStop; -var Em=216/24389,Dm=24389/27,Am=[95.047,100,108.883],Hm=null,vm=new nm,Wh=new nm,ym=new nm,Bm=new nm,om=!1;ql.className="Brush";var Hl;ql.Solid=Hl=new E(ql,"Solid",0);var Kl;ql.Linear=Kl=new E(ql,"Linear",1);var rl;ql.Radial=rl=new E(ql,"Radial",2);var Jl;ql.Pattern=Jl=new E(ql,"Pattern",4);var qm;ql.Lab=qm=new E(ql,"Lab",5);var Gm;ql.HSL=Gm=new E(ql,"HSL",6); -ql.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}; -ql.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;om||(pm(),om=!0);var b=Hm;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};ql.lighten=function(a){return sm(a)};ql.lightenBy=sm;ql.darken=function(a){return tm(a)};ql.darkenBy=tm;ql.mix=um;ql.isDark=wm;function Zl(){this.xa="Base"}Zl.prototype.measure=function(){}; -Zl.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};Zl.prototype.arrange=function(){};Zl.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Zl.prototype.jA=function(a){a.Tj()};Zl.prototype.hc=function(){};ma.Object.defineProperties(Zl.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});Zl.prototype.remeasureObject=Zl.prototype.jA;Zl.prototype.arrangeElement=Zl.prototype.My; -Zl.prototype.measureElement=Zl.prototype.Zz;Zl.className="PanelLayout";function Im(){this.xa="Base"}la(Im,Zl); -Im.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Jm(a);for(var k=0;ka)&&xa(a,"0 <= loc <= 1",tl,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Kl&&(this.type=Nl);this.xe=null;return this}; +t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(b,c)} +t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(-a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(-a,b));return this};function wm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(-b,c)} +function xm(a,b,c){Uh(a);a=ym.j;var d=ym.u,e=ym.o,f=ym.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((ym.j-a)*c+a)+", "+Math.round((ym.u-d)*c+d)+", "+Math.round((ym.o-e)*c+e)+", "+Math.round((ym.F-f)*c+f)+")"} +t.Hx=function(){if(this.type===Kl)return zm(this.color);if((this.type===Nl||this.type===ul)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ul)return zm(a.first().value);if(null!==a.get(.5))return zm(a.get(.5));if(2===a.count)return a=a.Fa(),zm(xm(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 zm(xm(a.get(c),a.get(d),1-f/e))}return!1}; +function zm(a){if(!a)return!1;if(a instanceof tl)return a.Hx();Uh(a);return 128>(299*ym.j+587*ym.u+114*ym.o)/1E3} +function um(a,b){switch(b){case tm:b=100*Am(ym.j);var c=100*Am(ym.u),d=100*Am(ym.o);Bm.j=.4124564*b+.3575761*c+.1804375*d;Bm.u=.2126729*b+.7151522*c+.072175*d;Bm.o=.0193339*b+.119192*c+.9503041*d;Bm.F=ym.F;b=Cm(Bm.j/Dm[0]);c=Cm(Bm.u/Dm[1]);d=Cm(Bm.o/Dm[2]);Em.j=116*c-16;Em.u=500*(b-c);Em.o=200*(c-d);Em.F=Bm.F;Em.j=Math.min(100,Math.max(0,Em.j+100*a));a=(Em.j+16)/116;b=a-Em.o/200;Bm.j=Dm[0]*Fm(Em.u/500+a);Bm.u=Dm[1]*(Em.j>Gm*Hm?Math.pow(a,3):Em.j/Gm);Bm.o=Dm[2]*Fm(b);Bm.F=Em.F;a=-.969266*Bm.j+1.8760108* +Bm.u+.041556*Bm.o;b=.0556434*Bm.j+-.2040259*Bm.u+1.0572252*Bm.o;ym.j=255*Im((3.2404542*Bm.j+-1.5371385*Bm.u+-.4985314*Bm.o)/100);ym.u=255*Im(a/100);ym.o=255*Im(b/100);ym.F=Bm.F;ym.j=Math.round(ym.j);255ym.j&&(ym.j=0);ym.u=Math.round(ym.u);255ym.u&&(ym.u=0);ym.o=Math.round(ym.o);255ym.o&&(ym.o=0);return"rgba("+ym.j+", "+ym.u+", "+ym.o+", "+ym.F+")";case Jm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){rm||(sm(),rm=!0);var b=Km;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,ym.j=a[0],ym.u=a[1],ym.o=a[2],ym.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,ym.j=0,ym.u=0,ym.o=0,ym.F=1)}} +function Vh(){var a=ym.j/255,b=ym.u/255,c=ym.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=ym.F}function Am(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Im(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Cm(a){return a>Hm?Math.pow(a,1/3):(Gm*a+16)/116}function Fm(a){var b=a*a*a;return b>Hm?b:(116*a-16)/Gm}function fm(a,b){"string"!==typeof a&&(a instanceof tl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function sm(){Km=Lg?(new Ti(null,void 0,{willReadFrequently:!0})).context:null} +ma.Object.defineProperties(tl.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Nl?this.start=tc:a===ul&&(this.start=wc));this.end.Mc()&&(a===Nl?this.end=Ac:a===ul&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, +set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",tl,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, +a);0>a&&xa(a,">= zero",tl,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});tl.prototype.isDark=tl.prototype.Hx;tl.prototype.darkenBy=tl.prototype.Xy;tl.prototype.lightenBy=tl.prototype.Wz;tl.prototype.addColorStop=tl.prototype.addColorStop; +var Hm=216/24389,Gm=24389/27,Dm=[95.047,100,108.883],Km=null,ym=new qm,Wh=new qm,Bm=new qm,Em=new qm,rm=!1;tl.className="Brush";var Kl;tl.Solid=Kl=new E(tl,"Solid",0);var Nl;tl.Linear=Nl=new E(tl,"Linear",1);var ul;tl.Radial=ul=new E(tl,"Radial",2);var Ml;tl.Pattern=Ml=new E(tl,"Pattern",4);var tm;tl.Lab=tm=new E(tl,"Lab",5);var Jm;tl.HSL=Jm=new E(tl,"HSL",6); +tl.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}; +tl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;rm||(sm(),rm=!0);var b=Km;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};tl.lighten=function(a){return vm(a)};tl.lightenBy=vm;tl.darken=function(a){return wm(a)};tl.darkenBy=wm;tl.mix=xm;tl.isDark=zm;function bm(){this.xa="Base"}bm.prototype.measure=function(){}; +bm.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};bm.prototype.arrange=function(){};bm.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};bm.prototype.jA=function(a){a.Tj()};bm.prototype.hc=function(){};ma.Object.defineProperties(bm.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});bm.prototype.remeasureObject=bm.prototype.jA;bm.prototype.arrangeElement=bm.prototype.My; +bm.prototype.measureElement=bm.prototype.Zz;bm.className="PanelLayout";function Lm(){this.xa="Base"}la(Lm,bm); +Lm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Mm(a);for(var k=0;kS&&(eb=Math.max(S-ff,0));var nk=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(nk?ff:0)),0)}if(1===ec.columnSpan&&(Fb===kg||Fb===Xk)){G=a.Fb(Eb);var Ai=G.Wc();eb=Math.max(Lf-G.actual,0);eb+Ai>M&&(eb=Math.max(M-Ai,0));var Pn=0===G.oa;G.pc=G.pc+eb;G.actual= -G.oa+eb;M=Math.max(M-(eb+(Pn?Ai:0)),0)}ef&&ec.Tj()}}}}}Ga(y);var Td=0,ne=0;f=a.columnCount;for(var sg=0;sg=a.rowCount);Oe++)G=a.Gb(Pa.row+Oe),eb=0,eb=Fb===nd||Fb===Xk?Math.max(G.minimum, -0===ud[Pa.row+Oe]?G.maximum:Math.min(ud[Pa.row+Oe],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.height+=eb,qc+=G.minimum;for(var Vc=1;Vc=a.columnCount);Vc++)G=a.Fb(Pa.column+Vc),eb=0,eb=Fb===nd||Fb===Wk?Math.max(G.minimum,0===Hc[Pa.column+Vc]?G.maximum:Math.min(Hc[Pa.column+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.width+=eb,rk+=G.minimum;hb.width+=Id.width;hb.height+=Id.height;var Eh=Pa.margin, -lf=Eh.right+Eh.left,Ci=Eh.top+Eh.bottom;Pa.measure(hb.width,hb.height,rk,qc);for(var Fh=Pa.measuredBounds,Jd=Math.max(Fh.width+lf,0),Pf=Math.max(Fh.height+Ci,0),mf=0,Gh=0;Gh=a.rowCount);Gh++)G=a.Gb(Pa.row+Gh),mf+=G.total||0;if(mf=Pe)&&!(Pa.row+qe>=a.rowCount);qe++){G=a.Gb(Pa.row+qe);var Re=G.oa||0,Qf=Qe(Pa,G,Vd);G.actual=Math.min(G.maximum,Re+Qf);G.oa!==Re&&(Pe-=G.oa- -Re)}for(;0vd&&(G.actual=Math.min(G.maximum,vd+Pe),G.oa!==vd&&(Pe-=G.oa-vd));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var vg=0,Se=0;Se=a.columnCount);Se++)G=a.Fb(Pa.column+Se),vg+=G.total||0;if(vg=wg)&&!(Pa.column+Rf>=a.columnCount);Rf++){G=a.Fb(Pa.column+Rf);var Di=G.oa||0,Sn=re(Pa,G,Rn);G.actual=Math.min(G.maximum, -Di+Sn);G.oa!==Di&&(wg-=G.oa-Di)}for(;0sk&&(G.actual=Math.min(G.maximum,sk+wg),G.oa!==sk&&(wg-=G.oa-sk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Id);L.free(hb);void 0!==ud&&Ga(ud);void 0!==Hc&&Ga(Hc);var xg=0,yg=0,tk=a.desiredSize,Fr=a.maxSize;Fb=jl(a,!0);var Ei=ne=Td=0,Fi=0;f=a.columnCount;for(var uk=0;uk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= -1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ke=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ke=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Yb()){Ua=a.defaultAlignment;Ua.sb()||(Ua=wc);var rd=Ua.x;var Eb=Ua.y;var Le=Ua.offsetX;Ua=Ua.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Le=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Ua=Tc.offsetY)}else rd=Ua.x,Eb=Ua.y,Le= -Ua.offsetX,Ua=Ua.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Ua=Le=0;xc=I.width;Tc=I.height;var nc=R.margin,ec=nc.left+nc.right,ef=nc.top+nc.bottom,sd=Ol(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Wk||(xc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==Xk||(Tc=Math.max(na-ef,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+ef;G+=wa*rd-(xc+ec)*rd+Le+nc.left;ca+=db*Eb-X*Eb+Ua+nc.top;R.visible&& -(Zb(gb,Db,eb,Ke,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ke)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(B))}}}}r= +function Qm(a,b,c){var d=null;a instanceof W&&""!==a.$e&&(d=a.fb(a.$e),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.pp(b),d=d.panel}function Rm(){this.xa="Base"}la(Rm,bm); +Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Qb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Bf&&(u=k,r=u.strokeWidth*u.scale);var w=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var v=Sm(k),y=v.x*w+v.offsetX;v=v.y*l+v.offsetY;var z=Tm(k),A=z.x*w+z.offsetX;z=z.y*l+z.offsetY;isFinite(b)&&(m=Math.max(Math.abs(y-A)-r,0));isFinite(c)&&(n=Math.max(Math.abs(v-z)-r,0));r=L.alloc();r.h(0,0);a=Mm(a);for(z=0;zS&&(eb=Math.max(S-vh,0));var Sn=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(Sn?vh:0)),0)}if(1===dc.columnSpan&&(Fb===kg||Fb===$k)){G=a.Fb(Eb);var zi=G.Wc();eb=Math.max(oc-G.actual,0);eb+zi>M&&(eb=Math.max(M-zi,0));var sk=0===G.oa; +G.pc=G.pc+eb;G.actual=G.oa+eb;M=Math.max(M-(eb+(sk?zi:0)),0)}(Pe||sd)&&dc.Tj()}}}}}Ga(y);var oe=0,Dd=0;f=a.columnCount;for(var wh=0;wh=a.rowCount);Vc++)G=a.Gb(Na.row+Vc),eb=0,eb=Fb=== +nd||Fb===$k?Math.max(G.minimum,0===Hc[Na.row+Vc]?G.maximum:Math.min(Hc[Na.row+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.height+=eb,Dh+=G.minimum;for(var Of=1;Of=a.columnCount);Of++)G=a.Fb(Na.column+Of),eb=0,eb=Fb===nd||Fb===Zk?Math.max(G.minimum,0===re[Na.column+Of]?G.maximum:Math.min(re[Na.column+Of],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.width+=eb,qc+=G.minimum;jb.width+=Gd.width; +jb.height+=Gd.height;var Vd=Na.margin,Ei=Vd.right+Vd.left,Fi=Vd.top+Vd.bottom;Na.measure(jb.width,jb.height,qc,Dh);for(var Wd=Na.measuredBounds,Pf=Math.max(Wd.width+Ei,0),Qf=Math.max(Wd.height+Fi,0),Eh=0,mf=0;mf=a.rowCount);mf++)G=a.Gb(Na.row+mf),Eh+=G.total||0;if(Eh=Wc)&&!(Na.row+se>=a.rowCount);se++){G=a.Gb(Na.row+se);var Te=G.oa||0,te=Rf(Na,G,Se);G.actual=Math.min(G.maximum, +Te+te);G.oa!==Te&&(Wc-=G.oa-Te)}for(;0tg&&(G.actual=Math.min(G.maximum,tg+Wc),G.oa!==tg&&(Wc-=G.oa-tg));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var Ue=0,Fh=0;Fh=a.columnCount);Fh++)G=a.Fb(Na.column+Fh),Ue+=G.total||0;if(Ue=ug)&&!(Na.column+Gh>=a.columnCount);Gh++){G=a.Fb(Na.column+Gh);var Hi=G.oa||0,tu=Gi(Na, +G,ue);G.actual=Math.min(G.maximum,Hi+tu);G.oa!==Hi&&(ug-=G.oa-Hi)}for(;0vk&&(G.actual=Math.min(G.maximum,vk+ug),G.oa!==vk&&(ug-=G.oa-vk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Gd);L.free(jb);void 0!==Hc&&Ga(Hc);void 0!==re&&Ga(re);var vg=0,wg=0,wk=a.desiredSize,Fr=a.maxSize;Fb=ml(a,!0);var Ii=Dd=oe=0,Ji=0;f=a.columnCount;for(var xk=0;xk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= +1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ne=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ne=Math.max(c.height-k,0));var Va=R.alignment;if(Va.Yb()){Va=a.defaultAlignment;Va.sb()||(Va=wc);var rd=Va.x;var Eb=Va.y;var Oe=Va.offsetX;Va=Va.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Oe=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Va=Tc.offsetY)}else rd=Va.x,Eb=Va.y,Oe= +Va.offsetX,Va=Va.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Va=Oe=0;xc=I.width;Tc=I.height;var lc=R.margin,dc=lc.left+lc.right,Pe=lc.top+lc.bottom,sd=Rl(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Zk||(xc=Math.max(X-dc,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==$k||(Tc=Math.max(na-Pe,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+Pe;G+=wa*rd-(xc+dc)*rd+Oe+lc.left;ca+=db*Eb-X*Eb+Va+lc.top;R.visible&& +(Yb(gb,Db,eb,Ne,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ne)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=dk(v.figure);for(var A=0;Az&&y.push(B))}}}}r= a.O.s;u=r.length;for(w=0;we*v*c))){z=D.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=D.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=q[w];var M=!1,S=D.strokeDashArray;null!==S&&(M=!0,b.js(S,D.strokeDashOffset));if("LineV"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== +e);S<=D+l;S++){var R=S*e+p;0<=R&&R<=h&&an(S,y,z,B)&&(b.moveTo(R,0),b.lineTo(R,k))}b.stroke();b.Se()}else if("LineH"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== P.j?I.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&I.offset(-R.startX,-R.startY));R=z[2];if(M!==Zf){var G=k.computeAngle(y,M,R);y.Lb=G}G=I.x-b.x;var ca=I.y-b.y;J.free(I);Ga(z)}else if(A<-n||A>=n)z=J.alloc(),k.vg(),k.computeMidPoint(z),R=k.midAngle,M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G),G=z.x-b.x,ca=z.y-b.y,J.free(z);else{G=0;0<=A?(ca=m.M(A),z=AX+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==an&&M!==bn||r.rotate(90, -X/2,wa/2);M!==cn&&M!==dn||r.rotate(-90,X/2,wa/2);M===en&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); +2):z);I=R.Bf(ca);var X=z.Bf(G);R=I>X+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==dn&&M!==en||r.rotate(90, +X/2,wa/2);M!==fn&&M!==gn||r.rotate(-90,X/2,wa/2);M===hn&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); G+=w.x;ca+=w.y;I.set(z);I.h(G+D,ca+y,z.width,z.height);q.push(I);c.ed(I)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.jg=c;a.position.h(b.x+c.x,b.y+c.y);Pb(e,c.width||0,c.height||0);ld.free(r);J.free(u);J.free(w)}}}}; -Zm.prototype.arrange=function(a,b){var c=b.length;if(a instanceof te||a instanceof T){var d=a,e=null;a instanceof te&&(e=a,d=e.adornedPart);var f=a instanceof te?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=J.alloc(),q=n,w=r,q.vg(),q.computeMidPoint(w),q=n.midAngle,l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,w=r.y, J.free(r);else{u=0;0<=h?(r=b.s[h],w=hy+10?0<=h?q.ab(r):r.ab(q):y>v+10?0<=h?w.ab(u):u.ab(w):0<=h?q.ab(u):u.ab(q)}else q=0<=h?r.ab(w):w.ab(r);l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(w.x-r.x)*k;w=r.y+(w.y-r.y)*k}if(p.ys())g.location=new J(n,w);else{p.Mc()&&(p=wc);r=ld.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var z=g.naturalBounds;u=N.allocAt(0,0,z.width,z.height);v=J.alloc();v.xi(u,p);r.Ga(v);p=-v.x;y=-v.y;var A=z.width,B=z.height;z=J.alloc();z.assign(m);var D=isNaN(m.x),M=isNaN(m.y);if(D||M){A=A/2+3;B=B/2+3;var S=45<=q&&135>=q,R=225<=q&&315>=q;l===Zf&&(S||R)?(z.x=M?A:m.y,z.y=D?B:m.x,S?0<=h||isNaN(h)&&.5>k||!D||(z.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&D&&(z.y=-B),M&&(z.x=-A))):(D&&(z.x=0<=h||isNaN(h)&&.5>k?A:-A),M&&(z.y=-B),z.rotate(q))}else z.rotate(q);n+=z.x;w+=z.y;r.pp(u);p+=u.x;y+=u.y;h=J.allocAt(n+ -p,w+y);g.move(h);J.free(h);J.free(z);J.free(v);N.free(u);ld.free(r)}}null!==e?e.Ul(!1):d.Ul(!1);d=fn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);J.free(d)}}; -function $m(a,b,c,d){if(!1!==uj(d)){var e=d.strokeWidth;0===e&&a instanceof te&&a.type===W.Link&&a.adornedObject instanceof Bf&&(e=a.adornedObject.strokeWidth);e*=d.Ca;a instanceof T&&null!==a.ua?(a=a.geometry.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof te&&null!==a.adornedPart.ua?(a=a.adornedPart.ua.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.w()||null===d.ua?d.ec.h(0,0,e.width,e.height):d.ec.assign(d.ua.bounds);pj(d,!1)}} -function gn(){this.xa="Base"}la(gn,Zl); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Qb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new N(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,w=q.flattenedLengths,v=q.flattenedTotalLength,y=u.length,z=0,A=0,B=Ea(),D=0;DX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbKe))for(var Ua=0;UaKe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Le=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,nc=0,ec=0,ef=v;a.graduatedMarks=[];for(var sd, -xh=0;xhzi*Fb*v/a.graduatedRange&&null===oc.graduatedSkip)){var rg=w[0][0],Fd=0,fc=0;ec=v*oc.graduatedStart-1E-4;ef=v*oc.graduatedEnd+1E-4;var Lf=zi*Fb,pc=a.graduatedTickBase;if(pca.graduatedMin+Lf&&(pc-=Math.floor((pc-a.graduatedMin)/Lf)*Lf);for(var nk=Le[xh],Ai=pc,Pn=1E-6*a.graduatedMax,Td= -1;pc<=a.graduatedMax+Pn;Td++){a:{for(var ne=nk.length,sg=0;sg-yh){var hf=!1;break a}}hf=!0}if(hf&&(pc>a.graduatedMax&&(pc=a.graduatedMax),null===oc.graduatedSkip||oc instanceof Pg&&!oc.graduatedSkip(pc,oc)||oc instanceof Bf&&!oc.graduatedSkip(pc,oc))&&(nc=(pc-a.graduatedMin)*v/a.graduatedRange,nc>v&&(nc=v),ec<=nc&&nc<=ef)){for(var Ud=B[Fd][fc],Me=w[Fd][fc];Fdrg&&fcoe&&.4995oe?0oe||.9995tg){var Ah=1-Math.abs(.5-oe);Ud=(td*Ah+Hd*(1-Ah))%360;break a}}}Ud=td}if(oc instanceof Pg){var ed="";null!==oc.graduatedFunction?(ed=oc.graduatedFunction(pc,oc),ed=null!==ed&&void 0!==ed?ed.toString():""):ed=(+pc.toFixed(2)).toString();""!==ed&&sd.push({$l:zh,angle:Ud,text:ed})}else sd.push({$l:zh,angle:Ud})}pc=Ai+Td*Lf}}}a.graduatedMarks.push(sd)}Ga(B); -var hb=a.graduatedMarks;if(null!==hb)for(var Bi=d.length,Sb=0;Sbfd;fd++){switch(fd){case 0:hc.h(Id,ud);break;case 1:hc.h(Id+Bh,ud);break;case 2:hc.h(Id,ud+Of);break;case 3:hc.h(Id+Bh,ud+Of)}hc.rotate(Pa+Va.angle);hc.offset(qk,Dh);0===Ch&&0===fd?Hc.h(hc.x,hc.y,0,0):Hc.Ye(hc);hc.offset(-qk,-Dh);hc.rotate(-Pa-Va.angle)}J.free(hc);null!==pe.graduatedBounds&&pe.graduatedBounds.push(Hc);Yb(Ne,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Va instanceof Pg){var Uc=a,rk=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Pg);var qc=Uc.temporaryTextBlock;hn(qc,Va); -var Oe=Va.alignmentFocus;Oe.Mc()&&(Oe=tc);for(var Vc=Va.segmentOrientation,Eh=Va.segmentOffset,lf=new N,Ci=0,Fh=0,Jd=0,Pf=0,mf=0,Gh=Tb.length,Pe=0;PeJd||225Jd)&&vd.rotate(-Jd,Re/2,Qf/2);var vg=N.allocAt(0,0,Re,Qf),Se=J.alloc();Se.xi(vg,Oe);vd.Ga(Se);var wg=-Se.x,Rn=-Se.y,re=J.alloc();re.assign(Eh);isNaN(re.x)&&(re.x=Re/2+3);isNaN(re.y)&&(re.y=-(Qf/2+3));re.rotate(Jd);Ci+=re.x+wg;Fh+=re.y+Rn;var Rf=new N(Ci,Fh,Qe.width,Qe.height),Di=new N(Qe.x,Qe.y,Qe.width,Qe.height),Sn=new N(qe.x,qe.y,qe.width,qe.height); -Vd.Tz=Pf;Vd.lineCount=qc.lineCount;Vd.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Vd.actualBounds=Rf;Vd.measuredBounds=Di;Vd.naturalBounds=Sn;0===Pe?lf.assign(Rf):lf.ed(Rf);J.free(re);J.free(Se);N.free(vg);ld.free(vd)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(lf);Yb(rk,lf.x,lf.y,lf.width,lf.height)}pj(Va,!1)}}}; -gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbNe))for(var Va=0;VaNe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Oe=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,lc=0,dc=0,Pe=v;a.graduatedMarks=[];for(var sd, +gf=0;gfFb*rk*v/a.graduatedRange&&null===mc.graduatedSkip)){var Lf=w[0][0],Cd=0,nc=0;dc=v*mc.graduatedStart-1E-4;Pe=v*mc.graduatedEnd+1E-4;var hf=Fb*rk,oc=a.graduatedTickBase;if(oca.graduatedMin+hf&&(oc-=Math.floor((oc-a.graduatedMin)/hf)*hf);for(var vh=Oe[gf],Sn=oc,zi=1E-6*a.graduatedMax,sk= +1;oc<=a.graduatedMax+zi;sk++){a:{for(var oe=vh.length,Dd=0;Dd-jf){var xh=!1;break a}}xh=!0}if(xh&&(oc>a.graduatedMax&&(oc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Ng&&!mc.graduatedSkip(oc,mc)||mc instanceof Bf&&!mc.graduatedSkip(oc,mc))&&(lc=(oc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),dc<=lc&&lc<=Pe)){for(var fd=B[Cd][nc],Qe=w[Cd][nc];CdLf&&ncpe&&.4995pe?0pe||.9995Bi){var zh=1-Math.abs(.5-pe);fd=(Qd*zh+Fd*(1-zh))%360;break a}}}fd=Qd}if(mc instanceof Ng){var Rd="";null!==mc.graduatedFunction?(Rd=mc.graduatedFunction(oc,mc),Rd=null!==Rd&&void 0!==Rd?Rd.toString():""):Rd=(+oc.toFixed(2)).toString();""!==Rd&&sd.push({$l:Ai,angle:fd,text:Rd})}else sd.push({$l:Ai,angle:fd})}oc=Sn+sk*hf}}}a.graduatedMarks.push(sd)}Ga(B); +var kf=a.graduatedMarks;if(null!==kf)for(var jb=d.length,Mf=0;MfNa;Na++){switch(Na){case 0:fc.h(lf,Gd);break;case 1:fc.h(lf+Ci,Gd);break;case 2:fc.h(lf,Gd+Bh);break;case 3:fc.h(lf+Ci,Gd+Bh)}fc.rotate(Ch+Ra.angle);fc.offset(Nf,uk);0===Td&&0===Na?Hc.h(fc.x,fc.y,0,0):Hc.Ye(fc);fc.offset(-Nf,-uk);fc.rotate(-Ch-Ra.angle)}J.free(fc);null!==pc.graduatedBounds&&pc.graduatedBounds.push(Hc);Xb(Re,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Ra instanceof Ng){var Uc=a,Ud=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Ng);var qc=Uc.temporaryTextBlock;ln(qc,Ra); +var Dh=Ra.alignmentFocus;Dh.Mc()&&(Dh=tc);for(var Vc=Ra.segmentOrientation,Of=Ra.segmentOffset,Vd=new N,Ei=0,Fi=0,Wd=0,Pf=0,Qf=0,Eh=Sb.length,mf=0;mfWd||225Wd)&&te.rotate(-Wd,se/2,Te/2);var tg=N.allocAt(0,0,se,Te),Ue=J.alloc();Ue.xi(tg,Dh);te.Ga(Ue);var Fh=-Ue.x,ug=-Ue.y,ue=J.alloc();ue.assign(Of);isNaN(ue.x)&&(ue.x=se/2+3);isNaN(ue.y)&&(ue.y=-(Te/2+3));ue.rotate(Wd);Ei+=ue.x+Fh;Fi+=ue.y+ug;var Gi=new N(Ei,Fi,Se.width,Se.height),Gh=new N(Se.x,Se.y,Se.width,Se.height),Hi=new N(Rf.x,Rf.y,Rf.width,Rf.height); +Wc.Tz=Pf;Wc.lineCount=qc.lineCount;Wc.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Wc.actualBounds=Gi;Wc.measuredBounds=Gh;Wc.naturalBounds=Hi;0===mf?Vd.assign(Gi):Vd.ed(Gi);J.free(ue);J.free(Ue);N.free(tg);ld.free(te)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(Vd);Xb(Ud,Vd.x,Vd.y,Vd.width,Vd.height)}tj(Ra,!1)}}}; +kn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +t.hh=function(a,b){if(this.na===W.Grid)a.yc(),this.na.hc(this,a,b);else if(this.na===W.Graduated)a.yc(),this.na.hc(this,a,b);else{if(this.na===W.Table)if(a.yc(),a instanceof ii){var c=a.yd;a.yd=Gl(a,"gojs-ts");on(this,a);a.nh.pop();a.yd=c}else on(this,a);(c=this.isClipping&&this.na===W.Spot)&&a.save();for(var d=this.Qb(),e=this.O.s,f=e.length,g=0;gg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.js(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.Se();n&&b.fs()}}}} -function mn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=on(a,!0),l=on(a,!1),m=0;mp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function on(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function rn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),J.free(r));J.free(m);f&&e.transform(g);return l}; -t.Fj=function(){for(var a=this.O.s,b=a.length,c=0;cc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Wk:this.v(!0);this.measure(c+h,f+g,0,0);break;case Xk:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; -t.gh=function(a){var b=this.naturalBounds,c=Jm(this);if(Zb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Zk:this.v(!0);this.measure(c+h,f+g,0,0);break;case $k:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; +t.gh=function(a){var b=this.naturalBounds,c=Mm(this);if(Yb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); -if(null!==m?m.Cf(a,b,c,d,e,p):il(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function vn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&vn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Mm(this),k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); +if(null!==m?m.Cf(a,b,c,d,e,p):ll(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function yn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&yn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.og=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:xb(J.allocAt(a.x,a.y),this.transform),l=h?b:xb(J.allocAt(b.x,b.y),this.transform),m=k.Bf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; -function Pm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Qm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;cw.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; +function Sm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Tm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;uj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||wn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.cb(fe,"elements",this,b,null,d,null),c.cb(ee,"elements",this,null,b,null,a)))};function xn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(ee,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"rowdefs",this,c,null,a,null);this.v()}}}; -function Wj(a,b,c){var d=a.rowDefs;if(!(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.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(ee,"coldefs",this,null,c,null,a)}return b[a]}; -t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"coldefs",this,c,null,a,null);this.v()}}};function Xj(a,b,c){var d=a.colDefs;if(!(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.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&Yl(b,a);return this}; -t.Iy=function(a,b){(a=this.Gb(a))&&Yl(a,new Vj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&Yl(a,new Vj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;yj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||zn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.cb(ge,"elements",this,b,null,d,null),c.cb(fe,"elements",this,null,b,null,a)))};function An(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(fe,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"rowdefs",this,c,null,a,null);this.v()}}}; +function ak(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(fe,"coldefs",this,null,c,null,a)}return b[a]}; +t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"coldefs",this,c,null,a,null);this.v()}}};function bk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&am(b,a);return this}; +t.Iy=function(a,b){(a=this.Gb(a))&&am(a,new Zj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&am(a,new Zj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.qc(this.O.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=tn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&xn(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+tn(a);a.Hb(f,e);d&&(e.ub=b,En(a,f,c),e.ub=null);e.data=b}}} -function En(a,b,c){for(a=a.O;ba;)this.qc(this.O.length-1,!1);Dn(this,this.itemArray)}; +function Dn(a,b){var c=wn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Fn(a,b);e=Gn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&An(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+wn(a);a.Hb(f,e);d&&(e.ub=b,Hn(a,f,c),e.ub=null);e.data=b}}} +function Hn(a,b,c){for(a=a.O;ba&&xa(a,">= 0",W,"padding"), -a=new dc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:lc},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Jn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== -this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof ql)&&(a instanceof ql&&a.freeze(),null===this.U&&(this.U=new Jn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Jn),this.U.Ha=a,this.v(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Jn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.U&&(this.U=new Jn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof te);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), -null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, -set:function(a){var b=this.Hh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););cl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(cl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, +a=new cc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:jc},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Mn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof tl)&&(a instanceof tl&&a.freeze(),null===this.U&&(this.U=new Mn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Mn),this.U.Ha=a,this.v(), +this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Mn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ +a),null===this.U&&(this.U=new Mn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof we);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), +null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, +set:function(a){var b=this.Hh;if(b!==a||null!==a&&Cn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Qj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Nj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Dn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););fl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(fl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this instanceof pf&&(this.tb=null),this.v(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){var c=null===this.panel||this.panel.If(); -this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&wn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); -ma.Object.defineProperties(W,{Position:{get:function(){return Xl.I("Position")}},Horizontal:{get:function(){return Xl.I("Horizontal")}},Vertical:{get:function(){return Xl.I("Vertical")}},Spot:{get:function(){return Xl.I("Spot")}},Auto:{get:function(){return Xl.I("Auto")}},Table:{get:function(){return Xl.I("Table")}},Viewbox:{ -get:function(){return Xl.I("Viewbox")}},TableRow:{get:function(){return Xl.I("TableRow")}},TableColumn:{get:function(){return Xl.I("TableColumn")}},Link:{get:function(){return Xl.I("Link")}},Grid:{get:function(){return Xl.I("Grid")}},Graduated:{get:function(){return Xl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; +this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&zn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); +ma.Object.defineProperties(W,{Position:{get:function(){return $l.I("Position")}},Horizontal:{get:function(){return $l.I("Horizontal")}},Vertical:{get:function(){return $l.I("Vertical")}},Spot:{get:function(){return $l.I("Spot")}},Auto:{get:function(){return $l.I("Auto")}},Table:{get:function(){return $l.I("Table")}},Viewbox:{ +get:function(){return $l.I("Viewbox")}},TableRow:{get:function(){return $l.I("TableRow")}},TableColumn:{get:function(){return $l.I("TableColumn")}},Link:{get:function(){return $l.I("Link")}},Grid:{get:function(){return $l.I("Grid")}},Graduated:{get:function(){return $l.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; W.prototype.findItemPanelForData=W.prototype.tx;W.prototype.updateTargetBindings=W.prototype.La;W.prototype.copyTemplate=W.prototype.Vy;W.prototype.graduatedValueForPoint=W.prototype.Hz;W.prototype.graduatedPointForValue=W.prototype.Gz;W.prototype.findColumnForLocalX=W.prototype.gz;W.prototype.findRowForLocalY=W.prototype.oz;W.prototype.addColumnDefinition=W.prototype.Cy;W.prototype.addRowDefinition=W.prototype.Iy;W.prototype.addRowColumnDefinition=W.prototype.Hy; W.prototype.removeColumnDefinition=W.prototype.kA;W.prototype.getColumnDefinition=W.prototype.Fb;W.prototype.removeRowDefinition=W.prototype.pA;W.prototype.getRowDefinition=W.prototype.Gb;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Hb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.Nl;W.prototype.walkVisualTreeFrom=W.prototype.qm; -W.prototype.findMainElement=W.prototype.Qb;var Gn=!1,Hn=null,Xl=new ob;W.className="Panel";W.definePanelLayout=In;In("Position",new Im);In("Vertical",new Lm);In("Auto",new Om);In("Link",new Zm);function Kn(){this.lq=0;this.F=100;this.ia=10;this.V=0;this.Zh=this.o=this.j=this.u=null}Kn.prototype.copy=function(){var a=new Kn;a.lq=this.lq;a.F=this.F;a.ia=this.ia;a.V=this.V;a.u=this.u;a.j=this.j;a.o=this.o;a.Zh=this.Zh;return a};Kn.className="GradPanelSettings"; -function Jn(){this.Pc=[];this.Oc=[];this.j=this.ob=Ln;this.hb=this.Ib=0;this.Qp=lc;this.Ha=1;this.V=this.ia=null;this.F=1;this.nb=this.o=this.u=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Pc,d=c.length,e=b.Pc,f=0;fa&&xa(a,">= 0",Vj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), -this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Vj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Vj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ -get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Vj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= -a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&cm(a,"RowColumnDefinition.separatorStroke"), -a instanceof ql&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&xa(a,">= 0",Zj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), +this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Zj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Zj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ +get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Zj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= +a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&fm(a,"RowColumnDefinition.separatorStroke"), +a instanceof tl&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;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,q,r,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;r=w[v];n=r[0];q=r[1];p=r[2];r=r[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){Ga(w);return}e>r?(y=e-r,e=r):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(q);a.translate(-(g/2),-(f/2));0===y&&d.hh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==y){v++;if(v===w.length){Ga(w);return}r=w[v];n=r[0];q=r[1];p=r[2];r=r[3];e=y}}Ga(w)}} -t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof te&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof we&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Gf("drawShadows")&&(f=h.isShadowed);!1===a.Il&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.js(k,this.strokeDashOffset));if(e.type===P.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.ik(),a.Se();else if(e.type===P.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.ng(d);null!==c&&(h&&f&&ul(a),a.ik(),h&&f&&tl(a));a.Se()}else if(e.type===P.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+K.wg*e,k-p,l+e,k-K.wg*p,l+e,k),a.bezierCurveTo(l+e,k+K.wg*p,l+K.wg*e,k+p,l,k+p),a.bezierCurveTo(l-K.wg*e,k+p,l-e,k+K.wg*p,l-e,k),a.bezierCurveTo(l-e,k-K.wg*p,l-K.wg*e,k-p,l,k-p),a.closePath(),null!==d&&a.ng(d),null!==c&& -(h&&f&&ul(a),a.ik(),h&&f&&tl(a)),a.Se();else if(e.type===P.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Nd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;vu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Kd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;N.free(f);return K.Zb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== P.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ca(a))return N.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ca(a);N.free(f);return a}if(c.type===P.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return N.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);N.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Rd(c,a.x,a.y,e):Pd(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Od(c,a.x,a.y,e):Md(c,a,e,1=this.strokeWidth)m=K.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Ea();a=new J;K.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),v-=r,y-= -u;q.contains(v,y);)v-=r,y-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||K.$(k.y,a))&&(k.yb||K.$(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} t.ux=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.gh(a,!0))return!0;var e=a.Bf(b),f=e;1.5=e||zb(b,f,0,-n)>=e||zb(b, -f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Rd(b,a.x,a.y,f):Pd(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Ed:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Kd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Ld:case Md:p=n.type===Ld?Nd(n,f):Od(n,f,g,m);var q=p.length;if(0===q){g=n.type===Ld?n.centerX:n.endX;m=n.type===Ld?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; +f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Od(b,a.x,a.y,f):Md(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Bd:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Hd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Id:case Jd:p=n.type===Id?Kd(n,f):Ld(n,f,g,m);var q=p.length;if(0===q){g=n.type===Id?n.centerX:n.endX;m=n.type===Id?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; break}n=null;for(var r=Ea(),u=0;u= 0",Bf,"strokeWidth:value")}},strokeCap:{ -get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Nn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', -Bf,"strokeJoin"):(Nn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Nn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;e= 0",Bf,"strokeWidth:value")}},strokeCap:{ +get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Qn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', +Bf,"strokeJoin"):(Qn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Qn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.ib!==a&&(c=!1);b.ib instanceof ii&& -(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case al:a.translate(e,0);a.scale(-1,1);break;case $k:a.translate(0,f);a.scale(1,-1);break;case bl:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case al:a.scale(-1,1);a.translate(-e,0);break;case $k:a.scale(1,-1);a.translate(0,-f);break;case bl:a.scale(-1,-1),a.translate(-e,-f)}}}; +(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case dl:a.translate(e,0);a.scale(-1,1);break;case cl:a.translate(0,f);a.scale(1,-1);break;case el:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case dl:a.scale(-1,1);a.translate(-e,0);break;case cl:a.scale(1,-1);a.translate(0,-f);break;case el:a.scale(-1,-1),a.translate(-e,-f)}}}; t.Nj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==ko?ko(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);if(l){h=null!==lo?lo(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.Se();b instanceof ii&&b.ad.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.Se(),b instanceof ii&&b.ad.classList.add("gojs-td"))}}; -t.jk=function(a,b,c){if(!Y.prototype.jk.call(this,a,b,c))return!1;ji(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Rb.length))){this.l|=16777216; l=this.Rb[k];for(b=Math.max(1,a-b);oo(l)>b&&1a.maxLines&&(a.l|=16777216)}} +t.eh=function(a,b,c,d){pl(this,a,b,c,d)};function uo(a,b,c){if(null===a.ze)a.ze=b,a.Db=c;else{if(null===a.Rb||null===a.Qc)a.Rb=[],a.Qc=[],a.Rb.push(a.ze),a.Qc.push(a.Db);a.Rb.push(b);a.Qc.push(c);a.Rb.length>a.maxLines&&(a.l|=16777216)}} function vo(a,b,c,d){var e=a.formatting===no;e&&(b=b.trim());var f=0,g=a.Ae,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,jo(a)+h);var k=a.overflow===qo?ro(g):0;if(a.Gc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Gc+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===go?8*a.length:go.measureText(a).width}function jo(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===go){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*go.measureText("M").width,Bo[b]=c,Co++);return a.df=c} function ro(a){if(null===go)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=go.measureText(so).width,Do[a]=b,Eo++;return b} function po(a,b){var c=a.fc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,jo(a)+d);if(0===c.length)return a.Db=0,a.Gc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Gc=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.wrap!==wo){a.Le=0;var k=L.alloc();vo(a,f,b,k);e+=k.height;L.free(k);a.Gc+=a.Le}else vo(a,f,b,null),e+=d,a.Gc++;a.Gc===a.maxLines&&(h=!0)}f=g+1}return a.Lq=e} -ma.Object.defineProperties(Pg.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Yc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= -a,Nl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, +ma.Object.defineProperties(Ng.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Zc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= +a,Ql(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, a))}},isUnderline:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.$r: -Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&cm(a, -"TextBlock.stroke"),a instanceof ql&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: +Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&fm(a, +"TextBlock.stroke"),a instanceof tl&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: null},set:function(a){var b=this.textEditor;b!==a&&(ho(this),this.da.Qr=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return null!==this.da?this.da.Hd:null},set:function(a){var b=this.errorFunction;b!==a&&(ho(this),this.da.Hd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Sk:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa= new eo);this.fa.Sk=a;this.v();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&xa(a,"> 0",Pg,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ -get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Pg,"None",0),to=new E(Pg,"WrapFit",1),Fo=new E(Pg,"WrapDesiredSize",2),yo=new E(Pg,"WrapBreakAll",3),Go=new E(Pg,"OverflowClip",0),qo=new E(Pg,"OverflowEllipsis",1),no=new E(Pg,"FormatTrim",0),Ao=new E(Pg,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ta,Co=0,Do=new Ta,Eo=0,so="...",mo="",go=null,fo=!1;Pg.className="TextBlock"; -function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Yc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Pg.getEllipsis=function(){return so};Pg.setEllipsis=function(a){so=a;Do=new Ta;Eo=0};Pg.getBaseline=function(){return ko}; -Pg.setBaseline=function(a){ko=a};Pg.getUnderline=function(){return lo};Pg.setUnderline=function(a){lo=a};Pg.isValidFont=function(a){fo||(go=Ng?(new Pi(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Pg.FormatNone=Ao;Pg.FormatTrim=no;Pg.None=wo;Pg.OverflowClip=Go; -Pg.OverflowEllipsis=qo;Pg.WrapBreakAll=yo;Pg.WrapDesiredSize=Fo;Pg.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; -function dk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=cc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};dk.prototype.qb=function(a){a===kg||a===mg||a===Zk?this.imageStretch=a:Y.prototype.qb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Mi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ta,Io=0)} -function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case Zk:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===Zk&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;m=a&&xa(a,"> 0",Ng,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ +get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Ng,"None",0),to=new E(Ng,"WrapFit",1),Fo=new E(Ng,"WrapDesiredSize",2),yo=new E(Ng,"WrapBreakAll",3),Go=new E(Ng,"OverflowClip",0),qo=new E(Ng,"OverflowEllipsis",1),no=new E(Ng,"FormatTrim",0),Ao=new E(Ng,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ua,Co=0,Do=new Ua,Eo=0,so="...",mo="",go=null,fo=!1;Ng.className="TextBlock"; +function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Zc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Ng.getEllipsis=function(){return so};Ng.setEllipsis=function(a){so=a;Do=new Ua;Eo=0};Ng.getBaseline=function(){return ko}; +Ng.setBaseline=function(a){ko=a};Ng.getUnderline=function(){return lo};Ng.setUnderline=function(a){lo=a};Ng.isValidFont=function(a){fo||(go=Lg?(new Ti(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Ng.FormatNone=Ao;Ng.FormatTrim=no;Ng.None=wo;Ng.OverflowClip=Go; +Ng.OverflowEllipsis=qo;Ng.WrapBreakAll=yo;Ng.WrapDesiredSize=Fo;Ng.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; +function hk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=bc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(hk,Y); +hk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};hk.prototype.qb=function(a){a===kg||a===mg||a===bl?this.imageStretch=a:Y.prototype.qb.call(this,a)};hk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Qi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ua,Io=0)} +function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case bl:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===bl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Wd(a,0,!0)).add(new Xd(pd,b-a,0)).add(new Xd(Ed,b,a,b-f,0,b,f)).add(new Xd(pd,b,c-a)).add(new Xd(Ed,b-a,c,b,c-f,b-f,c)).add(new Xd(pd,a,c)).add(new Xd(Ed,0,c-a,f,c,0,c-f)).add(new Xd(pd,0,a)).add((new Xd(Ed,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Xd(a,0,!0)).add(new Yd(pd,b-a,0)).add(new Yd(Bd,b,a,b-f,0,b,f)).add(new Yd(pd,b,c-a)).add(new Yd(Bd,b-a,c,b,c-f,b-f,c)).add(new Yd(pd,a,c)).add(new Yd(Bd,0,c-a,f,c,0,c-f)).add(new Yd(pd,0,a)).add((new Yd(Bd,a,0,0,f,f,0)).close()));1e.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.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Mo():a.Sd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.fd||m.bb(),m=m.To(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.$b(!0);m.oh();var n=c?m.Oo():m.Po();l.wv=a;n.all(function(a){return function(b){return b===a.wv||!b.isTreeExpanded}}(l))&&e.Cj(m,f)}if(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; +ig.prototype.computeMemberBounds=function(a){if(!(this.part instanceof pf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof T){if(!b.computesBoundsIncludingLinks)continue;if(yj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; function T(a){U.call(this,W.Link);this.Qa=8;this.ef=null;this.ff="";this.uf=this.gn=null;this.vf="";this.uo=null;this.pk=Zf;this.Om=0;this.Qm=Zf;this.Rm=NaN;this.qj=Dp;this.po=.5;this.wd=null;this.Ob=(new F).freeze();this.Tg=this.Mg=null;this.ml=new N;this.ua=new P;this.u=this.o=this.Sf=this.Wf=null;this.su=new J;this.cq=this.Nw=this.Mw=null;this.vt=NaN;this.ba=null;this.j=[];a&&Object.assign(this,a)}la(T,U); T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Qa=this.Qa&-113;a.ff=this.ff;a.gn=this.gn;a.vf=this.vf;a.uo=this.uo;a.pk=this.pk;a.Om=this.Om;a.Qm=this.Qm;a.Rm=this.Rm;a.qj=this.qj;a.po=this.po;null!==this.ba&&(a.ba=this.ba.copy())};t=T.prototype;t.Af=function(a){U.prototype.Af.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Mg=null;a.bb();a.Sf=this.Sf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new el)};t.si=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.Av=function(){return!1}; -t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case jn:a=b;break;case an:a=b+90;break;case cn:a=b-90;break;case Hp:a=b+180;break;case kn:a=K.bp(b);90a&&(a-=180);break;case bn:a=K.bp(b+90);90a&&(a-=180);break;case dn:a=K.bp(b-90);90a&&(a-=180);break;case en:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; +t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new hl)};t.si=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(zj(a)||Aj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),zj(a)||Aj(a))?!1:!0};t.Av=function(){return!1}; +t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case mn:a=b;break;case dn:a=b+90;break;case fn:a=b-90;break;case Hp:a=b+180;break;case nn:a=K.bp(b);90a&&(a-=180);break;case en:a=K.bp(b+90);90a&&(a-=180);break;case gn:a=K.bp(b-90);90a&&(a-=180);break;case hn:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.qx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.aa,g.aa=!0);e(a,c,b);null!==g&&(g.aa=f)}!a.fd||a.Mw!==c&&a.Nw!==c||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.oh.call(this)};t.To=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.wd&&(a.wd=new H);a.wd.add(b);a.v()} t.Vo=function(a){U.prototype.Vo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Wo=function(a){U.prototype.Wo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Kj=function(){this.fd=!0;if(null!==this.wd){var a=this.diagram;if(null!==a)for(var b=this.wd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; -T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));bf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));df(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(tb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.Qu(.5,a),a.add(this.i(0)),c=this.ua.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===bg){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);K.bx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);K.bx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1563,7 +1564,7 @@ b.y)));return a}; T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.xx(.5);if(this.computeCurve()===bg&&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 K.Ny(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.ab(d)};t=T.prototype;t.i=function(a){return this.Ob.s[a]};t.dd=function(a,b){this.Ob.cd(a,b)};t.L=function(a,b,c){this.Ob.cd(a,new J(b,c))};t.Lz=function(a,b){this.Ob.Hb(a,b)}; t.m=function(a,b,c){this.Ob.Hb(a,new J(b,c))};t.ne=function(a){this.Ob.add(a)};t.yf=function(a,b){this.Ob.add(new J(a,b))};t.qv=function(a){this.Ob.mb(a)};t.Ej=function(){this.Ob.clear()}; -function bf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Nl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function df(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Ql(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Ab&&Nh(g.animationManager,a,e);a.g("points",f,e)}}t.uh=function(){null===this.Mg&&(this.Mg=this.Ob,this.Ob=this.Ob.copy())}; t.zf=function(){if(null!==this.Mg){for(var a=this.Mg,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gd.y k.x?0:180:h.y>=k.y?90:270;J.free(k);k=c}g&&d.Mc()&&g.Td(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.li();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Ku;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=wc:(b=this.fromSpot,b.Yb()&&(b=a.fromSpot),a=b===Sc?rc:b)):(a=b?b:this.toPort,null===a?a=wc:(b=this.toSpot,b.Yb()&&(b=a.toSpot),a=b===Sc?rc:b));return a};function Pp(a){return a===rc||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:wc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==Zf&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); +T.prototype.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); if(m instanceof W)h=m.Cf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Bf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.fh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.Re(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var w=J.alloc(),v=J.alloc(),y=J.alloc(),z=ld.alloc();z.set(r);z.cv(m.transform);z.Uj();v.x=p;v.y=u;v.transform(z);w.x=h;w.y=u;w.transform(z);r=!1;$n(m,w,v,y)?r=!0:(w.x=p,w.y=q,w.transform(z),$n(m,w,v,y)?r=!0:(v.x= -h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=il(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; +h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=ll(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; T.prototype.computeCurve=function(){if(null===this.Wf){var a=this.fromPort,b=this.isOrthogonal;this.Wf=null!==a&&a===this.toPort&&!b}return this.Wf?bg:this.curve};T.prototype.computeCorner=function(){if(this.curve===bg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.O.s,c=b.length,d=0;dk?-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.$(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.dd(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.dd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.Xa(b)||!n.Xa(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.dd(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.w()&&k.w()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ye(a);k.Ye(c);var l=J.alloc(),m=J.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ca(a)||h.ca(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(zk(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(Ck(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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.L(2,a.x,h),this.L(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=q.Ho/2&&(this.L(2,a.x,h.y),this.L(3,a.x,g.y)),this.m(2,a.x,h.y)):this.L(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!==r&&(0===d||180===d?this.yf(f.x,r.y):this.yf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));J.free(l);J.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function Sj(a){if(null===a.diagram||!a.isAvoiding||!jk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=kk(a.diagram,!0,a.containingGroup,null);for(var d=1;dc)return!1;a=ok(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(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>cq)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>cq&&(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),$p(b,g,m)===l-1?bq(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),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)}T.prototype.fz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=yb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.kk=!0:this.ua=this.makeGeometry();a=this.path;if(null!==a){a.ua=this.ua;for(var b=this.O.s,c=b.length,d=0;d=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;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?r>q?(f.x=v-z,f.y=q-z,e.x=v+u,e.y=q+u):(f.x=v-z,f.y=q+z,e.x=v+u,e.y=q-u):r>q?(f.x=v+z,f.y=q-z,e.x=v-u,e.y=q+u):(f.x=v+z,f.y=q+z,e.x=v-u,e.y=q-u));K.$(w,v)&&K.$(q,r)&&(q>p?(y>v?(f.x=v-z,f.y=q-z,e.x=v+u):(f.x=v+z,f.y=q-z,e.x=v-u),e.y=q+u):(y>v?(f.x=v-z,f.y=q+z,e.x=v+u):(f.x=v+z,f.y=q+z,e.x=v-u),e.y=q-u));if(K.$(w,v)&&K.$(v,y)||K.$(p,q)&&K.$(q,r))w=.5*(w+y),p=.5*(p+r),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&K.$(g.x,this.i(0).x)&&K.$(g.y,this.i(0).y)&& -(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));xd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);xd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),xd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f= +(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));ud(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);ud(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),ud(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.D(m))0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb)),gq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);yd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),yd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, -p,u),f.assign(p));e.assign(m);n=l}J.free(f)}Bd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} +n,w,f,p,u),f.assign(p);else{var A=p.x,B=p.y;q=A;y=B;p.x>f.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);vd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),vd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, +p,u),f.assign(p));e.assign(m);n=l}J.free(f)}yd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} function dq(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=fq(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=fq(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 eq(a,b,c,d){for(var e=a.pointsCount,f=b;K.$(b.x,f.x)&&K.$(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.$(b.x,f.x)&&!K.$(b.y,f.y))return c-1;for(var g=f;K.$(b.x,f.x)&&K.$(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.$(b.y,f.y)&&K.$(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}T.prototype.computeJumpLength=function(){return 10}; -function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?wd(b,n,q,!1):xd(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?wd(b,q,m,!1):xd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?td(b,n,q,!1):ud(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?td(b,q,m,!1):ud(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Pa.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,w)n&&!K.B(g,w)){h.x=r;h.y=n;m=!0;break a}}else if(!K.B(n,q)&& K.B(g,w)&&Math.min(n,q)g&&Math.min(r,u)m&&!K.B(r,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 Ip(a){a=a.curve;return a===Xf||a===Yf}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ml.width&&0===a.ml.height||b.Eh.add(a,a.ml.copy())} @@ -1648,7 +1649,7 @@ a,this.g("toPortChanged",b,a))}},fromSpot:{get:function(){return null!==this.ba? this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),this.bb())}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.rc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:Sc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&& pp(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return null!==this.ba?this.ba.wj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",T,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),this.bb())}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.rc(),this.g("toShortLength",b, a))}},isLabeledLink:{get:function(){return null===this.wd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);K.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):K.$(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Bf(e)); @@ -1661,22 +1662,22 @@ a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{g Mp(this,b===Yf||b===Xf||a===Yf||a===Xf),this.g("curve",b,a))}},curviness:{get:function(){return this.Rm},set:function(a){var b=this.Rm;b!==a&&(this.Rm=a,this.bb(),this.rc(),this.g("curviness",b,a))}},routing:{get:function(){return this.qj},set:function(a){var b=this.qj;b!==a&&(this.qj=a,this.Wf=null,this.bb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.po}, set:function(a){var b=this.po;b!==a&&(this.po=a,this.rc(),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram;if(null!==a&&a.model.ri())return a.model.Ac(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Xo;T.prototype.findClosestSegment=T.prototype.fz;T.prototype.updateRoute=T.prototype.vg;T.prototype.invalidateRoute=T.prototype.bb;T.prototype.rollbackRoute=T.prototype.sv;T.prototype.commitRoute=T.prototype.zf;T.prototype.startRoute=T.prototype.uh; T.prototype.clearPoints=T.prototype.Ej;T.prototype.removePoint=T.prototype.qv;T.prototype.addPointAt=T.prototype.yf;T.prototype.addPoint=T.prototype.ne;T.prototype.insertPointAt=T.prototype.m;T.prototype.insertPoint=T.prototype.Lz;T.prototype.setPointAt=T.prototype.L;T.prototype.setPoint=T.prototype.dd;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.Dz;T.prototype.getOtherNode=T.prototype.To; -var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),jn=new E(T,"OrientAlong",21),an=new E(T,"OrientPlus90",22),cn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),kn=new E(T,"OrientUpright",25),bn=new E(T,"OrientPlus90Upright",26),dn=new E(T,"OrientMinus90Upright", -27),en=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=jn;T.OrientPlus90=an;T.OrientMinus90=cn;T.OrientOpposite=Hp;T.OrientUpright=kn;T.OrientPlus90Upright=bn;T.OrientMinus90Upright=dn;T.OrientUpright45=en;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; +var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),mn=new E(T,"OrientAlong",21),dn=new E(T,"OrientPlus90",22),fn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),nn=new E(T,"OrientUpright",25),en=new E(T,"OrientPlus90Upright",26),gn=new E(T,"OrientMinus90Upright", +27),hn=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=mn;T.OrientPlus90=dn;T.OrientMinus90=fn;T.OrientOpposite=Hp;T.OrientUpright=nn;T.OrientPlus90Upright=en;T.OrientMinus90Upright=gn;T.OrientUpright45=hn;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; function kq(a,b,c,d){Qa(this);this.Fe=this.qq=!1;this.Ds=a;this.Px=b;this.dv=c;this.Qx=d;this.links=[]}kq.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} -lk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Bk)return!1}return!0}; +function pk(a){Qa(this);this.Zx=this.group=null;this.vs=!0;this.abort=!1;this.Od=this.Nd=1;this.Fn=this.En=-1;this.sc=a.width;this.tc=a.height;this.bc=null;this.ei=this.di=0;this.Os=11;this.Jx=this.Ix=22} +pk.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} +pk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; function oq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.bc[l][m];if(n>=cq&&n=a.bc[l][m]);)a.bc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h, -k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Bk,m=cq;for(a.bc[b][c]=m;l===Bk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Bk?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Bk?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=cq;for(a.bc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -ma.Object.defineProperties(lk.prototype,{bounds:{get:function(){return new N(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.sc},set:function(a){0=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}Tp.prototype.Sl=function(){this.pe.length=0}; @@ -1730,42 +1731,42 @@ yq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Sh;var c=b.Sh;if(nu b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}return null!==c?-1:0}return 1}return null!==b?-1:0};function zq(a){Qa(this);this.nb=a;this.qd=this.kd=this.Zk=this.ub=null}zq.prototype.clear=function(){this.qd=this.kd=this.Zk=this.ub=null};zq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+bb(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.Ea("Layout");d=[];switch(this.alignment){case Oq: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,r=q,u+=v,v=0;v=Math.max(v,D);switch(p){case Nq:A=-A.width;break;default:A= 0}z.moveTo(r+A,u);switch(p){case Nq:r-=B;break;default:r+=B}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case Gq:k=g;m=f;n=b;p=c;g=N.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(r=0;r=l&&(k-=l);l=z=0;B=Math.max(this.cellSize.height,1);A=f=0;D=!0;w=J.alloc();for(M=0;Mm-1||0k){d.push(new N(0,D?y-f:y,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Ok.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0b?1:0} +ma.Object.defineProperties(Rk.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0n)){var u=n+tn(r);r.qc(u,!0);En(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; +pi.prototype.doModelChanged=function(a){if(this.H){var b=this.H;if(a.model===b.model){var c=a.change;b.doModelChanged(a);if(b.aa){b.aa=!1;try{var d=a.modelChange;if(""!==d)if(c===de){if("nodeCategory"===d){var e=this.Lc(a.object),f=a.newValue;null!==e&&"string"===typeof f&&(e.category=f)}else"nodeDataArray"===d&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));b.isModified=!0}else if(c===fe){var g=a.newValue;"nodeDataArray"===d&&za(g)&&Pq(this,g);b.isModified=!0}else if(c===ge){var h=a.oldValue; +"nodeDataArray"===d&&za(h)&&this.ip(h);b.isModified=!0}else c===ee&&("SourceChanged"===d?null!==a.object?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):"ModelDisplaced"===d&&this.Wd());else if(c===de){var k=a.propertyName,l=a.object;if(l===b.model){if("nodeKeyProperty"===k||"nodeCategoryProperty"===k)b.undoManager.isUndoingRedoing||this.Wd()}else this.updateDataBindings(l,k);b.isModified=!0}else if(c===fe||c===ge){var m=a.change===fe,n=m?a.newParam:a.oldParam, +p=m?a.newValue:a.oldValue,q=this.aj.I(a.object);if(Array.isArray(q))for(a=0;an)){var u=n+wn(r);r.qc(u,!0);Hn(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; pi.prototype.rp=function(){for(var a=this.H.model,b=new H,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Sa;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",fe,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cd)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",ee,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",fe,"",a,c,null,b,null)}; -t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),Ar(this,"nodeCategory",ce,c,a,d,b))}else Uj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; +function Br(a,b,c){if(a.copiesArrays&&Array.isArray(b)){var d=[];for(c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",fe,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",ge,"",a,c,null,b,null)}; +t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=In(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=In(a,c);void 0===d&&(d="");d!==b&&(Yj(a,c,b),Ar(this,"nodeCategory",de,c,a,d,b))}else Yj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; t.xs=function(){return!1};t.Wj=function(){return!1};function ri(){return new Z}function vr(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 vr(a,b.constructor);return typeof b}function zr(a){return Dr[a]?Dr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} -function Fn(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){}} +function In(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 Yj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.xa},set:function(a){var b=this.xa;b!==a&&(this.xa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var b=this.Sm;b!==a&&(this.Sm=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var b=this.Gg;b!==a&&(this.Gg=a,this.g("isReadOnly",b,a))}},modelData:{ get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.Sx(this),this.o=a,null!==a&&a.Yw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var b=this.Th; b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===fe){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== -a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(hr(a,f,b),Uj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; -function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=Fn(a,b);return void 0===a?Jr:a}; -t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",fe,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.jh(b)&&(Uj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",ce,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Uj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; -t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Uj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; -function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",ee,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",fe,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== +a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Yj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; +t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=In(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=In(b,e);f!==c&&(hr(a,f,b),Yj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; +function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=In(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=In(b,e);void 0===f&&(f="");f!==c&&(Yj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=In(a,b);return void 0===a?Jr:a}; +t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=In(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=In(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=In(a,c);d!==b&&null===this.jh(b)&&(Yj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Yj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; +t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Yj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Yj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Yj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; +function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;f=b[c].length)&&(g=b[c][0],g.sd===g)){Inf g.height,a.add(g,d?-g.zc-f:g.zc);return a}function Kt(a,b,c){if(isNaN(b.zc)){b.zc=0;var d=b;do{if(0a&&C("Could not determine previous vertex in layer");return b[c][a-1]} Hs.prototype.u=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=Mt(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Ga(d);Ga(e)}; function Mt(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.K||270===a.K?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}Hs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Os(this,!0),b=Os(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Hu();this.isRouting&&this.commitLinks()}; -function Os(a,b){return 270===a.K?b?$c:cd:90===a.K?b?cd:$c:180===a.K?b?ad:bd:b?bd:ad} +function Os(a,b){return 270===a.K?b?ad:dd:90===a.K?b?dd:ad:180===a.K?b?bd:cd:b?cd:bd} Hs.prototype.commitNodes=function(){this.he=[];this.Ld=[];this.Kd=[];this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.he[c]=Math.max(this.he[c],this.nodeMinLayerSpace(b,!0));this.Ld[c]=Math.max(this.Ld[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ie;for(var d=0;d<=this.Ia;d++){var e=c;0>=this.he[d]+this.Ld[d]&&(e=0);0e?Gu(this,a,g,X,v,y):Hu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case wu:for(A=0;An&&(Sgb&&(Mu(a,-gb,0,ca,na-1),Nu(A,-gb,0),Nu(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Mu(a,0,-gb,ca,na-1),Nu(A,0,-gb),Nu(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===xu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Su(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Qu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Su(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Ru(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xe?Hu(this,a,g,X,v,y):Iu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case xu:for(A=0;An&&(Sgb&&(Nu(a,-gb,0,ca,na-1),Ou(A,-gb,0),Ou(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Nu(a,0,-gb,ca,na-1),Ou(A,0,-gb),Ou(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===yu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Tu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Ru(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Tu(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Su(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xd?Gu(a,b,e,G,z,A):Hu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case wu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Gu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Du(b),m=0,n=0,p=0,q=0;qd?Hu(a,b,e,G,z,A):Iu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case xu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Eu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Uu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Uu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} -function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Du(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Vu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Vu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} +function Iu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Eu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Uu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Uu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Eu:return a.width>b?a.width:b;case Fu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case vu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case wu:return a.width-a.focus.x+a.nodeSpacing/2+b;case xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function Ru(a,b,c){switch(a.alignment){case Pu:case Ou:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Eu:return a.height>b?a.height:b;case Fu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case vu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case wu:return a.height-a.focus.y+a.nodeSpacing/2+b;case xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function Su(a,b,c){switch(a){case Ou:b/=2;c/=2;break;case Pu:b/=2;c/=2;break;case Eu:c=b=0;break;case Fu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ju(a,b,c,d,e,f){b=Su(b,c,d);Mu(a,b.x,b.y,e,f)}function Mu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} -function Ku(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Nu(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Vu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Vu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Fu:return a.width>b?a.width:b;case Gu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case wu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case xu:return a.width-a.focus.x+a.nodeSpacing/2+b;case yu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function Su(a,b,c){switch(a.alignment){case Qu:case Pu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Fu:return a.height>b?a.height:b;case Gu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case wu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case xu:return a.height-a.focus.y+a.nodeSpacing/2+b;case yu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function Tu(a,b,c){switch(a){case Pu:b/=2;c/=2;break;case Qu:b/=2;c/=2;break;case Fu:c=b=0;break;case Gu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ku(a,b,c,d,e,f){b=Tu(b,c,d);Nu(a,b.x,b.y,e,f)}function Nu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} +function Lu(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Ou(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Du(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Eu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!== -a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Au&&a!==Cu||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, +a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Bu&&a!==Du||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!== a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot= a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==ou&&a!==pu&& a!==qu&&!ru||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ -get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Au&&a!==Cu||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Bu&&a!==Du||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{ get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}}); -var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Ou=new E(Rt,"AlignmentCenterSubtrees",20),Pu=new E(Rt,"AlignmentCenterChildren",21),Eu=new E(Rt,"AlignmentStart",22),Fu=new E(Rt,"AlignmentEnd",23),vu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),wu=new E(Rt,"AlignmentTopLeftBus",26),xu=new E(Rt, -"AlignmentBottomRightBus",27),Au=new E(Rt,"CompactionNone",30),Cu=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Wu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; -Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Ou;Rt.AlignmentCenterChildren=Pu;Rt.AlignmentStart=Eu;Rt.AlignmentEnd=Fu;Rt.AlignmentBus=vu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=wu;Rt.AlignmentBottomRightBus=xu;Rt.CompactionNone=Au;Rt.CompactionBlock=Cu;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; -Rt.ArrangementHorizontal=Wu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Yu(this)};Xt.className="TreeNetwork"; -function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Pu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Cu;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); +var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Pu=new E(Rt,"AlignmentCenterSubtrees",20),Qu=new E(Rt,"AlignmentCenterChildren",21),Fu=new E(Rt,"AlignmentStart",22),Gu=new E(Rt,"AlignmentEnd",23),wu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),xu=new E(Rt,"AlignmentTopLeftBus",26),yu=new E(Rt, +"AlignmentBottomRightBus",27),Bu=new E(Rt,"CompactionNone",30),Du=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Xu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; +Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Pu;Rt.AlignmentCenterChildren=Qu;Rt.AlignmentStart=Fu;Rt.AlignmentEnd=Gu;Rt.AlignmentBus=wu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=xu;Rt.AlignmentBottomRightBus=yu;Rt.CompactionNone=Bu;Rt.CompactionBlock=Du;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; +Rt.ArrangementHorizontal=Xu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Zu(this)};Xt.className="TreeNetwork"; +function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Qu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Du;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); Yt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.nd=a.sorting,this.hd=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)}; ma.Object.defineProperties(Yt.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.xc;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;g=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; +t.clear=function(){this._isFrozen&&va(this);this.Ub={};this.Tb=0;null!==this.Sa&&this.Sa.reset();this.kf=this.ea=null;this.yb()};H.prototype.copy=function(){var a=new H,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};H.prototype.Fa=function(){var a=Array(this.Tb),b=this.Ub,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};H.prototype.Iv=function(){var a=new F,b=this.Ub,c;for(c in b)a.add(b[c].value);return a};function Qa(a){a.__gohashid=ib++} +function fb(a){var b=a.__gohashid;void 0===b&&(b=ib++,a.__gohashid=b);return b}function bb(a){return a.__gohashid}ma.Object.defineProperties(H.prototype,{count:{get:function(){return this.Tb}},size:{get:function(){return this.Tb}},iterator:{get:function(){if(0>=this.Tb)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new cb(this)}}});H.prototype.toList=H.prototype.Iv;H.prototype.toArray=H.prototype.Fa; H.prototype.clear=H.prototype.clear;H.prototype.retainAll=H.prototype.qA;H.prototype.removeAll=H.prototype.hp;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.first=H.prototype.first;H.prototype.containsAny=H.prototype.Uy;H.prototype.containsAll=H.prototype.Ty;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.addAll=H.prototype.addAll;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.ka;H.prototype.freeze=H.prototype.freeze; -var jb=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; +var ib=1;H.className="Set";H.uniqueHash=Qa;H.hashIdUnique=fb;H.hashId=bb;function kb(a){this.ma=a;this.qa=a.Ja;this.sa=null}kb.prototype.reset=function(){this.qa=this.ma.Ja;this.sa=null};kb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=this.key=a=b.key,!0;this.de();return!1};kb.prototype.Ad=function(){return this.next()}; kb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.value=this.key=a=a.key):null};kb.prototype.any=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(a(b.key))return!0;b=b.va}return!1};kb.prototype.all=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;){if(!a(b.key))return!1;b=b.va}return!0};kb.prototype.each=function(a){var b=this.ma;this.sa=null;for(b=b.ea;null!==b;)a(b.key),b=b.va;return this}; kb.prototype.map=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.key)),b=b.va;return c.iterator};kb.prototype.filter=function(a){var b=this.ma;this.sa=null;var c=new F;for(b=b.ea;null!==b;){var d=b.key;a(d)&&c.add(d);b=b.va}return c.iterator};kb.prototype.de=function(){this.value=this.key=null;this.qa=-1};kb.prototype.toString=function(){return null!==this.sa?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"}; ma.Object.defineProperties(kb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.Ad;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="MapKeySetIterator";function lb(a){H.call(this);Qa(this);this._isFrozen=!0;this.ma=a}la(lb,H);t=lb.prototype;t.freeze=function(){return this};t.ka=function(){return this}; @@ -72,16 +72,16 @@ lb.prototype.remove=lb.prototype.remove;lb.prototype.has=lb.prototype.has;lb.pro mb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.value=b.value,this.key=b.key,!0;this.de();return!1};mb.prototype.Ad=function(){return this.next()};mb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;if(null!==a){this.sa=a;var b=a.value;this.key=a.key;return this.value=b}return null}; mb.prototype.any=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(a(b.value))return!0;b=b.va}return!1};mb.prototype.all=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;){if(!a(b.value))return!1;b=b.va}return!0};mb.prototype.each=function(a){var b=this.ma;this.sa=b.jf=null;for(b=b.ea;null!==b;)a(b.value),b=b.va;return this};mb.prototype.map=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b.value)),b=b.va;return c.iterator}; mb.prototype.filter=function(a){var b=this.ma;this.sa=b.jf=null;var c=new F;for(b=b.ea;null!==b;){var d=b.value;a(d)&&c.add(d);b=b.va}return c.iterator};mb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.jf=this};mb.prototype.toString=function(){return null!==this.sa?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"};ma.Object.defineProperties(mb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}}); -mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function ib(a,b){this.key=a;this.value=b;this.ll=this.va=null}ib.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ib.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; +mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.Ad;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;mb.className="MapValueSetIterator";function hb(a,b){this.key=a;this.value=b;this.ll=this.va=null}hb.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};hb.className="KeyValuePair";function nb(a){this.ma=a;a.Sa=null;this.qa=a.Ja;this.sa=null}nb.prototype.reset=function(){var a=this.ma;a.Sa=null;this.qa=a.Ja;this.sa=null}; nb.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&null===this.key)return!1;var b=this.sa;b=null===b?a.ea:b.va;if(null!==b)return this.sa=b,this.key=b.key,this.value=b.value,!0;this.de();return!1};nb.prototype.Ad=function(){return this.next()};nb.prototype.first=function(){var a=this.ma;this.qa=a.Ja;a=a.ea;return null!==a?(this.sa=a,this.key=a.key,this.value=a.value,a):null};nb.prototype.any=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(a(b))return!0;b=b.va}return!1}; nb.prototype.all=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;){if(!a(b))return!1;b=b.va}return!0};nb.prototype.each=function(a){var b=this.ma;this.sa=b.Sa=null;for(b=b.ea;null!==b;)a(b),b=b.va;return this};nb.prototype.map=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)c.add(a(b)),b=b.va;return c.iterator};nb.prototype.filter=function(a){var b=this.ma;this.sa=b.Sa=null;var c=new F;for(b=b.ea;null!==b;)a(b)&&c.add(b),b=b.va;return c.iterator}; nb.prototype.de=function(){this.value=this.key=null;this.qa=-1;this.ma.Sa=this};nb.prototype.toString=function(){return null!==this.sa?"MapIterator@"+this.sa:"MapIterator"};ma.Object.defineProperties(nb.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Tb}}});nb.prototype.first=nb.prototype.first;nb.prototype.hasNext=nb.prototype.Ad;nb.prototype.next=nb.prototype.next;nb.prototype.reset=nb.prototype.reset; nb.className="MapIterator";function ob(a){Qa(this);this._isFrozen=!1;this.Ub={};this.Tb=0;this.jf=this.Sa=null;this.Ja=0;this.kf=this.ea=null;"string"===typeof a&&C("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=ob.prototype;t.yb=function(){var a=this.Ja;a++;999999999=this.count)return Ya;var a=this.Sa;return null!==a?(a.reset(),a):new nb(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ya:new kb(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ya; var a=this.jf;return null!==a?(a.reset(),a):new mb(this)}}});ob.prototype.toKeySet=ob.prototype.Lf;ob.prototype.toArray=ob.prototype.Fa;ob.prototype.clear=ob.prototype.clear;ob.prototype["delete"]=ob.prototype.delete;ob.prototype.remove=ob.prototype.remove;ob.prototype.get=ob.prototype.get;ob.prototype.getValue=ob.prototype.I;ob.prototype.has=ob.prototype.has;ob.prototype.contains=ob.prototype.contains;ob.prototype.first=ob.prototype.first;ob.prototype.addAll=ob.prototype.addAll; ob.prototype.set=ob.prototype.set;ob.prototype.add=ob.prototype.add;ob.prototype.thaw=ob.prototype.ka;ob.prototype.freeze=ob.prototype.freeze;ob.className="Map";function J(a,b){void 0===a?this.y=this.x=0:"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):C("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var pb,qb,rb,sb,tb;J.prototype.assign=function(a){this.x=a.x;this.y=a.y;return this};J.prototype.h=function(a,b){this.x=a;this.y=b;return this}; @@ -106,36 +106,36 @@ b)):C("Invalid arguments to Rect constructor: "+a+", "+b+", "+c+", "+d);this._is t.dd=function(a){this.x=a.x;this.y=a.y;return this};t.uA=function(a){this.width=a.width;this.height=a.height;return this};N.prototype.copy=function(){var a=new N;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};t=N.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this}; t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function Qb(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 N(c,e,f,g)}return new N} function Rb(a){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.D=function(a){return a instanceof N?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};t.hi=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};t.Xa=function(a){return K.B(this.x,a.x)&&K.B(this.y,a.y)&&K.B(this.width,a.width)&&K.B(this.height,a.height)}; -function Ub(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; -t.Bc=function(a,b){return Vb(this,b,a,b,a)};t.Co=function(a){return Vb(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Vb(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Vb(this,a,b,c,d)};function Vb(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Wb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Wb(this,a,b,c,d)}; -function Wb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Xb(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.Ye=function(a){return Yb(this,a.x,a.y,0,0)};t.ed=function(a){return Yb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Yb(this,a,b,c,d)}; -function Yb(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.yi=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 Zb(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 $b(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=ac.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=ac.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){ac.push(a)}; +function Tb(a,b){return K.$(a.x,b.x)&&K.$(a.y,b.y)&&K.$(a.width,b.width)&&K.$(a.height,b.height)}t.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};t.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};t.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};t.offset=function(a,b){this.x+=a;this.y+=b;return this}; +t.Bc=function(a,b){return Ub(this,b,a,b,a)};t.Co=function(a){return Ub(this,a.top,a.right,a.bottom,a.left)};t.Gv=function(a){return Ub(this,-a.top,-a.right,-a.bottom,-a.left)};t.Iz=function(a,b,c,d){return Ub(this,a,b,c,d)};function Ub(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}t.Fx=function(a){return Vb(this,a.x,a.y,a.width,a.height)};t.Vu=function(a,b,c,d){return Vb(this,a,b,c,d)}; +function Vb(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.Yc=function(a){return this.Wu(a.x,a.y,a.width,a.height)};t.Wu=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 Wb(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.Ye=function(a){return Xb(this,a.x,a.y,0,0)};t.ed=function(a){return Xb(this,a.x,a.y,a.width,a.height)};t.Lv=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return Xb(this,a,b,c,d)}; +function Xb(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.yi=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 Yb(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 Zb(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.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.Nz=function(){return 0===this.width&&0===this.height};N.alloc=function(){var a=$b.pop();return void 0===a?new N:a};N.allocAt=function(a,b,c,d){var e=$b.pop();return void 0===e?new N(a,b,c,d):e.h(a,b,c,d)};N.free=function(a){$b.push(a)}; ma.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 L(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.Nz;N.prototype.isReal=N.prototype.w;N.intersectsLineSegment=function(a,b,c,d,e,f,g,h){return K.Gx(a,b,c,d,e,f,g,h)};N.prototype.setSpot=N.prototype.yi;N.prototype.union=N.prototype.Lv;N.prototype.unionRect=N.prototype.ed;N.prototype.unionPoint=N.prototype.Ye;N.prototype.intersects=N.prototype.Wu; N.prototype.intersectsRect=N.prototype.Yc;N.prototype.intersect=N.prototype.Vu;N.prototype.intersectRect=N.prototype.Fx;N.prototype.grow=N.prototype.Iz;N.prototype.subtractMargin=N.prototype.Gv;N.prototype.addMargin=N.prototype.Co;N.prototype.inflate=N.prototype.Bc;N.prototype.offset=N.prototype.offset;N.prototype.contains=N.prototype.contains;N.prototype.containsRect=N.prototype.Re;N.prototype.containsPoint=N.prototype.ca;N.prototype.equalsApprox=N.prototype.Xa;N.prototype.equalTo=N.prototype.hi; -N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var bc=null,cc=null,ac=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b;N.ZeroRect=bc=(new N(0,0,0,0)).ja();N.NoRect=cc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Zb;N.intersects=$b; -function dc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}dc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; -dc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};dc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};dc.prototype.copy=function(){var a=new dc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=dc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; +N.prototype.equals=N.prototype.D;N.prototype.setSize=N.prototype.uA;N.prototype.setPoint=N.prototype.dd;N.prototype.set=N.prototype.set;N.prototype.setTo=N.prototype.sg;var ac=null,bc=null,$b=[];N.className="Rect";N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb;N.ZeroRect=ac=(new N(0,0,0,0)).ja();N.NoRect=bc=(new N(NaN,NaN,NaN,NaN)).ja();N.parse=Qb;N.stringify=Rb;N.contains=Yb;N.intersects=Zb; +function cc(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):C("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this._isFrozen=!1}cc.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this}; +cc.prototype.sg=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};cc.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};cc.prototype.copy=function(){var a=new cc;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};t=cc.prototype;t.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()}; t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this}; -function ic(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 dc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new dc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new dc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new dc(c,e):new dc(c,e,f,g)}return new dc} -function jc(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.D=function(a){return a instanceof dc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; -t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};dc.alloc=function(){var a=kc.pop();return void 0===a?new dc:a};dc.free=function(a){kc.push(a)};dc.prototype.isReal=dc.prototype.w;dc.prototype.equalsApprox=dc.prototype.Xa;dc.prototype.equalTo=dc.prototype.hi;dc.prototype.equals=dc.prototype.D;dc.prototype.set=dc.prototype.set; -dc.prototype.setTo=dc.prototype.sg;var lc=null,mc=null,kc=[];dc.className="Margin";dc.parse=ic;dc.stringify=jc;dc.ZeroMargin=lc=(new dc(0,0,0,0)).ja();dc.TwoMargin=mc=(new dc(2,2,2,2)).ja();dc.parse=ic;dc.stringify=jc;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._isFrozen=!1} -var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Wc,Xc,Yc,Zc,$c,ad,bd,cd,dd,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.sg=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}; +function gc(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 cc;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new cc(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new cc(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new cc(c,e):new cc(c,e,f,g)}return new cc} +function hc(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.D=function(a){return a instanceof cc?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};t.hi=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d}; +t.Xa=function(a){return K.B(this.top,a.top)&&K.B(this.right,a.right)&&K.B(this.bottom,a.bottom)&&K.B(this.left,a.left)};t.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};cc.alloc=function(){var a=ic.pop();return void 0===a?new cc:a};cc.free=function(a){ic.push(a)};cc.prototype.isReal=cc.prototype.w;cc.prototype.equalsApprox=cc.prototype.Xa;cc.prototype.equalTo=cc.prototype.hi;cc.prototype.equals=cc.prototype.D;cc.prototype.set=cc.prototype.set; +cc.prototype.setTo=cc.prototype.sg;var jc=null,kc=null,ic=[];cc.className="Margin";cc.parse=gc;cc.stringify=hc;cc.ZeroMargin=jc=(new cc(0,0,0,0)).ja();cc.TwoMargin=kc=(new cc(2,2,2,2)).ja();cc.parse=gc;cc.stringify=hc;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._isFrozen=!1} +var rc,sc,tc,uc,vc,wc,yc,zc,Ac,Bc,Cc,Dc,Ec,Fc,Gc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Xc,Yc,Zc,$c,ad,bd,cd,dd,ed,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.sg=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.ja=function(){this._isFrozen=!0;Object.freeze(this);return this};t.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;return this};function hd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} function id(a){if("string"===typeof a){a=a.trim();if("None"===a)return rc;if("TopLeft"===a)return sc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return tc;if("TopRight"===a)return uc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return vc;if("Center"===a)return wc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return yc;if("BottomLeft"===a)return zc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Ac;if("BottomRight"===a)return Bc;if("TopSide"===a)return Cc;if("LeftSide"=== a)return Dc;if("RightSide"===a)return Ec;if("BottomSide"===a)return Fc;if("TopBottomSides"===a)return Gc;if("LeftRightSides"===a)return Ic;if("TopLeftSides"===a)return Jc;if("TopRightSides"===a)return Kc;if("BottomLeftSides"===a)return Lc;if("BottomRightSides"===a)return Mc;if("NotTopSide"===a)return Nc;if("NotLeftSide"===a)return Oc;if("NotRightSide"===a)return Pc;if("NotBottomSide"===a)return Qc;if("AllSides"===a)return Rc;if("Default"===a)return Sc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=a)return 0;var b=K.Vv;if(null===b){b=[];for(var c=0;2E3>=c;c++)b[c]=Math.sqrt(c);K.Vv=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(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},cs:function(a,b,c,d,e,f,g,h,k,l,m,n){if(K.Zb(a,b,g,h,n,c,d)&&K.Zb(a,b,g,h,n,e,f))return K.Zb(a,b,g,h,n,l,m);var p=(a+c)/2,q=(b+d)/2,r=(c+e)/2,u=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+r)/2;c=(q+u)/2;r=(r+e)/2;u=(u+f)/2;var w=(d+r)/2,v=(c+u)/2;return K.cs(a, -b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Yb(l,a,b,0,0),Yb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ +b,p,q,d,c,w,v,k,l,m,n)||K.cs(w,v,r,u,e,f,g,h,k,l,m,n)},bx: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},Ny:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return Ab(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Dl:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(a,b,g,h,k,e,f))Xb(l,a,b,0,0),Xb(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/ 2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Dl(a,b,m,n,d,c,r,u,k,l);K.Dl(r,u,p,q,e,f,g,h,k,l)}return l},Qe:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,g,h,k,c,d)&&K.Zb(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,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;p=(p+e)/2;q=(q+f)/2;var r=(d+p)/2,u=(c+q)/2;K.Qe(a,b,m,n,d,c,r,u,k,l);K.Qe(r,u,p,q,e,f,g,h,k,l)}return l},kv:function(a,b,c,d,e,f,g,h,k,l){if(K.Zb(a,b,e,f,l,c,d))return K.Zb(a, -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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Yb(h,a,b,0,0),Yb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), +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,q=(n+d)/2;return K.kv(a,b,m,n,p,q,g,h,k,l)||K.kv(p,q,c,d,e,f,g,h,k,l)},PA:function(a,b,c,d,e,f,g){g.h(((a+c)/2+(c+e)/2)/2,((b+d)/2+(d+f)/2)/2);return g},jv:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))Xb(h,a,b,0,0),Xb(h,e,f,0,0);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.jv(a,b,k,l,m,n,g,h);K.jv(m,n,c,d,e,f,g,h)}return h},ep:function(a,b,c,d,e,f,g,h){if(K.Zb(a,b,e,f,g,c,d))0===h.length&&(h.push(a), 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.ep(a,b,k,l,m,n,g,h);K.ep(m,n,c,d,e,f,g,h)}return h},Eo:function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){if(K.Zb(a,b,g,h,p,c,d)&&K.Zb(a,b,g,h,p,e,f)){if(!K.Rl(a,b,g,h,k,l,m,n))return!1;p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return!1;q.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 r=(a+c)/2,u=(b+d)/2,w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/ 2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2,A=Infinity,B=!1,D=0,M=0;K.Eo(a,b,r,u,d,c,y,z,k,l,m,n,p,q)&&(a=(q.x-k)*(q.x-k)+(q.y-l)*(q.y-l),a=m)return q; if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(ba)return q}else if(aa)return q;0p&&q--}else{r=(a+c)/2;u=(b+d)/2;var w=(c+e)/2,v=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(r+w)/2;c=(u+v)/2;w=(w+e)/2;v=(v+f)/2;var y=(d+w)/2,z=(c+v)/2;q+=K.Fo(a,b,r,u,d,c,y,z,k,l,m,n,p);q+=K.Fo(y,z,w,v,e,f,g,h,k,l,m,n,p)}return q},qh:function(a,b,c,d,e,f,g){if(K.$(a,c)){bb)return g.h(a,b),!1;g.h(a,f);return!0}if(K.$(b,d)){aa)return g.h(a,b),!1;g.h(e,b);return!0}e k.h(a,c);return!0}g=(d-b)/(c-a);if(K.$(h,g))return K.qh(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(K.$(g,0)){aa)return k.h(a,b),!1;k.h(e,b);return!0}return K.qh(a,b,c,d,e,g*(e-a)+b,k)},NA:function(a,b,c,d,e){return K.Ve(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},LA: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},Ff:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(K.Ve(a,b,a,d,e,f,g, h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},us:function(a,b,c){return K.Gx(a.x,a.y,a.width,a.height,b.x,b.y,c.x,c.y)},Gx:function(a,b,c,d,e,f,g,h){var k=a+c,l=b+d;return e===g?(f=b):f===h?(e=a):Zb(a,b,c,d,e,f)||Zb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); +k&&g<=l&&f>=b):f===h?(e=a):Yb(a,b,c,d,e,f)||Yb(a,b,c,d,g,h)||K.Rl(a,b,k,b,e,f,g,h)||K.Rl(k,b,k,l,e,f,g,h)||K.Rl(k,l,a,l,e,f,g,h)||K.Rl(a,l,a,b,e,f,g,h)?!0:!1},Rl:function(a,b,c,d,e,f,g,h){return a===c&&b===d&&e===g&&f===h?a===e&&b===f:0>=K.Fl(a,b,c,d,e,f)*K.Fl(a,b,c,d,g,h)&&0>=K.Fl(e,f,g,h,a,b)*K.Fl(e,f,g,h,c,d)},Fl:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return f},bp:function(a){0>a&&(a+=360); 360<=a&&(a-=360);return a},kx:function(a,b,c,d,e,f){var g=Math.PI;f||(d*=g/180,e*=g/180);var h=d>e?-1:1;f=[];var k=g/2,l=d;d=Math.min(2*g,Math.abs(e-d));if(1E-5>d)return k=l+h*Math.min(d,k),h=a+c*Math.cos(l),l=b+c*Math.sin(l),a+=c*Math.cos(k),b+=c*Math.sin(k),c=(h+a)/2,k=(l+b)/2,f.push([h,l,c,k,c,k,a,b]),f;for(;1E-5c,f=0>d;if(al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+e),n=g/(b+f);m=m*m+n*n-1;if(0m)k=b;else break}c=e*c/(b+e)-c;d=f*d/(b+f)-d;c=Math.sqrt(c*c+d*d)}else c=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa)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 P.o:b="";c=this.figures.s;for(var d=c.length,e=0;e=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?z:new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k,"$1 $2"); -a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(wd(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z=new J((w===w.toLowerCase()?z.x:0)+parseFloat(d()), -z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z=new J(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();xd(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),xd(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)y=r=h(),D=f(),yd(a,r.x,r.y,D.x,D.y);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d());var S=parseFloat(d()), -R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()),w===w.toLowerCase()&& -(I=z.x+I,G=z.y+G),z.h(I,G),zd(a,r,D,M,S,R,I,G);break;case "Z":Ad(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0=A-1?!0:null!==l[u+1].match(B)}function d(){u++;return l[u]}function e(a){var b=parseFloat(d()),c=parseFloat(d());w===w.toLowerCase()&&(b=z.x+b,c=z.y+c);a.h(b,c)}function f(){e(z);return z}function g(){e(y);return y}function h(){var a=v.toLowerCase();return"c"!==a&&"s"!==a&&"q"!==a&&"t"!==a?new J(z.x,z.y):new J(2*z.x-y.x,2*z.y-y.y)}void 0===b&&(b=!1);var k=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," ");a=a.replace(k, +"$1 $2");a=a.replace(k,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2");a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");var l=a.split(" ");for(a=0;a=A-1);)if(v=w,w=d(),""!==w)switch(w.toUpperCase()){case "X":q=!0;n=m=!1;break;case "M":r=f();null===a.nc||!0===q?(td(a,r.x,r.y,m,!n,p),q=!1):a.moveTo(r.x,r.y);for(k.assign(z);!c();)r=f(),a.lineTo(r.x,r.y);break;case "L":for(;!c();)r=f(),a.lineTo(r.x,r.y);break;case "H":for(;!c();)z.h((w===w.toLowerCase()?z.x:0)+parseFloat(d()), +z.y),a.lineTo(z.x,z.y);break;case "V":for(;!c();)z.h(z.x,(w===w.toLowerCase()?z.y:0)+parseFloat(d())),a.lineTo(z.x,z.y);break;case "C":for(;!c();){r=new J;e(r);var D=g(),M=f();ud(a,r.x,r.y,D.x,D.y,M.x,M.y)}break;case "S":for(;!c();)r=h(),D=g(),M=f(),ud(a,r.x,r.y,D.x,D.y,M.x,M.y);break;case "Q":for(;!c();)r=g(),D=f(),vd(a,r.x,r.y,D.x,D.y);break;case "T":for(;!c();)r=h(),y.assign(r),D=f(),vd(a,r.x,r.y,D.x,D.y),y.assign(D);break;case "B":for(;!c();){r=parseFloat(d());D=parseFloat(d());M=parseFloat(d()); +var S=parseFloat(d()),R=parseFloat(d()),I=R,G=!1;c()||(I=parseFloat(d()),c()||(G=0!==parseFloat(d())));w===w.toLowerCase()&&(M+=z.x,S+=z.y);a.arcTo(r,D,M,S,R,I,G)}break;case "A":for(;!c();)r=Math.abs(parseFloat(d())),D=Math.abs(parseFloat(d())),M=parseFloat(d()),R=S=!1,G=I=0,I=d(),1===I.length?(S=!!parseFloat(I),R=!!parseFloat(d()),I=parseFloat(d())):2===I.length?(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(d())):(S=!!parseFloat(I[0]),R=!!parseFloat(I[1]),I=parseFloat(I.slice(2))),G=parseFloat(d()), +w===w.toLowerCase()&&(I=z.x+I,G=z.y+G),z.h(I,G),wd(a,r,D,M,S,R,I,G);break;case "Z":xd(a);z.assign(k);break;case "F":r="";for(D=1;l[u+D];)if("0"===l[u+D])p=!0,D++;else if(null!==l[u+D].match(/[Uu]/))D++;else if(null===l[u+D].match(B))D++;else{r=l[u+D];break}r.match(/[Mm]/)?m=!0:0g&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); -0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Md:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); +t.transform=function(a,b,c,d,e,f){switch(this.type){case P.j:case P.u:case P.F:var g=this.od;var h=this.pd;this.od=g*a+h*c+e;this.pd=g*b+h*d+f;g=this.Dc;h=this.Ec;this.Dc=g*a+h*c+e;this.Ec=g*b+h*d+f;break;case P.o:for(var k=this.figures.s,l=k.length,m=0;mg&&(g+=360),r.startAngle+=g);0>a&&(r.startAngle=180-r.startAngle,r.sweepAngle=-r.sweepAngle); +0>d&&(r.startAngle=-r.startAngle,r.sweepAngle=-r.sweepAngle);r.radiusX*=Math.sqrt(a*a+c*c);void 0!==r.radiusY&&(r.radiusY*=Math.sqrt(b*b+d*d));break;case Jd:g=r.endX;h=r.endY;r.endX=g*a+h*c+e;r.endY=g*b+h*d+f;if(0===r.radiusX||0===r.radiusY)break;0!==b&&(g=180*Math.atan2(b,a)/Math.PI,0>g&&(g+=360),r.xAxisRotation+=g);0>a&&(r.xAxisRotation=180-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);0>d&&(r.xAxisRotation=-r.xAxisRotation,r.isClockwiseArc=!r.isClockwiseArc);r.radiusX*=Math.sqrt(a*a+c*c); r.radiusY*=Math.sqrt(b*b+d*d);break;default:C("Unknown Segment type: "+r.type)}}}}this._isInvalidBounds=!0;return this}; -t.ca=function(a,b){void 0===b&&(b=0);var c=this.od,d=this.pd,e=this.Dc,f=this.Ec;switch(this.type){case P.j:return K.Zb(c,d,e,f,b,a.x,a.y);case P.u:var g=N.allocAt(Math.min(c,e)-b,Math.min(d,f)-b,Math.abs(e-c)+2*b,Math.abs(f-d)+2*b);a=g.ca(a);N.free(g);return a;case P.F:g=Math.min(c,e)-b;var h=Math.min(d,f)-b;c=(Math.abs(e-c)+2*b)/2;b=(Math.abs(f-d)+2*b)/2;if(0>=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Pd(this,a,b,!0,!1);default:return!1}}; -function Pd(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=c||0>=b)return!1;g=a.x-(g+c);h=a.y-(h+b);return 1>=g*g/(c*c)+h*h/(b*b);case P.o:return Md(this,a,b,!0,!1);default:return!1}}; +function Md(a,b,c,d,e){var f=b.x;b=b.y;for(var g=a.bounds.x-20,h=0,k,l,m,n,p=a.figures.s,q=p.length,r=0;r=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f))if(fh)return 0}else{if(bf)return 0}else if(eg)return 0}else if(le)return 0;return 0a?a=0:1=f)return d=f-g,d=0===m?0:d/m,c=c[h],h=c[2*a],e=c[2*a+1],b.h(h+(c[2*a+2]-h)*d,e+(c[2*a+3]-e)*d),b;g+=m}}return b}; t.xx=function(a){0>a?a=0:1=e)return e=b[g],b=e[2*a],c=e[2*a+1],d=e[2*a+2],a=e[2*a+3],1>Math.abs(d-b)&&1>Math.abs(a-c)?0:1>Math.abs(d-b)?0<=a-c?90:270:1>Math.abs(a-c)?0<=d-b?0:180:180*Math.atan2(a-c,d-b)/Math.PI;f+=l}}return NaN}; t.Ru=function(a,b){0>a?a=0:1=f)return d=f-g,d=0===m?0:d/m,m=c[h],c=m[2*a],h=m[2*a+1],e=m[2*a+2],a=m[2* @@ -201,176 +201,176 @@ a+3],b[0]=c+(e-c)*d,b[1]=h+(a-h)*d,b[2]=1>Math.abs(e-c)&&1>Math.abs(a-h)?0:1>Mat t.yx=function(a){if(this.type===P.j){var b=this.startX,c=this.startY,d=this.endX,e=this.endY;if(b!==d||c!==e){var f=a.x;a=a.y;if(b===d){if(c=d?d===c?0:1:Math.abs(a-c)/(d-g)}if(c===e)return b=d?d===b?0:1:Math.abs(f-b)/(d-g);g=(d-b)*(d-b)+(e-c)*(e-c);var h=J.alloc();K.qh(b,c,d,e,f,a,h);a=h.x;f=h.y;J.free(h);return Math.sqrt(((a-b)*(a-b)+(f-c)*(f-c))/g)}}else if(this.type===P.u){g=this.startX;h=this.startY;var k=this.endX; e=this.endY;if(g!==k||h!==e){b=k-g;c=e-h;f=2*b+2*c;d=a.x;a=a.y;d=Math.min(Math.max(d,g),k);a=Math.min(Math.max(a,h),e);g=Math.abs(d-g);k=Math.abs(d-k);h=Math.abs(a-h);e=Math.abs(a-e);var l=Math.min(g,k,h,e);if(l===h)return d/f;if(l===k)return(b+a)/f;if(l===e)return(2*b+c-d)/f;if(l===g)return(2*b+2*c-a)/f}}else{b=this.flattenedSegments;c=this.flattenedLengths;f=this.flattenedTotalLength;d=J.alloc();e=Infinity;h=g=0;k=b.length;for(var m=l=0,n=0;na?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a);for(var c=this.segments.s,d=c.length,e=0;ea&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Ld&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== -Ld&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Xd.prototype.copy=function(){var a=new Xd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Xd.prototype; -t.Xa=function(a){if(!(a instanceof Xd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Dd:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Ed: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 Kd: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 Ld: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 Md: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.qb=function(a){a.classType===Xd&&(this.type=a)}; -t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Dd:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ed: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 Kd: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 Ld: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 Md: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)+ +this.pd=a;this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&va(this,a);this.pl=a;this._isInvalidBounds=!0}}});Xd.prototype.add=Xd.prototype.add;Xd.prototype.equalsApprox=Xd.prototype.Xa;Xd.className="PathFigure"; +function Yd(a,b,c,d,e,f,g,h){Qa(this);void 0===a&&(a=pd);this.na=a;this.l=2;void 0!==b?this.Dc=b:this.Dc=0;void 0!==c?this.Ec=c:this.Ec=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===g&&(g=0);a===Jd?(a=f%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(d,0),this.Pg=Math.max(e,0),"boolean"===typeof g?g&&(this.isLargeArc=!0):"number"===typeof g&&g&&(this.isLargeArc=!0),h&&(this.isClockwiseArc=!0)):(this.Ne=d,this.Vh=e,a===Id&&(f=Math.max(f,0)),this.Wh=f,"number"===typeof g?(a=== +Id&&(g=Math.max(g,0)),this.Pg=g):this.Pg=0);this.ae=null}Yd.prototype.copy=function(){var a=new Yd;a.na=this.na;a.l=this.l&-2;a.Dc=this.Dc;a.Ec=this.Ec;a.Ne=this.Ne;a.Vh=this.Vh;a.Wh=this.Wh;a.Pg=this.Pg;return a};t=Yd.prototype; +t.Xa=function(a){if(!(a instanceof Yd)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ad:case pd:return K.B(this.endX,a.endX)&&K.B(this.endY,a.endY);case Bd: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 Hd: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 Id: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 Jd: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.qb=function(a){a.classType===Yd&&(this.type=a)}; +t.toString=function(a){void 0===a&&(a=-1);switch(this.type){case Ad:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case pd:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Bd: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 Hd: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 Id: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 Jd: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)+ " "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")};t.freeze=function(){this._isFrozen=!0;return this};t.ka=function(){this._isFrozen=!1;return this};t.close=function(){this.isClosed=!0;return this}; -function Nd(a,b){if(null!==a.ae&&!1===b._isInvalidBounds)return a.ae;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.ae=[],a.ae;b=a.Ne;var e=a.Vh,f=K.kx(0,0,c=q?g=Math.PI:1<=q&&(g=0);!k&&0g&&(g+=2*Math.PI);k=b>f?1:b/f;q=b>f?f/b:1;b=K.kx(0,0,b>f?b:f,m,m+g,!0);f=ld.alloc();f.reset();f.translate(c,d);f.rotate(a.Ne,0,0);f.scale(k,q);P.Ha(b,f); ld.free(f);a.ae=b;return a.ae} -ma.Object.defineProperties(Xd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ +ma.Object.defineProperties(Yd.prototype,{_isFrozen:{get:function(){return 0!==(this.l&1)},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return 0!==(this.l&2)},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return 0!==(this.l&8)},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{ get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);this.Dc=a;this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);this.Ec=a;this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&& va(this,a);this.Ne=a;this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},centerX:{ -get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Xd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, -set:function(a){0>a&&xa(a,">= zero",Xd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ +get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);this.Ne=a;this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&va(this,a);this.Vh=a;this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&xa(a,">= zero",Yd,"radiusX");this._isFrozen&&va(this,a);this.Wh=a;this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg}, +set:function(a){0>a&&xa(a,">= zero",Yd,"radiusY");this._isFrozen&&va(this,a);this.Pg=a;this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Dc=a;this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&va(this,a);360a&&(a=-360);this.Ec=a;this._isInvalidBounds=!0}},isClockwiseArc:{ get:function(){return 0!==(this.l&4)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|4:this.l&-5;this._isInvalidBounds=!0}},isLargeArc:{get:function(){return 0!==(this.l&16)},set:function(a){this._isFrozen&&va(this,a);this.l=a?this.l|16:this.l&-17;this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&va(this,a);a%=360;0>a&&(a+=360);this.Ne=a;this._isInvalidBounds= -!0}}});Xd.prototype.equalsApprox=Xd.prototype.Xa;var Dd=new E(Xd,"Move",0),pd=new E(Xd,"Line",1),Ed=new E(Xd,"Bezier",2),Kd=new E(Xd,"QuadraticBezier",3),Ld=new E(Xd,"Arc",4),Md=new E(Xd,"SvgArc",4);Xd.className="PathSegment";Xd.Move=Dd;Xd.Line=pd;Xd.Bezier=Ed;Xd.QuadraticBezier=Kd;Xd.Arc=Ld;Xd.SvgArc=Md; -function Zd(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}Zd.prototype.copy=function(){var a=new Zd;return this.clone(a)}; -Zd.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; -Zd.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};Zd.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);return b}; -Zd.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;$d(c,a,b);b.assign(c.Ps(b));return b}; -ma.Object.defineProperties(Zd.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, +!0}}});Yd.prototype.equalsApprox=Yd.prototype.Xa;var Ad=new E(Yd,"Move",0),pd=new E(Yd,"Line",1),Bd=new E(Yd,"Bezier",2),Hd=new E(Yd,"QuadraticBezier",3),Id=new E(Yd,"Arc",4),Jd=new E(Yd,"SvgArc",4);Yd.className="PathSegment";Yd.Move=Ad;Yd.Line=pd;Yd.Bezier=Bd;Yd.QuadraticBezier=Hd;Yd.Arc=Id;Yd.SvgArc=Jd; +function $d(){this.H=null;this.xu=(new J(0,0)).freeze();this.mt=(new J(0,0)).freeze();this.Bp=this.Rq=0;this.Cp=1;this.xq="";this.Wr=this.Tp=!1;this.Rp=this.Ep=0;this.xg=this.nq=this.tq=!1;this.Zp=null;this.Rr=0;this.xd=this.Nr=null}$d.prototype.copy=function(){var a=new $d;return this.clone(a)}; +$d.prototype.clone=function(a){a.H=this.H;a.xu.assign(this.viewPoint);a.mt.assign(this.documentPoint);a.Rq=this.Rq;a.Bp=this.Bp;a.Cp=this.Cp;a.xq=this.xq;a.Tp=this.Tp;a.Wr=this.Wr;a.Ep=this.Ep;a.Rp=this.Rp;a.tq=this.tq;a.nq=this.nq;a.xg=this.xg;a.Zp=this.Zp;a.Rr=this.Rr;a.Nr=this.Nr;a.xd=this.xd;return a}; +$d.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};$d.prototype.So=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);return b}; +$d.prototype.Cz=function(a,b){var c=this.diagram;if(null===c)return b;ae(c,a,b);b.assign(c.Ps(b));return b}; +ma.Object.defineProperties($d.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp}, set:function(a){this.Bp=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.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr= a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{ get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return null===a?!1:"touch"===a.pointerType||"pen"===a.pointerType}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd= 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}}});Zd.prototype.getMultiTouchDocumentPoint=Zd.prototype.Cz; -Zd.prototype.getMultiTouchViewPoint=Zd.prototype.So;Zd.className="InputEvent";function ae(){this.H=null;this.xa="";this.ar=this.Lr=null}ae.prototype.copy=function(){var a=new ae;a.H=this.H;a.xa=this.xa;a.Lr=this.Lr;a.ar=this.ar;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}; -ma.Object.defineProperties(ae.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}});ae.className="DiagramEvent"; -function be(){this.Fm=ce;this.rf=this.Qq="";this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}be.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.dc=null}; -be.prototype.copy=function(){var a=new be;a.Fm=this.Fm;a.Qq=this.Qq;a.rf=this.rf;a.dc=this.dc;a.H=this.H;a.Qn=this.Qn;var b=this.Sn;a.Sn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Rn;a.Rn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Mn;a.Mn=za(b)&&"function"===typeof b.J?b.J():b;b=this.Ln;a.Ln=za(b)&&"function"===typeof b.J?b.J():b;return a};be.prototype.qb=function(a){a.classType===be&&(this.change=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+=Ia(this.object)),null!==this.oldValue&&(a+=" old: "+Ia(this.oldValue)),null!== -this.oldParam&&(a+=" "+this.oldParam),null!==this.newValue&&(a+=" new: "+Ia(this.newValue)),null!==this.newParam&&(a+=" "+this.newParam));return a};be.prototype.I=function(a){return a?this.oldValue:this.newValue};be.prototype.Ez=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))}; -ma.Object.defineProperties(be.prototype,{model:{get:function(){return this.dc},set:function(a){this.dc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf}, -set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===de&&("CommittedTransaction"===this.rf||"FinishedUndo"===this.rf||"FinishedRedo"===this.rf)}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}}, -newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=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.Ez;be.prototype.getValue=be.prototype.I;be.prototype.clear=be.prototype.clear; -var de=new E(be,"Transaction",-1),ce=new E(be,"Property",0),ee=new E(be,"Insert",1),fe=new E(be,"Remove",2);be.className="ChangedEvent";be.Transaction=de;be.Property=ce;be.Insert=ee;be.Remove=fe;function ge(){this.o=(new F).freeze();this.xa="";this.j=!1}ge.prototype.toString=function(a){var b="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==a&&0b&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; -ma.Object.defineProperties(ge.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});ge.prototype.optimize=ge.prototype.$j;ge.prototype.redo=ge.prototype.redo;ge.prototype.canRedo=ge.prototype.canRedo;ge.prototype.undo=ge.prototype.undo;ge.prototype.canUndo=ge.prototype.canUndo; -ge.prototype.clear=ge.prototype.clear;ge.className="Transaction";function he(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} -he.prototype.toString=function(a){var b="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;b+="[";for(var c=this.nestedTransactionNames.count,d=0;db&&a.cd(b,d),b++);for(;a.length>b;)a.pop();a.freeze()}}; +ma.Object.defineProperties(he.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}});he.prototype.optimize=he.prototype.$j;he.prototype.redo=he.prototype.redo;he.prototype.canRedo=he.prototype.canRedo;he.prototype.undo=he.prototype.undo;he.prototype.canUndo=he.prototype.canUndo; +he.prototype.clear=he.prototype.clear;he.className="Transaction";function ie(){this.Pt=new H;this.Jd=!1;this.u=(new F).freeze();this.Ce=-1;this.o=999;this.Fe=!1;this.Np=null;this.bi=0;this.j=!1;this.Ie=(new F).freeze();this.gl=new F;this.tt=!0;this.Dt=this.rq=this.Gt=this.Ft=!1} +ie.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&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0a.transactionLevel&&ya("Ending transaction without having started a transaction: "+c);var d=1===a.transactionLevel,e=a.currentTransaction;d&&b&&(a.isInternalTransaction||a.Pb("CommittingTransaction",c,e));var f=0;if(0=d&&(f=b.M(0),null!==f&&f.clear(),b.mb(0),a.Ce--)),0===d||0!==b.count&&b.get(b.count-1)===e||(b.add(e),a.Ce++),b.freeze()),a.isInternalTransaction||a.Pb("CommittedTransaction",c,e);else{a.Fe=!0;try{a.isEnabled&&null!==e&&(e.isComplete=!0,e.undo())}finally{a.isInternalTransaction||a.Pb("RolledBackTransaction",c,e),a.Fe=!1}null!== e&&e.clear()}a.Np=null;a.isPendingClear&&a.clear();a.isPendingClear=!1;a.isPendingUnmodified=!1;return!0}if(a.isEnabled&&!b&&null!==e){a=f;c=e.changes;for(e=c.count-1;e>=a;e--)b=c.M(e),null!==b&&b.undo(),c.ka(),c.mb(e);c.freeze()}return!1}t.mx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var b=a.count-1;b>this.historyIndex;b--){var c=a.M(b);null!==c&&c.clear();a.mb(b);this.rq=!0}a.freeze()}}; -he.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; -he.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; -ma.Object.defineProperties(he.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex=this.transactionLevel&&!this.tt&&(a=a.diagram,null!==a&&!1===a.pi||ya("Change not within a transaction: "+c.toString()))}}; +ie.prototype.skipsEvent=function(a){if(null===a||0>a.change.value)return!0;a=a.object;if(null===a)return!1;if(void 0!==a.layer){if(a=a.layer,null!==a&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1}; +ma.Object.defineProperties(ie.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexe||Math.abs(b.y-a.y)>d}; -ma.Object.defineProperties(je.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, -set:function(a){this.wm=a}}});je.prototype.startTransaction=je.prototype.Ea;je.className="Tool";function La(){je.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=se;this.u=ue;this.Mp=this.j=null;this.zj=-1}la(La,je);La.prototype.initializeStandardTools=function(){}; -La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof te&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ve&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===we){b.bubbles=!0;return}if(this.gestureBehavior===ve)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de||Math.abs(b.y-a.y)>d}; +ma.Object.defineProperties(ke.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Q&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm}, +set:function(a){this.wm=a}}});ke.prototype.startTransaction=ke.prototype.Ea;ke.className="Tool";function La(){ke.call(this);this.name="ToolManager";this.hb=new F;this.ob=new F;this.Ib=new F;this.F=this.V=850;this.o=(new L(2,2)).ja();this.Ha=5E3;this.ia=ve;this.u=xe;this.Mp=this.j=null;this.zj=-1}la(La,ke);La.prototype.initializeStandardTools=function(){}; +La.prototype.updateAdornments=function(a){var b=this.currentToolTip;if(b instanceof we&&this.Mp===a){var c=b.adornedObject;(null!==a?c.part===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; +La.prototype.doMouseDown=function(){var a=this.diagram,b=a.lastInput;b.isTouchEvent&&this.gestureBehavior===ye&&(b.bubbles=!1);if(b.isMultiTouch){this.cancelWaitAfter();if(this.gestureBehavior===ze){b.bubbles=!0;return}if(this.gestureBehavior===ye)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var c=this.mouseDownTools.length,d=0;de.right&&(c.x-=d.width+5/b.scale);c.xe.bottom?c.y-(d.height+5/b.scale):c.y+20/b.scale;c.yc.pointsCount)){var d=a.diagram;if(!d.isReadOnly){var e=a.Oe;if(null!==e){var f=null,g=null;null===c.fromNode&&(f=sf(a,c.i(0),!1),null!==f&&(g=f.part));var h=null,k=null;null===c.toNode&&(h=sf(a,c.i(c.pointsCount-1),!0),null!==h&&(k=h.part));e.isValidLink(g,f,k,h)?b?(c.defaultFromPoint=c.i(0),c.defaultToPoint=c.i(c.pointsCount-1),c.suspendsRouting=!1,c.fromNode=g,null!==f&&(c.fromPortId=f.portId),c.toNode=k,null!==h&&(c.toPortId=h.portId),c.fromPort!== -d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}Ae.prototype.doDragOver=function(){}; -function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Te(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==De){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==De){a=N.alloc();for(b= +d.Nx&&d.S("LinkRelinked",c,d.Nx),c.toPort!==d.Ox&&d.S("LinkRelinked",c,d.Ox)):tf(e,g,f,k,h):tf(e,null,null,null,null)}}}}De.prototype.doDragOver=function(){}; +function uf(a,b){var c=a.diagram;a.dragsLink&&of(a,!0);Ve(a);var d=a.findDragOverObject(b),e=c.lastInput;e.targetObject=d;if(null!==d){e.handled=!1;for(var f=d;null!==f;){var g=f.mouseDrop;if(null!==g&&(g(e,f),e.handled))break;vf(a,e,f);f=rf(f)}}else f=c.mouseDrop,null!==f&&f(e);if(a.isActive||null!==Ge){for(e=(a.copiedParts||a.draggedParts).iterator;e.next();)f=e.key,f instanceof V&&f.linksConnected.each(function(a){a.suspendsRouting=!1});a.doDropOnto(b,d);if(a.isActive||null!==Ge){a=N.alloc();for(b= c.selection.iterator;b.next();)d=b.value,d instanceof V&&wf(c,d,a);N.free(a)}}}function vf(a,b,c){a=a.diagram;c=c.part;!a.handlesDragDropForTopLevelParts||!c.isTopLevel||c instanceof pf||(c=a.mouseDrop,null!==c&&c(b))}function wf(a,b,c){var d=!1;c=b.getAvoidableRect(c);a.viewportBounds.Re(c)&&(d=!0);a=a.Ou(c,function(a){return a.part},function(a){return a instanceof T},!0,function(a){return a instanceof T},d);if(0!==a.count)for(a=a.iterator;a.next();)c=a.value,!c.Td(b)&&c.isAvoiding&&c.bb()} -Ae.prototype.doDropOnto=function(){};Ae.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(af(this,!1),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts)):this.mayMove()?(We(this),cf(this,this.draggedParts,!0)):this.mayDragOut()?(af(this,!1),cf(this,this.copiedParts,!1)):We(this),nf(this,a.lastInput.documentPoint))}}; -Ae.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(We(this),af(this,!0),Ge(a,this.copiedParts),cf(this,this.copiedParts,!1),Ue(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,We(this),this.mayMove()&&(cf(this,this.draggedParts, -!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();Ue(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; -Ae.prototype.simulatedMouseMove=function(a,b,c){if(null===De)return!1;var d=De.diagram;c instanceof Q||(c=null);var e=He;c!==e&&(null!==e&&e!==d&&(e.ug(),De.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),He=c,null!==c&&c!==d&&(Ze(),e=c.toolManager.findTool("Dragging"),null!==e&&(Ce.contains(e)||Ce.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); +De.prototype.doDropOnto=function(){};De.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;this.simulatedMouseMove(b.event,b.documentPoint,b.targetDiagram)||null===this.currentPart||null===this.draggedParts||(this.mayCopy()?(cf(this,!1),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts)):this.mayMove()?(Ye(this),ef(this,this.draggedParts,!0)):this.mayDragOut()?(cf(this,!1),ef(this,this.copiedParts,!1)):Ye(this),nf(this,a.lastInput.documentPoint))}}; +De.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,b=a.lastInput;if(!this.simulatedMouseUp(b.event,b.documentPoint,b.targetDiagram)){b=!1;var c=this.mayCopy();c&&null!==this.copiedParts?(Ye(this),cf(this,!0),Je(a,this.copiedParts),ef(this,this.copiedParts,!1),We(a,this.copiedParts),null!==this.copiedParts&&(a.S("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(a){a.isSelected=!0}))):(b=!0,Ye(this),this.mayMove()&&(ef(this,this.draggedParts, +!0),nf(this,a.lastInput.documentPoint)));this.Ym=!0;uf(this,a.lastInput.documentPoint);if(this.isActive){var d=c?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null;b&&xf(this);a.Ya();We(a,this.draggedParts);this.transactionResult=c?"Copy":"Move";a.S(c?"SelectionCopied":"SelectionMoved",d)}this.stopTool();c&&a.S("ChangedSelection",a.selection)}}}; +De.prototype.simulatedMouseMove=function(a,b,c){if(null===Ge)return!1;var d=Ge.diagram;c instanceof Q||(c=null);var e=Ke;c!==e&&(null!==e&&e!==d&&(e.ug(),Ge.isDragOutStarted=!1,e=e.toolManager.findTool("Dragging"),null!==e&&e.doSimulatedDragLeave()),Ke=c,null!==c&&c!==d&&(af(),e=c.toolManager.findTool("Dragging"),null!==e&&(Fe.contains(e)||Fe.add(e),e.doSimulatedDragEnter())),this.doUpdateCursor(null));if(null===c||c===d||!c.allowDrop||c.isReadOnly||!c.allowInsert)return!1;d=c.toolManager.findTool("Dragging"); null!==d&&(null!==a&&(void 0!==a.targetTouches&&(0g&&(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.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,bf(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;Ee(a,g.Lf());null!==a.draggedLink&&(c=a.draggedLink,b=c.routeBounds,bf(c,a.startPoint.x-(b.x+b.width/2),a.startPoint.y-(b.y+b.height/ -2)));a.doUpdateCursor(null)}}}Ae.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};Ae.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; -ma.Object.defineProperties(Ae.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= +f=a.Fr;g=new ob;h=J.alloc();for(k=b.iterator;k.next();)l=k.value,l instanceof T&&l.canCopy()&&(m=c.I(l),null!==m&&(m.points=l.points,df(m,f.x-d,f.y-e),m.suspendsRouting=!0,g.add(m,a.Pd())));for(b=b.iterator;b.next();)l=b.value,l.Zc()&&l.canCopy()&&(k=c.I(l),null!==k&&(l=l.location,h.h(f.x-(d-l.x),f.y-(e-l.y)),k.location=h,k.Va(),g.add(k,a.Pd(h))));J.free(h);a.copiedParts=g;He(a,g.Lf());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/ +2)));a.doUpdateCursor(null)}}}De.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1;this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor;this.Bn=null};De.prototype.computeMove=function(a,b,c,d){c=this.diagram;return null!==c?c.computeMove(a,b,this.dragOptions,d):new J}; +ma.Object.defineProperties(De.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled= a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{ get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink= a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V}, set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return null!==this.copiedParts?this.copiedParts.Lf():null!==this.draggedParts?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink= -a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});Ae.prototype.getDraggingSource=Ae.prototype.Bz;var De=null,He=null;Ae.className="DraggingTool";Ce=new F; -Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==De&&De.doCancel();je.prototype.doCancel.call(this)}; -function Af(){je.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= -2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,je);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; +a}},isDragOutStarted:{get:function(){return this.Ib},set:function(a){this.Ib=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Hk},set:function(a){this.Hk=a}}});De.prototype.getDraggingSource=De.prototype.Bz;var Ge=null,Ke=null;De.className="DraggingTool";Fe=new F; +Ka("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)});La.prototype.doCancel=function(){null!==Ge&&Ge.doCancel();ke.prototype.doCancel.call(this)}; +function Af(){ke.call(this);this.te=100;this.Ha=!1;this.u="pointer";var a=new T,b=new Bf;b.isPanelMain=!0;b.stroke="blue";a.add(b);b=new Bf;b.toArrow="Standard";b.fill="blue";b.stroke="blue";a.add(b);a.layerName="Tool";this.Ci=a;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth=2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Bi=a;this.j=b;a=new V;b=new Bf;b.portId="";b.figure="Rectangle";b.fill=null;b.stroke="magenta";b.strokeWidth= +2;b.desiredSize=Gb;a.add(b);a.selectable=!1;a.layerName="Tool";this.Di=a;this.o=b;this.Pc=this.Oc=this.ob=this.hb=this.Ib=null;this.ia=!0;this.iy=new ob;this.Of=this.gj=this.Pf=null}la(Af,ke);Af.prototype.doStop=function(){this.diagram.ug();this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null;this.validPortsCache.clear();this.targetPort=null}; Af.prototype.copyPortProperties=function(a,b,c,d,e){if(null!==a&&null!==b&&null!==c&&null!==d){var f=b.Df(),g=L.alloc();g.width=b.naturalBounds.width*f;g.height=b.naturalBounds.height*f;d.desiredSize=g;L.free(g);e?(d.toSpot=b.toSpot,d.toEndSegmentLength=b.toEndSegmentLength):(d.fromSpot=b.fromSpot,d.fromEndSegmentLength=b.fromEndSegmentLength);c.locationSpot=wc;f=J.alloc();c.location=b.ga(wc,f);J.free(f);d.angle=b.li();null!==this.portTargeted&&this.portTargeted(a,b,c,d,e)}}; Af.prototype.setNoTargetPortProperties=function(a,b,c){null!==b&&(b.desiredSize=Gb,b.fromSpot=rc,b.toSpot=rc);null!==a&&(a.location=this.diagram.lastInput.documentPoint);null!==this.portTargeted&&this.portTargeted(null,null,a,b,c)};Af.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()}; Af.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;this.targetPort=this.findTargetPort(this.isForwards);if(null!==this.targetPort&&this.targetPort.part instanceof V){var b=this.targetPort.part;this.isForwards?this.copyPortProperties(b,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(b,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort, @@ -403,30 +403,30 @@ this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLi Tf.prototype.insertLink=function(a,b,c,d){return this.diagram.partManager.insertLink(a,b,c,d)};Tf.prototype.doNoLink=function(){}; ma.Object.defineProperties(Tf.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}}); var Uf=new E(Tf,"Either",0),Vf=new E(Tf,"ForwardsOnly",0),Wf=new E(Tf,"BackwardsOnly",0);Tf.className="LinkingTool";Tf.Either=Uf;Tf.ForwardsOnly=Vf;Tf.BackwardsOnly=Wf; -function Ie(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Ie,Af); -Ie.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& -(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Ie.prototype.makeAdornment=function(a,b){var c=new te;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; -Ie.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; -Ie.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 te&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(this.name);a.isMouseCaptured=!0;a.currentCursor=this.linkingCursor; +function Le(){Af.call(this);this.name="Relinking";var a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=0;this.V=a;a=new Bf;a.figure="Diamond";a.desiredSize=Ib;a.fill="lightblue";a.stroke="dodgerblue";a.cursor=this.linkingCursor;a.segmentIndex=-1;this.Xd=a;this.F=null;this.Fw=new N}la(Le,Af); +Le.prototype.updateAdornments=function(a){if(null!==a&&a instanceof T){var b="RelinkFrom",c=null;if(a.isSelected&&!this.diagram.isReadOnly){var d=a.selectionObject;null!==d&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&&(c=a.Oj(b),null===c&&(c=this.makeAdornment(d,!1),a.bh(b,c)))}null===c&&a.Jf(b);b="RelinkTo";c=null;a.isSelected&&!this.diagram.isReadOnly&&(d=a.selectionObject,null!==d&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&d.actualBounds.w()&&d.Ed()&& +(c=a.Oj(b),null===c?(c=this.makeAdornment(d,!0),a.bh(b,c)):c.v()));null===c&&a.Jf(b)}};Le.prototype.makeAdornment=function(a,b){var c=new we;c.type=W.Link;b=b?this.toHandleArchetype:this.fromHandleArchetype;null!==b&&c.add(b.copy());c.adornedObject=a;return c}; +Le.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!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}; +Le.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 we&&c.adornedPart instanceof T))return;this.handle=b;this.isForwards=null===c||"RelinkTo"===c.category;this.originalLink=c.adornedPart}this.Ea(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.Fw.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 W)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,b)};gg.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}; gg.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.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.hv())),this.Tn.set(this.adornedObject.part.location),this.Ew.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt= -this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; +this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))};gg.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.isActive=a.isMouseCaptured=!1};gg.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b}; gg.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation);this.stopTool()};gg.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(a.lastInput.documentPoint,J.alloc()),f=this.computeReshape();b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.bd();J.free(e)}}; gg.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var b=this.rt,c=this.qt,d=this.pt,e=this.adornedObject.qs(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.Ya();this.transactionResult=this.name;a.S("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()}; -gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Be;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; +gg.prototype.resize=function(a){var b=this.diagram,c=this.adornedObject;if(null!==c){c.desiredSize=a.size;a=c.part;a.Va();c=c.ga(this.handle.alignment.hv());if(a instanceof pf){var d=new F;d.add(a);if(!this.dragsMembers&&null===a.placeholder){var e=new Ee;e.dragsMembers=!1}b.moveParts(d,this.oppositePoint.copy().re(c),!0,e)}else a.location=a.location.copy().re(c).add(this.oppositePoint);b.bd()}}; gg.prototype.computeResize=function(a,b,c,d,e,f){b.Mc()&&(b=wc);var g=this.adornedObject.naturalBounds,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){n=g.width;var p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=J.alloc();K.No(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n* a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width,a.y=m-a.height)):1<=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width),a.x=l-a.width)):(a.x= Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=l-a.x,f||(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n,a.y=k+.5*(m-k-a.height))):1<=b.x?0>=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(1<=a.height/a.width?(a.height=Math.max(Math.min(n*a.width,d.height),c.height),a.width=a.height/n):(a.width=Math.max(Math.min(a.height/n,d.width),c.width),a.height=n*a.width), @@ -457,125 +457,125 @@ a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=Math.max(Math.min(a.heig gg.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),b=this.minSize;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};gg.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),b=this.maxSize;!isNaN(b.width)&&b.widthc?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.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=je.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; +d,b.y=-d);return a.ga(b)};ng.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction();this.ue=this.handle=null;this.kr=new J(NaN,NaN);this.isActive=a.isMouseCaptured=!1};ng.prototype.stopTransaction=function(){var a=this.diagram,b=ke.prototype.stopTransaction.call(this);b&&null!==a.undoManager.transactionToUndo&&a.undoManager.transactionToUndo.$j();return b};ng.prototype.doCancel=function(){this.diagram.delaysLayout=!1;this.rotate(this.originalAngle);this.stopTool()}; ng.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))};ng.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var b=this.computeRotate(a.lastInput.documentPoint);this.rotate(b);a.Ya();this.transactionResult=this.name;a.S("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()}; ng.prototype.rotate=function(a){var b=this.adornedObject;if(null!==b){b.angle=a;b=b.part;b.Va();var c=b.locationObject,d=b.rotateObject;if(c===d||c.rg(d))c=this.Tn.copy(),b.location=c.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint);this.diagram.bd()}}; ng.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var b=this.adornedObject.panel;null!==b&&(a-=b.li());360<=a?a-=360:0>a&&(a+=360);b=Math.min(Math.abs(this.snapAngleMultiple),180);var c=Math.min(Math.abs(this.snapAngleEpsilon),b/2);!this.diagram.lastInput.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a}; -ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof te))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof te)throw Error("new handle must not be in an Adornment: "+ +ma.Object.defineProperties(ng.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(null!==a&&!(a.part instanceof we))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(null!==a&&a.part instanceof we)throw Error("new handle must not be in an Adornment: "+ a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Dw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u= -a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){je.call(this);this.name="ClickSelecting"}la(og,je);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; -og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){je.call(this);this.name="Action";this.nk=null}la(pg,je); +a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}});ng.className="RotatingTool";Ka("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function og(){ke.call(this);this.name="ClickSelecting"}la(og,ke);og.prototype.canStart=function(){return!this.isEnabled||this.isBeyondDragSize()?!1:!0}; +og.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip());this.stopTool()};og.className="ClickSelectingTool";function pg(){ke.call(this);this.name="Action";this.nk=null}la(pg,ke); pg.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,b=a.lastInput,c=a.jc(b.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a});if(null!==c){if(!c.isActionable)return!1;this.nk=c;a.Bk=a.jc(b.documentPoint,null,null);return!0}return!1};pg.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionDown&&b.actionDown(a,b))}else this.canStart()&&this.doActivate()}; pg.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionMove&&b.actionMove(a,b))}};pg.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,b=this.nk;if(null===b)return;a.targetObject=b;null!==b.actionUp&&b.actionUp(a,b);this.standardMouseClick(function(a){for(;null!==a.panel&&(!a.isActionable||a!==b);)a=a.panel;return a},function(a){return a===b})}this.stopTool()}; -pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){je.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,je); +pg.prototype.doCancel=function(){var a=this.diagram.lastInput,b=this.nk;null!==b&&(a.targetObject=b,null!==b.actionCancel&&b.actionCancel(a,b),this.stopTool())};pg.prototype.doStop=function(){this.nk=null};pg.className="ActionTool";function qg(){ke.call(this);this.name="ClickCreating";this.Ri=null;this.o=!0;this.j=!1;this.nw=new J(0,0)}la(qg,ke); qg.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.nw=a.lastInput.viewPoint.copy()),2!==a.lastInput.clickCount||this.isBeyondDragSize(this.nw))return!1}else if(1!==a.lastInput.clickCount)return!1;return a.currentTool!==this&&null!==a.Ol(a.lastInput.documentPoint,!0)?!1:!0}; qg.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint);this.stopTool()}; -qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&zg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= +qg.prototype.insertPart=function(a){var b=this.diagram,c=this.archetypeNodeData;if(null===c)return null;var d=null;try{b.S("ChangingSelection",b.selection);this.Ea(this.name);if(c instanceof U)c.Zc()&&(jg(c),d=c.copy(),null!==d&&b.add(d));else if(null!==c){var e=b.model.copyNodeData(c);za(e)&&(b.model.xf(e),d=b.Lc(e))}if(null!==d){var f=J.allocAt(a.x,a.y);this.isGridSnapEnabled&&xg(this.diagram,d,a,f);d.location=f;b.allowSelect&&(b.clearSelection(!0),d.isSelected=!0);J.free(f)}b.Ya();this.transactionResult= this.name;b.S("PartCreated",d)}finally{this.stopTransaction(),b.S("ChangedSelection",b.selection)}return d};ma.Object.defineProperties(qg.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}});qg.className="ClickCreatingTool"; -function Ag(){je.call(this);this.name="DragSelecting";this.Hk=175;this.o=!1;var a=new U;a.layerName="Tool";a.selectable=!1;var b=new Bf;b.name="SHAPE";b.figure="Rectangle";b.fill=null;b.stroke="magenta";a.add(b);this.j=a}la(Ag,je); -Ag.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.timestampe.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ye.right&&(c.x-=d.width+5/b.scale);c.xe.bottom&&(c.y-=d.height+5/b.scale);c.ya.lastInput.clickCount?!1:!0};Og.prototype.doStart=function(){Yg=this;null!==this.textBlock&&this.doActivate()}; -Og.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Pg&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Vg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Og.prototype.doCancel=function(){this.stopTool()}; -Og.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Og.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Zg)};Og.prototype.acceptText=function(a){switch(a){case Zg:if(this.qa===ah)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this);break;case dh:case Tg:case Ug:if(Tg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Vg||this.qa===Xg||this.qa===Wg)this.qa=bh,ch(this)}}; -function ch(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.qa=ah,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Xg,a.doError(e,f))}} -Og.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)};Og.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Og.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Rg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Og.prototype.doStop=function(){Yg=null}; -Og.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};Og.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; -ma.Object.defineProperties(Og.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, -set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Og.prototype.measureTemporaryTextBlock=Og.prototype.Mx; -var dh=new E(Og,"LostFocus",0),Zg=new E(Og,"MouseDown",1),Ug=new E(Og,"Tab",2),Tg=new E(Og,"Enter",3),eh=new E(Og,"SingleClick",0),Qg=new E(Og,"SingleClickSelected",1),$g=new E(Og,"DoubleClick",2),Rg=new E(Og,"StateNone",0),Vg=new E(Og,"StateActive",1),Wg=new E(Og,"StateEditing",2),bh=new E(Og,"StateValidating",3),Xg=new E(Og,"StateInvalid",4),ah=new E(Og,"StateValidated",5),Yg=null;Og.className="TextEditingTool";Og.LostFocus=dh;Og.MouseDown=Zg;Og.Tab=Ug;Og.Enter=Tg;Og.SingleClick=eh; -Og.SingleClickSelected=Qg;Og.DoubleClick=$g;Og.StateNone=Rg;Og.StateActive=Vg;Og.StateEditing=Wg;Og.StateValidating=bh;Og.StateInvalid=Xg;Og.StateValidated=ah;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); -function fh(a){gh||(hh(),gh=!0);this.H=ke;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=ih;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new jh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}fh.prototype.Xe=function(a){this.H=a};fh.prototype.canStart=function(){return!0};function kh(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),lh(a.H),a.Ab=!0)} -function mh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===ih?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===nh&&b.vc.clear(),a.Rw=a.Ok===oh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),ph(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==qh&&null!==d&&(delete d.start.scale,delete d.end.scale), -x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Fe(c),rh(c),a.Ab=!1,b.start(),b.cc&&(sh(a),c.Ya(),th(b,0),yf(c,!0),uh(a),c.S("AnimationStarting",a)))}))}}function vh(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function wh(a,b,c,d){a.isTicking||vh(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=fh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; -function Hh(a,b){function c(){0a.lastInput.clickCount?!1:!0};Mg.prototype.doStart=function(){Wg=this;null!==this.textBlock&&this.doActivate()}; +Mg.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(null!==a){var b=this.textBlock;null===b&&(b=a.jc(a.lastInput.documentPoint));if(null!==b&&b instanceof Ng&&(this.textBlock=b,null!==b.part)){a.animationManager.Cc();this.isActive=!0;this.qa=Tg;var c=this.defaultTextEditor;null!==b.textEditor&&(c=b.textEditor);this.Zh=this.textBlock.copy();var d=new N(this.textBlock.ga(sc),this.textBlock.ga(Bc));a.uv(d);c.show(b,a,this);this.currentTextEditor=c}}}};Mg.prototype.doCancel=function(){this.stopTool()}; +Mg.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()};Mg.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xg)};Mg.prototype.acceptText=function(a){switch(a){case Xg:if(this.qa===Zg)this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus();else if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this);break;case bh:case Rg:case Sg:if(Rg!==a||!0!==this.textBlock.isMultiline)if(this.qa===Tg||this.qa===Vg||this.qa===Ug)this.qa=$g,ah(this)}}; +function ah(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.qa=Zg,a.transactionResult=a.name,b.text=f,a.doSuccess(e,f),null!==c&&c.S("TextEdited",b,e),a.stopTransaction(),a.stopTool(),null!==c&&c.doFocus()):(a.qa=Vg,a.doError(e,f))}} +Mg.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)};Mg.prototype.doSuccess=function(a,b){var c=this.textBlock;null!==c.textEdited&&c.textEdited(c,a,b)};Mg.prototype.doDeactivate=function(){var a=this.diagram;null!==a&&(this.qa=Pg,null!==this.currentTextEditor&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)};Mg.prototype.doStop=function(){Wg=null}; +Mg.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};Mg.prototype.Mx=function(a){var b=this.Zh;b.text=a;b.measure(this.textBlock.Ih,Infinity);return b}; +ma.Object.defineProperties(Mg.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj}, +set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}});Mg.prototype.measureTemporaryTextBlock=Mg.prototype.Mx; +var bh=new E(Mg,"LostFocus",0),Xg=new E(Mg,"MouseDown",1),Sg=new E(Mg,"Tab",2),Rg=new E(Mg,"Enter",3),ch=new E(Mg,"SingleClick",0),Og=new E(Mg,"SingleClickSelected",1),Yg=new E(Mg,"DoubleClick",2),Pg=new E(Mg,"StateNone",0),Tg=new E(Mg,"StateActive",1),Ug=new E(Mg,"StateEditing",2),$g=new E(Mg,"StateValidating",3),Vg=new E(Mg,"StateInvalid",4),Zg=new E(Mg,"StateValidated",5),Wg=null;Mg.className="TextEditingTool";Mg.LostFocus=bh;Mg.MouseDown=Xg;Mg.Tab=Sg;Mg.Enter=Rg;Mg.SingleClick=ch; +Mg.SingleClickSelected=Og;Mg.DoubleClick=Yg;Mg.StateNone=Pg;Mg.StateActive=Tg;Mg.StateEditing=Ug;Mg.StateValidating=$g;Mg.StateInvalid=Vg;Mg.StateValidated=Zg;Ka("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)}); +function dh(a){eh||(fh(),eh=!0);this.H=le;this.Nk=this.Ab=this.vq=this.cc=!1;this.Rw=!0;this.Ok=gh;this.Dm=!1;this.Gh=this.Jd=!0;this.Dg=600;this.dw=this.Pw=!1;this.Zd=new H;this.ce=new hh;this.ce.Yd=this;this.Ei=new H;this.pu=new H;this.Sr=new H;this.pr=new H;a&&Object.assign(this,a)}dh.prototype.Xe=function(a){this.H=a};dh.prototype.canStart=function(){return!0};function ih(a,b){a.Jd&&a.canStart(b)&&(a.Zd.add(b),a.defaultAnimation.isAnimating&&a.Cc(),jh(a.H),a.Ab=!0)} +function kh(a){if(a.Jd&&a.Ab){var b=a.ce,c=a.H,d=a.Zd.contains("Model");d&&(a.Nk=!0,a.Ok===gh?(b.isViewportUnconstrained=!0,b.vc.clear(),b.add(c,"position",c.position.copy().offset(0,-200),c.position),b.add(c,"opacity",0,1)):a.Ok===lh&&b.vc.clear(),a.Rw=a.Ok===mh&&c.du.D(c.pa)?!0:!1,c.S("InitialAnimationStarting",a));d&&!a.Gh||0===b.vc.count?(a.Zd.clear(),a.Ab=!1,b.vc.clear(),nh(b,c),a.Nk=!1,c.N()):(a.Zd.clear(),c.kg=!1,d=b.vc.get(c),c.autoScale!==oh&&null!==d&&(delete d.start.scale,delete d.end.scale), +x.requestAnimationFrame(function(){!1===a.Ab||b.cc||(c.Gf("temporaryPixelRatio")&&Ie(c),ph(c),a.Ab=!1,b.start(),b.cc&&(qh(a),c.Ya(),rh(b,0),yf(c,!0),sh(a),c.S("AnimationStarting",a)))}))}}function th(a){return a.Zd.contains("Trigger")&&1===a.Zd.count}function uh(a,b,c,d){a.isTicking||th(a)||b instanceof T&&(null!==b.fromNode||null!==b.toNode)||a.ce.add(b,"position",c,d,!1)}t=dh.prototype;t.gv=function(a){return this.ce.gv(a)};t.Yu=function(a){return this.ce.Yu(a)}; +function Hh(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 hh(){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 ob;b.add("position:diagram",a);b.add("position",a);b.add("position:part",function(a,b,e,f,g,h){ga&&xa(a,">= 1",fh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, -isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});fh.prototype.stopAnimation=fh.prototype.Cc; -var Ph=null,gh=!1,ih=new E(fh,"Default",1),oh=new E(fh,"AnimateLocations",2),nh=new E(fh,"None",3);fh.className="AnimationManager";fh.defineAnimationEffect=function(a,b){gh||(hh(),gh=!0);Ph.add(a,b)};fh.Default=ih;fh.AnimateLocations=oh;fh.None=nh; -function jh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}jh.prototype.suspend=function(){this.Wk=!0};jh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);sh(this.Yd);yf(this.H);uh(this.Yd);this.H.redraw()}; -function ph(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a&&xa(a,">= 1",dh,"duration");this.Dg=a}},isAnimating:{get:function(){return this.cc}}, +isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Ok},set:function(a){this.Ok=a}}});dh.prototype.stopAnimation=dh.prototype.Cc; +var Ph=null,eh=!1,gh=new E(dh,"Default",1),mh=new E(dh,"AnimateLocations",2),lh=new E(dh,"None",3);dh.className="AnimationManager";dh.defineAnimationEffect=function(a,b){eh||(fh(),eh=!0);Ph.add(a,b)};dh.Default=gh;dh.AnimateLocations=mh;dh.None=lh; +function hh(a){this.vu=this.Ow=this.Yd=this.H=null;this.Wk=this.cc=this.j=!1;this.cn=this.Qd=0;this.Lp=this.ot=Qh;this.Vk=this.ho=!1;this.cu=1;this.au=0;this.Gd=this.Dg=NaN;this.hw=0;this.dn=null;this.o=pb;this.vc=new ob;this.Tt=new ob;this.yl=new H;this.Ut=new H;this.ew=Rh;a&&Object.assign(this,a)}hh.prototype.suspend=function(){this.Wk=!0};hh.prototype.advanceTo=function(a,b){b&&(this.Wk=!1);this.ho&&a>=this.Gd&&(this.Vk=!0,a-=this.Gd);this.hw=a;Ih(this,!0);qh(this.Yd);yf(this.H);sh(this.Yd);this.H.redraw()}; +function nh(a,b){a.Tt.clear();a.Vk=!1;a.au=0;a.Gd=NaN;0a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} -function th(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; -t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;sh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: -h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Xe(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);uh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),ph(this,null),c.Ml(this),b.ac())}}; +function Ih(a,b){if(!a.Wk||b){var c=a.Yd;if(!1!==a.cc){var d=+new Date,e=d>a.cn?a.Gd:d-a.Qd;b&&(e=a.hw,ea.cn&&(a.ho&&!a.Vk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Vk=!0):a.Ml(!1))}}} +function rh(a,b){for(var c=a.Gd,d=a.vc.iterator,e=a.Vk;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=Ph,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.Lp,b,c,a)}}}t.stop=function(){if(!this.cc)return this;this.Ml(!0);return this}; +t.Ml=function(a){null!==this.vu&&this.vu.jo.remove(this.Ow);if(this.cc){var b=this.H,c=this.Yd;this.Wk=this.cc=c.Nk=!1;qh(c);for(var d=this.vc,e=this.yl.iterator;e.next();)b.remove(e.value);for(e=this.Ut.iterator;e.next();)e.value.v();e=this.ho;d=d.iterator;for(var f=Ph;d.next();){var g=d.key,h=d.value,k=e?h.end:h.start,l=e?h.start:h.end,m=h.Lu,n;for(n in l)if(null!==f.get(n)){var p=n;!h.Iu||"position:nodeCollapse"!==p&&"position:placeholder"!==p||(p="position");f.get(p)(g,k[n],void 0!==m[n]?m[n]: +h.Iu?k[n]:l[n],this.Lp,this.Gd,this.Gd,this)}h.Iu&&void 0!==m.location&&g instanceof U&&(g.location=m.location);h.ov&&g instanceof U&&g.$b(!1)}b.As.clear();Ze(b,!1);b.Ya();b.N();yf(b,!0);if(c.defaultAnimation===this){for(n=c.pr.iterator;n.next();)e=n.value,null!==e.Tg&&(e.points=e.Tg,e.Tg=null);c.pr.clear()}yf(b,!0);this.isViewportUnconstrained&&(b.scrollMode=this.ew);sh(c);this.au++;!a&&this.cu>this.au?(this.Vk=!1,this.start()):(this.dn&&this.dn(this),nh(this,null),c.Ml(this),b.ac())}}; t.Cj=function(a,b){var c=b.actualBounds,d=null;b instanceof pf&&(d=b.placeholder);null!==d?(c=d.ga(sc),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 pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Cj(d,b)}; t.Aj=function(a,b){if(a.isVisible()){var c=null;b instanceof pf&&(c=b.placeholder);if(null!==c){var d=c.ga(sc);c=c.padding;d.x+=c.left;d.y+=c.top;this.add(a,"position:placeholder",a.position,d,!0)}else this.add(a,"position:nodeCollapse",a.position,b,!0);this.add(a,"scale",a.scale,.01,!0);d=this.vc;d.contains(a)&&(d.I(a).ov=!0);if(a instanceof pf)for(a=a.memberParts;a.next();)d=a.value,d instanceof V&&this.Aj(d,b)}};t.Fz=function(a){var b=this.Tt.get(a);null===b&&(b={},this.Tt.add(a,b));return b}; -ma.Object.defineProperties(jh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",jh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}jh.className="Animation";jh.EaseLinear=function(a,b,c,d){return c*a/d+b};jh.EaseInOutQuad=Qh;jh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};jh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};jh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};jh.EaseOutExpo=Sh; +ma.Object.defineProperties(hh.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&xa(a,">= 1",hh,"duration");this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}function Sh(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b}hh.className="Animation";hh.EaseLinear=function(a,b,c,d){return c*a/d+b};hh.EaseInOutQuad=Qh;hh.EaseInQuad=function(a,b,c,d){return c*(a/=d)*a+b};hh.EaseOutQuad=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};hh.EaseInExpo=function(a,b,c,d){return 0===a?b:c*Math.pow(2,10*(a/d-1))+b};hh.EaseOutExpo=Sh; function Yh(a,b,c){this.start=a;this.end=b;this.Lu={};this.Iu=c;this.ov=!1}Yh.className="AnimationState";function Zh(a,b,c){this.xd=null;this.rf=a;this.so=c||$h;this.tk=null;void 0!==b&&(this.tk=b,void 0===c&&(this.so=ai))}Zh.prototype.copy=function(){var a=new Zh(this.rf);a.so=this.so;var b=this.tk;if(null!==b){var c={};void 0!==b.duration&&(c.duration=b.duration);void 0!==b.finished&&(c.finished=b.finished);void 0!==b.easing&&(c.easing=b.easing);a.tk=c}return a}; function bi(a,b){a=a.tk;null!==a&&(a.duration&&(b.duration=a.duration),a.finished&&(b.finished=a.finished),a.easing&&(b.easing=a.easing))}ma.Object.defineProperties(Zh.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.tk},set:function(a){this.tk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}}); var $h=new E(Zh,"Default",1),ai=new E(Zh,"Immediate",2),ci=new E(Zh,"Bundled",3);Zh.className="AnimationTrigger";Zh.Default=$h;Zh.Immediate=ai;Zh.Bundled=ci;function di(a){Qa(this);this.H=null;this.Pa=new F;this.xa="";this.pb=1;this.o=!1;this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0;this.Zq=[];a&&Object.assign(this,a)}t=di.prototype; t.clear=function(){for(var a=this.Pa,b=0;b=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof te?g++:c++}h="";0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Pa.iterator;h.next();){var k=h.value;k instanceof pf?e++:k instanceof V?d++:k instanceof T?f++:k instanceof we?g++:c++}h="";0c.Oq||h.height*e>c.Oq?b.hc(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&&(ji(b,a,b.areaBackground,!0,!0,f,e),a.fillRect(e.x,e.y,e.width,e.height)),null===b.areaBackground&&null===b.background&&(ji(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),ji(b,a,b.background,!0,!1,f,e),a.fillRect(0,0,f.width/2,f.height/2),c.ws()||(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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(ce,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; +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.Vc(!0))}};t.g=function(a,b,c,d,e){var f=this.diagram;null!==f&&f.cb(de,a,this,b,c,d,e)};t.oi=function(a,b,c){var d=this.Pa;b.Ig=this;null===this&&ei(b);if(a>=d.count)a=d.count;else if(d.M(a)===b)return-1;d.Hb(a,b);b.Vo(c);d=this.diagram;null!==d&&(c?d.N():d.oi(b));ki(this,a,b);return a}; t.qc=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.qc(a,b,c);var d=this.Pa;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.Wo(c);d.mb(a);d=this.diagram;null!==d&&(c?d.N():d.qc(b));b.Ig=null;ei(b);return a}; function ki(a,b,c){b=li(a,b,c);if(c instanceof pf&&null!==c&&isNaN(c.zOrder)){if(0!==c.memberParts.count){for(var d=-1,e=a.Pa.s,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.mb(b);a.Hb(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.mb(b);a.Hb(h,c);return h}for(k=NaN;++h< @@ -587,135 +587,135 @@ a&&(this.j=a,null!==this.diagram&&this.diagram.Ya())}},allowCopy:{get:function() a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var b=this.Hi;b!==a&&(this.Hi=a,this.g("allowGroup",b,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var b=this.Qi;b!==a&&(this.Qi=a,this.g("allowUngroup",b,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var b=this.Ii;b!==a&&(this.Ii=a,this.g("allowLink",b,a))}},allowRelink:{get:function(){return this.Ki}, set:function(a){var b=this.Ki;b!==a&&(this.Ki=a,this.g("allowRelink",b,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var b=this.Ji;b!==a&&(this.Ji=a,this.g("allowMove",b,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var b=this.Li;b!==a&&(this.Li=a,this.g("allowReshape",b,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var b=this.Mi;b!==a&&(this.Mi=a,this.g("allowResize", b,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var b=this.Ni;b!==a&&(this.Ni=a,this.g("allowRotate",b,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var b=this.Oi;b!==a&&(this.Oi=a,this.g("allowSelect",b,a))}}});di.prototype.findObjectsNear=di.prototype.og;di.prototype.findObjectsIn=di.prototype.Cf;di.prototype.findObjectsAt=di.prototype.ji;di.prototype.findObjectAt=di.prototype.jc;di.className="Layer"; -function Q(a,b){mi||(ni(),mi=!0);Qa(this);ke=this;this.wb=!0;this.Ka=null;this.ya=this.Aa=0;this.ta=null;if(Ng){var c=this,d=function(){c.removeEventListener(x.document,"DOMContentLoaded",d,!1);c.setRTL()};null!==x.document.body?this.setRTL():c.addEventListener(x.document,"DOMContentLoaded",d,!1)}this.ol=null;oi.add("Model",pi);var e=this;this.Ib=function(a){var b=e.partManager;if(a.model===b.diagram.model&&b.diagram.aa){b.diagram.aa=!1;try{var c=a.change;""===a.modelChange&&c===ce&&b.updateDataBindings(a.object, -a.propertyName)}finally{b.diagram.aa=!0}}};this.Oc=function(a){e.partManager.doModelChanged(a)};this.hu=this.ku=null;qi(this);this.model=ri();this.Wg=!0;si(this);this.layout=new ti;this.Wg=!1;this.bk=this.dk=this.ek=this.ck=this.ui=this.bA=this.Zj=this.Pv=null;this.gk=function(){};this.preventDefault=null;this.rn=!1;this.Yf=new ui;void 0!==a&&("string"===typeof a||x.Element&&a instanceof Element?vi(this,a):b=a);this.wb=!1;b&&this.nm(b);return this}var wi,ke; -function qi(a){a.Yd=new fh;a.Yd.Xe(a);a.Eb=17;a.Hw=!1;a.tn=!1;a.bu="default";a.Wa=new F;a.pj=new ob;a.nl="default";a.Ux();a.Tx();a.pb=1;a.pa=(new J(NaN,NaN)).freeze();a.du=new J(NaN,NaN);a.Ca=1;a.Pp=1;a.zt=(new J(NaN,NaN)).freeze();a.At=NaN;a.Ot=1E-4;a.Mt=100;a.Bb=new ld;a.zu=(new J(NaN,NaN)).freeze();a.ut=(new N(NaN,NaN,NaN,NaN)).freeze();a.rj=(new dc(0,0,0,0)).freeze();a.sj=Rh;a.nu=!1;a.Zt=null;a.fu=null;a.yh=qh;a.yk=Sc;a.Fg=qh;a.pq=Sc;a.yt=sc;a.Bt=sc;a.Fc=!0;a.pn=!1;a.De=new H;a.Eh=new ob;a.Xm= -!0;a.vp=250;a.uk=-1;a.xp=(new dc(16,16,16,16)).freeze();a.kg=!1;a.Ik=!1;a.fn=!0;a.bq=new Zd;a.bq.diagram=a;a.Qg=new Zd;a.Qg.diagram=a;a.cj=new Zd;a.cj.diagram=a;a.zg=null;a.pf=null;a.qu=!1;xi(a);a.ai=new H;a.Ht=!0;a.uu=yi;a.qw=!1;a.wu=Df;a.it="auto";a.Op="auto";a.zh=null;a.Fh=null;a.Bh=null;a.Qh=null;a.Oh=null;a.Nh=null;a.Qt=null;a.Lh=null;a.xt=!1;a.Mh=null;a.Ph=null;a.$h=null;a.Ch=null;a.Rt=!1;a.Yt={};a.oj=[null,null];a.Wg=!1;a.Jw=!1;a.ou=!1;a.lt=!1;a.sw=!0;a.ld=!1;a.$i=!1;a.Uw=!0;a.Ce=-2;a.Og=new ob; -a.Xn=new F;a.Gg=!1;a.Jd=!0;a.Us=!0;a.Fi=!0;a.Gi=!0;a.Vs=!1;a.Ws=!0;a.Pi=!0;a.Hi=!0;a.Qi=!0;a.Ys=!0;a.Ii=!0;a.Ki=!0;a.Ji=!0;a.Li=!0;a.Mi=!0;a.Ni=!0;a.Oi=!0;a.Zs=!0;a.at=!0;a.rw=!1;a.Uk=!1;a.mn=!0;a.nn=!0;a.Xs=!0;a.$s=!0;a.iu=16;a.mu=16;a.qr=!1;a.gu=!1;a.lu=0;a.ju=0;a.zb=(new dc(5)).freeze();a.Iw=(new H).freeze();a.Nt=999999999;a.ow=(new H).freeze();a.Zi=!0;a.Ee=!0;a.vd=!0;a.Be=!1;a.gf=!1;a.xh=!0;a.hf=!1;a.ty=new H;a.pw=new H;a.Xh=null;a.bw=new L(8,8);a.cw=999;a.Cw=1;a.Kw=0;a.gc={scale:1,position:new J, -bounds:new N,Qy:new L,cA:new L,Pz:!1};a.gc.canvasSize=a.gc.Qy;a.gc.newCanvasSize=a.gc.cA;a.gc.isScroll=!1;a.Sw=(new N(NaN,NaN,NaN,NaN)).freeze();a.wo=(new L(NaN,NaN)).freeze();a.Sp=(new N(NaN,NaN,NaN,NaN)).freeze();a.It=!1;a.Lg=new ob;var b=new V,c=new Pg;c.bind(new Gi("text","",Ia));b.add(c);a.oy=b;a.Lg.add("",b);b=new V;c=new Pg;c.stroke="brown";c.bind(new Gi("text","",Ia));b.add(c);a.Lg.add("Comment",b);b=new V;b.selectable=!1;b.avoidable=!1;c=new Bf;c.figure="Ellipse";c.fill="black";c.stroke= -null;c.desiredSize=(new L(3,3)).ja();b.add(c);a.Lg.add("LinkLabel",b);a.Yi=new ob;b=new pf;b.selectionObjectName="GROUPPANEL";b.type=W.Vertical;c=new Pg;c.font="bold 12pt sans-serif";c.bind(new Gi("text","",Ia));b.add(c);c=new W(W.Auto);c.name="GROUPPANEL";var d=new Bf;d.figure="Rectangle";d.fill="rgba(128,128,128,0.2)";d.stroke="black";c.add(d);d=new ig;d.padding=(new dc(5,5,5,5)).ja();c.add(d);b.add(c);a.my=b;a.Yi.add("",b);a.Kh=new ob;b=new T;c=new Bf;c.isPanelMain=!0;b.add(c);c=new Bf;c.toArrow= -"Standard";c.fill="black";c.stroke=null;c.strokeWidth=0;b.add(c);a.ny=b;a.Kh.add("",b);b=new T;c=new Bf;c.isPanelMain=!0;c.stroke="brown";b.add(c);a.Kh.add("Comment",b);b=new te;b.type=W.Auto;c=new Bf;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);c=new ig;c.margin=(new dc(1.5,1.5,1.5,1.5)).ja();b.add(c);a.St=b;a.wt=b;b=new te;b.type=W.Link;c=new Bf;c.isPanelMain=!0;c.fill=null;c.stroke="dodgerblue";c.strokeWidth=3;b.add(c);a.Kt=b;a.fe=null;a.mq=!1;a.Bk=null;a.partManager=new pi;a.toolManager= -new La;a.toolManager.initializeStandardTools();a.defaultTool=a.toolManager;a.currentTool=a.defaultTool;a.nt=null;a.Wm=new Be;a.Vt=null;a.Wt=null;a.Mr=!1;a.commandHandler=Ii();a.eq=null;a.fq=tb;a.Qw=!1;a.Nb=1;a.Yh=null;a.Oq=1;a.Sq=0;a.Aw=[0,0,0,0,0];a.Tq=0;a.yq=1;a.uw=0;a.vw=new J;a.Ay=500;a.wp=new J;a.wq=!1}Q.prototype.clear=function(){this.animationManager.Cc();this.model.clear();Ji=null;Ki="";Li(this,!1);this.Xn.clear();Mi();this.Og.clear();this.Xh=null;this.Ya();this.Va();this.N()}; -function Li(a,b){a.animationManager.Cc(!0);a.Iw=(new H).freeze();a.ow=(new H).freeze();var c=a.skipsUndoManager,d=null!==a.dc&&void 0!==a.dc;d&&(a.skipsUndoManager=!0);var e=null;null!==a.fe&&(e=a.fe.part,null!==e&&a.remove(e));var f=[],g=a.Wa.length;if(b){for(b=0;b=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; -function vi(a,b){if(Ng){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); -a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Pi(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= -"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Qi(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Pi(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Ng){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= -"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Ri;e.addEventListener("pointerdown",Si);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){rh(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Ti(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 -Math.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=0c|| -Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Ui(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Vi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, -b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;Wi(a,f,c);c.targetObject=null;a.doMouseMove();Ui(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== -b.pointerId&&(d[1]=null);else{d[0]=null;d=Vi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&Wi(e.H,b,d);null===e&&(e=b.target);Wi(a,b,d);d.clickCount=a.yq;d.targetDiagram=Xi(b,e);d.targetObject=null;a.doMouseUp();Ui(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; -c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+Yi[1]+Yi[2]+"wI"+Zi.slice(1,5)]["b"+$i.slice(1,b)](d.Z,aj,b,b);d.Vc(!0);bj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), +Q.prototype.setScrollWidth=function(a){a=void 0===a?this.div:a;null===a&&(a=x.document.body);var b=0;if(Lg){var c=Si;b=wi;null===c&&(c=Si=ua("p"),c.style.width="100%",c.style.height="200px",c.style.boxSizing="content-box",b=wi=ua("div"),b.style.position="absolute",b.style.visibility="hidden",b.style.width="200px",b.style.height="150px",b.style.boxSizing="content-box",b.appendChild(c));b.style.overflow="hidden";a.appendChild(b);var d=c.offsetWidth;b.style.overflow="scroll";c=c.offsetWidth;d===c&&(c= +b.clientWidth);a.removeChild(b);b=d-c;0!==b||Pa||(b=11)}this.Eb=b;this.Hw=!0};Q.prototype.qb=function(a){a.classType===Q&&(this.autoScale=a)};Q.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.div&&this.div.id&&(b=this.div.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.Wa.iterator;c.next();)b+="\n "+c.value.toString(a-1);return b}; +function vi(a,b){if(Lg){void 0!==b&&null!==b||C("Diagram setup requires an argument DIV.");null!==a.Ka&&C("Diagram has already completed setup.");"string"===typeof b?a.Ka=x.document.getElementById(b):b instanceof HTMLDivElement?a.Ka=b:C("No DIV or DIV id supplied: "+b);null===a.Ka&&C("Invalid DIV id; could not get element with id: "+b);void 0!==a.Ka.H&&C("Invalid div id; div already has a Diagram associated with it.");if(!a.ol&&x.ResizeObserver){var c=sa(function(){a.ac()},250);a.ol=new x.ResizeObserver(function(){c()}); +a.ol.observe(a.Ka)}"static"===x.getComputedStyle(a.Ka,null).position&&(a.Ka.style.position="relative");b=5;var d="rgba(2"+b+"5, 255, 255, 0)";b--;a.Ka.style["-webkit-tap-highlight-color"]=d;a.Ka.innerHTML="";a.Ka.H=a;a.Ka.goDiagram=a;a.Ka.go=x.go;var e=new Ti(a);void 0!==e.style&&(e.style.position="absolute",e.style.top="0px",e.style.left="0px","rtl"===x.getComputedStyle(a.Ka,null).getPropertyValue("direction")&&(a.tn=!0),e.style.zIndex="2",e.style.userSelect="none",e.style.MozUserSelect="none",e.style.touchAction= +"none",e.style.letterSpacing="normal !important",e.style.wordSpacing="normal !important");a.ta=e;a.ib=e.context;d=a.ib;a.Nb=a.computePixelRatio();a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1);Ui(a,a.Aa,a.ya);a.Ka.insertBefore(e.Oa,a.Ka.firstChild);e=new Ti(null);e.width=1;e.height=1;a.kw=e;a.py=e.context;if(Lg){e=ua("div");var f=ua("div");e.style.position="absolute";e.style.overflow="auto";e.style.width=a.Aa+"px";e.style.height=a.ya+"px";e.style.zIndex="1";f.style.position= +"absolute";f.style.width="1px";f.style.height="1px";a.Ka.appendChild(e);e.appendChild(f);e.onscroll=Vi;e.addEventListener("pointerdown",Wi);e.H=a;e.vy=!0;e.wy=!0;a.ku=e;a.hu=f}a.gk=sa(function(){a.Yh=null;a.N()},300);a.Pv=sa(function(){ph(a)},250);a.preventDefault=function(a){a.preventDefault();return!1};a.Zj=function(b){if(a.isEnabled){var c=Xi(a,b,!0);c.bubbles=!0;var d=0,e=0;c.delta=0;void 0!==b.deltaX?(0!==b.deltaX&&(d=0 +Math.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=0c|| +Math.abs(e.y-b.screenY)>c)?a.yq++:a.yq=1;d.clickCount=a.yq;a.uw=b.timeStamp;a.vw.sg(b.screenX,b.screenY);a.doMouseDown();1===b.button?b.preventDefault():Yi(d,b)}};a.ck=function(b){if(a.isEnabled){a.Uk=!0;var c=a.oj;if(null===c[0]||c[0].pointerId!==b.pointerId&&c[0].pointerType===b.pointerType){if(null!==c[1]&&c[1].pointerId===b.pointerId){c[1]=b;return}if(null===c[0])c[0]=b;else return}else c[0]=b;if(c[0].pointerId===b.pointerId){c=Zi(a,b,!1,!1,!1,null!==c[1]);var d=x.document.elementFromPoint(b.clientX, +b.clientY)||null;null!==d&&void 0!==d.shadowRoot&&null!==d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(b.clientX,b.clientY));var e=a,f=b;d&&d.H&&(f=b,e=d.H);c.targetDiagram=e;$i(a,f,c);c.targetObject=null;a.doMouseMove();Yi(c,b)}}};a.ek=function(b){if(a.isEnabled){a.Uk=!0;var c="touch"===b.pointerType||"pen"===b.pointerType,d=a.Yt;if(c&&a.qu)delete d[b.pointerId],b.preventDefault();else if(d=a.oj,null===d[0]||d[0].pointerId!==b.pointerId&&d[0].pointerType===b.pointerType)null!==d[1]&&d[1].pointerId=== +b.pointerId&&(d[1]=null);else{d[0]=null;d=Zi(a,b,!1,!0,!0,!1);var e=x.document.elementFromPoint(b.clientX,b.clientY)||null;null!==e&&void 0!==e.shadowRoot&&null!==e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(b.clientX,b.clientY));null!==e&&e.H instanceof Q&&e.H!==a&&$i(e.H,b,d);null===e&&(e=b.target);$i(a,b,d);d.clickCount=a.yq;d.targetDiagram=aj(b,e);d.targetObject=null;a.doMouseUp();Yi(d,b);c&&(a.wq=!1)}}};a.dk=function(b){if(a.isEnabled){a.Uk=!1;var c=a.Yt;c[b.pointerId]&&delete c[b.pointerId]; +c=a.oj;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.bk=function(b){var c=a.oj;null!==c[0]&&c[0].pointerId===b.pointerId?(c[0]=null,a.wq=!1):null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null)};a.Vp=d.Z["d"+bj[1]+bj[2]+"wI"+cj.slice(1,5)]["b"+dj.slice(1,b)](d.Z,ej,b,b);d.Vc(!0);fj(a);"svg"===a.nl&&(b=a.pj.get("svg"),a.Ka.appendChild(b.Oa), a.ib=b.context)}}Q.prototype.addEventListener=function(a,b,c,d){a.addEventListener(b,c,{capture:d,passive:!1})};Q.prototype.removeEventListener=function(a,b,c,d){a.removeEventListener(b,c,{capture:d})}; -function bj(a){var b=a.ta.Oa;b instanceof HTMLCanvasElement||(b=a.div);a.addEventListener(b,"pointerdown",a.ui,!1);a.addEventListener(b,"pointermove",a.ck,!1);a.addEventListener(b,"pointerup",a.ek,!1);a.addEventListener(b,"pointerout",a.dk,!1);a.addEventListener(b,"pointercancel",a.bk,!1);a.addEventListener(b,"pointerenter",a.cz,!1);a.addEventListener(b,"pointerleave",a.dz,!1);a.addEventListener(b,"wheel",a.Zj,!1);a.addEventListener(b,"keydown",a.Rz,!1);a.addEventListener(b,"keyup",a.Sz,!1);a.addEventListener(b, -"blur",a.Oy,!1);a.addEventListener(b,"focus",a.Py,!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(x,"resize",a.Pv,!1)}function Fe(a){30r&&(this.position=w.h(-(b.scrollWidth-this.Aa)+v-this.Aa/e+m,this.position.y))),a.wy&&this.allowVerticalScroll&&(hu&&(this.position= -w.h(this.position.x,-(b.scrollHeight-this.ya)+a.scrollTop-this.ya/e+f))),J.free(w),this.vd=!0,this.Ee=this.qr=!1,d=this.documentBounds,e=this.viewportBounds,m=d.right,r=e.right,f=d.bottom,u=e.bottom,g=d.x,n=e.x,h=d.y,d=e.y,p>=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);lh(this);return ej(this,a)}; -function ej(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;f=k&&g>=n&&m<=r&&(c.style.width="1px"),q>=l&&h>=d&&f<=u&&(c.style.height="1px"))}};Q.prototype.computeBounds=function(a){void 0===a&&(a=new N);jh(this);return ij(this,a)}; +function ij(a,b){if(a.fixedBounds.w())return b.assign(a.fixedBounds),b.Co(a.zb),b;for(var c=!0,d=a.Wa.s,e=d.length,f=0;fc&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===jj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} -Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=gj(this,ij);a!==Rh&&(fj(this,!1),hj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; -t.CA=function(a,b){void 0===b&&(b=ij);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===ij||b===jj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===jj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; +function jj(a,b){if((b||a.hf)&&!a.wb&&null!==a.ta&&a.documentBounds.w()){a.wb=!0;if(b){var c=a.initialPosition;if(c.w()){a.wb=!1;a.position=c;return}c=J.alloc();c.xi(a.documentBounds,a.initialDocumentSpot);var d=a.viewportBounds;d=N.allocAt(0,0,d.width,d.height);var e=J.alloc();e.xi(d,a.initialViewportSpot);e.h(c.x-e.x,c.y-e.y);a.position=e;N.free(d);J.free(e);J.free(c)}c=a.yh;b&&a.Fg!==oh&&(c=a.Fg);var f=c!==oh?kj(a,c):a.scale;c=a.pa.x;d=a.pa.y;e=a.Aa/f;var g=a.ya/f,h=a.yk,k=a.pq;b&&!h.sb()&&(k.sb()|| +k.Yb())&&(h=k.Yb()?wc:k);lj(a,a.documentBounds,e,g,h,b);b=a.scale;a.scale=f;a.wb=!1;f=a.viewportBounds;if(!(K.B(f.x,c)&&K.B(f.y,d)&&K.B(f.width,e)&&K.B(f.height,g)))a.onViewportBoundsChanged(new N(c,d,e,g),f,b,!1)}} +function kj(a,b){var c=a.Pp;if(null===a.ta)return c;a.Va();var d=a.documentBounds;if(!d.w())return c;var e=d.width;d=d.height;var f=a.Aa+(a.gf?a.Eb:0),g=a.ya+(a.Be?a.Eb:0),h=f/e,k=g/d;return b===mj?(b=Math.min(k,h),b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):b===nj?(b=k>h?(g-a.Eb)/d:(f-a.Eb)/e,b>c&&(b=c),ba.maxScale&&(b=a.maxScale),b):a.scale} +Q.prototype.zoomToFit=function(){var a=this.sj;this.sj=Rh;this.scale=kj(this,mj);a!==Rh&&(jj(this,!1),lj(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.yk,!1));this.sj=a};t=Q.prototype; +t.CA=function(a,b){void 0===b&&(b=mj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===mj||b===nj)if(isNaN(c))e=this.viewportBounds.height*this.scale/d;else if(isNaN(d))e=this.viewportBounds.width*this.scale/c;else{e=this.Aa;var f=this.ya;e=b===nj?f/d>e/c?(f-(this.Be?this.Eb:0))/d:(e-(this.gf?this.Eb:0))/c:Math.min(f/d,e/c)}this.scale=e;this.position=new J(a.x,a.y)}}; t.Ky=function(a,b){this.Va();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.Az=function(a){if(a instanceof Y){this.eq=a;var b=J.alloc();this.fq=this.op(a.ga(sc,b));J.free(b)}else this.eq=null,this.fq=tb}; -function hj(a,b,c,d,e,f){var g=J.allocAt(a.pa.x,a.pa.y),h=g.x,k=g.y;if(null!==a.eq){var l=J.alloc();l=a.eq.ga(sc,l);h=l.x-a.fq.x/a.scale;k=l.y-a.fq.y/a.scale;e=rc;J.free(l)}if(f||a.scrollMode===Rh)e.sb()&&(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.rj,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.rj,f=c-b.width,cb.left?h=b.left:hb.top?k=b.top:kb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} -t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&tj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof te&&c.isVisible()&&(c.si()?(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 pf?(uj(f)||vj(f)||wj(f))&&tj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eb;b++){var c=a.De.iterator;if(null===c||0===a.De.count)break;a.De=new H;a.Ov(c,a.De)}a.nodes.each(function(a){a instanceof pf&&0!==(a.R&65536)!==!1&&(a.R=a.R^65536)})}} +t.Ov=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Zc()||c instanceof pf||(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof pf&&c.isVisible()&&xj(this,c);for(a.reset();a.next();)c=a.value,c instanceof T&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof we&&c.isVisible()&&(c.si()?(c.measure(Infinity,Infinity),c.arrange()):b.add(c))}; +function xj(a,b){for(var c=Ea(),d=Ea(),e=b.memberParts;e.next();){var f=e.value;f.isVisible()&&(f instanceof pf?(yj(f)||zj(f)||Aj(f))&&xj(a,f):f instanceof T?f.fromNode===b||f.toNode===b?d.push(f):c.push(f):(f.measure(Infinity,Infinity),f.arrange()))}a=c.length;for(e=0;eB&&(v=M.left, +Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));xb(m,u);xb(q,u);d.push(new N(Math.min(m.x,q.x),Math.min(m.y,q.y),Math.abs(m.x-q.x),Math.abs(m.y-q.y)));Ej(this.Yf,this)&&(e=0B&&(v=M.left, y=M.right),w.height>D&&(z=M.top,A=M.bottom)):(v=M.left,y=M.right,z=M.top,A=M.bottom);var S=w.width+v+y,R=w.height+z+A;M=a.scale;var I=S>k/M,G=R>l/M;if(!(f||a.gf||a.Be||I||G))return!0;v=w.x-v;k=m.x;y=w.right+y;l=m.right+g;z=w.y-z;var ca=m.y;w=w.bottom+A;m=m.bottom+h;var X="1px";A="1px";a.scrollMode===Rh&&(I||G)&&(I&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(I=1,v+1l+1&&(I=Math.max((y-l)*M+a.Aa,I)),B+g+1m+1&&(I=Math.max((w-m)*M+a.ya,I)),D+h+1l+1&&(g=Math.max((y-l)*M+a.Aa,g)),B+1m+1&&(h=Math.max((w-m)*M+g,h)),D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1l+1&&(b=a.position.x*M));if(a.tn)switch(a.bu){case "negative":b=-(r.scrollWidth-b-r.clientWidth);break;case "reverse":b=r.scrollWidth-b-r.clientWidth}r.scrollLeft=b;a.hasVerticalScrollbar&&a.allowVerticalScroll&&(D+1m+1&&(r.scrollTop=a.position.y*M));k=a.Aa;l=a.ya;r.style.width=k+(a.gf?a.Eb:0)+"px";r.style.height=l+(a.Be?a.Eb:0)+"px";return c!==k||d!==l||a.animationManager.Ab?(c=N.allocAt(e,n,p,q),a.onViewportBoundsChanged(c,a.viewportBounds,M,f),N.free(c),!1):!0}t=Q.prototype; -t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(ee,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; -t.oi=function(a){this.partManager.oi(a);var b=this;Hj(a,function(a){Ij(b,a)});(a instanceof te||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Hj(a,function(a){Jj(b.partManager,a)});!0!==vj(a)&&!0!==wj(a)||this.De.add(a);Kj(a,!0,this);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()}; -t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Hj(a,function(a){Mj(b.partManager,a,b)});this.De.remove(a);Lj(a)?(a.actualBounds.w()&&this.N(Gj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Gj(a,a.actualBounds));this.ac()};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.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(fe,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; -t.Dy=function(a,b){Tj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(fe,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; -t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(fe,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; +t.add=function(a){var b=a.diagram;if(b!==this&&(null!==b&&C("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString()),b=this.Pj(a.layerName),null===b&&(b=this.Pj("")),null===b&&C('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==b)){var c=b.oi(99999999,a,a.diagram===this);0<=c&&this.cb(fe,"parts",b,null,a,null,c);b.isTemporary||this.Ya();a.C(1);c=a.layerChanged;null!==c&&c(a,null,b)}}; +t.oi=function(a){this.partManager.oi(a);var b=this;Lj(a,function(a){Mj(b,a)});(a instanceof we||a instanceof pf&&null!==a.placeholder)&&a.v();null!==a.data&&Lj(a,function(a){Nj(b.partManager,a)});!0!==zj(a)&&!0!==Aj(a)||this.De.add(a);Oj(a,!0,this);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()}; +t.qc=function(a){a.Dj();this.partManager.qc(a);var b=this;null!==a.data&&Lj(a,function(a){Qj(b.partManager,a,b)});this.De.remove(a);Pj(a)?(a.actualBounds.w()&&this.N(Kj(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kj(a,a.actualBounds));this.ac()};t.remove=function(a){Rj(this,a,!0)}; +function Rj(a,b,c){var d=b.layer;null!==d&&d.diagram===a&&(b.isSelected=!1,b.isHighlighted=!1,b.C(2),c&&b.Kj(),c=d.qc(-1,b,!1),0<=c&&a.cb(ge,"parts",d,b,null,c,null),a=b.layerChanged,null!==a&&a(b,d,null))}t.Is=function(a,b){void 0===b&&(b=!1);if(Aa(a))for(var c=a.length,d=0;dd&&this.Ya();return this}; +t.Dy=function(a,b){Xj(this,a,b);a.Xe(this);var c=this.Wa,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.dc&&this.cb(ge,"layers",this,a,null,d,null));var e=c.count,f;for(f=0;fd&&this.Ya();return this}; +t.lA=function(a){a.diagram!==this&&C("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram);if(""!==a.name){var b=this.Wa,c=b.indexOf(a);if(b.remove(a)){for(b=a.Pa.copy().iterator;b.next();){var d=b.value,e=d.layerName;e!==a.name?d.layerName=e:d.layerName=""}null!==this.dc&&this.cb(ge,"layers",this,a,null,c,null);this.N();this.Ya()}}};t.Pj=function(a){for(var b=this.layers;b.next();){var c=b.value;if(c.name===a)return c}return null}; t.Zw=function(a){null===this.pf&&(this.pf=new F);this.pf.add(a);this.model.Pe(a);return this};t.nA=function(a){null!==this.pf&&(this.pf.remove(a),0===this.pf.count&&(this.pf=null));this.model.hk(a)};t.Pe=function(a){null===this.zg&&(this.zg=new F);this.zg.add(a);return this};t.hk=function(a){null!==this.zg&&(this.zg.remove(a),0===this.zg.count&&(this.zg=null))}; -t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==de&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==de&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= +t.ds=function(a){this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Uu(a);a.change!==ee&&(this.isModified=!0);if(null!==this.zg)for(var b=this.zg,c=b.length,d=0;dn.Pa.indexOf(q)&&n.oi(p,q,r):(q.isSelected=!1,q.isHighlighted=!1,q.Xb(),n.qc(r?p:-1,q,r)))}else n instanceof Q?"number"===typeof p&&q instanceof di&&(b?(q.Xe(this),this.Wa.Hb(p,q)):this.Wa.mb(p)):C("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else d!==ee&&C("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings= c}}};Q.prototype.Ea=function(a){return this.undoManager.Ea(a)};Q.prototype.eb=function(a){return this.undoManager.eb(a)};Q.prototype.Kf=function(){return this.undoManager.Kf()};Q.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.eb(b):this.undoManager.Kf(),this.skipsUndoManager=c}};Q.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)}; Q.prototype.rp=function(){this.partManager.rp()}; -function Yj(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ni(a),a.N(),a.Ee=!0,d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ni(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ni(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);fj(a,!1);d.Ab&&(vh(d)||d.ce.add(d.H,"scale",b,a.Ca))}} -Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==qh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),xe(e,this));this.wb||this.invalidateViewport(a,b);qj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= +function ck(a,b,c){var d=a.animationManager;if(a.wb||a.ld)a.Ca=c,Ri(a),a.N(),a.Ee=!0,d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca));else if(null===a.ta)a.Ca=c,Ri(a);else{a.wb=!0;var e=a.viewportBounds.copy(),f=a.Aa,g=a.ya,h=a.zoomPoint.x,k=a.zoomPoint.y,l=a.contentAlignment;isNaN(h)&&(l.$c()?l.Hf(Dc)?h=0:l.Hf(Ec)&&(h=f-1):h=l.sb()?l.x*(f-1):f/2);isNaN(k)&&(l.$c()?l.Hf(Cc)?k=0:l.Hf(Fc)&&(k=g-1):k=l.sb()?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.pa.x+h/b-h/c,a.pa.y+k/b-k/c);a.position=f;J.free(f);a.Ca=c;Ri(a);a.wb=!1;a.onViewportBoundsChanged(e,a.viewportBounds,b,!1);jj(a,!1);d.Ab&&(th(d)||d.ce.add(d.H,"scale",b,a.Ca))}} +Q.prototype.onViewportBoundsChanged=function(a,b,c,d){if(!a.D(b)){void 0===d&&(d=!1);d||(this.Ee=!0);this.vd=!0;var e=this.layout;null===e||!e.isViewportSized||this.autoScale!==oh||a.width===b.width&&a.height===b.height||e.C();e=this.currentTool;!0===this.Uk&&e instanceof La&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Ae(e,this));this.wb||this.invalidateViewport(a,b);uj(this);this.gc.scale=c;this.gc.position.x=a.x;this.gc.position.y=a.y;this.gc.bounds.assign(a);this.gc.canvasSize.width= Math.round(a.width*c);this.gc.canvasSize.height=Math.round(a.height*c);this.gc.newCanvasSize.width=this.Aa;this.gc.newCanvasSize.height=this.ya;this.gc.isScroll=d;this.S("ViewportBoundsChanged",this.gc,a);this.isVirtualized&&this.links.each(function(a){a.isAvoiding&&a.actualBounds.Yc(b)&&a.bb()})}}; -function qj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(Zj(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, +function uj(a,b){var c=a.fe;if(null!==c&&c.visible){for(var d=L.alloc(),e=1,f=1,g=c.O.s,h=g.length,k=0;km||(dk(l.figure)?f=f*m/K.wx(f,m):e=e*m/K.wx(e,m))}g=c.gridCellSize;d.h(f*g.width,e*g.height);if(void 0!==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.w()){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();K.No(a,g,0,0,d.width,d.height, b);b.offset(-d.width,-d.height);L.free(d);c.part.location=b;J.free(b)}}Q.prototype.clearSelection=function(a){void 0===a&&(a=!1);var b=this.selection;if(0!==b.count){a||this.S("ChangingSelection",b);for(var c=b.Fa(),d=c.length,e=0;e=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||kh(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)hk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),lh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= -!1),!b||0!==d&&1!==d||mh(f),a.aa=c}}}function hk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)hk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),tj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; +t.ms=function(a){for(var b=[],c=0;c=d&&!f.defaultAnimation.isAnimating&&!f.Ab&&(b||ih(f,"Layout"));a.xh=!1;for(var g=a.ai.iterator;g.next();)lk(a,g.value,b,d);e.isValidLayout||(!b||e.isRealtime||null===e.isRealtime||0===d?(e.doLayout(a),jh(a),e.isValidLayout=!0):a.xh=!0)}finally{b=a.undoManager.isInternalTransaction,0===d&&(a.eb("Layout"),a.undoManager.isInternalTransaction= +!1),!b||0!==d&&1!==d||kh(f),a.aa=c}}}function lk(a,b,c,d){if(null!==b){for(var e=b.fl.iterator;e.next();)lk(a,e.value,c,d);e=b.layout;null===e||e.isValidLayout||(!c||e.isRealtime||0===d?(b.rh=!b.location.w(),e.doLayout(b),b.C(32),xj(a,b),e.isValidLayout=!0):a.xh=!0)}}t.zz=function(){for(var a=new F,b=this.nodes;b.next();){var c=b.value;c.isTopLevel&&null===c.kh()&&a.add(c)}return a.iterator}; function xi(a){function b(a){var b=a.toLowerCase(),e=new F;c.add(a,e);c.add(b,e);d.add(a,a);d.add(b,a)}var c=new ob,d=new ob;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.jw=c;a.iw=d} -function Dj(a,b){var c=a.iw.I(b);return null!==c?c:a.iw.I(b.toLowerCase())}function ik(a,b){var c=a.jw.I(b);if(null!==c)return c;c=a.jw.I(b.toLowerCase());if(null!==c)return c;C("Unknown DiagramEvent name: "+b)}t.Bj=function(a,b){a=ik(this,a);null!==a&&a.add(b);return this};t.am=function(a,b){a=ik(this,a);null!==a&&a.remove(b)}; -t.S=function(a,b,c){var d=ik(this,a),e=new ae;e.diagram=this;a=Dj(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.Fa(),c=0;c=c.top&&0>=c.left&&0>=c.right&&0>=c.bottom)return b;var d=this.viewportBounds,e=this.scale;d=N.allocAt(0,0,d.width*e,d.height*e);var f=J.allocAt(0,0);if(a.x>=d.x&&a.xd.x+d.width-c.right&&this.allowHorizontalScroll&&(g=Math.max(this.scrollHorizontalLineChange, 1),g|=0,f.x+=g,a.x>d.x+d.width-c.right/2&&(f.x+=g),a.x>d.x+d.width-c.right/4&&(f.x+=4*g));a.y>=d.y&&a.yd.y+d.height-c.bottom&&this.allowVerticalScroll&&(g=Math.max(this.scrollVerticalLineChange,1),g|=0,f.y+=g,a.y>d.y+d.height-c.bottom/2&&(f.y+=g),a.y>d.y+d.height-c.bottom/4&&(f.y+=4*g));f.Xa(pb)||(b=new J(b.x+f.x/e,b.y+f.y/e)); N.free(d);J.free(f);return b};t=Q.prototype;t.Cs=function(){return null};t.bv=function(){return null};t.bs=function(a,b){this.pj.add(a,b)};t.Gu=function(a){(this.Qw=a)||this.nodes.each(function(a){a instanceof pf&&(a.$p=null)})}; -function Ek(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Ng)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; -t.Kx=function(a){void 0===a&&(a={});return Ek(this,this.Yz,a)}; -t.Yz=function(a,b,c){var d=Fk(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case Zi+"data":e=d.getImageData(0,0,c.width,c.height);break;case Zi:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== +function Hk(a,b,c){function d(){var a=+new Date;f=!0;for(g.reset();g.next();)if(!g.value[0].$k){f=!1;break}f||a-l>k?b(c,e,h):x.requestAnimationFrame(d)}for(var e=c.callback,f=!0,g=a.Og.iterator;g.next();)if(!g.value[0].$k){f=!1;break}if("function"!==typeof e||f)return b(c,e,a);var h=a,k=c.callbackTimeout||300,l=+new Date;x.requestAnimationFrame(function(){d()});return null}t.Xz=function(a){if(!Lg)return null;void 0===a&&(a={});a.returnType="Image";return this.Kx(a)}; +t.Kx=function(a){void 0===a&&(a={});return Hk(this,this.Yz,a)}; +t.Yz=function(a,b,c){var d=Ik(c,a,"canvas",null);if(null===d)return null;c=d.Z.canvas;var e=null;if(null!==c)switch(e=a.returnType,void 0===e?e="string":e=e.toLowerCase(),e){case cj+"data":e=d.getImageData(0,0,c.width,c.height);break;case cj:d=(a.document||document).createElement("img");d.src=c.toDataURL(a.type,a.details);e=d;break;case "blob":"function"!==typeof b&&C('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.');if("function"=== typeof c.toBlob)return c.toBlob(b,a.type,a.details),"toBlob";b(null);return null;default:e=c.toDataURL(a.type,a.details)}return"function"===typeof b?(b(e),null):e}; -function Fk(a,b,c,d){a.animationManager.Cc();a.bd();if(null===a.ta)return null;"object"!==typeof b&&C("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 L(Infinity,Infinity):new L(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,q=b.elementFinished||null,r=b.showTemporary; -void 0===r&&(r=!n);b=b.showGrid;void 0===b&&(b=r);null!==e&&isNaN(e.width)&&isNaN(e.height)&&(e=null);"number"===typeof l?l=new dc(l):l instanceof dc||C("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.ib.Vc(!0);n=new Pi(null,p,void 0,!0);var u=n.context;if(!(e||f||k||h)){n.width=a.Aa+Math.ceil(l.left+l.right);n.height=a.ya+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.hs=q;Bj(a,d.context,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(n.width,n.height),a.Ca,a.pa,k,m,r,b);a.Xm=!0;return n.context}var w=a.Pp,v=a.documentBounds.copy();v.Gv(a.zb);if(r)for(var y=a.Wa.s,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+=z):l=new dc(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.hs=q;Bj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Bj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} -ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Gk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Fj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, -0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Fj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), +f&&(f=w),e.w()?(e=B,v=A):isNaN(A)?(e=B,v=v.height*f):(e=v.width*f,v=A)):null!==e?e.w()?(f=Math.min(B/v.width,A/v.height),e=B,v=A):isNaN(A)?(f=B/v.width,e=B,v=v.height*f):(f=A/v.height,e=v.width*f,v=A):null!==f?"NaN"===f&&g.w()?(f=Math.min((g.width-h)/v.width,(g.height-z)/v.height),f>w?(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+=z):l=new cc(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.hs=q;Fj(a,d.context,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);return d.context}a.Xm=!1;Fj(a,u,l,new L(Math.ceil(e),Math.ceil(v)),f,y,k,m,r,b);a.Xm=!0;return n.context} +ma.Object.defineProperties(Q.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Jk||(""===a&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,"default"===a||"canvas"===a?(a=this.pj.get("svg"),null!==a&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):"svg"===a?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Jj(this,x.document),this.bs("svg",a)),null!==this.div&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Nb, +0,0,this.Nb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):"debug"!==a||this.pj.contains("SVG")||(a=new Jj(this,x.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",null!==this.div&&this.div.after(a.Oa)),this.gk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var b=this.Ka;null!==b?(b.H=void 0,b.goDiagram=void 0,b.go=void 0,b.innerHTML="",null!==this.ta&&(b=this.ta.Oa,this.removeEventListener(b,"pointermove",this.ck,!1), this.removeEventListener(b,"pointerdown",this.ui,!1),this.removeEventListener(b,"pointerup",this.ek,!1),this.removeEventListener(b,"pointerout",this.dk,!1),this.removeEventListener(b,"pointercancel",this.bk,!1),this.ta.nx()),this.ol&&(this.ol.disconnect(),this.ol=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.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),ke===this&&(ke=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, +this.ta=null,this.removeEventListener(x,"resize",this.Pv,!1),this.removeEventListener(x,"wheel",this.Zj,!0),le===this&&(le=null)):null===this.ui&&(this.hf=!1);this.Ka=null;if(null!==a){if(b=a.H)b.div=null;vi(this,a);this.gk()}}}},ax:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,null!==a&&(this.Vt=a.fromPort, this.Wt=a.toPort))}},Nx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Ox:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.dc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a;this.dc.skipsUndoManager= a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var b=this.pb;b!==a&&((0>a||1a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= +set:function(a){var b=this.at;b!==a&&(this.at=a,this.g("allowZoom",b,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var b=this.nn;b!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",b,a),jj(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var b=this.mn;b!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",b,a),jj(this,!1))}},allowHorizontalScroll:{ +get:function(){return this.Xs},set:function(a){var b=this.Xs;b!==a&&(this.Xs=a,this.g("allowHorizontalScroll",b,a),jj(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var b=this.$s;b!==a&&(this.$s=a,this.g("allowVerticalScroll",b,a),jj(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var b=this.iu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollHorizontalLineChange"),this.iu= a,this.g("scrollHorizontalLineChange",b,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var b=this.mu;b!==a&&(0>a&&xa(a,">= 0",Q,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",b,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{ get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){""===a&&(a=this.Op);if(this.it!==a){var b=this.ta,c=this.Ka;if(null!==b&&null!==c){this.it=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.Op},set:function(a){""===a&&(a="auto");var b=this.Op;b!==a&&(this.Op=a,this.g("defaultCursor",b,a))}},click:{get:function(){return this.zh},set:function(a){var b=this.zh;b!==a&&(this.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var b=this.Fh;b!==a&&(this.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ @@ -784,29 +784,29 @@ set:function(a){var b=this.Ch;b!==a&&(this.Ch=a,this.g("contextMenu",b,a))}},com a))}},currentTool:{get:function(){return this.hb},set:function(a){var b=this.hb;b&&(b.isActive&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.defaultTool);null!==a&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Iw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var b=this.Nt;if(b!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount", b,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Q,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var b=this.St;b!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",b,a))}},groupSelectionAdornmentTemplate:{ get:function(){return this.wt},set:function(a){var b=this.wt;b!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",b,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var b=this.Kt;b!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",b,a))}},highlighteds:{get:function(){return this.ow}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?null!==a.currentTransaction? -!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var b=this.undoManager;!a&&b.isEnabled&&(this.Ce=b.historyIndex);a||ak(this)}}},model:{get:function(){return this.dc},set:function(a){var b=this.dc;if(b!==a){this.currentTool.doCancel();b&&b.undoManager!==a.undoManager&&b.undoManager.isInTransaction&&C("Do not replace a Diagram.model while a transaction is in progress.");this.animationManager.Cc(!0);var c=Li(this,!0);this.hf=!1;this.fn= -!0;this.Ce=-2;this.kg=!1;var d=this.wb;this.wb=!0;kh(this.animationManager,"Model");b&&(null!==this.pf&&this.pf.each(function(a){return b.hk(a)}),b.hk(this.Oc));this.dc=a;this.partManager=bk(this.dc.type);for(var e=0;ethis.scale&&(this.scale=a)):xa(a,"> 0",Q,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var b=this.Mt;b!==a&&(0 0",Q,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.yk}, -set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),fj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ +set:function(a){var b=this.yk;b.D(a)||(this.yk=a=a.J(),this.g("contentAlignment",b,a),jj(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var b=this.pq;b.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",b,a))}},padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.Ya(),this.g("padding",b,a))}},partManager:{ get:function(){return this.Pc},set:function(a){var b=this.Pc;b!==a&&(null!==a.diagram&&C("Cannot share PartManagers between Diagrams: "+a.toString()),b&&b.Xe(null),this.Pc=a,a.Xe(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.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Hk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= -this.uu;b!==a&&(a!==yi&&a!==Ik&&a!==Jk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, -a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); -ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Kk.kc()},set:function(a){Kk.add(a.replace(/\s/g,""))}},version:{get:function(){return Lk}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; +get:function(){return this.Sc},set:function(a){var b=this.Sc;b!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",b,a),this.ac())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var b=this.Ht;if(b!==a&&(this.Ht=a,this.g("isTreePathToChildren",b,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Kk(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var b= +this.uu;b!==a&&(a!==yi&&a!==Lk&&a!==Mk&&C("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",b,a))}},Ue:{get:function(){return this.qw},set:function(a){this.qw=a}},avoidanceCellSize:{get:function(){return this.bw},set:function(a){this.Xh=null;this.bw=new L(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.cw},set:function(a){this.cw=Math.max(1, +a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var b=this.vp;b!==a&&(this.vp=a,this.g("autoScrollInterval",b,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.xp;b.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",b,a))}}}); +ma.Object.defineProperties(Q,{licenseKey:{get:function(){return Nk.kc()},set:function(a){Nk.add(a.replace(/\s/g,""))}},version:{get:function(){return Ok}}});Q.prototype.makeImageData=Q.prototype.Kx;Q.prototype.makeImage=Q.prototype.Xz;Q.prototype.cacheGroupExternalLinks=Q.prototype.Gu;Q.prototype.addRenderer=Q.prototype.bs;Q.prototype.makeSVG=Q.prototype.bv;Q.prototype.makeSvg=Q.prototype.Cs;Q.prototype.stopAutoScroll=Q.prototype.ug; Q.prototype.doAutoScroll=Q.prototype.gs;Q.prototype.isUnoccupied=Q.prototype.Xj;Q.prototype.raiseDiagramEvent=Q.prototype.S;Q.prototype.removeDiagramListener=Q.prototype.am;Q.prototype.addDiagramListener=Q.prototype.Bj;Q.prototype.findTreeRoots=Q.prototype.zz;Q.prototype.layoutDiagram=Q.prototype.Vz;Q.prototype.findTopLevelGroups=Q.prototype.rz;Q.prototype.findTopLevelNodesAndLinks=Q.prototype.sz;Q.prototype.ensureBounds=Q.prototype.Va;Q.prototype.findLinksByExample=Q.prototype.ls; Q.prototype.findNodesByExample=Q.prototype.ms;Q.prototype.findLinkForData=Q.prototype.Kc;Q.prototype.findNodeForData=Q.prototype.ii;Q.prototype.findPartForData=Q.prototype.Lc;Q.prototype.findLinkForKey=Q.prototype.findLinkForKey;Q.prototype.findNodeForKey=Q.prototype.Wb;Q.prototype.findPartForKey=Q.prototype.findPartForKey;Q.prototype.rebuildParts=Q.prototype.Wd;Q.prototype.transformViewToDoc=Q.prototype.Ps;Q.prototype.transformRectDocToView=Q.prototype.AA;Q.prototype.transformDocToView=Q.prototype.op; Q.prototype.centerRect=Q.prototype.es;Q.prototype.scrollToRect=Q.prototype.uv;Q.prototype.scroll=Q.prototype.scroll;Q.prototype.highlightCollection=Q.prototype.Kz;Q.prototype.highlight=Q.prototype.Jz;Q.prototype.selectCollection=Q.prototype.sA;Q.prototype.select=Q.prototype.select;Q.prototype.updateAllRelationshipsFromData=Q.prototype.rp;Q.prototype.updateAllTargetBindings=Q.prototype.updateAllTargetBindings;Q.prototype.commit=Q.prototype.commit;Q.prototype.rollbackTransaction=Q.prototype.Kf; @@ -814,493 +814,494 @@ Q.prototype.commitTransaction=Q.prototype.eb;Q.prototype.startTransaction=Q.prot Q.prototype.addLayerBefore=Q.prototype.Xw;Q.prototype.addLayer=Q.prototype.Al;Q.prototype.moveParts=Q.prototype.moveParts;Q.prototype.copyParts=Q.prototype.Jj;Q.prototype.removeParts=Q.prototype.Is;Q.prototype.remove=Q.prototype.remove;Q.prototype.add=Q.prototype.add;Q.prototype.clearDelayedGeometries=Q.prototype.ex;Q.prototype.setProperties=Q.prototype.nm;Q.prototype.attach=Q.prototype.Eu;Q.prototype.set=Q.prototype.set;Q.prototype.resetInputOptions=Q.prototype.Tx;Q.prototype.setInputOption=Q.prototype.tA; Q.prototype.getInputOption=Q.prototype.Ql;Q.prototype.resetRenderingHints=Q.prototype.Ux;Q.prototype.setRenderingHint=Q.prototype.Yx;Q.prototype.getRenderingHint=Q.prototype.Gf;Q.prototype.maybeUpdate=Q.prototype.bd;Q.prototype.requestUpdate=Q.prototype.ac;Q.prototype.delayInitialization=Q.prototype.Yy;Q.prototype.isUpdateRequested=Q.prototype.Qz;Q.prototype.invalidateDocumentBounds=Q.prototype.Ya;Q.prototype.findObjectsNear=Q.prototype.og;Q.prototype.findPartsNear=Q.prototype.nz; Q.prototype.findObjectsIn=Q.prototype.Cf;Q.prototype.findPartsIn=Q.prototype.vx;Q.prototype.findObjectsAt=Q.prototype.ji;Q.prototype.findPartsAt=Q.prototype.mz;Q.prototype.findObjectAt=Q.prototype.jc;Q.prototype.findPartAt=Q.prototype.Ol;Q.prototype.focusObject=Q.prototype.Az;Q.prototype.alignDocument=Q.prototype.Ky;Q.prototype.zoomToRect=Q.prototype.CA;Q.prototype.zoomToFit=Q.prototype.zoomToFit;Q.prototype.diagramScroll=Q.prototype.lx;Q.prototype.focus=Q.prototype.focus; -var oi=new ob,Oi=null,Ng=void 0!==x.document,Ji=null,Ki="",qh=new E(Q,"None",0),ij=new E(Q,"Uniform",1),jj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Ik=new E(Q,"AllParentsCollapsed",22),Jk=new E(Q,"AnyParentsCollapsed", -23),Kk=new F,Lk="2.3.12",Zi="image",aj=null,mi=!1; -function ni(){if(Ng){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; -aj=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Ng=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Ng};Q.None=qh;Q.Uniform=ij; -Q.UniformToFill=jj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Ik;Q.AnyParentsCollapsed=Jk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} -function Aj(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Ng){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Kk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); +var oi=new ob,Si=null,Lg=void 0!==x.document,Ni=null,Oi="",oh=new E(Q,"None",0),mj=new E(Q,"Uniform",1),nj=new E(Q,"UniformToFill",2),Df=new E(Q,"CycleAll",10),Hf=new E(Q,"CycleNotDirected",11),Jf=new E(Q,"CycleNotDirectedFast",12),Kf=new E(Q,"CycleNotUndirected",13),Ef=new E(Q,"CycleDestinationTree",14),Gf=new E(Q,"CycleSourceTree",15),Rh=new E(Q,"DocumentScroll",1),Th=new E(Q,"InfiniteScroll",2),yi=new E(Q,"TreeParentCollapsed",21),Lk=new E(Q,"AllParentsCollapsed",22),Mk=new E(Q,"AnyParentsCollapsed", +23),Nk=new F,Ok="2.3.13",cj="image",ej=null,mi=!1; +function ni(){if(Lg){var a=x.document.createElement("canvas"),b=a.getContext("2d"),c=Ma("7ca11abfd022028846");b[c]=Ma("398c3597c01238");for(var d=["5da73c80a36455d7038e4972187c3cae51fd22",ra.Dx+"4ae6247590da4bb21c324ba3a84e385776",ld.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",K.za],e=1;5>e;e++)b[Ma("7ca11abfd7330390")](Ma(d[e-1]),10,15*e);b[c]=Ma("39f046ebb36e4b");for(c=1;5>c;c++)b[Ma("7ca11abfd7330390")](Ma(d[c-1]),10,15*c);if(4!==d.length||"5"!==d[0][0]||"7"!==d[3][0])ld.prototype.Cd=ld.prototype.Fu; +ej=a}}Q.className="Diagram";Q.fromDiv=function(a){var b=a;"string"===typeof a&&(b=x.document.getElementById(a));return b instanceof HTMLDivElement&&b.H instanceof Q?b.H:null};Q.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};Q.useDOM=function(a){Lg=a?void 0!==x.document:!1};Q.isUsingDOM=function(){return Lg};Q.None=oh;Q.Uniform=mj; +Q.UniformToFill=nj;Q.CycleAll=Df;Q.CycleNotDirected=Hf;Q.CycleNotDirectedFast=Jf;Q.CycleNotUndirected=Kf;Q.CycleDestinationTree=Ef;Q.CycleSourceTree=Gf;Q.DocumentScroll=Rh;Q.InfiniteScroll=Th;Q.TreeParentCollapsed=yi;Q.AllParentsCollapsed=Lk;Q.AnyParentsCollapsed=Mk;function ui(){this.xy=null;this.j="zz@orderNum";"63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Rc=this.j=!0:this.Rc=null} +function Ej(a,b){b.ib.setTransform(b.Nb,0,0,b.Nb,0,0);b.ib.yc();if(null===a.Rc)a:{b="f";var c=x[Ma("76a715b2f73f148a")][Ma("72ba13b5")]||"";a.Rc=!0;if(Lg){var d=Q[Ma("76a115b6ed251eaf4692")];if(d)for(var e=Nk.iterator;e.next();){d=e.value;d=Ma(d).split(Ma("39e9"));if(6>d.length)break;var f=Ma(d[1]).split(".");if("7da71ca0"!==d[4])break;var g=Ma(ra[Ma("6cae19")]).split(".");if(f[0]>g[0]||f[0]===g[0]&&f[1]>=g[1]){var h=x[Ma("74a900bae4370f8b51")][Ma("6fbb13a1c2311e8a57")].toLowerCase();g=h[Ma("73a612b6fb191d")](Ma("3aad1ab6e022098b4dc4")); f=Ma(d[2]);if(-1g&&f!==Ma("7da71ca0ad381e90")&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("76a715b2ef3e149757")));0>g&&(g=b[Ma("73a612b6fb191d")](Ma("2bfa41fdb3784bca12")));0>g&&(g=c[Ma("73a612b6fb191d")](Ma("7baa19a6f76c1988428554")));a.Rc=!(0<=g&&gh),!a.Rc))break;if("#"===f[0]){g=x.document.createElement("div");for(var k=d[0].replace(/[A-Za-z]/g,"");4>k.length;)k+="9";h=k;k=k.substr(k.length-4);d="";d+=["gsh","gsf"][parseInt(k.substr(0, 1),10)%2];d+=["Header","Background","Display","Feedback"][parseInt(k.substr(0,1),10)%4];g[Ma("79a417a0f0181a8946")]=d;if(x.document[Ma("78a712aa")]){x.document[Ma("78a712aa")][Ma("7bb806b6ed32388c4a875b")](g);k=x.getComputedStyle(g).getPropertyValue(Ma("78a704b7e62456904c9b12701b6532a8"));var l=x.getComputedStyle(g).getPropertyValue(Ma("75b817b0ea2202"));x.document[Ma("78a712aa")][Ma("68ad1bbcf533388c4a875b")](g);if(k)if(g=x[Ma("77a902b0eb1b1e804a8a")],l==="0."+parseInt(h,10)%100||-1!==k.indexOf(parseInt(f[1]+ f[2],16))&&-1!==k.indexOf(parseInt(f[3]+f[4],16))){a.Rc=!1;break}else if(g&&g(Ma("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(d="."+d,f=0;fd.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, -d.updateDelay))};c.Of=function(){null!==d.observed&&Qk(d)};c.autoScale=ij;c.wb=!1;b&&Object.assign(c,b);return c}la(Gk,Q);Gk.prototype.computePixelRatio=function(){return 1}; -Gk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){xj(this);if(null===this.ql){var c=new Pi(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Rk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; -Gk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Fj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){xj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Rk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,b.reset(),1!==this.scale&&b.scale(this.scale),0===this.position.x&& +a.Rc&&a!==a.xy?!0:!1}ui.className="DiagramHelper";function Me(a){this.j=void 0===a?new J:a;this.o=new J}ma.Object.defineProperties(Me.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var bj="DraggingInfo";Me.className="DraggingInfo";function Vj(a,b,c){this.node=a;this.info=b;this.Tu=c}Vj.className="DraggingNodeInfoPair"; +function Ee(){this.reset()}Ee.prototype.reset=function(){this.isGridSnapEnabled=!1;this.isGridSnapRealtime=!0;this.gridSnapCellSize=(new L(NaN,NaN)).freeze();this.gridSnapCellSpot=sc;this.gridSnapOrigin=(new J(NaN,NaN)).freeze();this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1;this.dragsMembers=this.groupsAlwaysMove=!0};Ee.className="DraggingOptions"; +function Pk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;Qk(c);b&&c.nm(b);return c}la(Pk,Q);function Qk(a){a.allowDragOut=!0;a.allowMove=!1;a.isReadOnly=!0;a.contentAlignment=tc;a.layout=new Rk}Pk.prototype.reset=function(){Q.prototype.reset.call(this);Qk(this)};Pk.className="Palette"; +function Jk(a,b){if("string"===typeof a||x.Element&&a instanceof Element)var c=Q.call(this,a)||this;else c=Q.call(this)||this,b=a;var d=c;c.animationManager.isEnabled=!1;c.wb=!0;c.V=null;c.mn=!1;c.nn=!1;c.F=!0;c.u=!0;c.ia=0;c.o=!1;c.ql=null;c.Yx("drawShadows",!1);a=new U;var e=new Bf;e.stroke="magenta";e.strokeWidth=2;e.fill="transparent";e.name="BOXSHAPE";a.selectable=!0;a.selectionAdorned=!1;a.selectionObjectName="BOXSHAPE";a.locationObjectName="BOXSHAPE";a.resizeObjectName="BOXSHAPE";a.cursor= +"move";a.add(e);c.j=a;c.allowCopy=!1;c.allowDelete=!1;c.allowSelect=!0;c.autoScrollRegion=new cc(0,0,0,0);c.pa.h(0,0);c.toolManager.gb("Dragging",new Sk,c.toolManager.mouseMoveTools);c.click=function(){var a=d.observed;if(null!==a){var b=a.viewportBounds,c=d.lastInput.documentPoint;a.position=new J(c.x-b.width/2,c.y-b.height/2)}};c.Pf=function(){d.Ya();Tk(d)};c.Xd=function(){null!==d.observed&&(d.Ya(),d.N())};c.Ha=function(){1>d.updateDelay?d.N():d.o||(d.o=!0,setTimeout(function(){return d.redraw()}, +d.updateDelay))};c.Of=function(){null!==d.observed&&Tk(d)};c.autoScale=mj;c.wb=!1;b&&Object.assign(c,b);return c}la(Jk,Q);Jk.prototype.computePixelRatio=function(){return 1}; +Jk.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,b=this.ib;if(null!==a&&null!==b){Bj(this);if(null===this.ql){var c=new Ti(null);c.width=a.width;c.height=a.height;this.ql=c}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Uk(this)}finally{this.ta=a,this.ib=b}}}Q.prototype.redraw.call(this)}; +Jk.prototype.hc=function(){null===this.Ka&&C("No div specified");null===this.ta&&C("No canvas specified");if(!(this.ta instanceof Jj)&&(fi(this.box),this.Fc)){var a=this.observed;if(null!==a&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Bj(this);var b=this.ta;a=this.ib;a.Vc(!0);a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,b.width,b.height);1>this.updateDelay?Uk(this):null!==this.ql&&(a.drawImage(this.ql.Oa,0,0),b=this.Bb,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.Nb,this.Nb),a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),a.yc());b=this.Wa.s;for(var c=b.length,d=0;da&&(a=0);this.ia!==a&&(this.ia=a)}}});Gk.className="Overview";function Pk(){Ae.call(this);this.j=null}la(Pk,Ae); -Pk.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.timestampa&&(a=0);this.ia!==a&&(this.ia=a)}}});Jk.className="Overview";function Sk(){De.call(this);this.j=null}la(Sk,De); +Sk.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))};Sk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===qh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Sk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==qh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Sk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; -Sk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; -Sk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;kh(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=bc):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());mh(b)};Sk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; -Sk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0b.maxScale||(b.scale=a))};Vk.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.increaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;b.autoScale===oh&&(a=b.scale*a,ab.maxScale||(b.scale=a))};Vk.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.zoomFactor);var b=this.diagram;if(b.autoScale!==oh)return!1;a=b.scale*a;return ab.maxScale?!1:b.allowZoom};Vk.prototype.resetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;ab.maxScale||(b.scale=a)}; +Vk.prototype.canResetZoom=function(a){void 0===a&&(a=this.defaultScale);var b=this.diagram;return ab.maxScale?!1:b.allowZoom}; +Vk.prototype.zoomToFit=function(){var a=this.diagram,b=a.animationManager;b.Cc();a.redraw();var c=a.position,d=a.scale;ih(b,"Zoom To Fit");this.isZoomToFitRestoreEnabled&&d===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.tw,this.Au=NaN,this.yu=ac):(this.Jt=d,this.tw=c.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy());kh(b)};Vk.prototype.canZoomToFit=function(){return this.diagram.allowZoom}; +Vk.prototype.scrollToPart=function(a){void 0===a&&(a=null);var b=this.diagram;b.Va();if(null===a){try{null!==this.cg&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(k){this.cg=null}null===a&&(0a&&(a+=360));return a}; +t.mi=function(a){void 0===a&&(a=new N);var b=this.naturalBounds,c=this.oe,d=J.allocAt(0,0).transform(c);a.h(d.x,d.y,0,0);d.h(b.width,0).transform(c);Xb(a,d.x,d.y,0,0);d.h(b.width,b.height).transform(c);Xb(a,d.x,d.y,0,0);d.h(0,b.height).transform(c);Xb(a,d.x,d.y,0,0);J.free(d);return a};t.li=function(){var a=this.oe;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a}; t.Df=function(){if(0!==(this.l&4096)===!1)return this.Jk;var a=this.Ca;return null!==this.panel?a*this.panel.Df():a};t.qs=function(a,b){void 0===b&&(b=new J);b.assign(a);this.oe.Cd(b);return b};t.rs=function(a,b,c){return this.Rj(a.x,a.y,b.x,b.y,c)}; t.Rj=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.areaBackground)return f=this.actualBounds,K.Ff(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.h(0,0);d=this.naturalBounds;c=K.Ff(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; -Y.prototype.measure=function(a,b,c,d){if(!1!==uj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(jl(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& -a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Wk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case Xk: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.Db> -a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ll(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; -function ml(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=jl(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)pj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:pj(a,!0);a.measure(d,e,0,0);break;case Wk:pj(a,!0);a.measure(d,f,0,0);break;case Xk:pj(a,!0),a.measure(c,e,0,0)}}} -t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||nl(c,!0),this.N(),Ub(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(nl(a,!0),a instanceof V&&ol(a,this))}; -t.hc=function(a,b){if(!pl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&kl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof ql&&l.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, -a,m,!0,!1,k,h),m instanceof ql&&m.type===rl?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&sl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, +Y.prototype.measure=function(a,b,c,d){if(!1!==yj(this)){var e=this.Kg,f=e.right+e.left;e=e.top+e.bottom;a=Math.max(a-f,0);b=Math.max(b-e,0);c=Math.max((c||0)-f,0);d=Math.max((d||0)-e,0);f=this.angle;e=this.desiredSize;var g=this.kq();90===f||270===f?(a=isFinite(e.height)?e.height+g:a,b=isFinite(e.width)?e.width+g:b):(a=isFinite(e.width)?e.width+g:a,b=isFinite(e.height)?e.height+g:b);e=c||0;g=d||0;var h=this instanceof W;switch(ml(this,!0)){case kg:g=e=0;h&&(b=a=Infinity);break;case nd:isFinite(a)&& +a>c&&(e=a);isFinite(b)&&b>d&&(g=b);break;case Zk:isFinite(a)&&a>c&&(e=a);g=0;h&&(b=Infinity);break;case $k: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.Db> +a.width)))c=!0;this.l=c?this.l|256:this.l&-257;this.Jb.w()||C("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Jb.toString());this.Xl(f,this.Jb);ol(this,!1);N.free(f)};t=Y.prototype;t.eh=function(){}; +function pl(a,b,c,d,e){a.Jb.h(b,c,d,e);if(!a.desiredSize.w()){var f=a.uc;c=a.Kg;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=ml(a,!0);c===d&&f===e&&(b=kg);switch(b){case kg:if(c>d||f>e)tj(a,!0),a.measure(c>d?d:c,f>e?e:f,0,0);break;case nd:tj(a,!0);a.measure(d,e,0,0);break;case Zk:tj(a,!0);a.measure(d,f,0,0);break;case $k:tj(a,!0),a.measure(c,e,0,0)}}} +t.Xl=function(a,b){var c=this.part;null!==c&&null!==c.diagram&&(c.selectionObject!==this&&c.resizeObject!==this&&c.rotateObject!==this||ql(c,!0),this.N(),Tb(a,b)||(c.oh(),this.Pn(c)))};t.Pn=function(a){null!==this.portId&&(ql(a,!0),a instanceof V&&rl(a,this))}; +t.hc=function(a,b){if(!sl(this,a,b)&&this.visible){var c=this.opacity;if(0!==c){var d=1;1!==c&&(d=a.globalAlpha,a.globalAlpha=d*c);var e="";""!==this.filter&&(e=a.filter,a.filter=this.filter);var f=this instanceof W&&nl(this),g=this.Jb;if(f){var h=this.Jb,k=this.ec,l=this.areaBackground,m=this.Ma;null===l&&null===m||a.yc();null!==l&&(ji(this,a,l,!0,!0,k,h),l instanceof tl&&l.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(l)):a.fillRect(h.x,h.y,h.width,h.height));null!==m&&(ji(this, +a,m,!0,!1,k,h),m instanceof tl&&m.type===ul?(a.beginPath(),a.rect(h.x,h.y,h.width,h.height),a.ng(m)):a.fillRect(h.x,h.y,h.width,h.height));this.hh(a,b)}if(!f&&(f||0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y))){f=this.transform;h=this.panel;0!==(this.l&4096)===!0&&vl(this);l=this.part;k=!1;var n=0;l&&b.Gf("drawShadows")&&(k=l.isShadowed)&&(m=l.shadowOffset,n=Math.max(m.y,m.x)*b.scale*b.Nb);m=this.Dd();var p;if(!(p=b.$i||!m)){var q=this.naturalBounds;p=this.wh;var r=p.m11,u=p.m21,w=p.dx,v=p.m12, y=p.m22,z=p.dy,A,B=A=0;p=A*r+B*u+w;var D=A*v+B*y+z;A=q.width+n;B=0;var M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);var S=Math.min(D,A);var R=Math.max(p+0,M)-B;var I=Math.max(D+0,A)-S;p=B;D=S;A=q.width+n;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;A=0;B=q.height+n;M=A*r+B*u+w;A=A*v+B*y+z;B=Math.min(p,M);S=Math.min(D,A);R=Math.max(p+R,M)-B;I=Math.max(D+I,A)-S;p=B;D=S;n=b.viewportBounds;q=n.x;r=n.y;p=!(p>n.width+q||q>R+p||D>n.height+ -r||r>I+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Pg&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); -""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),tl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?tl(a):k&&!1===this.shadowVisible&&ul(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),vl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&wl(this,h)&&null===this.shadowVisible&&ul(a);null!==this.Ma&&(a.yc(),xl(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||wl(this,h))? -(yl(this,!0),null===this.shadowVisible&&ul(a)):yl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&tl(a);m&&k&&ul(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function wl(a,b){if(null===b)return!1;kl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; -function vl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof ql&&a.areaBackground.type===rl?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function xl(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof ql&&a.Ma.type===rl?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} -function zl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;gI+D)}if(p){p=0!==(this.l&256);a.clipInsteadOfFill&&(p=!1);this instanceof Ng&&(a.font=this.font);if(p){D=h.se()?h.naturalBounds:h.actualBounds;R=Math.max(g.x,D.x);I=Math.max(g.y,D.y);n=Math.min(g.right,D.right)-R;q=Math.min(g.bottom,D.bottom)-I;r=this.tb;null!==r&&(R=r.x,I=r.y,n=r.width,q=r.height);if(R>g.width+g.x||g.x>D.width+D.x){1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e);return}a.save();a.beginPath();a.rect(R,I,n,q);a.clip()}if(m){if(!l.isVisible()){1!==c&&(a.globalAlpha=d); +""!==this.filter&&(a.filter=e);return}k&&(D=l.shadowOffset,a.Fv(D.x*b.scale*this.scale*b.Nb,D.y*b.scale*this.scale*b.Nb,l.shadowBlur),wl(a),a.shadowColor=l.shadowColor)}k&&!0===this.shadowVisible?wl(a):k&&!1===this.shadowVisible&&xl(a);l=this.naturalBounds;null!==this.areaBackground&&(a.yc(),yl(this,a,l,g));a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);k&&zl(this,h)&&null===this.shadowVisible&&xl(a);null!==this.Ma&&(a.yc(),Al(this,a,l,g));k&&(null!==this.Ma||null!==this.areaBackground||zl(this,h))? +(Bl(this,!0),null===this.shadowVisible&&xl(a)):Bl(this,!1);this.hh(a,b);k&&0!==(this.l&512)===!0&&wl(a);m&&k&&xl(a);p&&(a.restore(),a.Vc(this instanceof W));f.ws()||(b=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*b,-f.m12*b,-f.m21*b,f.m11*b,b*(f.m21*f.dy-f.m22*f.dx),b*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d);""!==this.filter&&(a.filter=e)}}};function zl(a,b){if(null===b)return!1;nl(b)&&(b=b.panel);return 0!==(b.l&512)||(b.type===W.Auto||b.type===W.Spot)&&b.Qb()!==a}t.Ev=function(){}; +function yl(a,b,c,d){ji(a,b,a.areaBackground,!0,!0,c,d);a.areaBackground instanceof tl&&a.areaBackground.type===ul?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ng(a.areaBackground)):b.fillRect(d.x,d.y,d.width,d.height)}function Al(a,b,c,d){var e=a.kq(),f=c.x,g=c.y,h=c.width+e,k=c.height+e;ji(a,b,a.Ma,!0,!1,c,d);a.Ma instanceof tl&&a.Ma.type===ul?(b.beginPath(),b.rect(f-e/2,g-e/2,h,k),b.ng(a.Ma)):b.fillRect(f-e/2,g-e/2,h,k)} +function Cl(a,b,c){for(var d=b.O.s,e=d.length,f=-1,g=0;ge)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ta;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Cj(a,e)}else Cj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function $l(a,b){Wl.add(a,b)} -function am(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} -ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new dl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== -a&&(null===this.A&&(this.A=new dl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(cl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(cl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ -get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new bm),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ -get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1e)&&C("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)&&C("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.isRow=!1,a.index=e);e=new Ua;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Gj(a,e)}else Gj(a,b);else C('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}function cm(a,b){Zl.add(a,b)} +function dm(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} +ma.Object.defineProperties(Y.prototype,{bindingId:{get:function(){return null!==this.A?this.A.zp:-1},set:function(a){this.bindingId!==a&&(null===this.A&&(this.A=new gl),this.A.zp=a)}},localBindings:{get:function(){return null!==this.A?this.A.te:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.te=a)}},srcBindings:{get:function(){return null!==this.A?this.A.wm:null},set:function(a){this.srcBindings!== +a&&(null===this.A&&(this.A=new gl),this.A.wm=a)}},shadowVisible:{get:function(){return null!==this.A?this.A.Ci:null},set:function(a){var b=this.shadowVisible;b!==a&&(fl(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",b,a))}},enabledChanged:{get:function(){return null!==this.A?this.A.Ib:null},set:function(a){var b=this.enabledChanged;b!==a&&(fl(this),this.A.Ib=a,this.g("enabledChanged",b,a))}},segmentOrientation:{ +get:function(){return null!==this.Ua?this.Ua.rr:Zf},set:function(a){var b=this.segmentOrientation;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.rr=a,this.v(),this.g("segmentOrientation",b,a),a===Zf&&(this.angle=0))}},segmentIndex:{get:function(){return null!==this.Ua?this.Ua.u:-Infinity},set:function(a){a=Math.round(a);var b=this.segmentIndex;b!==a&&(null===this.Ua&&(this.Ua=new em),this.Ua.u=a,this.v(),this.g("segmentIndex",b,a))}},segmentFraction:{ +get:function(){return null!==this.Ua?this.Ua.o:0},set:function(a){isNaN(a)?a=0:0>a?a=0:1a||1=a&&C("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",b,a))}},angle:{get:function(){return this.Lb},set:function(a){var b=this.Lb;b!==a&& -(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Sl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),fl(this)&&(a=this.part,null!==a&&(gl(this,a,"width"),gl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, -set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&&(a=this.part,null!==a&&gl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),fl(this)&& -(a=this.part,null!==a&&gl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),cl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& -(a.height=Infinity),a.freeze(),cl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== -!0&&sl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&sl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(cl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(cl(this),this.A.Pf=a)}},alignment:{ -get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Nl(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== -this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),cl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); -var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),cl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(cl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ -get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&dm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,em(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Rl(this))}},toEndSegmentLength:{ -get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Rl(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Rl(this))}},toLinkable:{get:function(){return null!== +(a%=360,0>a&&(a+=360),b!==a&&(this.Lb=a,Vl(this),this.v(),this.g("angle",b,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var b=a.width,c=a.height,d=this.jd,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.jd=a=a.J(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",d,a),il(this)&&(a=this.part,null!==a&&(jl(this,a,"width"),jl(this,a,"height"))))}},width:{get:function(){return this.jd.width}, +set:function(a){var b=this.jd.width;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(a,this.jd.height)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&&(a=this.part,null!==a&&jl(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var b=this.jd.height;b===a||isNaN(b)&&isNaN(a)||(b=this.jd,this.jd=a=(new L(this.jd.width,a)).freeze(),this.v(),this instanceof Bf&&this.rc(),this.g("desiredSize",b,a),il(this)&& +(a=this.part,null!==a&&jl(this,a,"height")))}},minSize:{get:function(){return null!==this.A?this.A.u:Cb},set:function(a){var b=this.minSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),fl(this),this.A.u=a,this.v(),this.g("minSize",b,a))}},maxSize:{get:function(){return null!==this.A?this.A.o:Kb},set:function(a){var b=this.maxSize;b.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&& +(a.height=Infinity),a.freeze(),fl(this),this.A.o=a,this.v(),this.g("maxSize",b,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.ec}},margin:{get:function(){return this.Kg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.Kg;b.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",b,a))}},transform:{get:function(){0!==(this.l&2048)=== +!0&&vl(this);return this.Bb}},oe:{get:function(){0!==(this.l&4096)===!0&&vl(this);return this.wh}},animationTriggers:{get:function(){return null!==this.A?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(fl(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return null!==this.A?this.A.Pf:kg},set:function(a){this.reshapingBehavior!==a&&(fl(this),this.A.Pf=a)}},alignment:{ +get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(a.Mc()&&!a.Yb()&&C("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Kb=a=a.J(),Ql(this),this.g("alignment",b,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var b=this.Ag;b!==a&&(0>a&&xa(a,">= 0",Y,"column"),this.Ag=a,this.v(),this.g("column",b,a),null!==this.svg&&this.svg.remove())}},columnSpan:{get:function(){return null!== +this.A?this.A.ob:1},set:function(a){a=Math.round(a);var b=this.columnSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"columnSpan"),fl(this),this.A.ob=a,this.v(),this.g("columnSpan",b,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var b=this.io;b!==a&&(0>a&&xa(a,">= 0",Y,"row"),this.io=a,this.v(),this.g("row",b,a),null!==this.svg&&this.svg.remove())}},rowSpan:{get:function(){return null!==this.A?this.A.Bi:1},set:function(a){a=Math.round(a); +var b=this.rowSpan;b!==a&&(1>a&&xa(a,">= 1",Y,"rowSpan"),fl(this),this.A.Bi=a,this.v(),this.g("rowSpan",b,a))}},spanAllocation:{get:function(){return null!==this.A?this.A.Di:null},set:function(a){var b=this.spanAllocation;b!==a&&(fl(this),this.A.Di=a,this.v(),this.g("spanAllocation",b,a))}},alignmentFocus:{get:function(){return this.rk},set:function(a){var b=this.rk;b.D(a)||(this.rk=a=a.J(),this.v(),this.g("alignmentFocus",b,a))}},portId:{ +get:function(){return this.Yn},set:function(a){var b=this.Yn;if(b!==a){var c=this.part;null===c||c instanceof V||C("Cannot set portID on a Link: "+a);null!==b&&null!==c&&gm(c,this);this.Yn=a;null!==a&&null!==c&&(c.Te=!0,hm(c,this));this.g("portId",b,a)}}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:rc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),Ul(this))}},toEndSegmentLength:{ +get:function(){return null!==this.ba?this.ba.wj:10},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),Ul(this))}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:0},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",b,a),Ul(this))}},toLinkable:{get:function(){return null!== this.ba?this.ba.Tr:null},set:function(a){var b=this.toLinkable;b!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",b,a))}},toMaxLinks:{get:function(){return null!==this.ba?this.ba.Ur:Infinity},set:function(a){var b=this.toMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",b,a))}},fromSpot:{get:function(){return null!==this.ba?this.ba.Xi:rc},set:function(a){var b=this.fromSpot;b.D(a)||(a=a.J(),this.Xc(), -this.ba.Xi=a,this.g("fromSpot",b,a),Rl(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Rl(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", -b,a),Rl(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== -this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(cl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(cl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(cl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ -get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(cl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(cl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(cl(this), -this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(cl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(cl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: -null},set:function(a){var b=this.mouseHold;b!==a&&(cl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(cl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(cl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, -mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(cl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(cl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; -b!==a&&(cl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(cl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(cl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== -this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(cl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(cl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; +this.ba.Xi=a,this.g("fromSpot",b,a),Ul(this))}},fromEndSegmentLength:{get:function(){return null!==this.ba?this.ba.Vi:10},set:function(a){var b=this.fromEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",Y,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),Ul(this))}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:0},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength", +b,a),Ul(this))}},fromLinkable:{get:function(){return null!==this.ba?this.ba.hq:null},set:function(a){var b=this.fromLinkable;b!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",b,a))}},fromMaxLinks:{get:function(){return null!==this.ba?this.ba.iq:Infinity},set:function(a){var b=this.fromMaxLinks;b!==a&&(0>a&&xa(a,">= 0",Y,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",b,a))}},cursor:{get:function(){return null!== +this.A?this.A.j:""},set:function(a){var b=this.cursor;b!==a&&(fl(this),this.A.j=a,this.g("cursor",b,a))}},click:{get:function(){return null!==this.A?this.A.zh:null},set:function(a){var b=this.click;b!==a&&(fl(this),this.A.zh=a,this.g("click",b,a))}},doubleClick:{get:function(){return null!==this.A?this.A.Fh:null},set:function(a){var b=this.doubleClick;b!==a&&(fl(this),this.A.Fh=a,this.g("doubleClick",b,a))}},contextClick:{ +get:function(){return null!==this.A?this.A.Bh:null},set:function(a){var b=this.contextClick;b!==a&&(fl(this),this.A.Bh=a,this.g("contextClick",b,a))}},mouseEnter:{get:function(){return null!==this.A?this.A.Mh:null},set:function(a){var b=this.mouseEnter;b!==a&&(fl(this),this.A.Mh=a,this.g("mouseEnter",b,a))}},mouseLeave:{get:function(){return null!==this.A?this.A.Ph:null},set:function(a){var b=this.mouseLeave;b!==a&&(fl(this), +this.A.Ph=a,this.g("mouseLeave",b,a))}},mouseOver:{get:function(){return null!==this.A?this.A.Qh:null},set:function(a){var b=this.mouseOver;b!==a&&(fl(this),this.A.Qh=a,this.g("mouseOver",b,a))}},mouseHover:{get:function(){return null!==this.A?this.A.Oh:null},set:function(a){var b=this.mouseHover;b!==a&&(fl(this),this.A.Oh=a,this.g("mouseHover",b,a))}},mouseHold:{get:function(){return null!==this.A?this.A.Nh: +null},set:function(a){var b=this.mouseHold;b!==a&&(fl(this),this.A.Nh=a,this.g("mouseHold",b,a))}},mouseDragEnter:{get:function(){return null!==this.A?this.A.Of:null},set:function(a){var b=this.mouseDragEnter;b!==a&&(fl(this),this.A.Of=a,this.g("mouseDragEnter",b,a))}},mouseDragLeave:{get:function(){return null!==this.A?this.A.Xd:null},set:function(a){var b=this.mouseDragLeave;b!==a&&(fl(this),this.A.Xd=a,this.g("mouseDragLeave",b,a))}}, +mouseDrop:{get:function(){return null!==this.A?this.A.Lh:null},set:function(a){var b=this.mouseDrop;b!==a&&(fl(this),this.A.Lh=a,this.g("mouseDrop",b,a))}},actionDown:{get:function(){return null!==this.A?this.A.V:null},set:function(a){var b=this.actionDown;b!==a&&(fl(this),this.A.V=a,this.g("actionDown",b,a))}},actionMove:{get:function(){return null!==this.A?this.A.ia:null},set:function(a){var b=this.actionMove; +b!==a&&(fl(this),this.A.ia=a,this.g("actionMove",b,a))}},actionUp:{get:function(){return null!==this.A?this.A.Ha:null},set:function(a){var b=this.actionUp;b!==a&&(fl(this),this.A.Ha=a,this.g("actionUp",b,a))}},actionCancel:{get:function(){return null!==this.A?this.A.F:null},set:function(a){var b=this.actionCancel;b!==a&&(fl(this),this.A.F=a,this.g("actionCancel",b,a))}},toolTip:{get:function(){return null!== +this.A?this.A.$h:null},set:function(a){var b=this.toolTip;b!==a&&(fl(this),this.A.$h=a,this.g("toolTip",b,a))}},contextMenu:{get:function(){return null!==this.A?this.A.Ch:null},set:function(a){var b=this.contextMenu;b!==a&&(fl(this),this.A.Ch=a,this.g("contextMenu",b,a))}}});Y.prototype.trigger=Y.prototype.Kv;Y.prototype.findBindingPanel=Y.prototype.ih;Y.prototype.findTemplateBinder=Y.prototype.qz;Y.prototype.setProperties=Y.prototype.nm;Y.prototype.apply=Y.prototype.apply; Y.prototype.attach=Y.prototype.Eu;Y.prototype.set=Y.prototype.set;Y.prototype.isEnabledObject=Y.prototype.If;Y.prototype.isVisibleObject=Y.prototype.Ed;Y.prototype.isContainedBy=Y.prototype.rg;Y.prototype.getNearestIntersectionPoint=Y.prototype.rs;Y.prototype.getLocalPoint=Y.prototype.qs;Y.prototype.getDocumentScale=Y.prototype.Df;Y.prototype.getDocumentAngle=Y.prototype.li;Y.prototype.getDocumentBounds=Y.prototype.mi;Y.prototype.getDocumentPoint=Y.prototype.ga;Y.prototype.intersectsRect=Y.prototype.Yc; -Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Wl=null;Y.className="GraphObject";Wl=new ob; -$l("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Vl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", -_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Vl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; +Y.prototype.containedInRect=Y.prototype.fh;Y.prototype.containsRect=Y.prototype.Re;Y.prototype.containsPoint=Y.prototype.ca;Y.prototype.raiseChanged=Y.prototype.g;Y.prototype.raiseChangedEvent=Y.prototype.cb;Y.prototype.addCopyProperty=Y.prototype.Ww;var Zl=null;Y.className="GraphObject";Zl=new ob; +cm("Button",function(){function a(a,b){return null!==a.diagram.jc(a.documentPoint,function(a){for(;null!==a.panel&&!a.isActionable;)a=a.panel;return a},function(a){return a===b})}var b=Yl(W,W.Auto,{isActionable:!0,enabledChanged:function(a,b){if(a instanceof W){var c=a.fb("ButtonBorder");null!==c&&(c.fill=b?a._buttonFillNormal:a._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD", +_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Yl(Bf,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new O(0,0,2.76142374915397,2.761423749153969),spot2:new O(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));b.mouseEnter=function(a,b){if(b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf)){var c=b._buttonFillOver;b._buttonFillNormal=a.fill;a.fill=c;c=b._buttonStrokeOver;b._buttonStrokeNormal=a.stroke;a.stroke=c}}; b.mouseLeave=function(a,b){b.If()&&b instanceof W&&(a=b.fb("ButtonBorder"),a instanceof Bf&&(a.fill=b._buttonFillNormal,a.stroke=b._buttonStrokeNormal))};b.actionDown=function(a,b){if(b.If()&&b instanceof W&&null!==b._buttonFillPressed&&0===a.button){var c=b.fb("ButtonBorder");if(c instanceof Bf){a=a.diagram;var d=a.skipsUndoManager;a.skipsUndoManager=!0;var g=b._buttonFillPressed;b._buttonFillOver=c.fill;c.fill=g;g=b._buttonStrokePressed;b._buttonStrokeOver=c.stroke;c.stroke=g;a.skipsUndoManager= d}}};b.actionUp=function(b,d){if(d.If()&&d instanceof W&&null!==d._buttonFillPressed&&0===b.button){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=d.fb("ButtonBorder");if(c instanceof Bf){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.If()&&d instanceof W&&null!==d._buttonFillPressed){var c=b.diagram;if(0===c.firstInput.button&&(c.currentTool.standardMouseOver(),a(b,d)&&(b=d.fb("ButtonBorder"),b instanceof Bf))){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}); -$l("TreeExpanderButton",function(){var a=Vl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Gi("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof V){var b=c.diagram; +cm("TreeExpanderButton",function(){var a=Yl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isTreeExpanded",function(a,c){c=c.panel;return a?c._treeExpandedFigure:c._treeCollapsedFigure})).cp()),{visible:!1},(new Ki("visible","isTreeLeaf",function(a){return!a})).cp());a.click=function(a,c){c=c.part;c instanceof we&&(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}); -$l("SubGraphExpanderButton",function(){var a=Vl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Vl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Gi("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof te&&(c=c.adornedPart);if(c instanceof pf){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});$l("ToolTip",function(){return Vl(te,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Vl(Bf,{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)}))}); -$l("ContextMenu",function(){return Vl(te,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Gi("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});$l("ContextMenuButton",function(){var a=Vl("Button");a.stretch=Wk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); -$l("PanelExpanderButton",function(a){var b=am(a,"COLLAPSIBLE"),c=Vl("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},Vl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Gi("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); +cm("SubGraphExpanderButton",function(){var a=Yl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Yl(Bf,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ib},(new Ki("figure","isSubGraphExpanded",function(a,c){c=c.panel;return a?c._subGraphExpandedFigure:c._subGraphCollapsedFigure})).cp()));a.click=function(a,c){c=c.part;c instanceof we&&(c=c.adornedPart);if(c instanceof pf){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});cm("ToolTip",function(){return Yl(we,W.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},Yl(Bf,{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)}))}); +cm("ContextMenu",function(){return Yl(we,W.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new J(0,3),shadowBlur:5},new Ki("background","",function(a){return null!==a.adornedPart&&null!==a.placeholder?null:"#F5F5F5"}))});cm("ContextMenuButton",function(){var a=Yl("Button");a.stretch=Zk;var b=a.fb("ButtonBorder");b instanceof Bf&&(b.figure="Rectangle",b.strokeWidth=0,b.spot1=new O(0,0,2,3),b.spot2=new O(1,1,-2,-2));return a}); +cm("PanelExpanderButton",function(a){var b=dm(a,"COLLAPSIBLE"),c=Yl("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},Yl(Bf,{name:"ButtonIcon",strokeWidth:2},(new Ki("geometryString","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).cp(b))); a=c.fb("ButtonBorder");a instanceof Bf&&(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.ih();null===e&&(e=c.part);null!==e&&(c=e.fb(b),null!==c&&(a.handled=!0,d.Ea("Collapse/Expand Panel"),c.visible=!c.visible,d.eb("Collapse/Expand Panel")))}};return c}); -$l("CheckBoxButton",function(a){var b=am(a);a=Vl("Button",{desiredSize:new L(14,14)},Vl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Gi("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, +cm("CheckBoxButton",function(a){var b=dm(a);a=Yl("Button",{desiredSize:new L(14,14)},Yl(Bf,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:nd,geometryStretch:mg,visible:!1},""!==b?(new Ki("visible",b)).Lx():[]));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.fb("ButtonIcon");c.Ea("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a, d);c.eb("checkbox")}}};return a}); -$l("CheckBox",function(a){a=am(a);a=Vl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new dc(0,1,0,0)});var b=Vl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new dc(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=kg=new E(Y,"None",0);Y.Default=Yk=new E(Y,"Default",0);Y.Vertical=Xk=new E(Y,"Vertical",4);Y.Horizontal=Wk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); -Y.UniformToFill=Zk=new E(Y,"UniformToFill",2);Y.FlipVertical=$k=new E(Y,"FlipVertical",1);Y.FlipHorizontal=al=new E(Y,"FlipHorizontal",2);Y.FlipBoth=bl=new E(Y,"FlipBoth",3);Y.make=Vl;Y.getBuilders=function(){var a=new ob,b;for(b in Wl)if(b!==b.toLowerCase()){var c=Wl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=$l; -Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};fm.className="STransform"; -function gm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}gm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};gm.className="SGradient"; -function Fj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, -c)}Fj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; -Fj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Fj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Fj.prototype.focus=function(){this.Oa.focus()};Fj.prototype.nx=function(){this.ownerDocument=null}; -ma.Object.defineProperties(Fj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Fj.className="SVGSurface"; +cm("CheckBox",function(a){a=dm(a);a=Yl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new cc(0,1,0,0)});var b=Yl(W,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new cc(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=kg=new E(Y,"None",0);Y.Default=al=new E(Y,"Default",0);Y.Vertical=$k=new E(Y,"Vertical",4);Y.Horizontal=Zk=new E(Y,"Horizontal",5);Y.Fill=nd=new E(Y,"Fill",3);Y.Uniform=mg=new E(Y,"Uniform",1); +Y.UniformToFill=bl=new E(Y,"UniformToFill",2);Y.FlipVertical=cl=new E(Y,"FlipVertical",1);Y.FlipHorizontal=dl=new E(Y,"FlipHorizontal",2);Y.FlipBoth=el=new E(Y,"FlipBoth",3);Y.make=Yl;Y.getBuilders=function(){var a=new ob,b;for(b in Zl)if(b!==b.toLowerCase()){var c=Zl.I(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};Y.defineBuilder=cm; +Y.build=function(a,b,c){for(var d=[],e=2;ea&&(a+=360);if(0!==a){this.translate(b,c);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));var e=this.ha[1]*a+this.ha[3]*d,f=this.ha[0]*-d+this.ha[2]*a,g=this.ha[1]*-d+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*d;this.ha[1]=e;this.ha[2]=f;this.ha[3]=g;this.translate(-b,-c)}};im.className="STransform"; +function jm(a){this.type=a;this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0;this.hx=[];this.pattern=null}jm.prototype.addColorStop=function(a,b){this.hx.push({offset:a,color:b})};jm.className="SGradient"; +function Jj(a,b,c){this.ownerDocument=a=void 0===b?x.document:b;this.dA="http://www.w3.org/2000/svg";void 0!==a&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"));this.hs=null;this.context=new ii(this, +c)}Jj.prototype.resize=function(a,b,c,d){return this.width!==a||this.height!==b?(this.width=a,this.height=b,this.style.width=c+"px",this.style.height=d+"px",this.Oa.setAttributeNS(null,"width",c+"px"),this.Oa.setAttributeNS(null,"height",d+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+c+" "+d),this.context.xw.firstElementChild.setAttributeNS(null,"width",c+"px"),this.context.xw.firstElementChild.setAttributeNS(null,"height",d+"px"),!0):!1}; +Jj.prototype.Ud=function(a,b,c){a=this.ownerDocument.createElementNS(this.dA,a);if(za(b))for(var d in b)a.setAttributeNS("href"===d?"http://www.w3.org/1999/xlink":"",d,b[d]);void 0!==c&&(a.textContent=c);return a};Jj.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()};Jj.prototype.focus=function(){this.Oa.focus()};Jj.prototype.nx=function(){this.ownerDocument=null}; +ma.Object.defineProperties(Jj.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}});Jj.className="SVGSurface"; function ii(a,b){this.Hv=a;this.svg=a.Oa;this.stack=[];this.nh=[];this.fillStyle="#000000";this.font="10px sans-serif";this.globalAlpha=1;this.lineCap="butt";this.lineDashOffset=0;this.lineJoin="miter";this.lineWidth=1;this.miterLimit=10;this.shadowBlur=0;this.shadowColor="rgba(0, 0, 0, 0)";this.shadowOffsetY=this.shadowOffsetX=0;this.Il=!1;this.strokeStyle="#000000";this.textAlign="start";this.clipInsteadOfFill=!1;this.Vg=this.Br=this.Ar=0;this.yd=this.ad=null;this.path=[];this.Yl={};this.Ct=!1; -this.Yg=null;this.uj=0;this.rb=new fm;this.j=Dl(this);this.Mj=Dl(this,"gojs-diagram");this.Hl=this.ti=null;var c=jb++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} -function yj(a,b,c,d,e,f,g){void 0===a.Mj?Bl(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; +this.Yg=null;this.uj=0;this.rb=new im;this.j=Gl(this);this.Mj=Gl(this,"gojs-diagram");this.Hl=this.ti=null;var c=ib++,d=this.Ud("clipPath",{id:"mainClip"+c});d.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height}));this.xw=d;this.svg.appendChild(this.j);this.j.appendChild(this.Mj);this.svg.appendChild(d);this.j.setAttributeNS(null,"clip-path","url(#mainClip"+c+")");this.fA={};this.isTemporary=!!b;this.filter="";this.ak=null} +function Cj(a,b,c,d,e,f,g){void 0===a.Mj?El(a,b,c,d,e,f,g):a.Mj.setAttribute("transform","matrix("+b+", "+c+", "+d+", "+e+", "+f+", "+g+")")}t=ii.prototype; t.arc=function(a,b,c,d,e,f,g,h){var k=2*Math.PI,l=k-1E-6,m=c*Math.cos(d),n=c*Math.sin(d),p=a+m,q=b+n,r=f?0:1;d=f?d-e:e-d;(1E-6d&&(d=d%k+k);d>l?(this.path.push(["A",c,c,0,1,r,a-m,b-n]),this.path.push(["A",c,c,0,1,r,p,q])):1E-6=Math.PI),r,a+c*Math.cos(e),b+c*Math.sin(e)])};t.beginPath=function(){this.path=[];this.Yl={stroke:"none",fill:"none"}};t.Se=function(a){this.addPath(this.path,this.rb,a||0)}; -t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new gm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; -t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+jb++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(Zi,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; -t.createRadialGradient=function(a,b,c,d,e,f){var g=new gm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function El(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} -t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;El(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& -(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";hm(this,Zi,f,this.rb);this.addElement(Zi,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");im(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; -t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};hm(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};hm(this,"fill",a,this.rb);im(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};hm(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; +t.bezierCurveTo=function(a,b,c,d,e,f){this.path.push(["C",a,b,c,d,e,f])};t.clearRect=function(){};t.clip=function(){this.Yl.clipPath=!0};t.closePath=function(){this.path.push(["z"])};t.createLinearGradient=function(a,b,c,d){var e=new jm("linear");e.x1=a;e.y1=b;e.x2=c;e.y2=d;return e}; +t.createPattern=function(a){var b="";a instanceof HTMLCanvasElement&&(b=a.toDataURL());a instanceof HTMLImageElement&&(b=a.getAttribute("src"));var c=this.fA;if(c[b])return"url(#"+c[b]+")";var d="PATTERN"+ib++,e={x:0,y:0,width:a.width,height:a.height,href:b};a=this.Ud("pattern",{width:a.width,height:a.height,id:d,patternUnits:"userSpaceOnUse"});a.appendChild(this.Ud(cj,e));this.svg.appendChild(a);c[b]=d;return"url(#"+d+")"}; +t.createRadialGradient=function(a,b,c,d,e,f){var g=new jm("radial");g.x1=a;g.y1=b;g.r1=c;g.x2=d;g.y2=e;g.r2=f;return g};function Hl(a,b,c,d,e,f,g,h,k){d=h/d;e=k/e;0===f&&0===g||a.rb.translate(f,g);1===d&&1===e||a.rb.scale(d,e);0===b&&0===c||a.rb.translate(-b,-c)} +t.drawImage=function(a,b,c,d,e,f,g,h,k){var l="";a instanceof HTMLCanvasElement&&(l=a.toDataURL());a instanceof HTMLImageElement&&(l=a.getAttribute("src"));var m=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height;void 0===d&&(f=b,g=c,h=d=m,k=e=a);d=d||0;e=e||0;h=h||0;k=k||0;Hl(this,b,c,d,e,f||0,g||0,h,k);f={x:0,y:0,width:m||d,height:a||e,href:l};K.$(d,h)&&K.$(e,k)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&& +(f.preserveAspectRatio="xMidYMid slice"):f.preserveAspectRatio="none";if(0!==b||0!==c||d!==m||e!==a)d+=b,e+=c,f["clip-path"]="path('M "+b+","+c+" L "+d+" "+c+" L "+d+" "+e+" L "+b+" "+e+" z')";km(this,cj,f,this.rb);this.addElement(cj,f)};t.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd");lm(this,this.Yl)};t.ng=function(a,b){this.clipInsteadOfFill?this.clip():this.fill(b)}; +t.fillRect=function(a,b,c,d){a=[a,b,c,d];a={x:a[0],y:a[1],width:a[2],height:a[3]};km(this,"fill",a,this.rb);this.addElement("rect",a)};t.px=function(a,b,c,d){a={x:a,y:b,width:c,height:d};km(this,"fill",a,this.rb);lm(this,a);this.svg.prepend(this.Ud("rect",a))};t.fillText=function(a,b,c){a=[a,b,c];b=this.textAlign;"left"===b?b="start":"right"===b?b="end":"center"===b&&(b="middle");b={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":b};km(this,"fill",b,this.rb);this.addElement("text",b,a[0])}; t.lineTo=function(a,b){this.path.push(["L",a,b])};t.moveTo=function(a,b){this.path.push(["M",a,b])};t.quadraticCurveTo=function(a,b,c,d){this.path.push(["Q",a,b,c,d])};t.rect=function(a,b,c,d){this.path.push(["M",a,b],["L",a+c,b],["L",a+c,b+d],["L",a,b+d],["z"])}; t.restore=function(){this.rb=this.stack.pop();this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle;this.font=a.font;this.globalAlpha=a.globalAlpha;this.lineCap=a.lineCap;this.lineDashOffset=a.lineDashOffset;this.lineJoin=a.lineJoin;this.lineWidth=a.lineWidth;this.miterLimit=a.miterLimit;this.shadowBlur=a.shadowBlur;this.shadowColor=a.shadowColor;this.shadowOffsetX=a.shadowOffsetX;this.shadowOffsetY=a.shadowOffsetY;this.strokeStyle=a.strokeStyle;this.textAlign=a.textAlign;this.ak= a.ak}; t.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,ak:this.ak});for(var a=[],b=0;bb.offset?1:-1});for(e=0;ec?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; -t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(mm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; -ma.Object.defineProperties(Il.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, +t.ng=function(a,b){if(a instanceof tl&&a.type===ul){var c=a.xk;a=a.ft;a>c?(this.scale(c/a,1),this.translate((a-c)/2,0)):c>a&&(this.scale(1,a/c),this.translate(0,(c-a)/2));this.Hm?this.clip():this.fill(b);a>c?(this.translate(-(a-c)/2,0),this.scale(1/(c/a),1)):c>a&&(this.translate(0,-(c-a)/2),this.scale(1,1/(a/c)))}else this.Hm?this.clip():this.fill(b)};t.ik=function(){this.Hm||this.stroke()};t.Fv=function(a,b,c){this.Ar=a;this.Br=b;this.Vg=c}; +t.js=function(a,b){var c=this.Z;void 0!==c.setLineDash&&(c.setLineDash(a),c.lineDashOffset=b)};t.fs=function(){var a=this.Z;void 0!==a.setLineDash&&(a.setLineDash(pm),a.lineDashOffset=0)};t.Vc=function(a){a&&(this.dt="");this.ct=this.et=""};t.Hs=function(){}; +ma.Object.defineProperties(Ll.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap}, set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit= a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY= a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter= -""===a?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mm=Object.freeze([]);Il.className="CanvasSurfaceContext";function nm(){this.F=this.o=this.u=this.j=0}nm.className="ColorNumbers"; -function ql(a,b){om||(pm(),om=!0);Qa(this);this._isFrozen=!1;void 0===a?(this.na=Hl,this.wk="black"):"string"===typeof a?(this.na=Hl,this.wk=a):(this.na=a,this.wk="black");a=this.na;a===Kl?(this.Qd=tc,this.Kk=Ac):this.Kk=a===rl?this.Qd=wc:this.Qd=rc;this.Gr=0;this.Xp=NaN;this.xe=this.cr=this.we=null;this.ft=this.xk=0;b&&Object.assign(this,b)} -ql.prototype.copy=function(){var a=new ql;a.na=this.na;a.wk=this.wk;a.Qd=this.Qd.J();a.Kk=this.Kk.J();a.Gr=this.Gr;a.Xp=this.Xp;null!==this.we&&(a.we=this.we.copy());a.cr=this.cr;return a};t=ql.prototype;t.freeze=function(){this._isFrozen=!0;null!==this.we&&this.we.freeze();return this};t.ka=function(){Object.isFrozen(this)&&C("cannot thaw constant: "+this);this._isFrozen=!1;null!==this.we&&this.we.ka();return this};t.qb=function(a){a.classType===ql&&(this.type=a)}; -t.toString=function(){var a="Brush(";if(this.type===Hl)a+=this.color;else if(a=this.type===Kl?a+"Linear ":this.type===rl?a+"Radial ":this.type===Jl?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,null!==this.colorStops)for(var b=this.colorStops.iterator;b.next();)a+=" "+b.key+":"+b.value;return a+")"}; -t.addColorStop=function(a,b){this._isFrozen&&va(this);("number"!==typeof a||!isFinite(a)||1a)&&xa(a,"0 <= loc <= 1",ql,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Hl&&(this.type=Kl);this.xe=null;return this}; -t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(a,b));return this};function sm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(b,c)} -t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?qm:b;if(this.type===Hl)Uh(this.color),this.color=rm(-a,b);else if((this.type===Kl||this.type===rl)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,rm(-a,b));return this};function tm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?qm:c;Uh(a);return rm(-b,c)} -function um(a,b,c){Uh(a);a=vm.j;var d=vm.u,e=vm.o,f=vm.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((vm.j-a)*c+a)+", "+Math.round((vm.u-d)*c+d)+", "+Math.round((vm.o-e)*c+e)+", "+Math.round((vm.F-f)*c+f)+")"} -t.Hx=function(){if(this.type===Hl)return wm(this.color);if((this.type===Kl||this.type===rl)&&null!==this.colorStops){var a=this.colorStops;if(this.type===rl)return wm(a.first().value);if(null!==a.get(.5))return wm(a.get(.5));if(2===a.count)return a=a.Fa(),wm(um(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 wm(um(a.get(c),a.get(d),1-f/e))}return!1}; -function wm(a){if(!a)return!1;if(a instanceof ql)return a.Hx();Uh(a);return 128>(299*vm.j+587*vm.u+114*vm.o)/1E3} -function rm(a,b){switch(b){case qm:b=100*xm(vm.j);var c=100*xm(vm.u),d=100*xm(vm.o);ym.j=.4124564*b+.3575761*c+.1804375*d;ym.u=.2126729*b+.7151522*c+.072175*d;ym.o=.0193339*b+.119192*c+.9503041*d;ym.F=vm.F;b=zm(ym.j/Am[0]);c=zm(ym.u/Am[1]);d=zm(ym.o/Am[2]);Bm.j=116*c-16;Bm.u=500*(b-c);Bm.o=200*(c-d);Bm.F=ym.F;Bm.j=Math.min(100,Math.max(0,Bm.j+100*a));a=(Bm.j+16)/116;b=a-Bm.o/200;ym.j=Am[0]*Cm(Bm.u/500+a);ym.u=Am[1]*(Bm.j>Dm*Em?Math.pow(a,3):Bm.j/Dm);ym.o=Am[2]*Cm(b);ym.F=Bm.F;a=-.969266*ym.j+1.8760108* -ym.u+.041556*ym.o;b=.0556434*ym.j+-.2040259*ym.u+1.0572252*ym.o;vm.j=255*Fm((3.2404542*ym.j+-1.5371385*ym.u+-.4985314*ym.o)/100);vm.u=255*Fm(a/100);vm.o=255*Fm(b/100);vm.F=ym.F;vm.j=Math.round(vm.j);255vm.j&&(vm.j=0);vm.u=Math.round(vm.u);255vm.u&&(vm.u=0);vm.o=Math.round(vm.o);255vm.o&&(vm.o=0);return"rgba("+vm.j+", "+vm.u+", "+vm.o+", "+vm.F+")";case Gm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ -Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){om||(pm(),om=!0);var b=Hm;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,vm.j=a[0],vm.u=a[1],vm.o=a[2],vm.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,vm.j=0,vm.u=0,vm.o=0,vm.F=1)}} -function Vh(){var a=vm.j/255,b=vm.u/255,c=vm.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=vm.F}function xm(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Fm(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} -function zm(a){return a>Em?Math.pow(a,1/3):(Dm*a+16)/116}function Cm(a){var b=a*a*a;return b>Em?b:(116*a-16)/Dm}function cm(a,b){"string"!==typeof a&&(a instanceof ql||C("Value for "+b+" must be a color string or a Brush, not "+a))}function pm(){Hm=Ng?(new Pi(null,void 0,{willReadFrequently:!0})).context:null} -ma.Object.defineProperties(ql.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Kl?this.start=tc:a===rl&&(this.start=wc));this.end.Mc()&&(a===Kl?this.end=Ac:a===rl&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, -set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",ql,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, -a);0>a&&xa(a,">= zero",ql,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});ql.prototype.isDark=ql.prototype.Hx;ql.prototype.darkenBy=ql.prototype.Xy;ql.prototype.lightenBy=ql.prototype.Wz;ql.prototype.addColorStop=ql.prototype.addColorStop; -var Em=216/24389,Dm=24389/27,Am=[95.047,100,108.883],Hm=null,vm=new nm,Wh=new nm,ym=new nm,Bm=new nm,om=!1;ql.className="Brush";var Hl;ql.Solid=Hl=new E(ql,"Solid",0);var Kl;ql.Linear=Kl=new E(ql,"Linear",1);var rl;ql.Radial=rl=new E(ql,"Radial",2);var Jl;ql.Pattern=Jl=new E(ql,"Pattern",4);var qm;ql.Lab=qm=new E(ql,"Lab",5);var Gm;ql.HSL=Gm=new E(ql,"HSL",6); -ql.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}; -ql.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;om||(pm(),om=!0);var b=Hm;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};ql.lighten=function(a){return sm(a)};ql.lightenBy=sm;ql.darken=function(a){return tm(a)};ql.darkenBy=tm;ql.mix=um;ql.isDark=wm;function Zl(){this.xa="Base"}Zl.prototype.measure=function(){}; -Zl.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};Zl.prototype.arrange=function(){};Zl.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};Zl.prototype.jA=function(a){a.Tj()};Zl.prototype.hc=function(){};ma.Object.defineProperties(Zl.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});Zl.prototype.remeasureObject=Zl.prototype.jA;Zl.prototype.arrangeElement=Zl.prototype.My; -Zl.prototype.measureElement=Zl.prototype.Zz;Zl.className="PanelLayout";function Im(){this.xa="Base"}la(Im,Zl); -Im.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Jm(a);for(var k=0;ka)&&xa(a,"0 <= loc <= 1",tl,"addColorStop:loc");null===this.we&&(this.we=new ob);this.we.add(a,b);this.na===Kl&&(this.type=Nl);this.xe=null;return this}; +t.Wz=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(a,b));return this};function vm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(b,c)} +t.Xy=function(a,b){this._isFrozen&&va(this);a=void 0===a||"number"!==typeof a?.2:a;b=void 0===b?tm:b;if(this.type===Kl)Uh(this.color),this.color=um(-a,b);else if((this.type===Nl||this.type===ul)&&null!==this.colorStops)for(var c=this.colorStops.iterator;c.next();)Uh(c.value),this.addColorStop(c.key,um(-a,b));return this};function wm(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?tm:c;Uh(a);return um(-b,c)} +function xm(a,b,c){Uh(a);a=ym.j;var d=ym.u,e=ym.o,f=ym.F;Uh(b);void 0===c&&(c=.5);return"rgba("+Math.round((ym.j-a)*c+a)+", "+Math.round((ym.u-d)*c+d)+", "+Math.round((ym.o-e)*c+e)+", "+Math.round((ym.F-f)*c+f)+")"} +t.Hx=function(){if(this.type===Kl)return zm(this.color);if((this.type===Nl||this.type===ul)&&null!==this.colorStops){var a=this.colorStops;if(this.type===ul)return zm(a.first().value);if(null!==a.get(.5))return zm(a.get(.5));if(2===a.count)return a=a.Fa(),zm(xm(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 zm(xm(a.get(c),a.get(d),1-f/e))}return!1}; +function zm(a){if(!a)return!1;if(a instanceof tl)return a.Hx();Uh(a);return 128>(299*ym.j+587*ym.u+114*ym.o)/1E3} +function um(a,b){switch(b){case tm:b=100*Am(ym.j);var c=100*Am(ym.u),d=100*Am(ym.o);Bm.j=.4124564*b+.3575761*c+.1804375*d;Bm.u=.2126729*b+.7151522*c+.072175*d;Bm.o=.0193339*b+.119192*c+.9503041*d;Bm.F=ym.F;b=Cm(Bm.j/Dm[0]);c=Cm(Bm.u/Dm[1]);d=Cm(Bm.o/Dm[2]);Em.j=116*c-16;Em.u=500*(b-c);Em.o=200*(c-d);Em.F=Bm.F;Em.j=Math.min(100,Math.max(0,Em.j+100*a));a=(Em.j+16)/116;b=a-Em.o/200;Bm.j=Dm[0]*Fm(Em.u/500+a);Bm.u=Dm[1]*(Em.j>Gm*Hm?Math.pow(a,3):Em.j/Gm);Bm.o=Dm[2]*Fm(b);Bm.F=Em.F;a=-.969266*Bm.j+1.8760108* +Bm.u+.041556*Bm.o;b=.0556434*Bm.j+-.2040259*Bm.u+1.0572252*Bm.o;ym.j=255*Im((3.2404542*Bm.j+-1.5371385*Bm.u+-.4985314*Bm.o)/100);ym.u=255*Im(a/100);ym.o=255*Im(b/100);ym.F=Bm.F;ym.j=Math.round(ym.j);255ym.j&&(ym.j=0);ym.u=Math.round(ym.u);255ym.u&&(ym.u=0);ym.o=Math.round(ym.o);255ym.o&&(ym.o=0);return"rgba("+ym.j+", "+ym.u+", "+ym.o+", "+ym.F+")";case Jm:return Vh(),Wh.o=Math.min(100,Math.max(0,Wh.o+100*a)),"hsla("+Wh.j+", "+Wh.u+"%, "+Wh.o+"%, "+ +Wh.F+")";default:C("Unknown color space: "+b)}}function Uh(a){rm||(sm(),rm=!0);var b=Km;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,ym.j=a[0],ym.u=a[1],ym.o=a[2],ym.F=a[3]/255):(b.fillStyle="#FFFFFF",b.fillStyle=a,ym.j=0,ym.u=0,ym.o=0,ym.F=1)}} +function Vh(){var a=ym.j/255,b=ym.u/255,c=ym.o/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))}Wh.j=Math.round(g);Wh.u=Math.round(100*a);Wh.o=Math.round(100*e);Wh.F=ym.F}function Am(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Im(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055} +function Cm(a){return a>Hm?Math.pow(a,1/3):(Gm*a+16)/116}function Fm(a){var b=a*a*a;return b>Hm?b:(116*a-16)/Gm}function fm(a,b){"string"!==typeof a&&(a instanceof tl||C("Value for "+b+" must be a color string or a Brush, not "+a))}function sm(){Km=Lg?(new Ti(null,void 0,{willReadFrequently:!0})).context:null} +ma.Object.defineProperties(tl.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&va(this,a);this.na=a;this.start.Mc()&&(a===Nl?this.start=tc:a===ul&&(this.start=wc));this.end.Mc()&&(a===Nl?this.end=Ac:a===ul&&(this.end=wc));this.xe=null}},color:{get:function(){return this.wk},set:function(a){this._isFrozen&&va(this,a);this.wk=a;this.xe=null}},start:{get:function(){return this.Qd}, +set:function(a){this._isFrozen&&va(this,a);this.Qd=a.J();this.xe=null}},end:{get:function(){return this.Kk},set:function(a){this._isFrozen&&va(this,a);this.Kk=a.J();this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&va(this,a);0>a&&xa(a,">= zero",tl,"startRadius");this.Gr=a;this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&va(this, +a);0>a&&xa(a,">= zero",tl,"endRadius");this.Xp=a;this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&va(this,a);this.we=a;this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&va(this,a);this.cr=a;this.xe=null}}});tl.prototype.isDark=tl.prototype.Hx;tl.prototype.darkenBy=tl.prototype.Xy;tl.prototype.lightenBy=tl.prototype.Wz;tl.prototype.addColorStop=tl.prototype.addColorStop; +var Hm=216/24389,Gm=24389/27,Dm=[95.047,100,108.883],Km=null,ym=new qm,Wh=new qm,Bm=new qm,Em=new qm,rm=!1;tl.className="Brush";var Kl;tl.Solid=Kl=new E(tl,"Solid",0);var Nl;tl.Linear=Nl=new E(tl,"Linear",1);var ul;tl.Radial=ul=new E(tl,"Radial",2);var Ml;tl.Pattern=Ml=new E(tl,"Pattern",4);var tm;tl.Lab=tm=new E(tl,"Lab",5);var Jm;tl.HSL=Jm=new E(tl,"HSL",6); +tl.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}; +tl.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;rm||(sm(),rm=!0);var b=Km;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};tl.lighten=function(a){return vm(a)};tl.lightenBy=vm;tl.darken=function(a){return wm(a)};tl.darkenBy=wm;tl.mix=xm;tl.isDark=zm;function bm(){this.xa="Base"}bm.prototype.measure=function(){}; +bm.prototype.Zz=function(a,b,c,d,e){a.measure(b,c,d,e)};bm.prototype.arrange=function(){};bm.prototype.My=function(a,b,c,d,e,f){a.arrange(b,c,d,e,f)};bm.prototype.jA=function(a){a.Tj()};bm.prototype.hc=function(){};ma.Object.defineProperties(bm.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return W}}});bm.prototype.remeasureObject=bm.prototype.jA;bm.prototype.arrangeElement=bm.prototype.My; +bm.prototype.measureElement=bm.prototype.Zz;bm.className="PanelLayout";function Lm(){this.xa="Base"}la(Lm,bm); +Lm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length;a=Mm(a);for(var k=0;kS&&(eb=Math.max(S-ff,0));var nk=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(nk?ff:0)),0)}if(1===ec.columnSpan&&(Fb===kg||Fb===Xk)){G=a.Fb(Eb);var Ai=G.Wc();eb=Math.max(Lf-G.actual,0);eb+Ai>M&&(eb=Math.max(M-Ai,0));var Pn=0===G.oa;G.pc=G.pc+eb;G.actual= -G.oa+eb;M=Math.max(M-(eb+(Pn?Ai:0)),0)}ef&&ec.Tj()}}}}}Ga(y);var Td=0,ne=0;f=a.columnCount;for(var sg=0;sg=a.rowCount);Oe++)G=a.Gb(Pa.row+Oe),eb=0,eb=Fb===nd||Fb===Xk?Math.max(G.minimum, -0===ud[Pa.row+Oe]?G.maximum:Math.min(ud[Pa.row+Oe],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.height+=eb,qc+=G.minimum;for(var Vc=1;Vc=a.columnCount);Vc++)G=a.Fb(Pa.column+Vc),eb=0,eb=Fb===nd||Fb===Wk?Math.max(G.minimum,0===Hc[Pa.column+Vc]?G.maximum:Math.min(Hc[Pa.column+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Id.width+=eb,rk+=G.minimum;hb.width+=Id.width;hb.height+=Id.height;var Eh=Pa.margin, -lf=Eh.right+Eh.left,Ci=Eh.top+Eh.bottom;Pa.measure(hb.width,hb.height,rk,qc);for(var Fh=Pa.measuredBounds,Jd=Math.max(Fh.width+lf,0),Pf=Math.max(Fh.height+Ci,0),mf=0,Gh=0;Gh=a.rowCount);Gh++)G=a.Gb(Pa.row+Gh),mf+=G.total||0;if(mf=Pe)&&!(Pa.row+qe>=a.rowCount);qe++){G=a.Gb(Pa.row+qe);var Re=G.oa||0,Qf=Qe(Pa,G,Vd);G.actual=Math.min(G.maximum,Re+Qf);G.oa!==Re&&(Pe-=G.oa- -Re)}for(;0vd&&(G.actual=Math.min(G.maximum,vd+Pe),G.oa!==vd&&(Pe-=G.oa-vd));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var vg=0,Se=0;Se=a.columnCount);Se++)G=a.Fb(Pa.column+Se),vg+=G.total||0;if(vg=wg)&&!(Pa.column+Rf>=a.columnCount);Rf++){G=a.Fb(Pa.column+Rf);var Di=G.oa||0,Sn=re(Pa,G,Rn);G.actual=Math.min(G.maximum, -Di+Sn);G.oa!==Di&&(wg-=G.oa-Di)}for(;0sk&&(G.actual=Math.min(G.maximum,sk+wg),G.oa!==sk&&(wg-=G.oa-sk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Id);L.free(hb);void 0!==ud&&Ga(ud);void 0!==Hc&&Ga(Hc);var xg=0,yg=0,tk=a.desiredSize,Fr=a.maxSize;Fb=jl(a,!0);var Ei=ne=Td=0,Fi=0;f=a.columnCount;for(var uk=0;uk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= -1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ke=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ke=Math.max(c.height-k,0));var Ua=R.alignment;if(Ua.Yb()){Ua=a.defaultAlignment;Ua.sb()||(Ua=wc);var rd=Ua.x;var Eb=Ua.y;var Le=Ua.offsetX;Ua=Ua.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Le=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Ua=Tc.offsetY)}else rd=Ua.x,Eb=Ua.y,Le= -Ua.offsetX,Ua=Ua.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Ua=Le=0;xc=I.width;Tc=I.height;var nc=R.margin,ec=nc.left+nc.right,ef=nc.top+nc.bottom,sd=Ol(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Wk||(xc=Math.max(X-ec,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==Xk||(Tc=Math.max(na-ef,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+ef;G+=wa*rd-(xc+ec)*rd+Le+nc.left;ca+=db*Eb-X*Eb+Ua+nc.top;R.visible&& -(Zb(gb,Db,eb,Ke,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ke)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=Zj(v.figure);for(var A=0;Az&&y.push(B))}}}}r= +function Qm(a,b,c){var d=null;a instanceof W&&""!==a.$e&&(d=a.fb(a.$e),d===a&&(d=null));if(null!==d)for(c&&a.arrange(0,0,b.width,b.height),b.assign(d.actualBounds),d=d.panel;d!==a;)d.transform.pp(b),d=d.panel}function Rm(){this.xa="Base"}la(Rm,bm); +Rm.prototype.measure=function(a,b,c,d,e,f,g){var h=d.length,k=a.Qb(),l=k.margin,m=b,n=c,p=l.right+l.left,q=l.top+l.bottom;k.measure(b,c,f,g);l=k.measuredBounds;var r=0,u=null;k instanceof Bf&&(u=k,r=u.strokeWidth*u.scale);var w=Math.max(l.width+p,0);l=Math.max(l.height+q,0);var v=Sm(k),y=v.x*w+v.offsetX;v=v.y*l+v.offsetY;var z=Tm(k),A=z.x*w+z.offsetX;z=z.y*l+z.offsetY;isFinite(b)&&(m=Math.max(Math.abs(y-A)-r,0));isFinite(c)&&(n=Math.max(Math.abs(v-z)-r,0));r=L.alloc();r.h(0,0);a=Mm(a);for(z=0;zS&&(eb=Math.max(S-vh,0));var Sn=0===G.oa;G.pc=G.pc+eb;G.actual=G.oa+eb;S=Math.max(S-(eb+(Sn?vh:0)),0)}if(1===dc.columnSpan&&(Fb===kg||Fb===$k)){G=a.Fb(Eb);var zi=G.Wc();eb=Math.max(oc-G.actual,0);eb+zi>M&&(eb=Math.max(M-zi,0));var sk=0===G.oa; +G.pc=G.pc+eb;G.actual=G.oa+eb;M=Math.max(M-(eb+(sk?zi:0)),0)}(Pe||sd)&&dc.Tj()}}}}}Ga(y);var oe=0,Dd=0;f=a.columnCount;for(var wh=0;wh=a.rowCount);Vc++)G=a.Gb(Na.row+Vc),eb=0,eb=Fb=== +nd||Fb===$k?Math.max(G.minimum,0===Hc[Na.row+Vc]?G.maximum:Math.min(Hc[Na.row+Vc],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.height+=eb,Dh+=G.minimum;for(var Of=1;Of=a.columnCount);Of++)G=a.Fb(Na.column+Of),eb=0,eb=Fb===nd||Fb===Zk?Math.max(G.minimum,0===re[Na.column+Of]?G.maximum:Math.min(re[Na.column+Of],G.maximum)):Math.max(G.minimum,isNaN(G.Hc)?G.maximum:Math.min(G.Hc,G.maximum)),Gd.width+=eb,qc+=G.minimum;jb.width+=Gd.width; +jb.height+=Gd.height;var Vd=Na.margin,Ei=Vd.right+Vd.left,Fi=Vd.top+Vd.bottom;Na.measure(jb.width,jb.height,qc,Dh);for(var Wd=Na.measuredBounds,Pf=Math.max(Wd.width+Ei,0),Qf=Math.max(Wd.height+Fi,0),Eh=0,mf=0;mf=a.rowCount);mf++)G=a.Gb(Na.row+mf),Eh+=G.total||0;if(Eh=Wc)&&!(Na.row+se>=a.rowCount);se++){G=a.Gb(Na.row+se);var Te=G.oa||0,te=Rf(Na,G,Se);G.actual=Math.min(G.maximum, +Te+te);G.oa!==Te&&(Wc-=G.oa-Te)}for(;0tg&&(G.actual=Math.min(G.maximum,tg+Wc),G.oa!==tg&&(Wc-=G.oa-tg));if(0===G.index)break;G=a.Gb(G.index-1)}}for(var Ue=0,Fh=0;Fh=a.columnCount);Fh++)G=a.Fb(Na.column+Fh),Ue+=G.total||0;if(Ue=ug)&&!(Na.column+Gh>=a.columnCount);Gh++){G=a.Fb(Na.column+Gh);var Hi=G.oa||0,tu=Gi(Na, +G,ue);G.actual=Math.min(G.maximum,Hi+tu);G.oa!==Hi&&(ug-=G.oa-Hi)}for(;0vk&&(G.actual=Math.min(G.maximum,vk+ug),G.oa!==vk&&(ug-=G.oa-vk));if(0===G.index)break;G=a.Fb(G.index-1)}}}}Ga(z);L.free(Gd);L.free(jb);void 0!==Hc&&Ga(Hc);void 0!==re&&Ga(re);var vg=0,wg=0,wk=a.desiredSize,Fr=a.maxSize;Fb=ml(a,!0);var Ii=Dd=oe=0,Ji=0;f=a.columnCount;for(var xk=0;xk=a.rowCount);G++){var ca=a.Gb(y+G);0!==ca.oa&&(v.height+=ca.total)}for(G= +1;G=a.columnCount);G++)ca=a.Fb(A+G),0!==ca.oa&&(v.width+=ca.total);var X=B.oa+v.width,na=z.oa+v.height;G=h;ca=k;var wa=X,db=na,gb=h,Db=k,eb=X,Ne=na;h+X>c.width&&(eb=Math.max(c.width-h,0));k+na>c.height&&(Ne=Math.max(c.height-k,0));var Va=R.alignment;if(Va.Yb()){Va=a.defaultAlignment;Va.sb()||(Va=wc);var rd=Va.x;var Eb=Va.y;var Oe=Va.offsetX;Va=Va.offsetY;var xc=B.alignment,Tc=z.alignment;xc.sb()&&(rd=xc.x,Oe=xc.offsetX);Tc.sb()&&(Eb=Tc.y,Va=Tc.offsetY)}else rd=Va.x,Eb=Va.y,Oe= +Va.offsetX,Va=Va.offsetY;if(isNaN(rd)||isNaN(Eb))Eb=rd=.5,Va=Oe=0;xc=I.width;Tc=I.height;var lc=R.margin,dc=lc.left+lc.right,Pe=lc.top+lc.bottom,sd=Rl(R,z,B,!1);!isNaN(R.desiredSize.width)||sd!==nd&&sd!==Zk||(xc=Math.max(X-dc,0));!isNaN(R.desiredSize.height)||sd!==nd&&sd!==$k||(Tc=Math.max(na-Pe,0));X=R.maxSize;na=R.minSize;xc=Math.min(X.width,xc);Tc=Math.min(X.height,Tc);xc=Math.max(na.width,xc);Tc=Math.max(na.height,Tc);X=Tc+Pe;G+=wa*rd-(xc+dc)*rd+Oe+lc.left;ca+=db*Eb-X*Eb+Va+lc.top;R.visible&& +(Yb(gb,Db,eb,Ne,G,ca,I.width,I.height)?R.arrange(G,ca,xc,Tc):R.arrange(G,ca,xc,Tc,new N(gb,Db,eb,Ne)))}}L.free(v);for(a=0;a=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();b.Se();for(var q=[],r=a.O.s,u=r.length,w=0;wz)){v=dk(v.figure);for(var A=0;Az&&y.push(B))}}}}r= a.O.s;u=r.length;for(w=0;we*v*c))){z=D.segmentIndex;if(!isFinite(z)||isNaN(z))z=0;0>z&&(z=v-Math.min(-z,v));z=Math.round(z%v);v=D.opacity;A=1;if(1!==v){if(0===v)continue;A=b.globalAlpha;b.globalAlpha=A*v}B=q[w];var M=!1,S=D.strokeDashArray;null!==S&&(M=!0,b.js(S,D.strokeDashOffset));if("LineV"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== +e);S<=D+l;S++){var R=S*e+p;0<=R&&R<=h&&an(S,y,z,B)&&(b.moveTo(R,0),b.lineTo(R,k))}b.stroke();b.Se()}else if("LineH"===D.figure&&null!==D.stroke&&0b)return a%b===c;if(a%b!==c)return!1;b=d.length;for(var e=0;en)y.measure(Infinity,Infinity,0,0),z=y.measuredBounds,c.ed(z),q.push(z);else{var A=y.segmentIndex,B=y.segmentFraction,D=y.alignmentFocus;D.Mc()&&(D=wc);var M=y.segmentOrientation,S=y.segmentOffset;if(isNaN(A)){var R=k.ua;z=Ea();R.Ru(B,z);var I=J.allocAt(z[0],z[1]);I.add(k.i(0));R.type=== P.j?I.offset(-R.startX,-R.startY):(R=R.figures.first(),null!==R&&I.offset(-R.startX,-R.startY));R=z[2];if(M!==Zf){var G=k.computeAngle(y,M,R);y.Lb=G}G=I.x-b.x;var ca=I.y-b.y;J.free(I);Ga(z)}else if(A<-n||A>=n)z=J.alloc(),k.vg(),k.computeMidPoint(z),R=k.midAngle,M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G),G=z.x-b.x,ca=z.y-b.y,J.free(z);else{G=0;0<=A?(ca=m.M(A),z=AX+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==an&&M!==bn||r.rotate(90, -X/2,wa/2);M!==cn&&M!==dn||r.rotate(-90,X/2,wa/2);M===en&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); +2):z);I=R.Bf(ca);var X=z.Bf(G);R=I>X+10?0<=A?R.ab(ca):ca.ab(R):X>I+10?0<=A?z.ab(G):G.ab(z):0<=A?R.ab(G):G.ab(R)}else R=0<=A?ca.ab(z):z.ab(ca);M!==Zf&&(G=k.computeAngle(y,M,R),y.Lb=G);G=ca.x+(z.x-ca.x)*B-b.x;ca=ca.y+(z.y-ca.y)*B-b.y}y.measure(Infinity,Infinity,0,0);z=y.measuredBounds;I=y.naturalBounds;var na=0;y instanceof Bf&&(na=y.strokeWidth);X=I.width+na;var wa=I.height+na;r.reset();r.translate(-z.x,-z.y);r.scale(y.scale,y.scale);r.rotate(M===Zf?y.angle:R,X/2,wa/2);M!==dn&&M!==en||r.rotate(90, +X/2,wa/2);M!==fn&&M!==gn||r.rotate(-90,X/2,wa/2);M===hn&&(45R||225R)&&r.rotate(-R,X/2,wa/2);I=new N(0,0,X,wa);u.xi(I,D);r.Ga(u);D=-u.x+na/2*y.scale;y=-u.y+na/2*y.scale;w.assign(S);na=isNaN(S.x);var db=isNaN(S.y);if(na||db){X=X/2+3;wa=wa/2+3;var gb=45<=R&&135>=R,Db=225<=R&&315>=R;M===Zf&&(gb||Db)?(w.x=db?X:S.y,w.y=na?wa:S.x,gb?0<=A||isNaN(A)&&.5>B||!na||(w.y=-wa):Db&&((0<=A||isNaN(A)&&.5>B)&&na&&(w.y=-wa),db&&(w.x=-X))):(na&&(w.x=0<=A||isNaN(A)&&.5>B?X:-X),db&&(w.y=-wa),w.rotate(R))}else w.rotate(R); G+=w.x;ca+=w.y;I.set(z);I.h(G+D,ca+y,z.width,z.height);q.push(I);c.ed(I)}}if(null!==g)for(d=g.labelNodes;d.next();)d.value.measure(Infinity,Infinity);a.jg=c;a.position.h(b.x+c.x,b.y+c.y);Pb(e,c.width||0,c.height||0);ld.free(r);J.free(u);J.free(w)}}}}; -Zm.prototype.arrange=function(a,b){var c=b.length;if(a instanceof te||a instanceof T){var d=a,e=null;a instanceof te&&(e=a,d=e.adornedPart);var f=a instanceof te?null:d.path,g=a.j;if(0!==g.length){var h=0;if(null!==f&&h=c)r=J.alloc(),q=n,w=r,q.vg(),q.computeMidPoint(w),q=n.midAngle,l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n),n=r.x,w=r.y, J.free(r);else{u=0;0<=h?(r=b.s[h],w=hy+10?0<=h?q.ab(r):r.ab(q):y>v+10?0<=h?w.ab(u):u.ab(w):0<=h?q.ab(u):u.ab(q)}else q=0<=h?r.ab(w):w.ab(r);l!==Zf&&(n=n.computeAngle(g,l,q),g.angle=n);n=r.x+(w.x-r.x)*k;w=r.y+(w.y-r.y)*k}if(p.ys())g.location=new J(n,w);else{p.Mc()&&(p=wc);r=ld.alloc();r.reset();r.scale(g.scale,g.scale);r.rotate(g.angle, 0,0);var z=g.naturalBounds;u=N.allocAt(0,0,z.width,z.height);v=J.alloc();v.xi(u,p);r.Ga(v);p=-v.x;y=-v.y;var A=z.width,B=z.height;z=J.alloc();z.assign(m);var D=isNaN(m.x),M=isNaN(m.y);if(D||M){A=A/2+3;B=B/2+3;var S=45<=q&&135>=q,R=225<=q&&315>=q;l===Zf&&(S||R)?(z.x=M?A:m.y,z.y=D?B:m.x,S?0<=h||isNaN(h)&&.5>k||!D||(z.y=-B):R&&((0<=h||isNaN(h)&&.5>k)&&D&&(z.y=-B),M&&(z.x=-A))):(D&&(z.x=0<=h||isNaN(h)&&.5>k?A:-A),M&&(z.y=-B),z.rotate(q))}else z.rotate(q);n+=z.x;w+=z.y;r.pp(u);p+=u.x;y+=u.y;h=J.allocAt(n+ -p,w+y);g.move(h);J.free(h);J.free(z);J.free(v);N.free(u);ld.free(r)}}null!==e?e.Ul(!1):d.Ul(!1);d=fn(a);a.location.h(a.position.x+d.x,a.position.y+d.y);J.free(d)}}; -function $m(a,b,c,d){if(!1!==uj(d)){var e=d.strokeWidth;0===e&&a instanceof te&&a.type===W.Link&&a.adornedObject instanceof Bf&&(e=a.adornedObject.strokeWidth);e*=d.Ca;a instanceof T&&null!==a.ua?(a=a.geometry.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):a instanceof te&&null!==a.adornedPart.ua?(a=a.adornedPart.ua.bounds,d.Ge(a.x-e/2,a.y-e/2,a.width+e,a.height+e)):d.Ge(-(e/2),-(e/2),b+e,c+e);e=d.desiredSize;e.w()||null===d.ua?d.ec.h(0,0,e.width,e.height):d.ec.assign(d.ua.bounds);pj(d,!1)}} -function gn(){this.xa="Base"}la(gn,Zl); -gn.prototype.measure=function(a,b,c,d,e,f,g){var h=a.Qb();a.graduatedBounds=[];var k=h.margin,l=k.right+k.left,m=k.top+k.bottom;h.measure(b,c,f,g);var n=h.measuredBounds,p=new N(-k.left,-k.top,Math.max(n.width+l,0),Math.max(n.height+m,0));a.graduatedBounds.push(p);e.assign(p);for(var q=h.geometry,r=h.strokeWidth,u=q.flattenedSegments,w=q.flattenedLengths,v=q.flattenedTotalLength,y=u.length,z=0,A=0,B=Ea(),D=0;DX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbKe))for(var Ua=0;UaKe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Le=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,nc=0,ec=0,ef=v;a.graduatedMarks=[];for(var sd, -xh=0;xhzi*Fb*v/a.graduatedRange&&null===oc.graduatedSkip)){var rg=w[0][0],Fd=0,fc=0;ec=v*oc.graduatedStart-1E-4;ef=v*oc.graduatedEnd+1E-4;var Lf=zi*Fb,pc=a.graduatedTickBase;if(pca.graduatedMin+Lf&&(pc-=Math.floor((pc-a.graduatedMin)/Lf)*Lf);for(var nk=Le[xh],Ai=pc,Pn=1E-6*a.graduatedMax,Td= -1;pc<=a.graduatedMax+Pn;Td++){a:{for(var ne=nk.length,sg=0;sg-yh){var hf=!1;break a}}hf=!0}if(hf&&(pc>a.graduatedMax&&(pc=a.graduatedMax),null===oc.graduatedSkip||oc instanceof Pg&&!oc.graduatedSkip(pc,oc)||oc instanceof Bf&&!oc.graduatedSkip(pc,oc))&&(nc=(pc-a.graduatedMin)*v/a.graduatedRange,nc>v&&(nc=v),ec<=nc&&nc<=ef)){for(var Ud=B[Fd][fc],Me=w[Fd][fc];Fdrg&&fcoe&&.4995oe?0oe||.9995tg){var Ah=1-Math.abs(.5-oe);Ud=(td*Ah+Hd*(1-Ah))%360;break a}}}Ud=td}if(oc instanceof Pg){var ed="";null!==oc.graduatedFunction?(ed=oc.graduatedFunction(pc,oc),ed=null!==ed&&void 0!==ed?ed.toString():""):ed=(+pc.toFixed(2)).toString();""!==ed&&sd.push({$l:zh,angle:Ud,text:ed})}else sd.push({$l:zh,angle:Ud})}pc=Ai+Td*Lf}}}a.graduatedMarks.push(sd)}Ga(B); -var hb=a.graduatedMarks;if(null!==hb)for(var Bi=d.length,Sb=0;Sbfd;fd++){switch(fd){case 0:hc.h(Id,ud);break;case 1:hc.h(Id+Bh,ud);break;case 2:hc.h(Id,ud+Of);break;case 3:hc.h(Id+Bh,ud+Of)}hc.rotate(Pa+Va.angle);hc.offset(qk,Dh);0===Ch&&0===fd?Hc.h(hc.x,hc.y,0,0):Hc.Ye(hc);hc.offset(-qk,-Dh);hc.rotate(-Pa-Va.angle)}J.free(hc);null!==pe.graduatedBounds&&pe.graduatedBounds.push(Hc);Yb(Ne,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Va instanceof Pg){var Uc=a,rk=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Pg);var qc=Uc.temporaryTextBlock;hn(qc,Va); -var Oe=Va.alignmentFocus;Oe.Mc()&&(Oe=tc);for(var Vc=Va.segmentOrientation,Eh=Va.segmentOffset,lf=new N,Ci=0,Fh=0,Jd=0,Pf=0,mf=0,Gh=Tb.length,Pe=0;PeJd||225Jd)&&vd.rotate(-Jd,Re/2,Qf/2);var vg=N.allocAt(0,0,Re,Qf),Se=J.alloc();Se.xi(vg,Oe);vd.Ga(Se);var wg=-Se.x,Rn=-Se.y,re=J.alloc();re.assign(Eh);isNaN(re.x)&&(re.x=Re/2+3);isNaN(re.y)&&(re.y=-(Qf/2+3));re.rotate(Jd);Ci+=re.x+wg;Fh+=re.y+Rn;var Rf=new N(Ci,Fh,Qe.width,Qe.height),Di=new N(Qe.x,Qe.y,Qe.width,Qe.height),Sn=new N(qe.x,qe.y,qe.width,qe.height); -Vd.Tz=Pf;Vd.lineCount=qc.lineCount;Vd.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Vd.actualBounds=Rf;Vd.measuredBounds=Di;Vd.naturalBounds=Sn;0===Pe?lf.assign(Rf):lf.ed(Rf);J.free(re);J.free(Se);N.free(vg);ld.free(vd)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(lf);Yb(rk,lf.x,lf.y,lf.width,lf.height)}pj(Va,!1)}}}; -gn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= -p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yX&&(X+=360);S.push(X)}z=G;A=ca}B.push(S)}if(null===a.graduatedIntervals){for(var na=[],wa=a.O.s,db=wa.length,gb=0;gbNe))for(var Va=0;VaNe&&eb.push(Eb)}}}}a.graduatedIntervals=na}var Oe=a.graduatedIntervals;var xc=a.O.s,Tc=xc.length,lc=0,dc=0,Pe=v;a.graduatedMarks=[];for(var sd, +gf=0;gfFb*rk*v/a.graduatedRange&&null===mc.graduatedSkip)){var Lf=w[0][0],Cd=0,nc=0;dc=v*mc.graduatedStart-1E-4;Pe=v*mc.graduatedEnd+1E-4;var hf=Fb*rk,oc=a.graduatedTickBase;if(oca.graduatedMin+hf&&(oc-=Math.floor((oc-a.graduatedMin)/hf)*hf);for(var vh=Oe[gf],Sn=oc,zi=1E-6*a.graduatedMax,sk= +1;oc<=a.graduatedMax+zi;sk++){a:{for(var oe=vh.length,Dd=0;Dd-jf){var xh=!1;break a}}xh=!0}if(xh&&(oc>a.graduatedMax&&(oc=a.graduatedMax),null===mc.graduatedSkip||mc instanceof Ng&&!mc.graduatedSkip(oc,mc)||mc instanceof Bf&&!mc.graduatedSkip(oc,mc))&&(lc=(oc-a.graduatedMin)*v/a.graduatedRange,lc>v&&(lc=v),dc<=lc&&lc<=Pe)){for(var fd=B[Cd][nc],Qe=w[Cd][nc];CdLf&&ncpe&&.4995pe?0pe||.9995Bi){var zh=1-Math.abs(.5-pe);fd=(Qd*zh+Fd*(1-zh))%360;break a}}}fd=Qd}if(mc instanceof Ng){var Rd="";null!==mc.graduatedFunction?(Rd=mc.graduatedFunction(oc,mc),Rd=null!==Rd&&void 0!==Rd?Rd.toString():""):Rd=(+oc.toFixed(2)).toString();""!==Rd&&sd.push({$l:Ai,angle:fd,text:Rd})}else sd.push({$l:Ai,angle:fd})}oc=Sn+sk*hf}}}a.graduatedMarks.push(sd)}Ga(B); +var kf=a.graduatedMarks;if(null!==kf)for(var jb=d.length,Mf=0;MfNa;Na++){switch(Na){case 0:fc.h(lf,Gd);break;case 1:fc.h(lf+Ci,Gd);break;case 2:fc.h(lf,Gd+Bh);break;case 3:fc.h(lf+Ci,Gd+Bh)}fc.rotate(Ch+Ra.angle);fc.offset(Nf,uk);0===Td&&0===Na?Hc.h(fc.x,fc.y,0,0):Hc.Ye(fc);fc.offset(-Nf,-uk);fc.rotate(-Ch-Ra.angle)}J.free(fc);null!==pc.graduatedBounds&&pc.graduatedBounds.push(Hc);Xb(Re,Hc.x,Hc.y,Hc.width,Hc.height)}else if(Ra instanceof Ng){var Uc=a,Ud=e;null===Uc.temporaryTextBlock&&(Uc.temporaryTextBlock=new Ng);var qc=Uc.temporaryTextBlock;ln(qc,Ra); +var Dh=Ra.alignmentFocus;Dh.Mc()&&(Dh=tc);for(var Vc=Ra.segmentOrientation,Of=Ra.segmentOffset,Vd=new N,Ei=0,Fi=0,Wd=0,Pf=0,Qf=0,Eh=Sb.length,mf=0;mfWd||225Wd)&&te.rotate(-Wd,se/2,Te/2);var tg=N.allocAt(0,0,se,Te),Ue=J.alloc();Ue.xi(tg,Dh);te.Ga(Ue);var Fh=-Ue.x,ug=-Ue.y,ue=J.alloc();ue.assign(Of);isNaN(ue.x)&&(ue.x=se/2+3);isNaN(ue.y)&&(ue.y=-(Te/2+3));ue.rotate(Wd);Ei+=ue.x+Fh;Fi+=ue.y+ug;var Gi=new N(Ei,Fi,Se.width,Se.height),Gh=new N(Se.x,Se.y,Se.width,Se.height),Hi=new N(Rf.x,Rf.y,Rf.width,Rf.height); +Wc.Tz=Pf;Wc.lineCount=qc.lineCount;Wc.lines=[qc.Db,qc.Ih,qc.df,qc.Le,qc.Qc,qc.Rb,qc.ze];Wc.actualBounds=Gi;Wc.measuredBounds=Gh;Wc.naturalBounds=Hi;0===mf?Vd.assign(Gi):Vd.ed(Gi);J.free(ue);J.free(Ue);N.free(tg);ld.free(te)}null!==Uc.graduatedBounds&&Uc.graduatedBounds.push(Vd);Xb(Ud,Vd.x,Vd.y,Vd.width,Vd.height)}tj(Ra,!1)}}}; +kn.prototype.arrange=function(a,b,c){if(null!==a.graduatedBounds){var d=a.Qb(),e=a.graduatedMarks;if(null!==e){var f=a.graduatedBounds,g=0,h=f[g];g++;null!==d&&d.arrange(h.x-c.x,h.y-c.y,h.width,h.height);for(var k=b.length,l=0;l=g&&(g=1);for(var h=f.actualBounds,k=a.O.s,l=a.graduatedMarks,m=k.length,n=0;na.graduatedTickUnit*p.interval*f.geometry.flattenedTotalLength/a.graduatedRange*g&&null===p.graduatedSkip)){var u= +p.measuredBounds,w=p.strokeWidth*p.scale,v=p.alignmentFocus;v.Mc()&&(v=tc);for(var y=0;yg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; +t.hh=function(a,b){if(this.na===W.Grid)a.yc(),this.na.hc(this,a,b);else if(this.na===W.Graduated)a.yc(),this.na.hc(this,a,b);else{if(this.na===W.Table)if(a.yc(),a instanceof ii){var c=a.yd;a.yd=Gl(a,"gojs-ts");on(this,a);a.nh.pop();a.yd=c}else on(this,a);(c=this.isClipping&&this.na===W.Spot)&&a.save();for(var d=this.Qb(),e=this.O.s,f=e.length,g=0;gg.height)continue}else if(l.position>g.width)continue;var m=l.separatorStrokeWidth;isNaN(m)&&(m=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var n=l.separatorStroke;null===n&&(n=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(0!==m&&null!==n){ji(a,b,n,!1,!1,g,f);n=!1;var p=l.separatorDashArray; null===p&&(p=c?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray);null!==p&&(n=!0,b.js(p,0));b.beginPath();p=l.position+m;c?p>g.height&&(m-=p-g.height):p>g.width&&(m-=p-g.width);l=l.position+m/2;b.lineWidth=m;m=a.zb;c?(l+=m.top,p=g.width-m.right,b.moveTo(m.left,l),b.lineTo(p,l)):(l+=m.left,p=g.height-m.bottom,b.moveTo(l,m.top),b.lineTo(l,p));b.stroke();b.Se();n&&b.fs()}}}} -function mn(a,b,c,d,e){for(var f=d.length,g=a.actualBounds,h=a.naturalBounds,k=on(a,!0),l=on(a,!1),m=0;mp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= -r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function on(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dp)){var q=n.Wc(),r=n.separatorStrokeWidth;isNaN(r)&&(r=c?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var u=n.separatorStroke;null===u&&(u=c?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke);if(null===u||n.index===(c?k:l))r=0;q-= +r;r=n.position+r;q+=n.actual;r+q>p&&(q=p-r);0>=q||(p=a.zb,ji(a,b,n.background,!0,!1,h,g),c?b.fillRect(p.left,r+p.top,g.width-(p.left+p.right),q):b.fillRect(r+p.left,p.top,q,g.height-(p.top+p.bottom)))}}}}function rn(a,b){for(var c=b?a.rowCount:a.columnCount,d=0;dd&&e.set(r),J.free(r));J.free(m);f&&e.transform(g);return l}; -t.Fj=function(){for(var a=this.O.s,b=a.length,c=0;cc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Wk:this.v(!0);this.measure(c+h,f+g,0,0);break;case Xk:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; -t.gh=function(a){var b=this.naturalBounds,c=Jm(this);if(Zb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dc||f>d)this.v(),this.measure(b>c?c:b,f>d?d:f,0,0);break;case nd:this.v(!0);this.measure(c+h,d+g,0,0);break;case Zk:this.v(!0);this.measure(c+h,f+g,0,0);break;case $k:this.v(!0),this.measure(b+h,d+g,0,0)}}this.na.arrange(this,e,this.jg)}}; +t.gh=function(a){var b=this.naturalBounds,c=Mm(this);if(Yb(0,0,b.width,b.height,a.x,a.y)){b=this.O.s;for(var d=b.length,e=J.allocAt(0,0);d--;){var f=b[d];if(f.visible||f===c)if(xb(e.set(a),f.transform),f.ca(e))return J.free(e),!0}J.free(e);return null===this.Ma&&null===this.areaBackground?!1:!0}return!1};t.ks=function(a){if(this.bindingId===a)return this;for(var b=this.O.s,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); -if(null!==m?m.Cf(a,b,c,d,e,p):il(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function vn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&vn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +t.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){if(!this.isAtomic)for(var h=Mm(this),k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===h){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof W?m:null;p=ld.alloc();p.set(g); +if(null!==m?m.Cf(a,b,c,d,e,p):ll(n,a,d,p))null!==b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);ld.free(p)}}}void 0===f&&ld.free(g);return d}void 0===f&&ld.free(g);return!1};function yn(a,b,c,d){for(var e=a.O.s,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.actualBounds,k=a.naturalBounds;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof W&&yn(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} t.og=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.naturalBounds,h=this.se(),k=h?a:xb(J.allocAt(a.x,a.y),this.transform),l=h?b:xb(J.allocAt(b.x,b.y),this.transform),m=k.Bf(l),n=0w.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; -function Pm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Qm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;cw.width||u.y>w.height||0>u.x+u.width||0>u.y+u.height))if(r.se()?(u=r.transform,xb(k.set(a),u),xb(l.set(b),u)):(k.set(a),l.set(b)),u=r,r=r instanceof W?r:null,null!==r?r.og(k,l,c,d,e,f):u.ux(k,l,e))null!==c&&(u=c(u)),null===u||null!==d&&!d(u)||f.add(u)}}J.free(k);J.free(l)}return e?n:g}return!1}; +function Sm(a){var b=null;a instanceof Bf&&(b=a.spot1,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot1));null===b&&(b=sc);return b}function Tm(a){var b=null;a instanceof Bf&&(b=a.spot2,b===Sc&&(b=null),a=a.geometry,null!==a&&null===b&&(b=a.spot2));null===b&&(b=Bc);return b}t.add=function(a){for(var b=[],c=0;c=e.count&&a>=e.count)return; -e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;uj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||wn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& -c.cb(fe,"elements",this,b,null,d,null),c.cb(ee,"elements",this,null,b,null,a)))};function xn(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(ee,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"rowdefs",this,c,null,a,null);this.v()}}}; -function Wj(a,b,c){var d=a.rowDefs;if(!(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.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Vj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(ee,"coldefs",this,null,c,null,a)}return b[a]}; -t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(fe,"coldefs",this,c,null,a,null);this.v()}}};function Xj(a,b,c){var d=a.colDefs;if(!(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.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&Yl(b,a);return this}; -t.Iy=function(a,b){(a=this.Gb(a))&&Yl(a,new Vj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&Yl(a,new Vj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;e=e.count&&a>=e.count)return; +e.mb(f);d=f}else C("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Hb(a,b);if(0===a||b.isPanelMain)this.$g=null;yj(this)||this.v();b.v(!1);null!==b.portId?this.Te=!0:b instanceof W&&!0===b.Te&&(this.Te=!0);this.graduatedIntervals=null;this.If()||zn(this,b,!1);c=this.part;null!==c&&(c.Rh=null,c.ag=NaN,this.Te&&c instanceof V&&(c.Te=!0),c.Te&&c instanceof V&&(c.wc=null),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||(-1!==d&& +c.cb(ge,"elements",this,b,null,d,null),c.cb(fe,"elements",this,null,b,null,a)))};function An(a,b){a.l=b?a.l|16777216:a.l&-16777217}t.remove=function(a){for(var b=this.O.s,c=b.length,d=-1,e=0;ea&&xa(a,">= 0",W,"getRowDefinition:idx");a=Math.round(a);var b=this.rowDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!0;c.index=a;b[a]=c;this.cb(fe,"rowdefs",this,null,c,null,a)}return b[a]};t.pA=function(a){0>a&&xa(a,">= 0",W,"removeRowDefinition:idx");if(0!==this.rowCount){a=Math.round(a);var b=this.rowDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"rowdefs",this,c,null,a,null);this.v()}}}; +function ak(a,b,c){var d=a.rowDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Fb=function(a){0>a&&xa(a,">= 0",W,"getColumnDefinition:idx");a=Math.round(a);var b=this.colDefs;if(void 0===b[a]){var c=new Zj;c.wi(this);c.isRow=!1;c.index=a;b[a]=c;this.cb(fe,"coldefs",this,null,c,null,a)}return b[a]}; +t.kA=function(a){0>a&&xa(a,">= 0",W,"removeColumnDefinition:idx");if(0!==this.columnCount){a=Math.round(a);var b=this.colDefs,c=b[a];if(c){b[a]=void 0;for(var d=b.length-1;0<=d&&void 0===b[d--];)b.length--;this.cb(ge,"coldefs",this,c,null,a,null);this.v()}}};function bk(a,b,c){var d=a.colDefs;if(!(0>b)){d[b]=c instanceof Zj?c:void 0;if(!c)for(b=d.length-1;0<=b&&void 0===d[b--];)d.length--;a.v()}}t.Hy=function(a){var b=null;a.isRow?b=this.Gb(a.index):a.isRow||(b=this.Fb(a.index));b&&am(b,a);return this}; +t.Iy=function(a,b){(a=this.Gb(a))&&am(a,new Zj(b));return this};t.Cy=function(a,b){(a=this.Fb(a))&&am(a,new Zj(b));return this};t.oz=function(a){if(0>a||this.type!==W.Table||0===this.rowCount)return-1;for(var b=0,c=this.rowDefs,d=c.length,e=this.topIndex;ea||this.type!==W.Table||0===this.columnCount)return-1;for(var b=0,c=this.colDefs,d=c.length,e=this.leftIndex;ea;)this.qc(this.O.length-1,!1);An(this,this.itemArray)}; -function An(a,b){var c=tn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Cn(a,b);e=Dn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&xn(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+tn(a);a.Hb(f,e);d&&(e.ub=b,En(a,f,c),e.ub=null);e.data=b}}} -function En(a,b,c){for(a=a.O;ba;)this.qc(this.O.length-1,!1);Dn(this,this.itemArray)}; +function Dn(a,b){var c=wn(a);if(null===b||0===b.length)for(;a.O.length>c;)a.qc(a.O.length-1,!1);else if(a.O.length<=c){c=b.length;for(var d=0;dc)){var e=Fn(a,b);e=Gn(a,e);if(null!==e){jg(e);e=e.copy();if(0!==(e.l&16777216)){var f=a.ih();null!==f&&An(f,!0)}"object"===typeof b&&(null===a.ge&&(a.ge=new ob),a.ge.add(b,e));f=c+wn(a);a.Hb(f,e);d&&(e.ub=b,Hn(a,f,c),e.ub=null);e.data=b}}} +function Hn(a,b,c){for(a=a.O;ba&&xa(a,">= 0",W,"padding"), -a=new dc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ -get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:lc},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Jn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== -this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof ql)&&(a instanceof ql&&a.freeze(),null===this.U&&(this.U=new Jn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Jn),this.U.Ha=a,this.v(), -this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Jn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ -a),null===this.U&&(this.U=new Jn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof te);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), -null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new dl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, -set:function(a){var b=this.Hh;if(b!==a||null!==a&&zn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Mj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Jj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||An(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); -b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););cl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| -this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(cl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, +a=new cc(a)):(0>a.left&&xa(a.left,">= 0",W,"padding:value.left"),0>a.right&&xa(a.right,">= 0",W,"padding:value.right"),0>a.top&&xa(a.top,">= 0",W,"padding:value.top"),0>a.bottom&&xa(a.bottom,">= 0",W,"padding:value.bottom"));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.v(),this.g("padding",b,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var b=this.Tm;b.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",b,a))}},defaultStretch:{ +get:function(){return this.Uf},set:function(a){var b=this.Uf;b!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",b,a))}},defaultSeparatorPadding:{get:function(){return null!==this.U?this.U.Qp:jc},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.defaultSeparatorPadding;b.D(a)||(a=a.J(),null===this.U&&(this.U=new Mn),this.U.Qp=a,this.v(),this.g("defaultSeparatorPadding",b,a))}},defaultRowSeparatorStroke:{get:function(){return null!== +this.U?this.U.ia:null},set:function(a){var b=this.defaultRowSeparatorStroke;b!==a&&(null===a||"string"===typeof a||a instanceof tl)&&(a instanceof tl&&a.freeze(),null===this.U&&(this.U=new Mn),this.U.ia=a,this.N(),this.g("defaultRowSeparatorStroke",b,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return null!==this.U?this.U.Ha:1},set:function(a){var b=this.defaultRowSeparatorStrokeWidth;b!==a&&isFinite(a)&&0<=a&&(null===this.U&&(this.U=new Mn),this.U.Ha=a,this.v(), +this.g("defaultRowSeparatorStrokeWidth",b,a))}},defaultRowSeparatorDashArray:{get:function(){return null!==this.U?this.U.V:null},set:function(a){var b=this.defaultRowSeparatorDashArray;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea)&&C("Panel.topIndex must be greater than zero and a real number, not: "+a),null===this.U&&(this.U=new Mn),this.U.Ib=a,this.v(),this.g("topIndex",b,a))}},leftIndex:{get:function(){return null!==this.U?this.U.hb:0},set:function(a){var b=this.leftIndex;b!==a&&((!isFinite(a)||0>a)&&C("Panel.leftIndex must be greater than zero and a real number, not: "+ +a),null===this.U&&(this.U=new Mn),this.U.hb=a,this.v(),this.g("leftIndex",b,a))}},data:{get:function(){return this.ub},set:function(a){var b=this.ub;if(b!==a){var c=this instanceof U&&!(this instanceof we);jg(this);this.ub=a;var d=this.diagram;null!==d&&(c?(c=d.partManager,this instanceof T?(null!==b&&c.bf.remove(b),null!==a&&c.bf.add(a,this)):this instanceof U&&(null!==b&&c.cf.remove(b),null!==a&&c.cf.add(a,this))):(c=this.panel,null!==c&&null!==c.ge&&(null!==b&&c.ge.remove(b), +null!==a&&c.ge.add(a,this))));this.g("data",b,a);null!==d&&d.undoManager.isUndoingRedoing||null!==a&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var b=this.zn;b!==a&&(this.zn=a,this.g("itemIndex",b,a))}},allBindings:{get:function(){return null!==this.A?this.A.nb:null},set:function(a){this.localBindings!==a&&(null===this.A&&(this.A=new gl),this.A.nb=a)}},itemArray:{get:function(){return this.Hh}, +set:function(a){var b=this.Hh;if(b!==a||null!==a&&Cn(this,a)){var c=this.diagram;b!==a&&(null!==c&&null!==b&&Qj(c.partManager,this,c),this.Hh=a,null!==c&&null!==a&&Nj(c.partManager,this));this.g("itemArray",b,a);null!==c&&c.undoManager.isUndoingRedoing||Dn(this,a)}}},itemTemplate:{get:function(){return null===this.itemTemplateMap?null:this.itemTemplateMap.I("")},set:function(a){if(null===this.itemTemplateMap){if(null===a)return;this.itemTemplateMap=new ob}var b=this.itemTemplateMap.I(""); +b!==a&&((a instanceof U||a.isPanelMain)&&C("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",b,a),a=this.diagram,null!==a&&a.undoManager.isUndoingRedoing||this.nv())}},itemTemplateMap:{get:function(){return null!==this.A?this.A.Pc:null},set:function(a){var b=this.itemTemplateMap;if(b!==a){for(var c=a.iterator;c.next(););fl(this);this.A.Pc=a;this.g("itemTemplateMap",b,a);a=this.diagram;null!==a&&a.undoManager.isUndoingRedoing|| +this.nv()}}},itemCategoryProperty:{get:function(){return null!==this.A?this.A.Oc:"category"},set:function(a){var b=this.itemCategoryProperty;b!==a&&(fl(this),this.A.Oc=a,this.g("itemCategoryProperty",b,a))}},isAtomic:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("isAtomic",b,a))}},isClipping:{get:function(){return 0!==(this.l&2097152)}, set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this instanceof pf&&(this.tb=null),this.v(),this.g("isClipping",b,a))}},isOpposite:{get:function(){return 0!==(this.l&33554432)},set:function(a){var b=0!==(this.l&33554432);b!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",b,a))}},isEnabled:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);if(b!==a){var c=null===this.panel||this.panel.If(); -this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&wn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); -ma.Object.defineProperties(W,{Position:{get:function(){return Xl.I("Position")}},Horizontal:{get:function(){return Xl.I("Horizontal")}},Vertical:{get:function(){return Xl.I("Vertical")}},Spot:{get:function(){return Xl.I("Spot")}},Auto:{get:function(){return Xl.I("Auto")}},Table:{get:function(){return Xl.I("Table")}},Viewbox:{ -get:function(){return Xl.I("Viewbox")}},TableRow:{get:function(){return Xl.I("TableRow")}},TableColumn:{get:function(){return Xl.I("TableColumn")}},Link:{get:function(){return Xl.I("Link")}},Grid:{get:function(){return Xl.I("Grid")}},Graduated:{get:function(){return Xl.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; +this.l^=4194304;this.g("isEnabled",b,a);b=this.diagram;null!==b&&b.undoManager.isUndoingRedoing||c&&zn(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var b=this.$e;b!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",b,a))}}}); +ma.Object.defineProperties(W,{Position:{get:function(){return $l.I("Position")}},Horizontal:{get:function(){return $l.I("Horizontal")}},Vertical:{get:function(){return $l.I("Vertical")}},Spot:{get:function(){return $l.I("Spot")}},Auto:{get:function(){return $l.I("Auto")}},Table:{get:function(){return $l.I("Table")}},Viewbox:{ +get:function(){return $l.I("Viewbox")}},TableRow:{get:function(){return $l.I("TableRow")}},TableColumn:{get:function(){return $l.I("TableColumn")}},Link:{get:function(){return $l.I("Link")}},Grid:{get:function(){return $l.I("Grid")}},Graduated:{get:function(){return $l.I("Graduated")}}});W.prototype.rebuildItemElements=W.prototype.nv; W.prototype.findItemPanelForData=W.prototype.tx;W.prototype.updateTargetBindings=W.prototype.La;W.prototype.copyTemplate=W.prototype.Vy;W.prototype.graduatedValueForPoint=W.prototype.Hz;W.prototype.graduatedPointForValue=W.prototype.Gz;W.prototype.findColumnForLocalX=W.prototype.gz;W.prototype.findRowForLocalY=W.prototype.oz;W.prototype.addColumnDefinition=W.prototype.Cy;W.prototype.addRowDefinition=W.prototype.Iy;W.prototype.addRowColumnDefinition=W.prototype.Hy; W.prototype.removeColumnDefinition=W.prototype.kA;W.prototype.getColumnDefinition=W.prototype.Fb;W.prototype.removeRowDefinition=W.prototype.pA;W.prototype.getRowDefinition=W.prototype.Gb;W.prototype.removeAt=W.prototype.mb;W.prototype.remove=W.prototype.remove;W.prototype.insertAt=W.prototype.Hb;W.prototype.elt=W.prototype.M;W.prototype.add=W.prototype.add;W.prototype.findObject=W.prototype.fb;W.prototype.findInVisualTree=W.prototype.Nl;W.prototype.walkVisualTreeFrom=W.prototype.qm; -W.prototype.findMainElement=W.prototype.Qb;var Gn=!1,Hn=null,Xl=new ob;W.className="Panel";W.definePanelLayout=In;In("Position",new Im);In("Vertical",new Lm);In("Auto",new Om);In("Link",new Zm);function Kn(){this.lq=0;this.F=100;this.ia=10;this.V=0;this.Zh=this.o=this.j=this.u=null}Kn.prototype.copy=function(){var a=new Kn;a.lq=this.lq;a.F=this.F;a.ia=this.ia;a.V=this.V;a.u=this.u;a.j=this.j;a.o=this.o;a.Zh=this.Zh;return a};Kn.className="GradPanelSettings"; -function Jn(){this.Pc=[];this.Oc=[];this.j=this.ob=Ln;this.hb=this.Ib=0;this.Qp=lc;this.Ha=1;this.V=this.ia=null;this.F=1;this.nb=this.o=this.u=null} -Jn.prototype.copy=function(a){for(var b=new Jn,c=this.Pc,d=c.length,e=b.Pc,f=0;fa&&xa(a,">= 0",Vj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), -this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Vj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Vj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ -get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Vj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= -a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&cm(a,"RowColumnDefinition.separatorStroke"), -a instanceof ql&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea&&xa(a,">= 0",Zj,"height"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(), +this.Pb("height",b,a))}},width:{get:function(){return this.Hc},set:function(a){var b=this.Hc;b!==a&&(0>a&&xa(a,">= 0",Zj,"width"),this.Hc=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("width",b,a))}},minimum:{get:function(){return this.jj},set:function(a){var b=this.jj;b!==a&&((0>a||!isFinite(a))&&xa(a,">= 0",Zj,"minimum"),this.jj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("minimum",b,a))}},maximum:{ +get:function(){return this.hj},set:function(a){var b=this.hj;b!==a&&(0>a&&xa(a,">= 0",Zj,"maximum"),this.hj=a,this.actual=this.oa,null!==this.panel&&this.panel.v(),this.Pb("maximum",b,a))}},alignment:{get:function(){return this.Kb},set:function(a){var b=this.Kb;b.D(a)||(this.Kb=a.J(),null!==this.panel&&this.panel.v(),this.Pb("alignment",b,a))}},stretch:{get:function(){return this.hg},set:function(a){var b=this.hg;b!==a&&(this.hg= +a,null!==this.panel&&this.panel.v(),this.Pb("stretch",b,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.dg;null!==a&&null!==b&&b.D(a)||(null!==a&&(a=a.J()),this.dg=a,null!==this.panel&&this.panel.v(),this.Pb("separatorPadding",b,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var b=this.lo;b!==a&&(null!==a&&fm(a,"RowColumnDefinition.separatorStroke"), +a instanceof tl&&a.freeze(),this.lo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStroke",b,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var b=this.mo;b!==a&&(this.mo=a,null!==this.panel&&this.panel.v(),this.Pb("separatorStrokeWidth",b,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var b=this.tj;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,q,r,u=0,w=Ea(),v=2;vn&&(n=1);e=c=n;l=g/2;m=0===l?!1:!0;v=0;r=w[v];n=r[0];q=r[1];p=r[2];r=r[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){Ga(w);return}e>r?(y=e-r,e=r):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(q);a.translate(-(g/2),-(f/2));0===y&&d.hh(a,b);a.translate(g/2,f/2);a.rotate(-q);a.translate(-h,-k);u-=e;r-=e;if(0!==y){v++;if(v===w.length){Ga(w);return}r=w[v];n=r[0];q=r[1];p=r[2];r=r[3];e=y}}Ga(w)}} -t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof te&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= +t.hh=function(a,b){var c=this.xc,d=this.Ui;if(null!==c||null!==d){var e=this.ua;if(null!==e){a.yc();var f=this.actualBounds,g=this.naturalBounds;null!==d&&ji(this,a,d,!0,!1,g,f);var h=this.part,k=this.ig;null===c||0!==k||null===h||!this.isPanelMain&&h.Qb()!==this||(k=h.type===W.Link&&h instanceof we&&"Selection"===h.category&&h.adornedObject instanceof Bf&&h.adornedPart.Qb()===h.adornedObject?h.adornedObject.strokeWidth:0);0===k&&(c=null);null!==c&&0!==k&&(ji(this,a,c,!1,!1,g,f),a.lineWidth=k,a.lineJoin= this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit);f=!1;h&&b.Gf("drawShadows")&&(f=h.isShadowed);!1===a.Il&&(f=!1);h=!0;null===c||null!==d&&"transparent"!==d||(h=!1);g=!1;k=this.strokeDashArray;null!==k&&(g=!0,a.js(k,this.strokeDashOffset));if(e.type===P.j)a.beginPath(),a.moveTo(e.startX,e.startY),a.lineTo(e.endX,e.endY),null!==c&&a.ik(),a.Se();else if(e.type===P.u){var l=e.startX;k=e.startY;var m=e.endX,n=e.endY;e=Math.min(l,m);var p=Math.min(k,n);l=Math.abs(m-l);k=Math.abs(n- -k);a.beginPath();a.rect(e,p,l,k);null!==d&&a.ng(d);null!==c&&(h&&f&&ul(a),a.ik(),h&&f&&tl(a));a.Se()}else if(e.type===P.F)l=e.startX,k=e.startY,m=e.endX,n=e.endY,e=Math.abs(m-l)/2,p=Math.abs(n-k)/2,l=Math.min(l,m)+e,k=Math.min(k,n)+p,a.beginPath(),a.moveTo(l,k-p),a.bezierCurveTo(l+K.wg*e,k-p,l+e,k-K.wg*p,l+e,k),a.bezierCurveTo(l+e,k+K.wg*p,l+K.wg*e,k+p,l,k+p),a.bezierCurveTo(l-K.wg*e,k+p,l-e,k+K.wg*p,l-e,k),a.bezierCurveTo(l-e,k-K.wg*p,l-K.wg*e,k-p,l,k-p),a.closePath(),null!==d&&a.ng(d),null!==c&& -(h&&f&&ul(a),a.ik(),h&&f&&tl(a)),a.Se();else if(e.type===P.o)for(e=e.figures,k=e.length,p=0;pu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Nd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;vu.sweepAngle,null!==q?q.endX:l.startX,null!==q?q.endY:l.startY)}else if(q=Kd(u,l),w=q.length,0===w)a.lineTo(u.centerX,u.centerY);else for(var v=0;v(c.startX-c.endX)*(a.x-c.endX)+(c.startY-c.endY)*(a.y-c.endY)||0>d)return!1;N.free(f);return K.Zb(c.startX,c.startY,c.endX,c.endY,e,a.x,a.y)}if(c.type=== P.u){b=c.startX;var g=c.startY,h=c.endX;c=c.endY;f.x=Math.min(b,h);f.y=Math.min(g,c);f.width=Math.abs(h-b);f.height=Math.abs(c-g);if(null===this.fill){f.Bc(-d,-d);if(f.ca(a))return N.free(f),!1;f.Bc(d,d)}null!==this.stroke&&f.Bc(e,e);a=f.ca(a);N.free(f);return a}if(c.type===P.F){g=c.startX;e=c.startY;h=c.endX;var k=c.endY;c=Math.min(g,h);b=Math.min(e,k);g=Math.abs(h-g)/2;e=Math.abs(k-e)/2;c=a.x-(c+g);b=a.y-(b+e);if(null===this.fill){g-=d;e-=d;if(0>=g||0>=e||1>=c*c/(g*g)+b*b/(e*e))return N.free(f), -!1;g+=d;e+=d}null!==this.stroke&&(g+=d,e+=d);N.free(f);return 0>=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Rd(c,a.x,a.y,e):Pd(c,a,e,1=g||0>=e?!1:1>=c*c/(g*g)+b*b/(e*e)}if(c.type===P.o)return N.free(f),null===this.fill?Od(c,a.x,a.y,e):Md(c,a,e,1=this.strokeWidth)m=K.Ve(l.startX,l.startY,l.endX,l.endY,f,g,h,k,e);else{l.startX===l.endX?(d=n,m=0):(b=(l.endY-l.startY)/(l.endX-l.startX),m=n/Math.sqrt(1+b*b), d=m*b);b=Ea();a=new J;K.Ve(l.startX+d,l.startY+m,l.endX+d,l.endY+m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX-d,l.startY-m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.startX+d,l.startY+m,l.startX-d,l.startY-m,f,g,h,k,a)&&b.push(a);a=new J;K.Ve(l.endX+d,l.endY+m,l.endX-d,l.endY-m,f,g,h,k,a)&&b.push(a);h=b.length;if(0===h)return Ga(b),!1;m=!0;k=Infinity;for(d=0;dMath.abs(c)){k=g-m-c*(f-d);if(0>a*a*c*c+l*l-k*k){e.x=NaN;e.y=NaN;m=!1;break a}n=Math.sqrt(a*a*c*c+l*l-k*k);h=(-(a*a*c*k)+a*l*n)/(l*l+a*a*c*c)+d;a=(-(a*a*c*k)-a*l*n)/(l*l+a*a*c*c)+d;l=c*(h-d)+k+m;k=c* (a-d)+k+m;Math.abs((f-h)*(f-h))+Math.abs((g-l)*(g-l))h){e.x=NaN;e.y=NaN;m=!1;break a}k=Math.sqrt(h);h=m+k;k=m-k;Math.abs(h-g)Math.abs(r)?(u*=.5/r,r=.5):0!==u&&.5>Math.abs(u)&&(r*=.5/u,u=.5),v-=r,y-= -u;q.contains(v,y);)v-=r,y-=u;e.x=h;e.y=k;for(u=0;uc?a-c:c-a)<(b>d?b-d:d-b)?(a=ba||K.$(k.y,a))&&(k.yb||K.$(k.x,b))&&(k.x=a&&d<=b;a=d&&c<=a} t.ux=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.gh(a,!0))return!0;var e=a.Bf(b),f=e;1.5=e||zb(b,f,0,-n)>=e||zb(b, -f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Rd(b,a.x,a.y,f):Pd(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Ed:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Kd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Ld:case Md:p=n.type===Ld?Nd(n,f):Od(n,f,g,m);var q=p.length;if(0===q){g=n.type===Ld?n.centerX:n.endX;m=n.type===Ld?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; +f,0,n)>=e||zb(b,f,m,0)>=e?!1:!0}else if(b.type===P.o){l=b.bounds;f=l.x;h=l.y;k=l.x+l.width;l=l.y+l.height;if(a.x>k&&a.xl&&a.ye&&yb(a.x,a.y,f,h,k,h)>e&&yb(a.x,a.y,k,l,f,l)>e&&yb(a.x,a.y,k,l,k,h)>e)return!1;f=Math.sqrt(e);if(c){if(null===this.fill?Od(b,a.x,a.y,f):Md(b,a,f,!0,!1))return!0}else{c=b.figures;for(b=0;be)return!1;h=f.segments.s;k=h.length;for(l=0;le)return!1;break;case Bd:var p=Ea();K.Qe(g,m,n.point1X,n.point1Y,n.point2X,n.point2Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Hd:p=Ea();K.ep(g,m,n.point1X,n.point1Y,n.endX,n.endY,.8,p);g=d(p,a);Ga(p);if(g)return!1;g=n.endX;m=n.endY;if(a.zd(g,m)>e)return!1;break;case Id:case Jd:p=n.type===Id?Kd(n,f):Ld(n,f,g,m);var q=p.length;if(0===q){g=n.type===Id?n.centerX:n.endX;m=n.type===Id?n.centerY:n.endY;if(a.zd(g,m)>e)return!1; break}n=null;for(var r=Ea(),u=0;u= 0",Bf,"strokeWidth:value")}},strokeCap:{ -get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Nn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', -Bf,"strokeJoin"):(Nn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Nn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;e= 0",Bf,"strokeWidth:value")}},strokeCap:{ +get:function(){return null!==this.Na?this.Na.Hr:"butt"},set:function(a){var b=this.strokeCap;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?xa(a,'"butt", "round", or "square"',Bf,"strokeCap"):(Qn(this),this.Na.Hr=a,this.N(),this.g("strokeCap",b,a)))}},strokeJoin:{get:function(){return null!==this.Na?this.Na.Ir:"miter"},set:function(a){var b=this.strokeJoin;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?xa(a,'"miter", "bevel", or "round"', +Bf,"strokeJoin"):(Qn(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",b,a)))}},strokeMiterLimit:{get:function(){return null!==this.Na?this.Na.Jr:10},set:function(a){var b=this.strokeMiterLimit;if(b!==a&&1<=a){Qn(this);this.Na.Jr=a;this.N();var c=this.part;null!==c&&(c.ag=NaN);this.g("strokeMiterLimit",b,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var b=this.Yg;if(b!==a){if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1(n*n+m*m)*p*p&&(c=!0);b.ib!==a&&(c=!1);b.ib instanceof ii&& -(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case al:a.translate(e,0);a.scale(-1,1);break;case $k:a.translate(0,f);a.scale(1,-1);break;case bl:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], -a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case al:a.scale(-1,1);a.translate(-e,0);break;case $k:a.scale(1,-1);a.translate(0,-f);break;case bl:a.scale(-1,-1),a.translate(-e,-f)}}}; +(c=!1);!1===b.Gf("textGreeking")&&(c=!1);b=this.spacingAbove;n=this.spacingBelow;switch(this.flip){case dl:a.translate(e,0);a.scale(-1,1);break;case cl:a.translate(0,f);a.scale(1,-1);break;case el:a.translate(e,f),a.scale(-1,-1)}a.yc();m=this.Gc;p=(b+g+n)*m;f>p&&(d=this.verticalAlignment,d=d.y*f-d.y*p+d.offsetY);if(1===m&&null!==this.ze)n=this.Db,n>e&&(n=e),this.Nj(this.ze,a,0,d+b,e,g,n,c,h,k,l);else if(null!==this.Qc&&null!==this.Rb)for(p=0;pe&&(q=e);d+=b;this.Nj(this.Rb[p], +a,0,d,e,g,q,c,h,k,l);d+=g+n}switch(this.flip){case dl:a.scale(-1,1);a.translate(-e,0);break;case cl:a.scale(1,-1);a.translate(0,-f);break;case el:a.scale(-1,-1),a.translate(-e,-f)}}}; t.Nj=function(a,b,c,d,e,f,g,h,k,l,m){var n=0;if(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);else{"left"===k?n=0:"right"===k?n=e:"center"===k&&(n=e/2);e=null!==ko?ko(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);if(l){h=null!==lo?lo(this,f):.8*f;k=c+n;l=d+h;e=c+n+g;h=d+h;var p=a;b.beginPath();b.lineWidth=p;b.moveTo(k,l);b.lineTo(e,h);b.stroke();b.Se();b instanceof ii&&b.ad.classList.add("gojs-td")}m&&(m= d+f-f/2.2|0,0!==a%2&&(m+=.5),d=c+n,f=m,c=c+n+g,g=m,n=a,b.beginPath(),b.lineWidth=n,b.moveTo(d,f),b.lineTo(c,g),b.stroke(),b.Se(),b instanceof ii&&b.ad.classList.add("gojs-td"))}}; -t.jk=function(a,b,c){if(!Y.prototype.jk.call(this,a,b,c))return!1;ji(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds);if(c){if(0===this.svg.getElementsByTagName("text").length)return!0;b=this.svg.getElementsByClassName("gojs-td");for(c=0;c=this.Rb.length))){this.l|=16777216; l=this.Rb[k];for(b=Math.max(1,a-b);oo(l)>b&&1a.maxLines&&(a.l|=16777216)}} +t.eh=function(a,b,c,d){pl(this,a,b,c,d)};function uo(a,b,c){if(null===a.ze)a.ze=b,a.Db=c;else{if(null===a.Rb||null===a.Qc)a.Rb=[],a.Qc=[],a.Rb.push(a.ze),a.Qc.push(a.Db);a.Rb.push(b);a.Qc.push(c);a.Rb.length>a.maxLines&&(a.l|=16777216)}} function vo(a,b,c,d){var e=a.formatting===no;e&&(b=b.trim());var f=0,g=a.Ae,h=a.spacingAbove+a.spacingBelow;h=Math.max(0,jo(a)+h);var k=a.overflow===qo?ro(g):0;if(a.Gc>=a.maxLines)null!==d&&d.h(0,h);else if(g=b,a.wrap===wo){a.Le=1;var l=oo(b);if(0===k||l<=c)a.Db=Math.max(a.Db,l),uo(a,b,a.Db),null!==d&&d.h(l,h);else{f=xo(a,g);g=g.substr(f.length);b=xo(a,g);for(l=oo(f+b);0 c&&1c;){var n=1;l=oo(b.substr(0,n));for(m=0;l<=c;)n++,m=l,l=oo(b.substr(0,n));if(1===n){var p=l;f=Math.max(f,l)}else p=m,f=Math.max(f,m);n--;1>n&&(n=1);uo(a,b.substr(0,n),p);k++;b=b.substr(n);if(a.Gc+k>a.maxLines)break}m=xo(a,g);for(l=oo(b+m);0a.maxLines))break}a.Le=Math.min(a.maxLines,k);a.Db=Math.max(a.Db,f);null!==d&&d.h(a.Db,h*a.Le)}} function xo(a,b){if(a.wrap===yo)return b.substr(0,1);for(var c=b.length,d=0,e=zo;d=b.length?b:b.substr(0,d)}function oo(a){return null===go?8*a.length:go.measureText(a).width}function jo(a){if(null!==a.df)return a.df;var b=a.Ae;if(null===go){var c=16;return a.df=c}void 0!==Bo[b]&&5E3>Co?c=Bo[b]:(c=1.3*go.measureText("M").width,Bo[b]=c,Co++);return a.df=c} function ro(a){if(null===go)return 6;if(void 0!==Do[a]&&5E3>Eo)var b=Do[a];else b=go.measureText(so).width,Do[a]=b,Eo++;return b} function po(a,b){var c=a.fc.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),d=a.spacingAbove+a.spacingBelow;d=Math.max(0,jo(a)+d);if(0===c.length)return a.Db=0,a.Gc=1,d;if(!a.isMultiline){var e=c.indexOf("\n",0);0<=e&&(c=c.substr(0,e))}e=0;for(var f=a.Gc=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.wrap!==wo){a.Le=0;var k=L.alloc();vo(a,f,b,k);e+=k.height;L.free(k);a.Gc+=a.Le}else vo(a,f,b,null),e+=d,a.Gc++;a.Gc===a.maxLines&&(h=!0)}f=g+1}return a.Lq=e} -ma.Object.defineProperties(Pg.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= -this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Yc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= -a,Nl(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, +ma.Object.defineProperties(Ng.prototype,{font:{get:function(){return this.Ae},set:function(a){var b=this.Ae;b!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",b,a))}},text:{get:function(){return this.fc},set:function(a){var b=this.fc;null!==a&&void 0!==a?a=a.toString():a="";b!==a&&(this.fc=a,this.v(),this.g("text",b,a),this.Uc=!0)}},textAlign:{get:function(){return null!==this.da?this.da.Or:"start"},set:function(a){var b= +this.textAlign;b===a||"start"!==a&&"end"!==a&&"left"!==a&&"right"!==a&&"center"!==a||(ho(this),this.da.Or=a,this.N(),this.g("textAlign",b,a))}},flip:{get:function(){return null!==this.da?this.da.Xf:kg},set:function(a){var b=this.flip;b!==a&&(ho(this),this.da.Xf=a,this.N(),this.g("flip",b,a))}},verticalAlignment:{get:function(){return null!==this.da?this.da.Yr:Zc},set:function(a){var b=this.verticalAlignment;b.D(a)||(a=a.J(),ho(this),this.da.Yr= +a,Ql(this),this.g("verticalAlignment",b,a))}},naturalBounds:{get:function(){if(!this.ec.w()){var a=L.alloc();vo(this,this.fc,999999,a);var b=a.width;L.free(a);a=po(this,b);var c=this.desiredSize;isNaN(c.width)||(b=c.width);isNaN(c.height)||(a=c.height);Pb(this.ec,b,a)}return this.ec}},isMultiline:{get:function(){return 0!==(this.l&2097152)},set:function(a){var b=0!==(this.l&2097152);b!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",b, a))}},isUnderline:{get:function(){return 0!==(this.l&4194304)},set:function(a){var b=0!==(this.l&4194304);b!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",b,a))}},isStrikethrough:{get:function(){return 0!==(this.l&8388608)},set:function(a){var b=0!==(this.l&8388608);b!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",b,a))}},wrap:{get:function(){return null!==this.da?this.da.$r: -Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&cm(a, -"TextBlock.stroke"),a instanceof ql&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: +Fo},set:function(a){var b=this.wrap;b!==a&&(ho(this),this.da.$r=a,this.v(),this.g("wrap",b,a))}},overflow:{get:function(){return null!==this.da?this.da.$q:Go},set:function(a){var b=this.overflow;b!==a&&(ho(this),this.da.$q=a,this.v(),this.g("overflow",b,a))}},isOverflowed:{get:function(){return 0!==(this.l&16777216)}},stroke:{get:function(){return this.xc},set:function(a){var b=this.xc;b!==a&&(null!==a&&fm(a, +"TextBlock.stroke"),a instanceof tl&&a.freeze(),this.xc=a,this.N(),this.g("stroke",b,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return jo(this)}},editable:{get:function(){return 0!==(this.l&1048576)},set:function(a){var b=0!==(this.l&1048576);b!==a&&(this.l^=1048576,this.g("editable",b,a))}},textEditor:{get:function(){return null!==this.da?this.da.Qr: null},set:function(a){var b=this.textEditor;b!==a&&(ho(this),this.da.Qr=a,this.g("textEditor",b,a))}},errorFunction:{get:function(){return null!==this.da?this.da.Hd:null},set:function(a){var b=this.errorFunction;b!==a&&(ho(this),this.da.Hd=a,this.g("errorFunction",b,a))}},interval:{get:function(){return null!==this.fa?this.fa.Sk:1},set:function(a){var b=this.interval;a=Math.round(a);if(b!==a&&0!==a&&isFinite(a)){null===this.fa&&(this.fa= new eo);this.fa.Sk=a;this.v();var c=this.panel;null!==c&&(c.graduatedIntervals=null);this.g("interval",b,a)}}},graduatedStart:{get:function(){return null!==this.fa?this.fa.u:0},set:function(a){var b=this.graduatedStart;b!==a&&(0>a?a=0:1a?a=0:1=a&&xa(a,"> 0",Pg,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ -get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Pg,"None",0),to=new E(Pg,"WrapFit",1),Fo=new E(Pg,"WrapDesiredSize",2),yo=new E(Pg,"WrapBreakAll",3),Go=new E(Pg,"OverflowClip",0),qo=new E(Pg,"OverflowEllipsis",1),no=new E(Pg,"FormatTrim",0),Ao=new E(Pg,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ta,Co=0,Do=new Ta,Eo=0,so="...",mo="",go=null,fo=!1;Pg.className="TextBlock"; -function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Yc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Pg.getEllipsis=function(){return so};Pg.setEllipsis=function(a){so=a;Do=new Ta;Eo=0};Pg.getBaseline=function(){return ko}; -Pg.setBaseline=function(a){ko=a};Pg.getUnderline=function(){return lo};Pg.setUnderline=function(a){lo=a};Pg.isValidFont=function(a){fo||(go=Ng?(new Pi(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Pg.FormatNone=Ao;Pg.FormatTrim=no;Pg.None=wo;Pg.OverflowClip=Go; -Pg.OverflowEllipsis=qo;Pg.WrapBreakAll=yo;Pg.WrapDesiredSize=Fo;Pg.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; -function dk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=cc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(dk,Y); -dk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};dk.prototype.qb=function(a){a===kg||a===mg||a===Zk?this.imageStretch=a:Y.prototype.qb.call(this,a)};dk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Mi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ta,Io=0)} -function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case Zk:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===Zk&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ -p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;m=a&&xa(a,"> 0",Ng,"maxLines"),ho(this),this.da.Jq=a,this.v(),this.g("maxLines",b,a))}},metrics:{get:function(){return{arrSize:null!==this.Qc?this.Qc:[this.Db],arrText:null!==this.Rb?this.Rb:[this.ze],maxLineWidth:this.Db,fontHeight:this.df}}},choices:{ +get:function(){return this.Gm},set:function(a){var b=this.Gm;b!==a&&(this.Gm=a,this.g("choices",b,a))}}});var ko=null,lo=null,wo=new E(Ng,"None",0),to=new E(Ng,"WrapFit",1),Fo=new E(Ng,"WrapDesiredSize",2),yo=new E(Ng,"WrapBreakAll",3),Go=new E(Ng,"OverflowClip",0),qo=new E(Ng,"OverflowEllipsis",1),no=new E(Ng,"FormatTrim",0),Ao=new E(Ng,"FormatNone",0),zo=/[ \u200b\u00ad]/,Bo=new Ua,Co=0,Do=new Ua,Eo=0,so="...",mo="",go=null,fo=!1;Ng.className="TextBlock"; +function io(){this.oc=!1;this.Hd=null;this.Xf=kg;this.gq=no;this.Jq=Infinity;this.$q=Go;this.Er=this.Dr=0;this.Or="start";this.vj=this.Qr=this.Pr=null;this.Yr=Zc;this.$r=Fo}io.prototype.copy=function(){var a=new io;a.Hd=this.Hd;a.Xf=this.Xf;a.gq=this.gq;a.Jq=this.Jq;a.$q=this.$q;a.Dr=this.Dr;a.Er=this.Er;a.Or=this.Or;a.Pr=this.Pr;a.Qr=this.Qr;a.vj=this.vj;a.Yr=this.Yr;a.$r=this.$r;return a};Ng.getEllipsis=function(){return so};Ng.setEllipsis=function(a){so=a;Do=new Ua;Eo=0};Ng.getBaseline=function(){return ko}; +Ng.setBaseline=function(a){ko=a};Ng.getUnderline=function(){return lo};Ng.setUnderline=function(a){lo=a};Ng.isValidFont=function(a){fo||(go=Lg?(new Ti(null)).context:null,fo=!0);if(null===go)return!0;var b=go.font;if(a===b||"10px sans-serif"===a)return!0;go.font="10px sans-serif";go.font=a;var c=go.font;if("10px sans-serif"!==c)return go.font=b,!0;go.font="19px serif";var d=go.font;go.font=a;c=go.font;go.font=b;return c!==d};Ng.FormatNone=Ao;Ng.FormatTrim=no;Ng.None=wo;Ng.OverflowClip=Go; +Ng.OverflowEllipsis=qo;Ng.WrapBreakAll=yo;Ng.WrapDesiredSize=Fo;Ng.WrapFit=to;function eo(){this.Sk=1;this.u=0;this.j=1;this.o=this.F=null}eo.prototype.copy=function(){var a=new eo;a.Sk=this.Sk;a.u=this.u;a.j=this.j;a.F=this.F;a.o=this.o;return a};eo.className="GradElementSettings"; +function hk(a,b){Y.call(this);this.Eg=null;this.qo="";this.Xg=bc;this.Mk=nd;this.Zg=this.Hd=null;this.Lk=wc;this.Xf=kg;this.vl=null;this.qn=!1;this.en=!0;this.$k=!1;this.bt=this.rl=null;"string"===typeof a?this.source=a:a&&Object.assign(this,a);b&&Object.assign(this,b)}var Ho;la(hk,Y); +hk.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.qo=this.qo;a.element=this.Eg;a.Xg=this.Xg.J();a.Mk=this.Mk;a.Xf=this.Xf;a.Hd=this.Hd;a.Zg=this.Zg;a.Lk=this.Lk.J();a.en=this.en;a.rl=this.rl};hk.prototype.qb=function(a){a===kg||a===mg||a===bl?this.imageStretch=a:Y.prototype.qb.call(this,a)};hk.prototype.toString=function(){return"Picture("+this.source+")#"+bb(this)};function Qi(a){void 0===a&&(a="");""!==a?Ho[a]&&(delete Ho[a],Io--):(Ho=new Ua,Io=0)} +function Jo(a,b){b.sy||(b.Fq=function(c){b.sq=!0;b.ln=!1;var d=b.Bg.copy();if(null!==d&&void 0!==d){for(d=d.iterator;d.next();){var e=d.value;e.N();var f=b.getAttribute("src")||"";var g=e.Og.I(f);if(null!==g)for(var h=g.length,k=0;k=d.width&&(f=f+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case nd:n=d.width;p=d.height;break;case mg:case bl:q===mg?(q=Math.min(d.height/p,d.width/n),n*=q,p*=q):q===bl&&(q=Math.max(d.height/p,d.width/n),n*=q,p*=q,n>=d.width&&(f=(f+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/ +p)*h),k*=1/(n/d.width),h*=1/(p/d.height),n=d.width,p=d.height)}q=this.Df()*b.scale;var u=n*q*p*q,w=k*h/u,v=c.__goCache;q=null;var y=Ko;if(!e){if(c.sq&&void 0!==v&&4y*y)for(null===v.gi&&(Lo(v,4,l,m,c),Lo(v,16,l,m,c)),e=v.gi,l=e.length,m=0;ma)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Wd(a,0,!0)).add(new Xd(pd,b-a,0)).add(new Xd(Ed,b,a,b-f,0,b,f)).add(new Xd(pd,b,c-a)).add(new Xd(Ed,b-a,c,b,c-f,b-f,c)).add(new Xd(pd,a,c)).add(new Xd(Ed,0,c-a,f,c,0,c-f)).add(new Xd(pd,0,a)).add((new Xd(Ed,a,0,0,f,f,0)).close()));1a)a=5;a=Math.min(a,b/3);a=Math.min(a,c/3);var d="rr"+b+","+c+","+a,e=K.Mf[d];if(void 0!==e)return e;var f=a*K.wg;e=(new P).add((new Xd(a,0,!0)).add(new Yd(pd,b-a,0)).add(new Yd(Bd,b,a,b-f,0,b,f)).add(new Yd(pd,b,c-a)).add(new Yd(Bd,b-a,c,b,c-f,b-f,c)).add(new Yd(pd,a,c)).add(new Yd(Bd,0,c-a,f,c,0,c-f)).add(new Yd(pd,0,a)).add((new Yd(Bd,a,0,0,f,f,0)).close()));1e.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.righta&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=1);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);wp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}};function wp(a,b,c,d,e,f,g){if(1a&&(a=2);var b=this.diagram;if(null!==b&&!b.Ue){b.Ue=!0;var c=new H;c.add(this);yp(this,c,b.isTreePathToChildren,a,b,this,b.treeCollapsePolicy===yi);b.Ue=!1}}; function yp(a,b,c,d,e,f,g){for(var h=f===a?!1:a.isTreeExpanded,k=c?a.Mo():a.Sd(),l={};k.next();){var m=k.value;if(m.isTreeLink&&(h||m.fd||m.bb(),m=m.To(a),null!==m&&m!==a&&!b.contains(m))){b.add(m);if(!h){m.$b(!0);m.oh();var n=c?m.Oo():m.Po();l.wv=a;n.all(function(a){return function(b){return b===a.wv||!b.isTreeExpanded}}(l))&&e.Cj(m,f)}if(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new dc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; +ig.prototype.computeMemberBounds=function(a){if(!(this.part instanceof pf))return a.h(0,0,0,0),a;for(var b=this.part,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=b.memberParts;g.next();){var h=g.value;if(h.isVisible()){if(h instanceof T){if(!b.computesBoundsIncludingLinks)continue;if(yj(h))continue;if(h.fromNode===b||h.toNode===b)continue}h=h.actualBounds;h.lefte&&(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};ma.Object.defineProperties(ig.prototype,{padding:{get:function(){return this.zb},set:function(a){"number"===typeof a&&(a=new cc(a));var b=this.zb;b.D(a)||(this.zb=a=a.J(),this.g("padding",b,a),this.v())}}});ig.className="Placeholder"; function T(a){U.call(this,W.Link);this.Qa=8;this.ef=null;this.ff="";this.uf=this.gn=null;this.vf="";this.uo=null;this.pk=Zf;this.Om=0;this.Qm=Zf;this.Rm=NaN;this.qj=Dp;this.po=.5;this.wd=null;this.Ob=(new F).freeze();this.Tg=this.Mg=null;this.ml=new N;this.ua=new P;this.u=this.o=this.Sf=this.Wf=null;this.su=new J;this.cq=this.Nw=this.Mw=null;this.vt=NaN;this.ba=null;this.j=[];a&&Object.assign(this,a)}la(T,U); T.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.Qa=this.Qa&-113;a.ff=this.ff;a.gn=this.gn;a.vf=this.vf;a.uo=this.uo;a.pk=this.pk;a.Om=this.Om;a.Qm=this.Qm;a.Rm=this.Rm;a.qj=this.qj;a.po=this.po;null!==this.ba&&(a.ba=this.ba.copy())};t=T.prototype;t.Af=function(a){U.prototype.Af.call(this,a);this.ff=a.ff;this.vf=a.vf;a.Mg=null;a.bb();a.Sf=this.Sf;var b=a.fromPort;null!==b&&pp(b);a=a.toPort;null!==a&&pp(a)}; -t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new el)};t.si=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.Av=function(){return!1}; -t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case jn:a=b;break;case an:a=b+90;break;case cn:a=b-90;break;case Hp:a=b+180;break;case kn:a=K.bp(b);90a&&(a-=180);break;case bn:a=K.bp(b+90);90a&&(a-=180);break;case dn:a=K.bp(b-90);90a&&(a-=180);break;case en:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; +t.qb=function(a){a.classType===T?2===(a.value&2)?this.routing=a:a===bg||a===Yf||a===Xf?this.curve=a:a===Ep||a===Fp||a===Gp?this.adjusting=a:a!==Dp&&a!==Zf&&C("Unknown Link enum value for a Link property: "+a):U.prototype.qb.call(this,a)};t.Xc=function(){null===this.ba&&(this.ba=new hl)};t.si=function(){var a=this.fromNode;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(zj(a)||Aj(a))return!1}a=this.toNode;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),zj(a)||Aj(a))?!1:!0};t.Av=function(){return!1}; +t.Bv=function(){};t.Zc=function(){return!1};T.prototype.computeAngle=function(a,b,c){return T.computeAngle(b,c)};T.computeAngle=function(a,b){switch(a){default:case Zf:a=0;break;case mn:a=b;break;case dn:a=b+90;break;case fn:a=b-90;break;case Hp:a=b+180;break;case nn:a=K.bp(b);90a&&(a-=180);break;case en:a=K.bp(b+90);90a&&(a-=180);break;case gn:a=K.bp(b-90);90a&&(a-=180);break;case hn:a=K.bp(b);if(45a||225a)return 0;90a&&(a-=180)}return K.bp(a)}; function jp(a){var b=a.fromNode,c=a.toNode,d=null;null!==b?d=null!==c?b.qx(c):b.containingGroup:null!==c?d=c.containingGroup:d=null;b=d;c=a.Ah;if(c!==b){null!==c&&ep(c,a);a.Ah=b;null!==b&&dp(b,a);var e=a.containingGroupChanged;if(null!==e){var f=!0,g=a.diagram;null!==g&&(f=g.aa,g.aa=!0);e(a,c,b);null!==g&&(g.aa=f)}!a.fd||a.Mw!==c&&a.Nw!==c||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=d}t=T.prototype; t.oh=function(){var a=this.containingGroup;null!==a&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&U.prototype.oh.call(this)};t.To=function(a){var b=this.fromNode;return a===b?this.toNode:b};t.Dz=function(a){var b=this.fromPort;return a===b?this.toPort:b};function tp(a,b){null===a.wd&&(a.wd=new H);a.wd.add(b);a.v()} t.Vo=function(a){U.prototype.Vo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,rp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||rp(c,this,d)}Jp(this)}};t.Wo=function(a){U.prototype.Wo.call(this,a);Ip(this)&&this.Xo(this.actualBounds);if(!a){a=this.ef;var b=null;null!==a&&(b=this.fromPort,sp(a,this,b));var c=this.uf;if(null!==c){var d=this.toPort;c===a&&d===b||sp(c,this,d)}Kp(this)}}; t.Kj=function(){this.fd=!0;if(null!==this.wd){var a=this.diagram;if(null!==a)for(var b=this.wd.copy().iterator;b.next();)a.remove(b.value)}null!==this.data&&(a=this.diagram,null!==a&&a.partManager.removeDataForLink(this))};T.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var a=this.diagram;null!==a&&a.partManager.updateRelationshipsFromData(this)}}; -T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));bf(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; +T.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?U.prototype.move.call(this,a,!1):(a=J.allocAt(c.x+d,c.y+e),U.prototype.move.call(this,a,!1),J.free(a));df(this,d,e);for(a=this.labelNodes;a.next();)b=a.value,c=b.position,b.moveTo(c.x+d,c.y+e)}; T.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1};T.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;if(null===a)return!0;if(!a.allowRelink)return!1;a=a.diagram;return null===a||a.allowRelink?!0:!1}; T.prototype.computeMidPoint=function(a){var b=this.pointsCount;if(0===b)return a.assign(tb),a;if(1===b)return a.assign(this.i(0)),a;if(2===b){var c=this.i(0),d=this.i(1);a.h((c.x+d.x)/2,(c.y+d.y)/2);return a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.Qu(.5,a),a.add(this.i(0)),c=this.ua.figures.first(),a.offset(-c.startX,-c.startY),a;if(this.computeCurve()===bg){if(3===b){c=this.i(0);d=this.i(1);var e=this.i(2);K.bx(c.x,c.y,d.x,d.y,d.x,d.y,e.x,e.y,a); return a}d=(b-1)/3|0;c=3*(d/2|0);if(1===d%2){d=this.i(c);e=this.i(c+1);var f=this.i(c+2);c=this.i(c+3);K.bx(d.x,d.y,e.x,e.y,f.x,f.y,c.x,c.y,a)}else a.assign(this.i(c));return a}var g=this.flattenedLengths;c=this.flattenedTotalLength;for(e=f=d=0;dc/2)break;d+=e;f++}b=this.i(f);f=this.i(f+1);1>Math.abs(b.x-f.x)?b.y>f.y?a.h(b.x,b.y-(c/2-d)):a.h(b.x,b.y+(c/2-d)):1>Math.abs(b.y-f.y)?b.x>f.x?a.h(b.x-(c/2-d),b.y):a.h(b.x+(c/2-d),b.y):(c=(c/2-d)/e,a.h(b.x+c*(f.x-b.x),b.y+c*(f.y- @@ -1563,7 +1564,7 @@ b.y)));return a}; T.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(2===a)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===bg))return this.ua.xx(.5);if(this.computeCurve()===bg&&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 K.Ny(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.ab(d)};t=T.prototype;t.i=function(a){return this.Ob.s[a]};t.dd=function(a,b){this.Ob.cd(a,b)};t.L=function(a,b,c){this.Ob.cd(a,new J(b,c))};t.Lz=function(a,b){this.Ob.Hb(a,b)}; t.m=function(a,b,c){this.Ob.Hb(a,new J(b,c))};t.ne=function(a){this.Ob.add(a)};t.yf=function(a,b){this.Ob.add(new J(a,b))};t.qv=function(a){this.Ob.mb(a)};t.Ej=function(){this.Ob.clear()}; -function bf(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Nl(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= +function df(a,b,c){if(0!==b||0!==c)if(0===a.pointsCount)a.defaultFromPoint&&a.defaultFromPoint.offset(b,c),a.defaultToPoint&&a.defaultToPoint.offset(b,c);else{for(var d=a.fd,e=new F,f=a.Ob.iterator;f.next();){var g=f.value;e.add((new J(g.x+b,g.y+c)).freeze())}e.freeze();f=a.Ob;a.Ob=e;g=a.diagram;isNaN(b)||isNaN(c)||null!==g&&g.animationManager.Ab?a.v():(a.ke.h(a.ke.x+b,a.ke.y+c),a.pa.h(a.pa.x+b,a.pa.y+c),Ql(a));d?Lp(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint= a.i(a.pointsCount-1)));null!==g&&g.animationManager.Ab&&Nh(g.animationManager,a,e);a.g("points",f,e)}}t.uh=function(){null===this.Mg&&(this.Mg=this.Ob,this.Ob=this.Ob.copy())}; t.zf=function(){if(null!==this.Mg){for(var a=this.Mg,b=this.Ob,c=Infinity,d=Infinity,e=a.s,f=e.length,g=0;gd.y k.x?0:180:h.y>=k.y?90:270;J.free(k);k=c}g&&d.Mc()&&g.Td(a)&&(k+=180,360<=k&&(k-=360));if(Pp(d))return k;a=b.li();if(0===a)return k;45<=a&&135>a?k+=90:135<=a&&225>a?k+=180:225<=a&&315>a&&(k+=270);360<=k&&(k-=360);return k};T.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$c()&&(a=Sp(this,b),null!==a))return a.Ku;a=d?this.fromEndSegmentLength:this.toEndSegmentLength;null!==b&&isNaN(a)&&(a=d?b.fromEndSegmentLength:b.toEndSegmentLength);isNaN(a)&&(a=10);return a}; T.prototype.computeSpot=function(a,b){void 0===b&&(b=null);a?(a=b?b:this.fromPort,null===a?a=wc:(b=this.fromSpot,b.Yb()&&(b=a.fromSpot),a=b===Sc?rc:b)):(a=b?b:this.toPort,null===a?a=wc:(b=this.toSpot,b.Yb()&&(b=a.toSpot),a=b===Sc?rc:b));return a};function Pp(a){return a===rc||.5===a.x&&.5===a.y}function Qp(a){return.5===a.x&&.5===a.y?a:wc} T.prototype.computeOtherPoint=function(a,b){if(this.computeAdjusting()!==Zf&&4p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); +T.prototype.Cf=function(a,b,c,d,e,f){if(!1===this.pickable)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=ld.alloc(),g.reset());g.multiply(this.transform);if(this.fh(a,g))return yn(this,b,c,e),void 0===f&&ld.free(g),!0;if(this.Yc(a,g)){var h=!1;if(!this.isAtomic)for(var k=this.O.s,l=k.length;l--;){var m=k[l];if(m.visible||m===this.locationObject){var n=m.actualBounds,p=this.naturalBounds;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=ld.alloc();n.set(g); if(m instanceof W)h=m.Cf(a,b,c,d,e,n);else if(this.path===m){if(m instanceof Bf)if(h=a,p=d,!1===m.pickable)h=!1;else if(n.multiply(m.transform),p)b:{var q=h,r=n;if(m.fh(q,r))h=!0;else{if(void 0===r&&(r=m.transform,q.Re(m.actualBounds))){h=!0;break b}h=q.left;p=q.right;var u=q.top;q=q.bottom;var w=J.alloc(),v=J.alloc(),y=J.alloc(),z=ld.alloc();z.set(r);z.cv(m.transform);z.Uj();v.x=p;v.y=u;v.transform(z);w.x=h;w.y=u;w.transform(z);r=!1;$n(m,w,v,y)?r=!0:(w.x=p,w.y=q,w.transform(z),$n(m,w,v,y)?r=!0:(v.x= -h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=il(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; +h,v.y=q,v.transform(z),$n(m,w,v,y)?r=!0:(w.x=h,w.y=u,w.transform(z),$n(m,w,v,y)&&(r=!0))));ld.free(z);J.free(w);J.free(v);J.free(y);h=r}}else h=m.fh(h,n)}else h=ll(m,a,d,n);h&&(p=m,null!==b&&(p=b(m)),p&&(null===c||c(p))&&e.add(p));ld.free(n)}}}void 0===f&&ld.free(g);return h||null!==this.background||null!==this.areaBackground}void 0===f&&ld.free(g);return!1}; T.prototype.computeCurve=function(){if(null===this.Wf){var a=this.fromPort,b=this.isOrthogonal;this.Wf=null!==a&&a===this.toPort&&!b}return this.Wf?bg:this.curve};T.prototype.computeCorner=function(){if(this.curve===bg)return 0;var a=this.corner;if(isNaN(a)||0>a)a=10;return a}; T.prototype.findMidLabel=function(){for(var a=this.path,b=this.O.s,c=b.length,d=0;dk?-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.$(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.dd(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.dd(c,d)}}return!0;case Gp:f=this.i(a);n=this.i(c);if(!f.Xa(b)||!n.Xa(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 q=1;if(0!==k-h){var r=(p-m)/(k-h);q=Math.sqrt(1+1/(r*r))}else r=9E9;this.dd(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.w()&&k.w()){h.Bc(Yp,Yp);k.Bc(Yp,Yp);h.Ye(a);k.Ye(c);var l=J.alloc(),m=J.alloc();if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l.h(c.x,a.y),m.h(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.h(Math.max((a.x+c.x)/2,a.x),a.y),m.h(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.x?(l.y=a.ya.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l.h(a.x,Math.max((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.x,a.y,c.x,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.ca(a)||h.ca(c))?l.x=this.computeMidOrthoPosition(a.x,a.y,c.x,c.y,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,a.y,Math.min(c.x,k.left),c.y,!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(zk(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, -n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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): +c.y>=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l.h(a.x,Math.min((a.y+c.y)/2,a.y)),m.h(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.x=aq&&(Ck(q),h.Bc(q.Ho*q.Ix,q.Go*q.Jx),Zp(q,a,b,n,d,h,!1),k=$p(q, +n.x,n.y));if(!q.abort&&kthis.pointsCount)0===b||180===b?(h.x=a.x,h.y=n.y):(h.x=n.x,h.y=a.y),this.L(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.L(2,h,a.y),this.L(3,h,g.y)):K.B(h.y,g.y)?(Math.abs(a.y-h.y)<=q.Go/2&&(this.L(2,h.x,a.y),this.L(3,g.x,a.y)),this.m(2,h.x,a.y)):this.L(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.L(2,a.x,h),this.L(3,g.x,h)):K.B(h.x,g.x)?(Math.abs(a.x-h.x)<=q.Ho/2&&(this.L(2,a.x,h.y),this.L(3,a.x,g.y)),this.m(2,a.x,h.y)):this.L(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!==r&&(0===d||180===d?this.yf(f.x,r.y):this.yf(r.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ne(l.copy()),this.ne(m.copy()));J.free(l);J.free(m)}}; T.prototype.computeMidOrthoPosition=function(a,b,c,d,e){var f=0;!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(f=this.computeCurviness());return e?(b+d)/2+f:(a+c)/2+f}; -function Sj(a){if(null===a.diagram||!a.isAvoiding||!jk(a.diagram))return!1;var b=a.points.s,c=b.length;if(4>c)return!1;a=kk(a.diagram,!0,a.containingGroup,null);for(var d=1;dc)return!1;a=ok(a.diagram,!0,a.containingGroup,null);for(var d=1;dcq&&$p(b,m,n)!==l-1&&($p(b,c-h,d)===l-1?(e=180,m=c-h,n=d):$p(b,c+h,d)===l-1?(e=0,m=c+h,n=d):$p(b,c,d-k)===l-1?(e=270,m=c,n=d-k):$p(b,c,d+k)===l-1&&(e=90,m=c,n=d+k));for(;l>cq&&$p(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>cq)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>cq&&(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),$p(b,g,m)===l-1?bq(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),$p(b,g,m)===l-1&&bq(a,b,g,m,f,!1,f)));a.yf(c,d)}T.prototype.fz=function(a){var b=a.x;a=a.y;for(var c=this.i(0),d=this.i(1),e=yb(b,a,c.x,c.y,d.x,d.y),f=0,g=1;gthis.pointsCount?this.kk=!0:this.ua=this.makeGeometry();a=this.path;if(null!==a){a.ua=this.ua;for(var b=this.O.s,c=b.length,d=0;d=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;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?r>q?(f.x=v-z,f.y=q-z,e.x=v+u,e.y=q+u):(f.x=v-z,f.y=q+z,e.x=v+u,e.y=q-u):r>q?(f.x=v+z,f.y=q-z,e.x=v-u,e.y=q+u):(f.x=v+z,f.y=q+z,e.x=v-u,e.y=q-u));K.$(w,v)&&K.$(q,r)&&(q>p?(y>v?(f.x=v-z,f.y=q-z,e.x=v+u):(f.x=v+z,f.y=q-z,e.x=v-u),e.y=q+u):(y>v?(f.x=v-z,f.y=q+z,e.x=v+u):(f.x=v+z,f.y=q+z,e.x=v-u),e.y=q-u));if(K.$(w,v)&&K.$(v,y)||K.$(p,q)&&K.$(q,r))w=.5*(w+y),p=.5*(p+r),f.x=w,f.y=p,e.x=w,e.y=p;1===n?(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y)):2===n&&K.$(g.x,this.i(0).x)&&K.$(g.y,this.i(0).y)&& -(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));xd(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);xd(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),xd(h,f.x-d,f.y-k,e.x-d,e.y-k,g.x-d,g.y-k);else{f= +(c.x=.5*(g.x+l.x),c.y=.5*(g.y+l.y));ud(h,c.x-d,c.y-k,f.x-d,f.y-k,l.x-d,l.y-k);b.set(f);c.set(e);g=l}}l=g.x;g=g.y;m=this.i(this.pointsCount-1);0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb));l=.5*(l+m.x);g=.5*(g+m.y);ud(h,e.x-d,e.y-k,l-d,g-k,m.x-d,m.y-k);J.free(b);J.free(c);J.free(f);J.free(e)}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=dq(this,g.copy(),!1,pb)),ud(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.D(m))0!==this.computeShortLength(!1)&&(m=dq(this,m.copy(),!1,pb)),gq(this,h,-d,-k,f,m,c);else if(0===l)for(n=1;nf.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);yd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),yd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, -p,u),f.assign(p));e.assign(m);n=l}J.free(f)}Bd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} +n,w,f,p,u),f.assign(p);else{var A=p.x,B=p.y;q=A;y=B;p.x>f.x?A=p.x-r:A=p.x+r;v.y>p.y?y=p.y+z:y=p.y-z;v=J.allocAt(A,B);gq(this,h,n,w,f,v,u);J.free(v);vd(h,p.x+n,p.y+w,q+n,y+w);f.h(q,y)}else K.B(f.x,p.x)&&K.B(p.y,v.y)?(r=Math.min(g,Math.abs(p.y-e.y)/2),r=z=Math.min(r,Math.abs(v.x-p.x)/2),K.B(z,0)?(gq(this,h,n,w,f,p,u),f.assign(p)):(A=p.x,B=p.y,q=A,y=B,p.y>f.y?B=p.y-r:B=p.y+r,v.x>p.x?q=p.x+z:q=p.x-z,v=J.allocAt(A,B),gq(this,h,n,w,f,v,u),J.free(v),vd(h,p.x+n,p.y+w,q+n,y+w),f.h(q,y))):(gq(this,h,n,w,f, +p,u),f.assign(p));e.assign(m);n=l}J.free(f)}yd=h}else h=this.i(1).copy(),h.x-=d,h.y-=k,0!==this.computeShortLength(!0)&&(e=dq(this,e,!0,f)),0!==this.computeShortLength(!1)&&(h=dq(this,h,!1,f)),a.type=P.j,a.startX=e.x,a.startY=e.y,a.endX=h.x,a.endY=h.y;this.kk=!0;return a};function fq(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.$(a,0)?b:K.$(b,0)?a:Math.sqrt(a*a+b*b)} function dq(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=fq(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=fq(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 eq(a,b,c,d){for(var e=a.pointsCount,f=b;K.$(b.x,f.x)&&K.$(b.y,f.y);){if(c>=e)return e-1;f=a.i(c++)}if(!K.$(b.x,f.x)&&!K.$(b.y,f.y))return c-1;for(var g=f;K.$(b.x,f.x)&&K.$(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||K.$(b.y,f.y)&&K.$(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}T.prototype.computeJumpLength=function(){return 10}; -function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?wd(b,n,q,!1):xd(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?wd(b,q,m,!1):xd(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} +function gq(a,b,c,d,e,f,g){if(!g&&Ip(a)){g=a.computeJumpLength();var h=g/2,k=[],l=0;a.isVisible()&&(l=hq(a,e,f,k));if(0n-g)l--,n=Math.max(m-h,f.x);else break;m=f.y-g+d;n+=c;q=f.y+d;a.curve===Yf?td(b,n,q,!1):ud(b,p,m,n,m,n,q)}else if(K.B(e.x,f.x))if(e.ym-g)l--,m=Math.max(n-h,f.y);else break;n=f.x-g+c;q=f.x+c;m+=d;a.curve===Yf?td(b,q,m,!1):ud(b,n,p,n,m,q,m)}}b.lineTo(f.x+c,f.y+d)} function hq(a,b,c,d){var e=a.diagram;if(null===e||b.D(c))return 0;for(e=e.layers;e.next();){var f=e.value;if(null!==f&&f.visible){f=f.Pa.s;for(var g=f.length,h=0;hg.x&&m.x>=l.x||l.xg.y&&m.y>=l.y||l.yr&&Math.min(g,w)n&&!K.B(g,w)){h.x=r;h.y=n;m=!0;break a}}else if(!K.B(n,q)&& K.B(g,w)&&Math.min(n,q)g&&Math.min(r,u)m&&!K.B(r,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 Ip(a){a=a.curve;return a===Xf||a===Yf}function Mp(a,b){if(b||Ip(a))b=a.diagram,null===b||b.animationManager.isTicking||b.Eh.contains(a)||0===a.ml.width&&0===a.ml.height||b.Eh.add(a,a.ml.copy())} @@ -1648,7 +1649,7 @@ a,this.g("toPortChanged",b,a))}},fromSpot:{get:function(){return null!==this.ba? this.ba.Vi=a,this.g("fromEndSegmentLength",b,a),this.bb())}},fromShortLength:{get:function(){return null!==this.ba?this.ba.Wi:NaN},set:function(a){var b=this.fromShortLength;b!==a&&(this.Xc(),this.ba.Wi=a,this.rc(),this.g("fromShortLength",b,a))}},toSpot:{get:function(){return null!==this.ba?this.ba.yj:Sc},set:function(a){var b=this.toSpot;b.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",b,a),(b.$c()||a.$c())&&null!==this.toNode&& pp(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return null!==this.ba?this.ba.wj:NaN},set:function(a){var b=this.toEndSegmentLength;b!==a&&(0>a&&xa(a,">= 0",T,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",b,a),this.bb())}},toShortLength:{get:function(){return null!==this.ba?this.ba.xj:NaN},set:function(a){var b=this.toShortLength;b!==a&&(this.Xc(),this.ba.xj=a,this.rc(),this.g("toShortLength",b, a))}},isLabeledLink:{get:function(){return null===this.wd?!1:0=d&&(f=d-1);var h=this.i(f-1),k=this.i(f);K.Dl(e.x,e.y,g.x,g.y,h.x,h.y,k.x,k.y,.5,a);b=Math.min(k.x,b);c=Math.min(k.y,c);e=k}else for(e=this.i(0),f=this.i(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.h(e.x,e.y,0,0),a.Ye(f),e=2;ed&&(d=-d)):K.$(d.y,e.y)?(d=e.x-d.x,0>d&&(d=-d)):d=Math.sqrt(d.Bf(e)); @@ -1661,22 +1662,22 @@ a?0:2>=a?a-1:this.isOrthogonal||!Pp(this.computeSpot(!1))?a-2:a-1}},adjusting:{g Mp(this,b===Yf||b===Xf||a===Yf||a===Xf),this.g("curve",b,a))}},curviness:{get:function(){return this.Rm},set:function(a){var b=this.Rm;b!==a&&(this.Rm=a,this.bb(),this.rc(),this.g("curviness",b,a))}},routing:{get:function(){return this.qj},set:function(a){var b=this.qj;b!==a&&(this.qj=a,this.Wf=null,this.bb(),Mp(this,2===(b.value&2)||2===(a.value&2)),this.g("routing",b,a))}},smoothness:{get:function(){return this.po}, set:function(a){var b=this.po;b!==a&&(this.po=a,this.rc(),this.g("smoothness",b,a))}},key:{get:function(){var a=this.diagram;if(null!==a&&a.model.ri())return a.model.Ac(this.data)}}});T.prototype.invalidateOtherJumpOvers=T.prototype.Xo;T.prototype.findClosestSegment=T.prototype.fz;T.prototype.updateRoute=T.prototype.vg;T.prototype.invalidateRoute=T.prototype.bb;T.prototype.rollbackRoute=T.prototype.sv;T.prototype.commitRoute=T.prototype.zf;T.prototype.startRoute=T.prototype.uh; T.prototype.clearPoints=T.prototype.Ej;T.prototype.removePoint=T.prototype.qv;T.prototype.addPointAt=T.prototype.yf;T.prototype.addPoint=T.prototype.ne;T.prototype.insertPointAt=T.prototype.m;T.prototype.insertPoint=T.prototype.Lz;T.prototype.setPointAt=T.prototype.L;T.prototype.setPoint=T.prototype.dd;T.prototype.getPoint=T.prototype.i;T.prototype.getOtherPort=T.prototype.Dz;T.prototype.getOtherNode=T.prototype.To; -var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),jn=new E(T,"OrientAlong",21),an=new E(T,"OrientPlus90",22),cn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),kn=new E(T,"OrientUpright",25),bn=new E(T,"OrientPlus90Upright",26),dn=new E(T,"OrientMinus90Upright", -27),en=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=jn;T.OrientPlus90=an;T.OrientMinus90=cn;T.OrientOpposite=Hp;T.OrientUpright=kn;T.OrientPlus90Upright=bn;T.OrientMinus90Upright=dn;T.OrientUpright45=en;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; +var Np=null,Op=null,Dp=new E(T,"Normal",1),lq=new E(T,"Orthogonal",2),mq=new E(T,"AvoidsNodes",6),Vp=new E(T,"AvoidsNodesStraight",7),Zf=new E(T,"None",0),bg=new E(T,"Bezier",9),Yf=new E(T,"JumpGap",10),Xf=new E(T,"JumpOver",11),Ep=new E(T,"End",17),Fp=new E(T,"Scale",18),Gp=new E(T,"Stretch",19),mn=new E(T,"OrientAlong",21),dn=new E(T,"OrientPlus90",22),fn=new E(T,"OrientMinus90",23),Hp=new E(T,"OrientOpposite",24),nn=new E(T,"OrientUpright",25),en=new E(T,"OrientPlus90Upright",26),gn=new E(T,"OrientMinus90Upright", +27),hn=new E(T,"OrientUpright45",28),Xp=16,Wp=14,Yp=8;T.className="Link";T.Normal=Dp;T.Orthogonal=lq;T.AvoidsNodes=mq;T.AvoidsNodesStraight=Vp;T.None=Zf;T.Bezier=bg;T.JumpGap=Yf;T.JumpOver=Xf;T.End=Ep;T.Scale=Fp;T.Stretch=Gp;T.OrientAlong=mn;T.OrientPlus90=dn;T.OrientMinus90=fn;T.OrientOpposite=Hp;T.OrientUpright=nn;T.OrientPlus90Upright=en;T.OrientMinus90Upright=gn;T.OrientUpright45=hn;T.EndSegmentStep=8;T.CurvinessStart=Xp;T.SpacingMin=Wp;T.OrthoShortCut=Yp; function kq(a,b,c,d){Qa(this);this.Fe=this.qq=!1;this.Ds=a;this.Px=b;this.dv=c;this.Qx=d;this.links=[]}kq.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} -lk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Bk)return!1}return!0}; +function pk(a){Qa(this);this.Zx=this.group=null;this.vs=!0;this.abort=!1;this.Od=this.Nd=1;this.Fn=this.En=-1;this.sc=a.width;this.tc=a.height;this.bc=null;this.ei=this.di=0;this.Os=11;this.Jx=this.Ix=22} +pk.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Nd=Math.floor((a.x-this.sc)/this.sc)*this.sc;this.Od=Math.floor((b-this.tc)/this.tc)*this.tc;this.En=Math.ceil((c+2*this.sc)/this.sc)*this.sc;this.Fn=Math.ceil((d+2*this.tc)/this.tc)*this.tc;a=1+(Math.ceil((this.En-this.Nd)/this.sc)|0);b=1+(Math.ceil((this.Fn-this.Od)/this.tc)|0);if(null===this.bc||this.di=cq&&(c[d]=nq)} +pk.prototype.Xj=function(a,b,c,d){if(a>this.En||a+cthis.Fn||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.di)|0;for(c=Math.min(b+e-1,this.ei)|0;a<=d;a++){e=this.bc[a];for(var f=b;f<=c;f++)if(e[f]===Ek)return!1}return!0}; function oq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l=b|0;var m=c|0;var n=a.bc[l][m];if(n>=cq&&n=a.bc[l][m]);)a.bc[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)oq(a,b,c,1,!e,f,g,h,k),oq(a,b,c,-1,!e,f,g,h, -k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Bk,m=cq;for(a.bc[b][c]=m;l===Bk&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= -0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Bk?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Bk?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= +k)}}function pq(a,b,c,d,e,f,g,h,k){b|=0;c|=0;var l=Ek,m=cq;for(a.bc[b][c]=m;l===Ek&&b>f&&bh&&cf&&bh&&c=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;d=f.y;b=f.x+f.width;var p=f.y+f.height;n-=a.Nd;n/=a.sc;d-=a.Od;d/=a.tc;b-=a.Nd;b/=a.sc;p-=a.Od;p/=a.tc;f=Math.max(0,Math.min(a.di,n|0));b=Math.min(a.di,Math.max(0,b|0));n=Math.max(0,Math.min(a.ei,d|0));p=Math.min(a.ei,Math.max(0,p|0));d=a.bc;h|=0;k|=0;l|=0;m|= +0;var q=0===c||90===c?1:-1;c=90===c||270===c;d[h][k]===Ek?(pq(a,h,k,q,c,f,b,n,p),pq(a,h,k,1,!c,f,b,n,p),pq(a,h,k,-1,!c,f,b,n,p)):pq(a,h,k,q,c,h,k,h,k);d[l][m]===Ek?(qq(a,l,m,0===e||90===e?1:-1,90===e||270===e,f,b,n,p),qq(a,l,m,1,!(90===e||270===e),f,b,n,p),qq(a,l,m,-1,!(90===e||270===e),f,b,n,p)):qq(a,l,m,q,c,l,m,l,m);c=Ea();if(g&&rq(a,l,m,e,h,k,c)){if(c[0]!==l||c[1]!==m)c.unshift(m),c.unshift(l);if(c[c.length-2]!==h||c[c.length-1]!==k)c.push(h),c.push(k);a=cq;e=c[c.length-2];g=c[c.length-1];d[e][g]= a++;for(f=c.length-4;0<=f;f-=2)for(e=c[f+2],g=c[f+3],b=c[f],l=c[f+1];b>e?e++:bg?g++:le)m--;else break;else if(n>f)n--;else break;var p=h[m][n];if(0===p||p===sq)break;k=m;l=n}for(;;){m=d;n=k;p=l;0===d?pf&&(m=270,p--):90===d?ne&&(m=180,n--):180===d?pf&&(m=270,p--):ne&&(m=180,n--);n=h[n][p];if(m!==d&&0!==n&&n!==sq){g.push(k);g.push(l);if(rq(a,k,l, m,e,f,g))return!0;g.pop();g.pop()}h[k][l]=sq;if(0===d){if(k===b)return!1;k--}else if(90===d){if(l===c)return!1;l--}else if(180===d){if(k===b)return!1;k++}else{if(l===c)return!1;l++}}} -ma.Object.defineProperties(lk.prototype,{bounds:{get:function(){return new N(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.sc},set:function(a){0=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}Tp.prototype.Sl=function(){this.pe.length=0}; @@ -1730,42 +1731,42 @@ yq.smartComparer=function(a,b){if(null!==a){if(null!==b){a=a.Sh;var c=b.Sh;if(nu b[c])return 1;return""!==a[c]&&void 0!==a[c]?-1:0}return 1}return null!==c?-1:0}return 1}return null!==b?-1:0};function zq(a){Qa(this);this.nb=a;this.qd=this.kd=this.Zk=this.ub=null}zq.prototype.clear=function(){this.qd=this.kd=this.Zk=this.ub=null};zq.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutEdge#"+bb(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.Ea("Layout");d=[];switch(this.alignment){case Oq: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,r=q,u+=v,v=0;v=Math.max(v,D);switch(p){case Nq:A=-A.width;break;default:A= 0}z.moveTo(r+A,u);switch(p){case Nq:r-=B;break;default:r+=B}w++}d.push(new N(0,u,g+h,v));N.free(l);break;case Gq:k=g;m=f;n=b;p=c;g=N.alloc();q=Math.max(this.cellSize.width,1);f=u=l=0;h=J.alloc();for(r=0;r=l&&(k-=l);l=z=0;B=Math.max(this.cellSize.height,1);A=f=0;D=!0;w=J.alloc();for(M=0;Mm-1||0k){d.push(new N(0,D?y-f:y,k+n,A+f+p));for(S=0;Sl&&(f.width+=f.x-l,f.x=l);N.free(g)}for(h=f=g=e=0;hb?1:0} -ma.Object.defineProperties(Ok.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0b?1:0} +ma.Object.defineProperties(Rk.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0n)){var u=n+tn(r);r.qc(u,!0);En(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; +pi.prototype.doModelChanged=function(a){if(this.H){var b=this.H;if(a.model===b.model){var c=a.change;b.doModelChanged(a);if(b.aa){b.aa=!1;try{var d=a.modelChange;if(""!==d)if(c===de){if("nodeCategory"===d){var e=this.Lc(a.object),f=a.newValue;null!==e&&"string"===typeof f&&(e.category=f)}else"nodeDataArray"===d&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));b.isModified=!0}else if(c===fe){var g=a.newValue;"nodeDataArray"===d&&za(g)&&Pq(this,g);b.isModified=!0}else if(c===ge){var h=a.oldValue; +"nodeDataArray"===d&&za(h)&&this.ip(h);b.isModified=!0}else c===ee&&("SourceChanged"===d?null!==a.object?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):"ModelDisplaced"===d&&this.Wd());else if(c===de){var k=a.propertyName,l=a.object;if(l===b.model){if("nodeKeyProperty"===k||"nodeCategoryProperty"===k)b.undoManager.isUndoingRedoing||this.Wd()}else this.updateDataBindings(l,k);b.isModified=!0}else if(c===fe||c===ge){var m=a.change===fe,n=m?a.newParam:a.oldParam, +p=m?a.newValue:a.oldValue,q=this.aj.I(a.object);if(Array.isArray(q))for(a=0;an)){var u=n+wn(r);r.qc(u,!0);Hn(r,u,n)}}b.isModified=!0}}finally{b.aa=!0}}}}};pi.prototype.updateAllTargetBindings=function(a){void 0===a&&(a="");for(var b=this.parts.iterator;b.next();)b.value.La(a);for(b=this.nodes.iterator;b.next();)b.value.La(a);for(b=this.links.iterator;b.next();)b.value.La(a)}; pi.prototype.rp=function(){for(var a=this.H.model,b=new H,c=a.nodeDataArray,d=0;d=d)return"[]";var e=new Sa;e.add("[");c&&1=d)return"[]";var e=new Ta;e.add("[");c&&1d)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",fe,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cd)return;Da(a.Tc,d)}Ar(a,"nodeDataArray",ge,"nodeDataArray",a,b,null,d,null);a.qp(b)}t.oA=function(a){if(Aa(a))for(var b=a.length,c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",ee,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",fe,"",a,c,null,b,null)}; -t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=Fn(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=Fn(a,c);void 0===d&&(d="");d!==b&&(Uj(a,c,b),Ar(this,"nodeCategory",ce,c,a,d,b))}else Uj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; +function Br(a,b,c){if(a.copiesArrays&&Array.isArray(b)){var d=[];for(c=0;cb&&(b=a.length);Ca(a,b,c);Ar(this,"",fe,"",a,null,c,null,b)};t.pv=function(a,b){void 0===b&&(b=-1);a===this.Tc&&C("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=a.length-1);var c=a[b];Da(a,b);Ar(this,"",ge,"",a,c,null,b,null)}; +t.Ro=function(a){if(null===a)return"";var b=this.lj;if(""===b)return"";b=In(a,b);if(void 0===b)return"";if("string"===typeof b)return b;C("getCategoryForNodeData found a non-string category for "+a+": "+b)};t.jm=function(a,b){if(null!==a){var c=this.lj;if(""!==c)if(this.lb(a)){var d=In(a,c);void 0===d&&(d="");d!==b&&(Yj(a,c,b),Ar(this,"nodeCategory",de,c,a,d,b))}else Yj(a,c,b)}};t.lm=function(a,b){this.jm(b,this.Ro(a))};t.Tl=function(){return!1};t.Vj=function(){return!1};t.ri=function(){return!1}; t.xs=function(){return!1};t.Wj=function(){return!1};function ri(){return new Z}function vr(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 vr(a,b.constructor);return typeof b}function zr(a){return Dr[a]?Dr[a]:void 0!==x.go&&x.go[a]?x.go[a]:null} -function Fn(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){}} +function In(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 Yj(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){}} ma.Object.defineProperties(Z.prototype,{name:{get:function(){return this.xa},set:function(a){var b=this.xa;b!==a&&(this.xa=a,this.g("name",b,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var b=this.Sm;b!==a&&(this.Sm=a,this.g("dataFormat",b,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var b=this.Gg;b!==a&&(this.Gg=a,this.g("isReadOnly",b,a))}},modelData:{ get:function(){return this.j},set:function(a){var b=this.j;b!==a&&(this.j=a,this.g("modelData",b,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var b=this.o;b!==a&&(null!==b&&b.Sx(this),this.o=a,null!==a&&a.Yw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var b=this.Th; b!==a&&(""===a&&C("Model.nodeKeyProperty may not be the empty string"),0d.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===fe){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== -a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Uj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; -t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=Fn(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} -function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=Fn(b,e);f!==c&&(hr(a,f,b),Uj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; -function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=Fn(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=Fn(b,e);void 0===f&&(f="");f!==c&&(Uj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",ce,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Uj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=Fn(a,b);return void 0===a?Jr:a}; -t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",fe,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=Fn(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; -t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=Fn(a,c);d!==b&&null===this.jh(b)&&(Uj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",ce,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Uj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; -t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Uj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Uj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Uj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; -function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",ee,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",fe,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;fd.indexOf(a.newValue)&&d.splice(c,0,a.newValue));return}}else if(a.change===ge){c=a.oldParam;if("linkDataArray"===a.modelChange){a=a.oldValue;za(a)&&"number"===typeof c&&(d=this.Ac(a),b?(this.$f.add(a),this.md[c]!==a&&this.md.splice(c,0,a),void 0!==d&&this.xb.add(d,a)):(this.$f.remove(a),this.md[c]=== +a&&this.md.splice(c,1),void 0!==d&&this.xb.remove(d)));return}if("linkLabelKeys"===a.modelChange){d=this.Ef(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=Gr.prototype;t.Vl=function(a){if(void 0!==a){var b=this.Ri;if(null!==b){var c=this.ic(a);null===c&&(c=this.copyNodeData(b),Yj(c,this.nodeKeyProperty,a),this.xf(c))}return a}}; +t.zx=function(a){return br(this,a,!0)};t.xv=function(a,b){jr(this,a,b,!0)};t.Cx=function(a){return br(this,a,!1)};t.Cv=function(a,b){jr(this,a,b,!1)};function br(a,b,c){if(null!==b&&(a=c?a.lf:a.mf,""!==a&&(a=In(b,a),void 0!==a))){if(dr(a))return a;C((c?"FromKey":"ToKey")+" value for link data "+b+" is not a number or a string: "+a)}} +function jr(a,b,c,d){null===c&&(c=void 0);if(null!==b){var e=d?a.lf:a.mf;if(""!==e)if(c=a.Vl(c),a.Jc(b)){var f=In(b,e);f!==c&&(hr(a,f,b),Yj(b,e,c),null===a.ic(c)&&ir(a,c,b),Ar(a,d?"linkFromKey":"linkToKey",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ax=function(a){return ar(this,a,!0)};t.yv=function(a,b){kr(this,a,b,!0)};t.Ex=function(a){return ar(this,a,!1)};t.Dv=function(a,b){kr(this,a,b,!1)}; +function ar(a,b,c){if(null===b)return"";a=c?a.ej:a.fj;if(""===a)return"";b=In(b,a);return void 0===b?"":b}function kr(a,b,c,d){if(null!==b){var e=d?a.ej:a.fj;if(""!==e)if(a.Jc(b)){var f=In(b,e);void 0===f&&(f="");f!==c&&(Yj(b,e,c),Ar(a,d?"linkFromPortId":"linkToPortId",de,e,b,f,c),"string"===typeof e&&a.La(b,e))}else Yj(b,e,c)}}t.Ef=function(a){if(null===a)return Jr;var b=this.je;if(""===b)return Jr;a=In(a,b);return void 0===a?Jr:a}; +t.Ls=function(a,b){if(null!==a){var c=this.je;if(""!==c)if(this.Jc(a)){var d=In(a,c);void 0===d&&(d=Jr);if(d!==b){if(Array.isArray(d))for(var e=d.length,f=0;fe||(d.splice(e,1),this.Jc(a)&&(hr(this,b,a),Ar(this,"linkLabelKeys",ge,c,a,b,null,e,null)))}else void 0!==d&&C(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};t.Ac=function(a){if(null!==a){var b=this.Jh;if(""!==b&&(b=In(a,b),void 0!==b)){if(dr(b))return b;C("Key value for link data "+a+" is not a number or a string: "+b)}}}; +t.Ks=function(a,b){if(null!==a){var c=this.Jh;if(""!==c)if(this.Jc(a)){var d=In(a,c);d!==b&&null===this.jh(b)&&(Yj(a,c,b),void 0!==d&&this.xb.remove(d),this.xb.add(b,a),Ar(this,"linkKey",de,c,a,d,b),"string"===typeof c&&this.La(a,c))}else Yj(a,c,b)}};t.jh=function(a){null===a&&C("GraphLinksModel.findLinkDataForKey:key must not be null");return void 0!==a&&dr(a)?this.xb.I(a):null}; +t.Bs=function(a){if(null!==a){var b=this.Jh;if(""!==b){var c=this.Ac(a);if(void 0===c||this.xb.contains(c)){var d=this.bl;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.xb.contains(c))){Yj(a,b,c);return}if("string"===typeof c){for(d=2;this.xb.contains(c+d);)d++;Yj(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(c=-this.xb.count-1;this.xb.contains(c);)c--;Yj(a,b,c)}}}}};t.Jc=function(a){return null===a?!1:this.$f.contains(a)};t.fi=function(a){null!==a&&(fb(a),this.Jc(a)||fr(this,a,!0))}; +function fr(a,b,c){if(""!==a.linkKeyProperty){var d=a.Ac(b);if(void 0!==d&&a.xb.I(d)===b)return;a.Bs(b);d=a.Ac(b);void 0===d&&C("GraphLinksModel.makeLinkDataKeyUnique failed on "+b+". Data not added to model.");a.xb.add(d,b)}a.$f.add(b);d=null;c&&(d=a.md.length,a.md.splice(d,0,b));Ar(a,"linkDataArray",fe,"linkDataArray",a,null,b,null,d);Kr(a,b)}t.Fy=function(a){if(Array.isArray(a))for(var b=a.length,c=0;cd)return;a.md.splice(d,1)}Ar(a,"linkDataArray",ge,"linkDataArray",a,b,null,d,null);c=br(a,b,!0);hr(a,c,b);c=br(a,b,!1);hr(a,c,b);d=a.Ef(b);if(Array.isArray(d))for(var e=d.length,f=0;f=b[c].length)&&(g=b[c][0],g.sd===g)){Inf g.height,a.add(g,d?-g.zc-f:g.zc);return a}function Kt(a,b,c){if(isNaN(b.zc)){b.zc=0;var d=b;do{if(0a&&C("Could not determine previous vertex in layer");return b[c][a-1]} Hs.prototype.u=function(a){for(var b=[],c=0;cg;g++)if(b[g]){var h=Mt(this,b[g],d,e,g);hg;f={delta:f.delta},g++)b[g]&&(f.delta=0===g||2===g?d[c]-d[g]:e[c]-e[g],0!==f.delta&&b[g].each(function(a){return function(b){b.value+=a.delta}}(f)));Ga(d);Ga(e)}; function Mt(a,b,c,d,e){if(!b||0===b.count)return c[e]=0,d[e]=0,Infinity;var f=Infinity,g=-Infinity;b.each(function(b){var c=b.key;b=b.value;c=90===a.K||270===a.K?c.width:c.height;bg&&(g=b+c)});c[e]=f;d[e]=g;return g-f}Hs.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Os(this,!0),b=Os(this,!1),c=this.network.edges.iterator;c.next();){var d=c.value.link;null!==d&&(d.fromSpot=a,d.toSpot=b)}this.commitNodes();this.Hu();this.isRouting&&this.commitLinks()}; -function Os(a,b){return 270===a.K?b?$c:cd:90===a.K?b?cd:$c:180===a.K?b?ad:bd:b?bd:ad} +function Os(a,b){return 270===a.K?b?ad:dd:90===a.K?b?dd:ad:180===a.K?b?bd:cd:b?cd:bd} Hs.prototype.commitNodes=function(){this.he=[];this.Ld=[];this.Kd=[];this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var b=a.value,c=b.layer;this.he[c]=Math.max(this.he[c],this.nodeMinLayerSpace(b,!0));this.Ld[c]=Math.max(this.Ld[c],this.nodeMinLayerSpace(b,!1))}b=0;c=this.ie;for(var d=0;d<=this.Ia;d++){var e=c;0>=this.he[d]+this.Ld[d]&&(e=0);0e?Gu(this,a,g,X,v,y):Hu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case wu:for(A=0;An&&(Sgb&&(Mu(a,-gb,0,ca,na-1),Nu(A,-gb,0),Nu(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Mu(a,0,-gb,ca,na-1),Nu(A,0,-gb),Nu(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===xu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Su(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Qu(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Su(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Ru(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xe?Hu(this,a,g,X,v,y):Iu(this,a,g,X,v,y);X=y.x;v=y.width;y=y.height;break;case xu:for(A=0;An&&(Sgb&&(Nu(a,-gb,0,ca,na-1),Ou(A,-gb,0),Ou(B,-gb,0),gb=0)}wa.T.h(gb,R);v=Math.max(v,D);y=Math.max(y,z+(0===I?0:r)+db.height);S=D}else{0n&&(Rgb&&(Nu(a,0,-gb,ca,na-1),Ou(A,0,-gb),Ou(B,0,-gb),gb=0);wa.T.h(S,gb);y=Math.max(y,M);v=Math.max(v,z+(0===I?0:r)+db.width);R=M}G++}0l&&(l=0),135u&&(u=0),k===yu&&(h+=p/2+a.focus.y),g+=d+c):b?(null===a.comments?d>v&&(v=Tu(k,d-v,0),g=v.x,h=v.y,v=d,l=0):v=Ru(a,v,l),0>l&&(g-=l,l=0),135y&&(y=Tu(k,0,w-y),g=y.x,h=y.y,y=w,u=0):y=Su(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])),I[0].h(l+d,0),I[1].h(I[0].x,w),I[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])),I[0].h(0,u+w),I[1].h(d,I[0].y),I[2].xd?Gu(a,b,e,G,z,A):Hu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case wu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; -function Gu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Du(b),m=0,n=0,p=0,q=0;qd?Hu(a,b,e,G,z,A):Iu(a,b,e,G,z,A);G=A.x;z=A.width;A=A.height;break;case xu:for(p=0;pp&&(Dp&&(Mn&&(n=0),135v&&(v=0));b.la.h(n,v);b.Da.h(z,A)}}Rt.prototype.customAlignment=function(a,b,c,d,e){return[b,c,d,e]}; +function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return b=c[0],e=b.Da.width,f=b.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=90===Eu(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Uu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Uu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} -function Hu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Du(b),m=0,n=0,p=0,q=0;ql&&(e-=l),f=Math.max(f,Math.max(q,p)+a+g.height),0>c.T.x&&(d=Vu(b,c.T.x,!1,d,h))):(c.T.h(e+a,d+h/2-c.focus.y-c.la.y),e=Math.max(e,Math.max(r,n)+a+g.width),p=d+h/2-c.focus.y-c.la.y,f=Math.max(f,p+g.height),0>p&&(f-=p),0>c.T.y&&(d=Vu(b,c.T.y,!0,d,h))));return new N(d,0,e,f)} +function Iu(a,b,c,d,e,f){var g=c.length;if(0===g)return new N(d,0,e,f);if(1===g)return c=c[0],e=c.Da.width,f=c.Da.height,new N(d,0,e,f);for(var h=b.nodeSpacing,k=b.rowSpacing,l=270===Eu(b),m=0,n=0,p=0,q=0;qn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Uu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Uu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Eu:return a.width>b?a.width:b;case Fu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case vu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case wu:return a.width-a.focus.x+a.nodeSpacing/2+b;case xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} -function Ru(a,b,c){switch(a.alignment){case Pu:case Ou:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Eu:return a.height>b?a.height:b;case Fu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case vu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case wu:return a.height-a.focus.y+a.nodeSpacing/2+b;case xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} -function Su(a,b,c){switch(a){case Ou:b/=2;c/=2;break;case Pu:b/=2;c/=2;break;case Eu:c=b=0;break;case Fu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ju(a,b,c,d,e,f){b=Su(b,c,d);Mu(a,b.x,b.y,e,f)}function Mu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} -function Ku(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Nu(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Iu(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Iu(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Iu(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Iu(a,e);for(c=0;cn&&(e-=n),f=Math.max(f,Math.abs(Math.min(q,p))+a+m.height),0>k.T.x&&(d=Vu(b,k.T.x,!1,d,h))):(k.T.h(-e-m.width-a,d+h/2-k.focus.y-k.la.y),e=Math.max(e,Math.abs(Math.min(r,n))+a+m.width),p=d+h/2-k.focus.y-k.la.y,f=Math.max(f,p+m.height),0>p&&(f-=p),0>k.T.y&&(d=Vu(b,k.T.y,!0,d,h))));for(b=0;bb&&(b=c+a.width),0>c&&(b-=c),b;case Fu:return a.width>b?a.width:b;case Gu:return 2*a.focus.x>b?a.width:b+a.width-2*a.focus.x;case wu:case ju:return Math.max(a.width,Math.max(b,c+a.width)-Math.min(0,c));case xu:return a.width-a.focus.x+a.nodeSpacing/2+b;case yu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+b);default:return b}} +function Su(a,b,c){switch(a.alignment){case Qu:case Pu:return c+a.height>b&&(b=c+a.height),0>c&&(b-=c),b;case Fu:return a.height>b?a.height:b;case Gu:return 2*a.focus.y>b?a.height:b+a.height-2*a.focus.y;case wu:case ju:return Math.max(a.height,Math.max(b,c+a.height)-Math.min(0,c));case xu:return a.height-a.focus.y+a.nodeSpacing/2+b;case yu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+b);default:return b}} +function Tu(a,b,c){switch(a){case Pu:b/=2;c/=2;break;case Qu:b/=2;c/=2;break;case Fu:c=b=0;break;case Gu:break;default:C("Unhandled alignment value "+a.toString())}return new J(b,c)}function Ku(a,b,c,d,e,f){b=Tu(b,c,d);Nu(a,b.x,b.y,e,f)}function Nu(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].T;f.x+=b;f.y+=c}} +function Lu(a,b,c,d){var e=b.parent;switch(a.ud){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:C("Unhandled path value "+a.ud.toString())}}function Ou(a,b,c){for(var d=0;dn.length||null===q||2>q.length))for(e=c=0;cl&&f.yf.y&&lb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x+e,l.y);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;cn.length||null===q||2>q.length))for(e=c=0;ck&&f.xf.x&&kb.length||null===c||2>c.length)d=null;else{m=Ju(a,b.length+c.length);for(d=f=k=0;fk;)l=c[f++],m[d++].h(l.x,l.y+e);c=Ju(a,d);for(k=0;kn.length||null===f||2>f.length)e=null;else{m=Ju(a,n.length+f.length);for(e=l=c=0;cf;)k=n[c++],m[e++].h(k.x,k.y);f=Ju(a,e);for(c=0;c=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Du(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a?0:135>=a?90:225>=a?180:315>=a?270:0}Rt.prototype.computeLayerSpacing=function(a){var b=Eu(a);b=90===b||270===b;var c=a.layerSpacing;if(0=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!== -a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Au&&a!==Cu||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, +a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Bu&&a!==Du||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit}, set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!== a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot= a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==ou&&a!==pu&& a!==qu&&!ru||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||0!==a&&90!==a&&180!==a&&270!==a||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!== a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing}, set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{ -get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Au&&a!==Cu||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ +get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Bu&&a!==Du||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{ get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{ get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{ get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}}); -var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Ou=new E(Rt,"AlignmentCenterSubtrees",20),Pu=new E(Rt,"AlignmentCenterChildren",21),Eu=new E(Rt,"AlignmentStart",22),Fu=new E(Rt,"AlignmentEnd",23),vu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),wu=new E(Rt,"AlignmentTopLeftBus",26),xu=new E(Rt, -"AlignmentBottomRightBus",27),Au=new E(Rt,"CompactionNone",30),Cu=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Wu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; -Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Ou;Rt.AlignmentCenterChildren=Pu;Rt.AlignmentStart=Eu;Rt.AlignmentEnd=Fu;Rt.AlignmentBus=vu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=wu;Rt.AlignmentBottomRightBus=xu;Rt.CompactionNone=Au;Rt.CompactionBlock=Cu;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; -Rt.ArrangementHorizontal=Wu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Yu(this)};Xt.className="TreeNetwork"; -function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Pu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Cu;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); +var St=new E(Rt,"PathDefault",-1),Tt=new E(Rt,"PathDestination",0),$t=new E(Rt,"PathSource",1),ou=new E(Rt,"SortingForwards",10),pu=new E(Rt,"SortingReverse",11),qu=new E(Rt,"SortingAscending",12),ru=new E(Rt,"SortingDescending",13),Pu=new E(Rt,"AlignmentCenterSubtrees",20),Qu=new E(Rt,"AlignmentCenterChildren",21),Fu=new E(Rt,"AlignmentStart",22),Gu=new E(Rt,"AlignmentEnd",23),wu=new E(Rt,"AlignmentBus",24),ju=new E(Rt,"AlignmentBusBranching",25),xu=new E(Rt,"AlignmentTopLeftBus",26),yu=new E(Rt, +"AlignmentBottomRightBus",27),Bu=new E(Rt,"CompactionNone",30),Du=new E(Rt,"CompactionBlock",31),Ut=new E(Rt,"StyleLayered",40),nu=new E(Rt,"StyleLastParents",41),mu=new E(Rt,"StyleAlternating",42),lu=new E(Rt,"StyleRootOnly",43),Wt=new E(Rt,"ArrangementVertical",50),Xu=new E(Rt,"ArrangementHorizontal",51),Zt=new E(Rt,"ArrangementFixedRoots",52),Vt=new E(Rt,"LayerIndividual",60),hu=new E(Rt,"LayerSiblings",61),gu=new E(Rt,"LayerUniform",62);Rt.className="TreeLayout";Rt.PathDefault=St; +Rt.PathDestination=Tt;Rt.PathSource=$t;Rt.SortingForwards=ou;Rt.SortingReverse=pu;Rt.SortingAscending=qu;Rt.SortingDescending=ru;Rt.AlignmentCenterSubtrees=Pu;Rt.AlignmentCenterChildren=Qu;Rt.AlignmentStart=Fu;Rt.AlignmentEnd=Gu;Rt.AlignmentBus=wu;Rt.AlignmentBusBranching=ju;Rt.AlignmentTopLeftBus=xu;Rt.AlignmentBottomRightBus=yu;Rt.CompactionNone=Bu;Rt.CompactionBlock=Du;Rt.StyleLayered=Ut;Rt.StyleLastParents=nu;Rt.StyleAlternating=mu;Rt.StyleRootOnly=lu;Rt.ArrangementVertical=Wt; +Rt.ArrangementHorizontal=Xu;Rt.ArrangementFixedRoots=Zt;Rt.LayerIndividual=Vt;Rt.LayerSiblings=hu;Rt.LayerUniform=gu;function Xt(a){vq.call(this,a)}la(Xt,vq);Xt.prototype.createVertex=function(){return new Yt(this)};Xt.prototype.createEdge=function(){return new Zu(this)};Xt.className="TreeNetwork"; +function Yt(a){yq.call(this,a);this.V=!1;this.hb=null;this.u=[];this.nb=this.Ha=this.F=this.ia=0;this.td=null;this.T=new J(0,0);this.Da=new L(0,0);this.la=new J(0,0);this.im=this.hm=this.rA=!1;this.kp=this.Yo=null;this.nd=ou;this.hd=Fq;this.Lb=0;this.Kb=Qu;this.Vq=this.Uq=0;this.Wq=20;this.ie=50;this.Aq=0;this.Hp=Du;this.Ap=0;this.nr=25;this.Gp=this.mr=10;this.Fp=20;this.xr=!0;this.dr=Sc;this.wr=!0;this.Dp=Sc}la(Yt,yq); Yt.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.nd=a.sorting,this.hd=a.comparer,this.Lb=a.angle,this.Kb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)}; ma.Object.defineProperties(Yt.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(null!==a)for(var b=a.length,c=0;cq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Eu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): -c.alignment===Eu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.xq.y+c.rowIndent&&(f=Math.min(f,Math.max(n.y,f-b.computeNodeIndent(c))))):c.alignment===Fu?(f=d.top+e.y,0===e.y&&n.yq.x+c.rowIndent&&(f=Math.min(f,Math.max(n.x,f-b.computeNodeIndent(c))))): +c.alignment===Fu?(f=d.left+e.x,0===e.x&&n.x