Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2020-07-20 16:16:43 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2020-07-20 16:16:43 +0300
commit461799196698701e6115b3e8bacf330794888706 (patch)
treec6c4b3dd1673ebf6d27347e790c5521fafd7fad5
parent7f5a35aea98860d51ab39b8b480a617822de1ddc (diff)
13.4.9 releasev13.4.9
-rw-r--r--ChangeLog5
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js6
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlConstants.java96
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlData.java174
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlEdge.java222
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlGraph.java426
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlKey.java377
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlKeyManager.java78
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlNode.java158
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlPort.java88
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeEdge.java135
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeNode.java183
-rw-r--r--src/main/java/com/mxgraph/io/graphml/mxGraphMlUtils.java252
-rw-r--r--src/main/java/com/mxgraph/io/mxGraphMlCodec.java377
-rw-r--r--src/main/webapp/index.html1
-rw-r--r--src/main/webapp/js/app.min.js459
-rw-r--r--src/main/webapp/js/diagramly/App.js20
-rw-r--r--src/main/webapp/js/diagramly/Devel.js4
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js92
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js14
-rw-r--r--src/main/webapp/js/diagramly/Init.js3
-rw-r--r--src/main/webapp/js/mxgraph/Editor.js3
-rw-r--r--src/main/webapp/js/mxgraph/EditorUi.js18
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js106
-rw-r--r--src/main/webapp/js/viewer-static.min.js534
-rw-r--r--src/main/webapp/js/viewer.min.js534
-rw-r--r--src/main/webapp/service-worker.js4
28 files changed, 3461 insertions, 910 deletions
diff --git a/ChangeLog b/ChangeLog
index 52dbaec5..76f6cde5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20-JUL-2020: 13.4.9
+
+- Fixes handling of built-in plugins
+- Uses mxGraph 4.2.1 beta 6
+
19-JUL-2020: 13.4.8
- Fixes SHA for inline script
diff --git a/VERSION b/VERSION
index 31ff3f72..3513dbe1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-13.4.8 \ No newline at end of file
+13.4.9 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 1e210af0..078b4737 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1287,8 +1287,8 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=0!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f,g){f=null!=f?f:[];if(0<c||0<d||null!=g){var k=this.getModel(),l=a+c,m=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var n=k.getChildCount(e),p=0;p<n;p++){var q=k.getChildAt(e,p),r=this.view.getState(q);if(null!=r&&this.isCellVisible(q)){var t=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(r=mxUtils.getBoundingBox(r,t));null!=g&&k.isVertex(q)&&mxUtils.intersects(g,r)||null==g&&(k.isEdge(q)||k.isVertex(q))&&
-r.x>=a&&r.y+r.height<=m&&r.y>=b&&r.x+r.width<=l?f.push(q):this.getCells(a,b,c,d,q,f,g)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k){f=null!=f?f:[];if(0<c||0<d||null!=g){var l=this.getModel(),m=a+c,n=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=l.getRoot()));if(null!=e)for(var p=l.getChildCount(e),q=0;q<p;q++){var r=l.getChildAt(e,q),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&(null==k||!k(t))){var u=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(t=mxUtils.getBoundingBox(t,u));null!=g&&l.isVertex(r)&&mxUtils.intersects(g,t)||null==g&&(l.isEdge(r)||
+l.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=b&&t.x+t.width<=m?f.push(r):this.getCells(a,b,c,d,r,f,g,k)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
@@ -1385,7 +1385,7 @@ mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0
mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;
mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};
mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
-mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
+mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a);)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));return null!=b?b.cell:null};
mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())&&!mxEvent.isAltDown(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlConstants.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlConstants.java
new file mode 100644
index 00000000..8b6af609
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlConstants.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+/**
+ * This class contains constants used in the Import of gml documents.
+ */
+public class mxGraphMlConstants
+{
+ public static String ID = "id";
+
+ public static String KEY_FOR = "for";
+
+ public static String KEY_NAME = "attr.name";
+
+ public static String KEY_TYPE = "attr.type";
+
+ public static String GRAPH = "graph";
+
+ public static String GRAPHML = "graphml";
+
+ public static String NODE = "node";
+
+ public static String EDGE = "edge";
+
+ public static String HYPEREDGE = "hyperedge";
+
+ public static String PORT = "port";
+
+ public static String ENDPOINT = "endpoint";
+
+ public static String KEY = "key";
+
+ public static String DATA = "data";
+
+ public static String ALL = "all";
+
+ public static String EDGE_SOURCE = "source";
+
+ public static String EDGE_SOURCE_PORT = "sourceport";
+
+ public static String EDGE_TARGET = "target";
+
+ public static String EDGE_TARGET_PORT = "targetport";
+
+ public static String EDGE_DIRECTED = "directed";
+
+ public static String EDGE_UNDIRECTED = "undirected";
+
+ public static String EDGE_DEFAULT = "edgedefault";
+
+ public static String PORT_NAME = "name";
+
+ public static String HEIGHT = "height";
+
+ public static String WIDTH = "width";
+
+ public static String X = "x";
+
+ public static String Y = "y";
+
+ public static String JGRAPH = "jGraph:";
+
+ public static String GEOMETRY = "Geometry";
+
+ public static String FILL = "Fill";
+
+ public static String SHAPENODE = "ShapeNode";
+
+ public static String SHAPEEDGE = "ShapeEdge";
+
+ public static String JGRAPH_URL = "http://www.jgraph.com/";
+
+ public static String KEY_NODE_ID = "d0";
+
+ public static String KEY_NODE_NAME = "nodeData";
+
+ public static String KEY_EDGE_ID = "d1";
+
+ public static String KEY_EDGE_NAME = "edgeData";
+
+ public static String STYLE = "Style";
+
+ public static String SHAPE = "Shape";
+
+ public static String TYPE = "type";
+
+ public static String LABEL = "label";
+
+ public static String TEXT = "text";
+
+ public static String PROPERTIES = "properties";
+
+ public static String SOURCETARGET = "SourceTarget";
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlData.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlData.java
new file mode 100644
index 00000000..09aee900
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlData.java
@@ -0,0 +1,174 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Represents a Data element in the GML Structure.
+ */
+public class mxGraphMlData
+{
+ private String dataId = "";
+
+ private String dataKey = "";
+
+ private String dataValue = "";//not using
+
+ private mxGraphMlShapeNode dataShapeNode;
+
+ private mxGraphMlShapeEdge dataShapeEdge;
+
+ /**
+ * Construct a data with the params values.
+ * @param dataId Data's ID
+ * @param dataKey Reference to a Key Element ID
+ * @param dataValue Value of the data Element
+ * @param dataShapeEdge JGraph specific edge properties.
+ * @param dataShapeNode JGraph specific node properties.
+ */
+ public mxGraphMlData(String dataId, String dataKey, String dataValue,
+ mxGraphMlShapeEdge dataShapeEdge, mxGraphMlShapeNode dataShapeNode)
+ {
+ this.dataId = dataId;
+ this.dataKey = dataKey;
+ this.dataValue = dataValue;
+ this.dataShapeNode = dataShapeNode;
+ this.dataShapeEdge = dataShapeEdge;
+ }
+
+ /**
+ * Construct a data from one xml data element.
+ * @param dataElement Xml Data Element.
+ */
+ public mxGraphMlData(Element dataElement)
+ {
+ this.dataId = dataElement.getAttribute(mxGraphMlConstants.ID);
+ this.dataKey = dataElement.getAttribute(mxGraphMlConstants.KEY);
+
+ this.dataValue = "";
+
+ Element shapeNodeElement = mxGraphMlUtils.childsTag(dataElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.SHAPENODE);
+ Element shapeEdgeElement = mxGraphMlUtils.childsTag(dataElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.SHAPEEDGE);
+
+ if (shapeNodeElement != null)
+ {
+ this.dataShapeNode = new mxGraphMlShapeNode(shapeNodeElement);
+ }
+ else if (shapeEdgeElement != null)
+ {
+ this.dataShapeEdge = new mxGraphMlShapeEdge(shapeEdgeElement);
+ }
+ else
+ {
+ NodeList childs = dataElement.getChildNodes();
+ List<Node> childrens = mxGraphMlUtils.copyNodeList(childs);
+
+ for (Node n : childrens)
+ {
+ if (n.getNodeName().equals("#text"))
+ {
+
+ this.dataValue += n.getNodeValue();
+ }
+ }
+ this.dataValue = this.dataValue.trim();
+ }
+ }
+
+ /**
+ * Construct an empty data.
+ */
+ public mxGraphMlData()
+ {
+ }
+
+ public String getDataId()
+ {
+ return dataId;
+ }
+
+ public void setDataId(String dataId)
+ {
+ this.dataId = dataId;
+ }
+
+ public String getDataKey()
+ {
+ return dataKey;
+ }
+
+ public void setDataKey(String dataKey)
+ {
+ this.dataKey = dataKey;
+ }
+
+ public String getDataValue()
+ {
+ return dataValue;
+ }
+
+ public void setDataValue(String dataValue)
+ {
+ this.dataValue = dataValue;
+ }
+
+ public mxGraphMlShapeNode getDataShapeNode()
+ {
+ return dataShapeNode;
+ }
+
+ public void setDataShapeNode(mxGraphMlShapeNode dataShapeNode)
+ {
+ this.dataShapeNode = dataShapeNode;
+ }
+
+ public mxGraphMlShapeEdge getDataShapeEdge()
+ {
+ return dataShapeEdge;
+ }
+
+ public void setDataShapeEdge(mxGraphMlShapeEdge dataShapeEdge)
+ {
+ this.dataShapeEdge = dataShapeEdge;
+ }
+
+ /**
+ * Generates an Node Data Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateNodeElement(Document document)
+ {
+ Element data = document.createElement(mxGraphMlConstants.DATA);
+ data.setAttribute(mxGraphMlConstants.KEY, dataKey);
+
+ Element shapeNodeElement = dataShapeNode.generateElement(document);
+ data.appendChild(shapeNodeElement);
+
+ return data;
+ }
+
+ /**
+ * Generates an Edge Data Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateEdgeElement(Document document)
+ {
+ Element data = document.createElement(mxGraphMlConstants.DATA);
+ data.setAttribute(mxGraphMlConstants.KEY, dataKey);
+
+ Element shapeEdgeElement = dataShapeEdge.generateElement(document);
+ data.appendChild(shapeEdgeElement);
+
+ return data;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlEdge.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlEdge.java
new file mode 100644
index 00000000..8171f7ad
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlEdge.java
@@ -0,0 +1,222 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import com.mxgraph.util.mxConstants;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a Data element in the GML Structure.
+ */
+public class mxGraphMlEdge
+{
+ private String edgeId;
+
+ private String edgeSource;
+
+ private String edgeSourcePort;
+
+ private String edgeTarget;
+
+ private String edgeTargetPort;
+
+ private String edgeDirected;
+
+ private mxGraphMlData edgeData;
+
+ /**
+ * Map with the data. The key is the key attribute
+ */
+ private HashMap<String, mxGraphMlData> edgeDataMap = new HashMap<String, mxGraphMlData>();
+
+ /**
+ * Construct an edge with source and target.
+ * @param edgeSource Source Node's ID.
+ * @param edgeTarget Target Node's ID.
+ */
+ public mxGraphMlEdge(String edgeSource, String edgeTarget,
+ String edgeSourcePort, String edgeTargetPort)
+ {
+ this.edgeId = "";
+ this.edgeSource = edgeSource;
+ this.edgeSourcePort = edgeSourcePort;
+ this.edgeTarget = edgeTarget;
+ this.edgeTargetPort = edgeTargetPort;
+ this.edgeDirected = "";
+ }
+
+ /**
+ * Construct an edge from a xml edge element.
+ * @param edgeElement Xml edge element.
+ */
+ public mxGraphMlEdge(Element edgeElement)
+ {
+ this.edgeId = edgeElement.getAttribute(mxGraphMlConstants.ID);
+ this.edgeSource = edgeElement.getAttribute(mxGraphMlConstants.EDGE_SOURCE);
+ this.edgeSourcePort = edgeElement
+ .getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);
+ this.edgeTarget = edgeElement.getAttribute(mxGraphMlConstants.EDGE_TARGET);
+ this.edgeTargetPort = edgeElement
+ .getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);
+ this.edgeDirected = edgeElement
+ .getAttribute(mxGraphMlConstants.EDGE_DIRECTED);
+
+ List<Element> dataList = mxGraphMlUtils.childsTags(edgeElement,
+ mxGraphMlConstants.DATA);
+
+ for (Element dataElem : dataList)
+ {
+ mxGraphMlData data = new mxGraphMlData(dataElem);
+ String key = data.getDataKey();
+ edgeDataMap.put(key, data);
+ }
+ }
+
+ public String getEdgeDirected()
+ {
+ return edgeDirected;
+ }
+
+ public void setEdgeDirected(String edgeDirected)
+ {
+ this.edgeDirected = edgeDirected;
+ }
+
+ public String getEdgeId()
+ {
+ return edgeId;
+ }
+
+ public void setEdgeId(String edgeId)
+ {
+ this.edgeId = edgeId;
+ }
+
+ public String getEdgeSource()
+ {
+ return edgeSource;
+ }
+
+ public void setEdgeSource(String edgeSource)
+ {
+ this.edgeSource = edgeSource;
+ }
+
+ public String getEdgeSourcePort()
+ {
+ return edgeSourcePort;
+ }
+
+ public void setEdgeSourcePort(String edgeSourcePort)
+ {
+ this.edgeSourcePort = edgeSourcePort;
+ }
+
+ public String getEdgeTarget()
+ {
+ return edgeTarget;
+ }
+
+ public void setEdgeTarget(String edgeTarget)
+ {
+ this.edgeTarget = edgeTarget;
+ }
+
+ public String getEdgeTargetPort()
+ {
+ return edgeTargetPort;
+ }
+
+ public void setEdgeTargetPort(String edgeTargetPort)
+ {
+ this.edgeTargetPort = edgeTargetPort;
+ }
+
+ public HashMap<String, mxGraphMlData> getEdgeDataMap()
+ {
+ return edgeDataMap;
+ }
+
+ public void setEdgeDataMap(HashMap<String, mxGraphMlData> nodeEdgeMap)
+ {
+ this.edgeDataMap = nodeEdgeMap;
+ }
+
+ public mxGraphMlData getEdgeData()
+ {
+ return edgeData;
+ }
+
+ public void setEdgeData(mxGraphMlData egdeData)
+ {
+ this.edgeData = egdeData;
+ }
+
+ /**
+ * Generates a Edge Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element edge = document.createElement(mxGraphMlConstants.EDGE);
+
+ if (!edgeId.equals(""))
+ {
+ edge.setAttribute(mxGraphMlConstants.ID, edgeId);
+ }
+ edge.setAttribute(mxGraphMlConstants.EDGE_SOURCE, edgeSource);
+ edge.setAttribute(mxGraphMlConstants.EDGE_TARGET, edgeTarget);
+
+ if (!edgeSourcePort.equals(""))
+ {
+ edge.setAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT, edgeSourcePort);
+ }
+
+ if (!edgeTargetPort.equals(""))
+ {
+ edge.setAttribute(mxGraphMlConstants.EDGE_TARGET_PORT, edgeTargetPort);
+ }
+
+ if (!edgeDirected.equals(""))
+ {
+ edge.setAttribute(mxGraphMlConstants.EDGE_DIRECTED, edgeDirected);
+ }
+
+ Element dataElement = edgeData.generateEdgeElement(document);
+ edge.appendChild(dataElement);
+
+ return edge;
+ }
+
+ /**
+ * Returns if the edge has end arrow.
+ * @return style that indicates the end arrow type(CLASSIC or NONE).
+ */
+ public String getEdgeStyle()
+ {
+ String style = "";
+ Hashtable<String, Object> styleMap = new Hashtable<String, Object>();
+
+ //Defines style of the edge.
+ if (edgeDirected.equals("true"))
+ {
+ styleMap.put(mxConstants.STYLE_ENDARROW, mxConstants.ARROW_CLASSIC);
+
+ style = mxGraphMlUtils.getStyleString(styleMap, "=");
+ }
+ else if (edgeDirected.equals("false"))
+ {
+ styleMap.put(mxConstants.STYLE_ENDARROW, mxConstants.NONE);
+
+ style = mxGraphMlUtils.getStyleString(styleMap, "=");
+ }
+
+ return style;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlGraph.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlGraph.java
new file mode 100644
index 00000000..1f151bea
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlGraph.java
@@ -0,0 +1,426 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import com.mxgraph.model.mxCell;
+import com.mxgraph.util.mxPoint;
+import com.mxgraph.view.mxConnectionConstraint;
+import com.mxgraph.view.mxGraph;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a Graph element in the GML Structure.
+ */
+public class mxGraphMlGraph
+{
+ /**
+ * Map with the vertex cells added in the addNode method.
+ */
+ private static HashMap<String, Object> cellsMap = new HashMap<String, Object>();
+
+ private String id = "";
+
+ private String edgedefault = "";
+
+ private List<mxGraphMlNode> nodes = new ArrayList<mxGraphMlNode>();
+
+ private List<mxGraphMlEdge> edges = new ArrayList<mxGraphMlEdge>();
+
+ /**
+ * Constructs a graph with id and edge default direction.
+ * @param id Graph's ID
+ * @param edgedefault Edge Default direction.("directed" or "undirected")
+ */
+ public mxGraphMlGraph(String id, String edgedefault)
+ {
+ this.id = id;
+ this.edgedefault = edgedefault;
+ }
+
+ /**
+ * Constructs an empty graph.
+ */
+ public mxGraphMlGraph()
+ {
+ }
+
+ /**
+ * Constructs a graph from a xml graph element.
+ * @param graphElement Xml graph element.
+ */
+ public mxGraphMlGraph(Element graphElement)
+ {
+ this.id = graphElement.getAttribute(mxGraphMlConstants.ID);
+ this.edgedefault = graphElement
+ .getAttribute(mxGraphMlConstants.EDGE_DEFAULT);
+
+ //Adds node elements
+ List<Element> nodeElements = mxGraphMlUtils.childsTags(graphElement,
+ mxGraphMlConstants.NODE);
+
+ for (Element nodeElem : nodeElements)
+ {
+ mxGraphMlNode node = new mxGraphMlNode(nodeElem);
+
+ nodes.add(node);
+ }
+
+ //Adds edge elements
+ List<Element> edgeElements = mxGraphMlUtils.childsTags(graphElement,
+ mxGraphMlConstants.EDGE);
+
+ for (Element edgeElem : edgeElements)
+ {
+ mxGraphMlEdge edge = new mxGraphMlEdge(edgeElem);
+
+ if (edge.getEdgeDirected().equals(""))
+ {
+ if (edgedefault.equals(mxGraphMlConstants.EDGE_DIRECTED))
+ {
+ edge.setEdgeDirected("true");
+ }
+ else if (edgedefault.equals(mxGraphMlConstants.EDGE_UNDIRECTED))
+ {
+ edge.setEdgeDirected("false");
+ }
+ }
+
+ edges.add(edge);
+ }
+ }
+
+ /**
+ * Adds the elements represented for this graph model into the given graph.
+ * @param graph Graph where the elements will be located
+ * @param parent Parent of the cells to be added.
+ */
+ public void addGraph(mxGraph graph, Object parent)
+ {
+ List<mxGraphMlNode> nodeList = getNodes();
+
+ for (mxGraphMlNode node : nodeList)
+ {
+ addNode(graph, parent, node);
+ }
+ List<mxGraphMlEdge> edgeList = getEdges();
+
+ for (mxGraphMlEdge edge : edgeList)
+ {
+ addEdge(graph, parent, edge);
+ }
+ }
+
+ /**
+ * Checks if the node has data elements inside.
+ * @param node Gml node element.
+ * @return Returns <code>true</code> if the node has data elements inside.
+ */
+ public static boolean hasData(mxGraphMlNode node)
+ {
+ boolean ret = false;
+ if (node.getNodeDataMap() == null)
+ {
+ ret = false;
+ }
+ else
+ {
+ ret = true;
+ }
+ return ret;
+ }
+
+ /**
+ * Returns the data element inside the node that references to the key element
+ * with name = KEY_NODE_NAME.
+ * @param node Gml Node element.
+ * @return The required data. null if not found.
+ */
+ public static mxGraphMlData dataNodeKey(mxGraphMlNode node)
+ {
+ String keyId = "";
+ HashMap<String, mxGraphMlKey> keyMap = mxGraphMlKeyManager.getInstance()
+ .getKeyMap();
+
+ for (mxGraphMlKey key : keyMap.values())
+ {
+ if (key.getKeyName().equals(mxGraphMlConstants.KEY_NODE_NAME))
+ {
+ keyId = key.getKeyId();
+ }
+ }
+
+ mxGraphMlData data = null;
+ HashMap<String, mxGraphMlData> nodeDataMap = node.getNodeDataMap();
+ data = nodeDataMap.get(keyId);
+
+ return data;
+ }
+
+ /**
+ * Returns the data element inside the edge that references to the key element
+ * with name = KEY_EDGE_NAME.
+ * @param edge Gml Edge element.
+ * @return The required data. null if not found.
+ */
+ public static mxGraphMlData dataEdgeKey(mxGraphMlEdge edge)
+ {
+ String keyId = "";
+ HashMap<String, mxGraphMlKey> keyMap = mxGraphMlKeyManager.getInstance()
+ .getKeyMap();
+ for (mxGraphMlKey key : keyMap.values())
+ {
+ if (key.getKeyName().equals(mxGraphMlConstants.KEY_EDGE_NAME))
+ {
+ keyId = key.getKeyId();
+ }
+ }
+
+ mxGraphMlData data = null;
+ HashMap<String, mxGraphMlData> nodeDataMap = edge.getEdgeDataMap();
+ data = nodeDataMap.get(keyId);
+
+ return data;
+ }
+
+ /**
+ * Adds the vertex represented for the gml node into the graph with the given parent.
+ * @param graph Graph where the vertex will be added.
+ * @param parent Parent's cell.
+ * @param node Gml Node
+ * @return The inserted Vertex cell.
+ */
+ private mxCell addNode(mxGraph graph, Object parent, mxGraphMlNode node)
+ {
+ mxCell v1;
+ String id = node.getNodeId();
+
+ mxGraphMlData data = dataNodeKey(node);
+
+ if (data != null && data.getDataShapeNode() != null)
+ {
+ Double x = Double.valueOf(data.getDataShapeNode().getDataX());
+ Double y = Double.valueOf(data.getDataShapeNode().getDataY());
+ Double h = Double.valueOf(data.getDataShapeNode().getDataHeight());
+ Double w = Double.valueOf(data.getDataShapeNode().getDataWidth());
+ String label = data.getDataShapeNode().getDataLabel();
+ String style = data.getDataShapeNode().getDataStyle();
+ v1 = (mxCell) graph.insertVertex(parent, id, label, x, y, w, h,
+ style);
+ }
+ else
+ {
+ v1 = (mxCell) graph.insertVertex(parent, id, "", 0, 0, 100, 100);
+ }
+
+ cellsMap.put(id, v1);
+ List<mxGraphMlGraph> graphs = node.getNodeGraph();
+
+ for (mxGraphMlGraph gmlGraph : graphs)
+ {
+ gmlGraph.addGraph(graph, v1);
+ }
+ return v1;
+ }
+
+ /**
+ * Returns the point represented for the port name.
+ * The specials names North, NorthWest, NorthEast, East, West, South, SouthEast and SouthWest.
+ * are accepted. Else, the values acepted follow the pattern "double,double".
+ * where double must be in the range 0..1
+ * @param source Port Name.
+ * @return point that represent the port value.
+ */
+ private static mxPoint portValue(String source)
+ {
+ mxPoint fromConstraint = null;
+
+ if (source != null && !source.equals(""))
+ {
+
+ if (source.equals("North"))
+ {
+ fromConstraint = new mxPoint(0.5, 0);
+ }
+ else if (source.equals("South"))
+ {
+ fromConstraint = new mxPoint(0.5, 1);
+
+ }
+ else if (source.equals("East"))
+ {
+ fromConstraint = new mxPoint(1, 0.5);
+
+ }
+ else if (source.equals("West"))
+ {
+ fromConstraint = new mxPoint(0, 0.5);
+
+ }
+ else if (source.equals("NorthWest"))
+ {
+ fromConstraint = new mxPoint(0, 0);
+ }
+ else if (source.equals("SouthWest"))
+ {
+ fromConstraint = new mxPoint(0, 1);
+ }
+ else if (source.equals("SouthEast"))
+ {
+ fromConstraint = new mxPoint(1, 1);
+ }
+ else if (source.equals("NorthEast"))
+ {
+ fromConstraint = new mxPoint(1, 0);
+ }
+ else
+ {
+ try
+ {
+ String[] s = source.split(",");
+ Double x = Double.valueOf(s[0]);
+ Double y = Double.valueOf(s[1]);
+ fromConstraint = new mxPoint(x, y);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ return fromConstraint;
+ }
+
+ /**
+ * Adds the edge represented for the gml edge into the graph with the given parent.
+ * @param graph Graph where the vertex will be added.
+ * @param parent Parent's cell.
+ * @param edge Gml Edge
+ * @return The inserted edge cell.
+ */
+ private static mxCell addEdge(mxGraph graph, Object parent, mxGraphMlEdge edge)
+ {
+ //Get source and target vertex
+ mxPoint fromConstraint = null;
+ mxPoint toConstraint = null;
+ Object source = cellsMap.get(edge.getEdgeSource());
+ Object target = cellsMap.get(edge.getEdgeTarget());
+ String sourcePort = edge.getEdgeSourcePort();
+ String targetPort = edge.getEdgeTargetPort();
+
+ fromConstraint = portValue(sourcePort);
+
+ toConstraint = portValue(targetPort);
+
+ mxGraphMlData data = dataEdgeKey(edge);
+
+ String style = "";
+ String label = "";
+
+ if (data != null)
+ {
+ mxGraphMlShapeEdge shEdge = data.getDataShapeEdge();
+ style = shEdge.getStyle();
+ label = shEdge.getText();
+ }
+ else
+ {
+ style = edge.getEdgeStyle();
+ }
+
+ //Insert new edge.
+ mxCell e = (mxCell) graph.insertEdge(parent, null, label, source,
+ target, style);
+ graph.setConnectionConstraint(e, source, true,
+ new mxConnectionConstraint(fromConstraint, false));
+ graph.setConnectionConstraint(e, target, false,
+ new mxConnectionConstraint(toConstraint, false));
+ return e;
+ }
+
+ public String getEdgedefault()
+ {
+ return edgedefault;
+ }
+
+ public void setEdgedefault(String edgedefault)
+ {
+ this.edgedefault = edgedefault;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public List<mxGraphMlNode> getNodes()
+ {
+ return nodes;
+ }
+
+ public void setNodes(List<mxGraphMlNode> node)
+ {
+ this.nodes = node;
+ }
+
+ public List<mxGraphMlEdge> getEdges()
+ {
+ return edges;
+ }
+
+ public void setEdges(List<mxGraphMlEdge> edge)
+ {
+ this.edges = edge;
+ }
+
+ /**
+ * Checks if the graph has child nodes or edges.
+ * @return Returns <code>true</code> if the graph hasn't child nodes or edges.
+ */
+ public boolean isEmpty()
+ {
+ return nodes.size() == 0 && edges.size() == 0;
+ }
+
+ /**
+ * Generates a Key Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element graph = document.createElement(mxGraphMlConstants.GRAPH);
+
+ if (!id.equals(""))
+ {
+ graph.setAttribute(mxGraphMlConstants.ID, id);
+ }
+ if (!edgedefault.equals(""))
+ {
+ graph.setAttribute(mxGraphMlConstants.EDGE_DEFAULT, edgedefault);
+ }
+
+ for (mxGraphMlNode node : nodes)
+ {
+ Element nodeElement = node.generateElement(document);
+ graph.appendChild(nodeElement);
+ }
+
+ for (mxGraphMlEdge edge : edges)
+ {
+ Element edgeElement = edge.generateElement(document);
+ graph.appendChild(edgeElement);
+ }
+
+ return graph;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlKey.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlKey.java
new file mode 100644
index 00000000..17b5aaf8
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlKey.java
@@ -0,0 +1,377 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a Key element in the GML Structure.
+ */
+public class mxGraphMlKey
+{
+ /**
+ * Possibles values for the keyFor Attribute
+ */
+ public enum keyForValues
+ {
+ GRAPH, NODE, EDGE, HYPEREDGE, PORT, ENDPOINT, ALL
+ }
+
+ /**
+ * Possibles values for the keyType Attribute.
+ */
+ public enum keyTypeValues
+ {
+ BOOLEAN, INT, LONG, FLOAT, DOUBLE, STRING
+ }
+
+ private String keyDefault;
+
+ private String keyId;
+
+ private keyForValues keyFor;
+
+ private String keyName;
+
+ private keyTypeValues keyType;
+
+ /**
+ * Construct a key with the given parameters.
+ * @param keyId Key's ID
+ * @param keyFor Scope of the key.
+ * @param keyName Key Name
+ * @param keyType Type of the values represented for this key.
+ */
+ public mxGraphMlKey(String keyId, keyForValues keyFor, String keyName,
+ keyTypeValues keyType)
+ {
+ this.keyId = keyId;
+ this.keyFor = keyFor;
+ this.keyName = keyName;
+ this.keyType = keyType;
+ this.keyDefault = defaultValue();
+ }
+
+ /**
+ * Construct a key from a xml key element.
+ * @param keyElement Xml key element.
+ */
+ public mxGraphMlKey(Element keyElement)
+ {
+ this.keyId = keyElement.getAttribute(mxGraphMlConstants.ID);
+ this.keyFor = enumForValue(keyElement
+ .getAttribute(mxGraphMlConstants.KEY_FOR));
+ this.keyName = keyElement.getAttribute(mxGraphMlConstants.KEY_NAME);
+ this.keyType = enumTypeValue(keyElement
+ .getAttribute(mxGraphMlConstants.KEY_TYPE));
+ this.keyDefault = defaultValue();
+ }
+
+ public String getKeyDefault()
+ {
+ return keyDefault;
+ }
+
+ public void setKeyDefault(String keyDefault)
+ {
+ this.keyDefault = keyDefault;
+ }
+
+ public keyForValues getKeyFor()
+ {
+ return keyFor;
+ }
+
+ public void setKeyFor(keyForValues keyFor)
+ {
+ this.keyFor = keyFor;
+ }
+
+ public String getKeyId()
+ {
+ return keyId;
+ }
+
+ public void setKeyId(String keyId)
+ {
+ this.keyId = keyId;
+ }
+
+ public String getKeyName()
+ {
+ return keyName;
+ }
+
+ public void setKeyName(String keyName)
+ {
+ this.keyName = keyName;
+ }
+
+ public keyTypeValues getKeyType()
+ {
+ return keyType;
+ }
+
+ public void setKeyType(keyTypeValues keyType)
+ {
+ this.keyType = keyType;
+ }
+
+ /**
+ * Returns the default value of the keyDefault attribute according
+ * the keyType.
+ */
+ private String defaultValue()
+ {
+ String val = "";
+ switch (this.keyType)
+ {
+ case BOOLEAN:
+ {
+ val = "false";
+ break;
+ }
+ case DOUBLE:
+ {
+ val = "0";
+ break;
+ }
+ case FLOAT:
+ {
+ val = "0";
+ break;
+ }
+ case INT:
+ {
+ val = "0";
+ break;
+ }
+ case LONG:
+ {
+ val = "0";
+ break;
+ }
+ case STRING:
+ {
+ val = "";
+ break;
+ }
+ }
+ return val;
+ }
+
+ /**
+ * Generates a Key Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element key = document.createElement(mxGraphMlConstants.KEY);
+
+ if (!keyName.equals(""))
+ {
+ key.setAttribute(mxGraphMlConstants.KEY_NAME, keyName);
+ }
+ key.setAttribute(mxGraphMlConstants.ID, keyId);
+
+ if (!keyName.equals(""))
+ {
+ key.setAttribute(mxGraphMlConstants.KEY_FOR, stringForValue(keyFor));
+ }
+
+ if (!keyName.equals(""))
+ {
+ key.setAttribute(mxGraphMlConstants.KEY_TYPE, stringTypeValue(keyType));
+ }
+
+ if (!keyName.equals(""))
+ {
+ key.setTextContent(keyDefault);
+ }
+
+ return key;
+ }
+
+ /**
+ * Converts a String value in its corresponding enum value for the
+ * keyFor attribute.
+ * @param value Value in String representation.
+ * @return Returns the value in its enum representation.
+ */
+ public keyForValues enumForValue(String value)
+ {
+ keyForValues enumVal = keyForValues.ALL;
+
+ if (value.equals(mxGraphMlConstants.GRAPH))
+ {
+ enumVal = keyForValues.GRAPH;
+ }
+ else if (value.equals(mxGraphMlConstants.NODE))
+ {
+ enumVal = keyForValues.NODE;
+ }
+ else if (value.equals(mxGraphMlConstants.EDGE))
+ {
+ enumVal = keyForValues.EDGE;
+ }
+ else if (value.equals(mxGraphMlConstants.HYPEREDGE))
+ {
+ enumVal = keyForValues.HYPEREDGE;
+ }
+ else if (value.equals(mxGraphMlConstants.PORT))
+ {
+ enumVal = keyForValues.PORT;
+ }
+ else if (value.equals(mxGraphMlConstants.ENDPOINT))
+ {
+ enumVal = keyForValues.ENDPOINT;
+ }
+ else if (value.equals(mxGraphMlConstants.ALL))
+ {
+ enumVal = keyForValues.ALL;
+ }
+
+ return enumVal;
+ }
+
+ /**
+ * Converts a enum value in its corresponding String value for the
+ * keyFor attribute.
+ * @param value Value in enum representation.
+ * @return Returns the value in its String representation.
+ */
+ public String stringForValue(keyForValues value)
+ {
+
+ String val = mxGraphMlConstants.ALL;
+
+ switch (value)
+ {
+ case GRAPH:
+ {
+ val = mxGraphMlConstants.GRAPH;
+ break;
+ }
+ case NODE:
+ {
+ val = mxGraphMlConstants.NODE;
+ break;
+ }
+ case EDGE:
+ {
+ val = mxGraphMlConstants.EDGE;
+ break;
+ }
+ case HYPEREDGE:
+ {
+ val = mxGraphMlConstants.HYPEREDGE;
+ break;
+ }
+ case PORT:
+ {
+ val = mxGraphMlConstants.PORT;
+ break;
+ }
+ case ENDPOINT:
+ {
+ val = mxGraphMlConstants.ENDPOINT;
+ break;
+ }
+ case ALL:
+ {
+ val = mxGraphMlConstants.ALL;
+ break;
+ }
+ }
+
+ return val;
+ }
+
+ /**
+ * Converts a String value in its corresponding enum value for the
+ * keyType attribute.
+ * @param value Value in String representation.
+ * @return Returns the value in its enum representation.
+ */
+ public keyTypeValues enumTypeValue(String value)
+ {
+ keyTypeValues enumVal = keyTypeValues.STRING;
+
+ if (value.equals("boolean"))
+ {
+ enumVal = keyTypeValues.BOOLEAN;
+ }
+ else if (value.equals("double"))
+ {
+ enumVal = keyTypeValues.DOUBLE;
+ }
+ else if (value.equals("float"))
+ {
+ enumVal = keyTypeValues.FLOAT;
+ }
+ else if (value.equals("int"))
+ {
+ enumVal = keyTypeValues.INT;
+ }
+ else if (value.equals("long"))
+ {
+ enumVal = keyTypeValues.LONG;
+ }
+ else if (value.equals("string"))
+ {
+ enumVal = keyTypeValues.STRING;
+ }
+
+ return enumVal;
+ }
+
+ /**
+ * Converts a enum value in its corresponding string value for the
+ * keyType attribute.
+ * @param value Value in enum representation.
+ * @return Returns the value in its String representation.
+ */
+ public String stringTypeValue(keyTypeValues value)
+ {
+ String val = "string";
+
+ switch (value)
+ {
+ case BOOLEAN:
+ {
+ val = "boolean";
+ break;
+ }
+ case DOUBLE:
+ {
+ val = "double";
+ break;
+ }
+ case FLOAT:
+ {
+ val = "float";
+ break;
+ }
+ case INT:
+ {
+ val = "int";
+ break;
+ }
+ case LONG:
+ {
+ val = "long";
+ break;
+ }
+ case STRING:
+ {
+ val = "string";
+ break;
+ }
+ }
+
+ return val;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlKeyManager.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlKeyManager.java
new file mode 100644
index 00000000..58b1ae7b
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlKeyManager.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import java.util.HashMap;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * This is a singleton class that contains a map with the key elements of the
+ * document. The key elements are wrapped in instances of mxGmlKey and
+ * may to be access by ID.
+ */
+public class mxGraphMlKeyManager
+{
+ /**
+ * Map with the key elements of the document.<br/>
+ * The key is the key's ID.
+ */
+ private HashMap<String, mxGraphMlKey> keyMap = new HashMap<String, mxGraphMlKey>();
+
+ private static mxGraphMlKeyManager keyManager = null;
+
+ /**
+ * Singleton pattern requires private constructor.
+ */
+ private mxGraphMlKeyManager()
+ {
+ }
+
+ /**
+ * Returns the instance of mxGmlKeyManager.
+ * If no instance has been created until the moment, a new instance is
+ * returned.
+ * This method don't load the map.
+ * @return An instance of mxGmlKeyManager.
+ */
+ public static mxGraphMlKeyManager getInstance()
+ {
+ if (keyManager == null)
+ {
+ keyManager = new mxGraphMlKeyManager();
+ }
+ return keyManager;
+ }
+
+ /**
+ * Load the map with the key elements in the document.<br/>
+ * The keys are wrapped for instances of mxGmlKey.
+ * @param doc Document with the keys.
+ */
+ public void initialise(Document doc)
+ {
+ NodeList gmlKeys = doc.getElementsByTagName(mxGraphMlConstants.KEY);
+
+ int keyLength = gmlKeys.getLength();
+
+ for (int i = 0; i < keyLength; i++)
+ {
+ Element key = (Element) gmlKeys.item(i);
+ String keyId = key.getAttribute(mxGraphMlConstants.ID);
+ mxGraphMlKey keyElement = new mxGraphMlKey(key);
+ keyMap.put(keyId, keyElement);
+ }
+ }
+
+ public HashMap<String, mxGraphMlKey> getKeyMap()
+ {
+ return keyMap;
+ }
+
+ public void setKeyMap(HashMap<String, mxGraphMlKey> keyMap)
+ {
+ this.keyMap = keyMap;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlNode.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlNode.java
new file mode 100644
index 00000000..5ad4f537
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlNode.java
@@ -0,0 +1,158 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a Data element in the GML Structure.
+ */
+public class mxGraphMlNode
+{
+ private String nodeId;
+
+ private mxGraphMlData nodeData;
+
+ private List<mxGraphMlGraph> nodeGraphList = new ArrayList<mxGraphMlGraph>();
+
+ private HashMap<String, mxGraphMlData> nodeDataMap = new HashMap<String, mxGraphMlData>();
+
+ private HashMap<String, mxGraphMlPort> nodePortMap = new HashMap<String, mxGraphMlPort>();
+
+ /**
+ * Construct a node with Id and one data element
+ * @param nodeId Node`s ID
+ * @param nodeData Gml Data.
+ */
+ public mxGraphMlNode(String nodeId, mxGraphMlData nodeData)
+ {
+ this.nodeId = nodeId;
+ this.nodeData = nodeData;
+ }
+
+ /**
+ * Construct a Node from a xml Node Element.
+ * @param nodeElement Xml Node Element.
+ */
+ public mxGraphMlNode(Element nodeElement)
+ {
+ this.nodeId = nodeElement.getAttribute(mxGraphMlConstants.ID);
+
+ //Add data elements
+ List<Element> dataList = mxGraphMlUtils.childsTags(nodeElement,
+ mxGraphMlConstants.DATA);
+
+ for (Element dataElem : dataList)
+ {
+ mxGraphMlData data = new mxGraphMlData(dataElem);
+ String key = data.getDataKey();
+ nodeDataMap.put(key, data);
+ }
+
+ //Add graph elements
+ List<Element> graphList = mxGraphMlUtils.childsTags(nodeElement,
+ mxGraphMlConstants.GRAPH);
+
+ for (Element graphElem : graphList)
+ {
+ mxGraphMlGraph graph = new mxGraphMlGraph(graphElem);
+ nodeGraphList.add(graph);
+ }
+
+ //Add port elements
+ List<Element> portList = mxGraphMlUtils.childsTags(nodeElement,
+ mxGraphMlConstants.PORT);
+
+ for (Element portElem : portList)
+ {
+ mxGraphMlPort port = new mxGraphMlPort(portElem);
+ String name = port.getName();
+ nodePortMap.put(name, port);
+ }
+ }
+
+ public String getNodeId()
+ {
+ return nodeId;
+ }
+
+ public void setNodeId(String nodeId)
+ {
+ this.nodeId = nodeId;
+ }
+
+ public HashMap<String, mxGraphMlData> getNodeDataMap()
+ {
+ return nodeDataMap;
+ }
+
+ public void setNodeDataMap(HashMap<String, mxGraphMlData> nodeDataMap)
+ {
+ this.nodeDataMap = nodeDataMap;
+ }
+
+ public List<mxGraphMlGraph> getNodeGraph()
+ {
+ return nodeGraphList;
+ }
+
+ public void setNodeGraph(List<mxGraphMlGraph> nodeGraph)
+ {
+ this.nodeGraphList = nodeGraph;
+ }
+
+ public HashMap<String, mxGraphMlPort> getNodePort()
+ {
+ return nodePortMap;
+ }
+
+ public void setNodePort(HashMap<String, mxGraphMlPort> nodePort)
+ {
+ this.nodePortMap = nodePort;
+ }
+
+ /**
+ * Generates a Key Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element node = document.createElement(mxGraphMlConstants.NODE);
+
+ node.setAttribute(mxGraphMlConstants.ID, nodeId);
+
+ Element dataElement = nodeData.generateNodeElement(document);
+ node.appendChild(dataElement);
+
+ for (mxGraphMlPort port : nodePortMap.values())
+ {
+ Element portElement = port.generateElement(document);
+ node.appendChild(portElement);
+ }
+
+ for (mxGraphMlGraph graph : nodeGraphList)
+ {
+ Element graphElement = graph.generateElement(document);
+ node.appendChild(graphElement);
+ }
+
+ return node;
+ }
+
+ public mxGraphMlData getNodeData()
+ {
+ return nodeData;
+ }
+
+ public void setNodeData(mxGraphMlData nodeData)
+ {
+ this.nodeData = nodeData;
+ }
+
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlPort.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlPort.java
new file mode 100644
index 00000000..a31e9a09
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlPort.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import java.util.HashMap;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a Port element in the GML Structure.
+ */
+public class mxGraphMlPort
+{
+ private String name;
+
+ private HashMap<String, mxGraphMlData> portDataMap = new HashMap<String, mxGraphMlData>();
+
+ /**
+ * Construct a Port with name.
+ * @param name Port Name
+ */
+ public mxGraphMlPort(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Construct a Port from a xml port Element.
+ * @param portElement Xml port Element.
+ */
+ public mxGraphMlPort(Element portElement)
+ {
+ this.name = portElement.getAttribute(mxGraphMlConstants.PORT_NAME);
+
+ //Add data elements
+ List<Element> dataList = mxGraphMlUtils.childsTags(portElement,
+ mxGraphMlConstants.DATA);
+
+ for (Element dataElem : dataList)
+ {
+ mxGraphMlData data = new mxGraphMlData(dataElem);
+ String key = data.getDataKey();
+ portDataMap.put(key, data);
+ }
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public HashMap<String, mxGraphMlData> getPortDataMap()
+ {
+ return portDataMap;
+ }
+
+ public void setPortDataMap(HashMap<String, mxGraphMlData> nodeDataMap)
+ {
+ this.portDataMap = nodeDataMap;
+ }
+
+ /**
+ * Generates a Key Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element node = document.createElement(mxGraphMlConstants.PORT);
+
+ node.setAttribute(mxGraphMlConstants.PORT_NAME, name);
+
+ for (mxGraphMlData data : portDataMap.values())
+ {
+ Element dataElement = data.generateNodeElement(document);
+ node.appendChild(dataElement);
+ }
+
+ return node;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeEdge.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeEdge.java
new file mode 100644
index 00000000..6e0bcc4b
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeEdge.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * This class represents the properties of a JGraph edge.
+ */
+public class mxGraphMlShapeEdge
+{
+ private String text = "";
+
+ private String style = "";
+
+ private String edgeSource;
+
+ private String edgeTarget;
+
+ /**
+ * Construct a Shape Edge with text and style.
+ * @param text
+ * @param style
+ */
+ public mxGraphMlShapeEdge(String text, String style)
+ {
+ this.text = text;
+ this.style = style;
+ }
+
+ /**
+ * Constructs a ShapeEdge from a xml shapeEdgeElement.
+ * @param shapeEdgeElement
+ */
+ public mxGraphMlShapeEdge(Element shapeEdgeElement)
+ {
+ Element labelElement = mxGraphMlUtils.childsTag(shapeEdgeElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.LABEL);
+
+ if (labelElement != null)
+ {
+ this.text = labelElement.getAttribute(mxGraphMlConstants.TEXT);
+ }
+
+ Element styleElement = mxGraphMlUtils.childsTag(shapeEdgeElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.STYLE);
+
+ if (styleElement != null)
+ {
+ this.style = styleElement.getAttribute(mxGraphMlConstants.PROPERTIES);
+
+ }
+ }
+
+ /**
+ * Construct an empty Shape Edge Element.
+ */
+ public mxGraphMlShapeEdge()
+ {
+ }
+
+ /**
+ * Generates a ShapeEdge Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element dataEdge = document.createElementNS(mxGraphMlConstants.JGRAPH_URL,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.SHAPEEDGE);
+
+ if (!this.text.equals(""))
+ {
+ Element dataEdgeLabel = document.createElementNS(
+ mxGraphMlConstants.JGRAPH_URL, mxGraphMlConstants.JGRAPH
+ + mxGraphMlConstants.LABEL);
+ dataEdgeLabel.setAttribute(mxGraphMlConstants.TEXT, this.text);
+ dataEdge.appendChild(dataEdgeLabel);
+ }
+
+ if (!this.style.equals(""))
+ {
+ Element dataEdgeStyle = document.createElementNS(
+ mxGraphMlConstants.JGRAPH_URL, mxGraphMlConstants.JGRAPH
+ + mxGraphMlConstants.STYLE);
+
+ dataEdgeStyle.setAttribute(mxGraphMlConstants.PROPERTIES, this.style);
+ dataEdge.appendChild(dataEdgeStyle);
+ }
+
+ return dataEdge;
+ }
+
+ public String getText()
+ {
+ return text;
+ }
+
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+ public String getStyle()
+ {
+ return style;
+ }
+
+ public void setStyle(String style)
+ {
+ this.style = style;
+ }
+
+ public String getEdgeSource()
+ {
+ return edgeSource;
+ }
+
+ public void setEdgeSource(String edgeSource)
+ {
+ this.edgeSource = edgeSource;
+ }
+
+ public String getEdgeTarget()
+ {
+ return edgeTarget;
+ }
+
+ public void setEdgeTarget(String edgeTarget)
+ {
+ this.edgeTarget = edgeTarget;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeNode.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeNode.java
new file mode 100644
index 00000000..326e6670
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlShapeNode.java
@@ -0,0 +1,183 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class mxGraphMlShapeNode
+{
+ private String dataHeight = "";
+
+ private String dataWidth = "";
+
+ private String dataX = "";
+
+ private String dataY = "";
+
+ private String dataLabel = "";
+
+ private String dataStyle = "";
+
+ /**
+ * Construct a shape Node with the given parameters
+ * @param dataHeight Node's Height
+ * @param dataWidth Node's Width
+ * @param dataX Node's X coordinate.
+ * @param dataY Node's Y coordinate.
+ * @param dataStyle Node's style.
+ */
+ public mxGraphMlShapeNode(String dataHeight, String dataWidth, String dataX,
+ String dataY, String dataStyle)
+ {
+ this.dataHeight = dataHeight;
+ this.dataWidth = dataWidth;
+ this.dataX = dataX;
+ this.dataY = dataY;
+ this.dataStyle = dataStyle;
+ }
+
+ /**
+ * Construct an empty shape Node
+ */
+ public mxGraphMlShapeNode()
+ {
+ }
+
+ /**
+ * Construct a Shape Node from a xml Shape Node Element.
+ * @param shapeNodeElement Xml Shape Node Element.
+ */
+ public mxGraphMlShapeNode(Element shapeNodeElement)
+ {
+ //Defines Geometry
+ Element geometryElement = mxGraphMlUtils.childsTag(shapeNodeElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.GEOMETRY);
+ this.dataHeight = geometryElement.getAttribute(mxGraphMlConstants.HEIGHT);
+ this.dataWidth = geometryElement.getAttribute(mxGraphMlConstants.WIDTH);
+ this.dataX = geometryElement.getAttribute(mxGraphMlConstants.X);
+ this.dataY = geometryElement.getAttribute(mxGraphMlConstants.Y);
+
+ Element styleElement = mxGraphMlUtils.childsTag(shapeNodeElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.STYLE);
+
+ if (styleElement != null)
+ {
+ this.dataStyle = styleElement
+ .getAttribute(mxGraphMlConstants.PROPERTIES);
+ }
+ //Defines Label
+ Element labelElement = mxGraphMlUtils.childsTag(shapeNodeElement,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.LABEL);
+
+ if (labelElement != null)
+ {
+ this.dataLabel = labelElement.getAttribute(mxGraphMlConstants.TEXT);
+ }
+ }
+
+ /**
+ * Generates a Shape Node Element from this class.
+ * @param document Document where the key Element will be inserted.
+ * @return Returns the generated Elements.
+ */
+ public Element generateElement(Document document)
+ {
+ Element dataShape = document.createElementNS(mxGraphMlConstants.JGRAPH_URL,
+ mxGraphMlConstants.JGRAPH + mxGraphMlConstants.SHAPENODE);
+
+ Element dataShapeGeometry = document.createElementNS(
+ mxGraphMlConstants.JGRAPH_URL, mxGraphMlConstants.JGRAPH
+ + mxGraphMlConstants.GEOMETRY);
+ dataShapeGeometry.setAttribute(mxGraphMlConstants.HEIGHT, dataHeight);
+ dataShapeGeometry.setAttribute(mxGraphMlConstants.WIDTH, dataWidth);
+ dataShapeGeometry.setAttribute(mxGraphMlConstants.X, dataX);
+ dataShapeGeometry.setAttribute(mxGraphMlConstants.Y, dataY);
+
+ dataShape.appendChild(dataShapeGeometry);
+
+ if (!this.dataStyle.equals(""))
+ {
+ Element dataShapeStyle = document.createElementNS(
+ mxGraphMlConstants.JGRAPH_URL, mxGraphMlConstants.JGRAPH
+ + mxGraphMlConstants.STYLE);
+ dataShapeStyle.setAttribute(mxGraphMlConstants.PROPERTIES, dataStyle);
+ dataShape.appendChild(dataShapeStyle);
+ }
+
+ //Sets Label
+ if (!this.dataLabel.equals(""))
+ {
+
+ Element dataShapeLabel = document.createElementNS(
+ mxGraphMlConstants.JGRAPH_URL, mxGraphMlConstants.JGRAPH
+ + mxGraphMlConstants.LABEL);
+ dataShapeLabel.setAttribute(mxGraphMlConstants.TEXT, dataLabel);
+
+ dataShape.appendChild(dataShapeLabel);
+ }
+
+ return dataShape;
+ }
+
+ public String getDataHeight()
+ {
+ return dataHeight;
+ }
+
+ public void setDataHeight(String dataHeight)
+ {
+ this.dataHeight = dataHeight;
+ }
+
+ public String getDataWidth()
+ {
+ return dataWidth;
+ }
+
+ public void setDataWidth(String dataWidth)
+ {
+ this.dataWidth = dataWidth;
+ }
+
+ public String getDataX()
+ {
+ return dataX;
+ }
+
+ public void setDataX(String dataX)
+ {
+ this.dataX = dataX;
+ }
+
+ public String getDataY()
+ {
+ return dataY;
+ }
+
+ public void setDataY(String dataY)
+ {
+ this.dataY = dataY;
+ }
+
+ public String getDataLabel()
+ {
+ return dataLabel;
+ }
+
+ public void setDataLabel(String dataLabel)
+ {
+ this.dataLabel = dataLabel;
+ }
+
+ public String getDataStyle()
+ {
+ return dataStyle;
+ }
+
+ public void setDataStyle(String dataStyle)
+ {
+ this.dataStyle = dataStyle;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/graphml/mxGraphMlUtils.java b/src/main/java/com/mxgraph/io/graphml/mxGraphMlUtils.java
new file mode 100644
index 00000000..f56e73c2
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/graphml/mxGraphMlUtils.java
@@ -0,0 +1,252 @@
+/**
+ * Copyright (c) 2010 David Benson, Gaudenz Alder
+ */
+package com.mxgraph.io.graphml;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This class implements several GML utility methods.
+ */
+public class mxGraphMlUtils
+{
+ /**
+ * Checks if the NodeList has a Node with name = tag.
+ * @param nl NodeList
+ * @param tag Name of the node.
+ * @return Returns <code>true</code> if the Node List has a Node with name = tag.
+ */
+ public static boolean nodeListHasTag(NodeList nl, String tag)
+ {
+ boolean has = false;
+
+ if (nl != null)
+ {
+ int length = nl.getLength();
+
+ for (int i = 0; (i < length) && !has; i++)
+ {
+ has = (nl.item(i)).getNodeName().equals(tag);
+ }
+ }
+
+ return has;
+ }
+
+ /**
+ * Returns the first Element that has name = tag in Node List.
+ * @param nl NodeList
+ * @param tag Name of the Element
+ * @return Element with name = 'tag'.
+ */
+ public static Element nodeListTag(NodeList nl, String tag)
+ {
+ if (nl != null)
+ {
+ int length = nl.getLength();
+ boolean has = false;
+
+ for (int i = 0; (i < length) && !has; i++)
+ {
+ has = (nl.item(i)).getNodeName().equals(tag);
+
+ if (has)
+ {
+ return (Element) nl.item(i);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns a list with the elements included in the Node List that have name = tag.
+ * @param nl NodeList
+ * @param tag name of the Element.
+ * @return List with the indicated elements.
+ */
+ public static List<Element> nodeListTags(NodeList nl, String tag)
+ {
+ ArrayList<Element> ret = new ArrayList<Element>();
+
+ if (nl != null)
+ {
+ int length = nl.getLength();
+
+ for (int i = 0; i < length; i++)
+ {
+ if (tag.equals((nl.item(i)).getNodeName()))
+ {
+ ret.add((Element) nl.item(i));
+ }
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * Checks if the childrens of element has a Node with name = tag.
+ * @param element Element
+ * @param tag Name of the node.
+ * @return Returns <code>true</code> if the childrens of element has a Node with name = tag.
+ */
+ public static boolean childsHasTag(Element element, String tag)
+ {
+ NodeList nl = element.getChildNodes();
+
+ boolean has = false;
+
+ if (nl != null)
+ {
+ int length = nl.getLength();
+
+ for (int i = 0; (i < length) && !has; i++)
+ {
+ has = (nl.item(i)).getNodeName().equals(tag);
+ }
+ }
+ return has;
+ }
+
+ /**
+ * Returns the first Element that has name = tag in the childrens of element.
+ * @param element Element
+ * @param tag Name of the Element
+ * @return Element with name = 'tag'.
+ */
+ public static Element childsTag(Element element, String tag)
+ {
+ NodeList nl = element.getChildNodes();
+
+ if (nl != null)
+ {
+ int length = nl.getLength();
+ boolean has = false;
+
+ for (int i = 0; (i < length) && !has; i++)
+ {
+ has = (nl.item(i)).getNodeName().equals(tag);
+
+ if (has)
+ {
+ return (Element) nl.item(i);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns a list with the elements included in the childrens of element
+ * that have name = tag.
+ * @param element Element
+ * @param tag name of the Element.
+ * @return List with the indicated elements.
+ */
+ public static List<Element> childsTags(Element element, String tag)
+ {
+ NodeList nl = element.getChildNodes();
+
+ ArrayList<Element> ret = new ArrayList<Element>();
+
+ if (nl != null)
+ {
+ int length = nl.getLength();
+
+ for (int i = 0; i < length; i++)
+ {
+ if (tag.equals((nl.item(i)).getNodeName()))
+ {
+ ret.add((Element) nl.item(i));
+ }
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * Copy a given NodeList into a List<Element>
+ * @param nodeList Node List.
+ * @return List with the elements of nodeList.
+ */
+ public static List<Node> copyNodeList(NodeList nodeList)
+ {
+ ArrayList<Node> copy = new ArrayList<Node>();
+ int length = nodeList.getLength();
+
+ for (int i = 0; i < length; i++)
+ {
+ copy.add((Node) nodeList.item(i));
+ }
+
+ return copy;
+ }
+
+ /**
+ * Create a style map from a String with style definitions.
+ * @param style Definition of the style.
+ * @param asig Asignation simbol used in 'style'.
+ * @return Map with the style properties.
+ */
+ public static HashMap<String, Object> getStyleMap(String style, String asig)
+ {
+ HashMap<String, Object> styleMap = new HashMap<String, Object>();
+ String key = "";
+ String value = "";
+ int index = 0;
+
+ if (!style.equals(""))
+ {
+ String[] entries = style.split(";");
+
+ for (String entry : entries)
+ {
+ index = entry.indexOf(asig);
+
+ if (index == -1)
+ {
+ key = "";
+ value = entry;
+ styleMap.put(key, value);
+ }
+ else
+ {
+ key = entry.substring(0, index);
+ value = entry.substring(index + 1);
+ styleMap.put(key, value);
+ }
+ }
+ }
+ return styleMap;
+ }
+
+ /**
+ * Returns the string that represents the content of a given style map.
+ * @param styleMap Map with the styles values
+ * @return string that represents the style.
+ */
+ public static String getStyleString(Map<String, Object> styleMap,
+ String asig)
+ {
+ String style = "";
+ Iterator<Object> it = styleMap.values().iterator();
+ Iterator<String> kit = styleMap.keySet().iterator();
+
+ while (kit.hasNext())
+ {
+ String key = kit.next();
+ Object value = it.next();
+ style = style + key + asig + value + ";";
+ }
+ return style;
+ }
+}
diff --git a/src/main/java/com/mxgraph/io/mxGraphMlCodec.java b/src/main/java/com/mxgraph/io/mxGraphMlCodec.java
new file mode 100644
index 00000000..a83d0730
--- /dev/null
+++ b/src/main/java/com/mxgraph/io/mxGraphMlCodec.java
@@ -0,0 +1,377 @@
+/**
+ * Copyright (c) 2010-2012, JGraph Ltd
+ */
+package com.mxgraph.io;
+
+import com.mxgraph.io.graphml.mxGraphMlConstants;
+import com.mxgraph.io.graphml.mxGraphMlData;
+import com.mxgraph.io.graphml.mxGraphMlEdge;
+import com.mxgraph.io.graphml.mxGraphMlGraph;
+import com.mxgraph.io.graphml.mxGraphMlKey;
+import com.mxgraph.io.graphml.mxGraphMlKeyManager;
+import com.mxgraph.io.graphml.mxGraphMlNode;
+import com.mxgraph.io.graphml.mxGraphMlShapeEdge;
+import com.mxgraph.io.graphml.mxGraphMlShapeNode;
+import com.mxgraph.io.graphml.mxGraphMlUtils;
+import com.mxgraph.model.mxCell;
+import com.mxgraph.util.mxConstants;
+import com.mxgraph.util.mxDomUtils;
+import com.mxgraph.util.mxPoint;
+import com.mxgraph.view.mxCellState;
+import com.mxgraph.view.mxConnectionConstraint;
+
+import com.mxgraph.view.mxGraph;
+import com.mxgraph.view.mxGraphView;
+import java.util.HashMap;
+import java.util.List;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Parses a GraphML .graphml file and imports it in the given graph.<br/>
+ *
+ * See wikipedia.org/wiki/GraphML for more on GraphML.
+ *
+ * This class depends from the classes contained in
+ * com.mxgraph.io.gmlImplements.
+ */
+public class mxGraphMlCodec
+{
+ /**
+ * Receives a GraphMl document and parses it generating a new graph that is inserted in graph.
+ * @param document XML to be parsed
+ * @param graph Graph where the parsed graph is included.
+ */
+ public static void decode(Document document, mxGraph graph)
+ {
+ Object parent = graph.getDefaultParent();
+
+ graph.getModel().beginUpdate();
+
+ // Initialise the key properties.
+ mxGraphMlKeyManager.getInstance().initialise(document);
+
+ NodeList graphs = document.getElementsByTagName(mxGraphMlConstants.GRAPH);
+ if (graphs.getLength() > 0)
+ {
+
+ Element graphElement = (Element) graphs.item(0);
+
+ //Create the graph model.
+ mxGraphMlGraph gmlGraph = new mxGraphMlGraph(graphElement);
+
+ gmlGraph.addGraph(graph, parent);
+ }
+
+ graph.getModel().endUpdate();
+ cleanMaps();
+ }
+
+ /**
+ * Remove all the elements in the Defined Maps.
+ */
+ private static void cleanMaps()
+ {
+ mxGraphMlKeyManager.getInstance().getKeyMap().clear();
+ }
+
+ /**
+ * Generates a Xml document with the gmlGraph.
+ * @param gmlGraph Graph model.
+ * @return The Xml document generated.
+ */
+ public static Document encodeXML(mxGraphMlGraph gmlGraph)
+ {
+ Document doc = mxDomUtils.createDocument();
+
+ Element graphml = doc.createElement(mxGraphMlConstants.GRAPHML);
+
+ graphml.setAttribute("xmlns", "http://graphml.graphdrawing.org/xmlns");
+ graphml.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xsi",
+ "http://www.w3.org/2001/XMLSchema-instance");
+ graphml.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:jGraph",
+ mxGraphMlConstants.JGRAPH_URL);
+ graphml.setAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance",
+ "xsi:schemaLocation",
+ "http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd");
+
+ HashMap<String, mxGraphMlKey> keyMap = mxGraphMlKeyManager.getInstance()
+ .getKeyMap();
+
+ for (mxGraphMlKey key : keyMap.values())
+ {
+ Element keyElement = key.generateElement(doc);
+ graphml.appendChild(keyElement);
+ }
+
+ Element graphE = gmlGraph.generateElement(doc);
+ graphml.appendChild(graphE);
+
+ doc.appendChild(graphml);
+ cleanMaps();
+ return doc;
+
+ }
+
+ /**
+ * Generates a Xml document with the cells in the graph.
+ * @param graph Graph with the cells.
+ * @return The Xml document generated.
+ */
+ public static Document encode(mxGraph graph)
+ {
+ mxGraphMlGraph gmlGraph = new mxGraphMlGraph();
+ Object parent = graph.getDefaultParent();
+
+ createKeyElements();
+
+ gmlGraph = decodeGraph(graph, parent, gmlGraph);
+ gmlGraph.setEdgedefault(mxGraphMlConstants.EDGE_DIRECTED);
+
+ Document document = encodeXML(gmlGraph);
+
+ return document;
+ }
+
+ /**
+ * Creates the key elements for the encode.
+ */
+ private static void createKeyElements()
+ {
+ HashMap<String, mxGraphMlKey> keyMap = mxGraphMlKeyManager.getInstance()
+ .getKeyMap();
+ mxGraphMlKey keyNode = new mxGraphMlKey(mxGraphMlConstants.KEY_NODE_ID,
+ mxGraphMlKey.keyForValues.NODE, mxGraphMlConstants.KEY_NODE_NAME,
+ mxGraphMlKey.keyTypeValues.STRING);
+ keyMap.put(mxGraphMlConstants.KEY_NODE_ID, keyNode);
+ mxGraphMlKey keyEdge = new mxGraphMlKey(mxGraphMlConstants.KEY_EDGE_ID,
+ mxGraphMlKey.keyForValues.EDGE, mxGraphMlConstants.KEY_EDGE_NAME,
+ mxGraphMlKey.keyTypeValues.STRING);
+ keyMap.put(mxGraphMlConstants.KEY_EDGE_ID, keyEdge);
+ mxGraphMlKeyManager.getInstance().setKeyMap(keyMap);
+ }
+
+ /**
+ * Returns a Gml graph with the data of the vertexes and edges in the graph.
+ * @param gmlGraph Gml document where the elements are put.
+ * @param parent Parent cell of the vertexes and edges to be added.
+ * @param graph Graph that contains the vertexes and edges.
+ * @return Returns the document with the elements added.
+ */
+ public static mxGraphMlGraph decodeGraph(mxGraph graph, Object parent,
+ mxGraphMlGraph gmlGraph)
+ {
+ Object[] vertexes = graph.getChildVertices(parent);
+ List<mxGraphMlEdge> gmlEdges = gmlGraph.getEdges();
+ gmlEdges = encodeEdges(gmlEdges, parent, graph);
+ gmlGraph.setEdges(gmlEdges);
+
+ for (Object vertex : vertexes)
+ {
+ List<mxGraphMlNode> Gmlnodes = gmlGraph.getNodes();
+
+ mxCell v = (mxCell) vertex;
+ String id = v.getId();
+
+ mxGraphMlNode gmlNode = new mxGraphMlNode(id, null);
+ addNodeData(gmlNode, v);
+ Gmlnodes.add(gmlNode);
+ gmlGraph.setNodes(Gmlnodes);
+ mxGraphMlGraph gmlGraphx = new mxGraphMlGraph();
+
+ gmlGraphx = decodeGraph(graph, vertex, gmlGraphx);
+
+ if (!gmlGraphx.isEmpty())
+ {
+ List<mxGraphMlGraph> nodeGraphs = gmlNode.getNodeGraph();
+ nodeGraphs.add(gmlGraphx);
+ gmlNode.setNodeGraph(nodeGraphs);
+ }
+ }
+
+ return gmlGraph;
+ }
+
+ /**
+ * Add the node data in the gmlNode.
+ * @param gmlNode Gml node where the data add.
+ * @param v mxCell where data are obtained.
+ */
+ public static void addNodeData(mxGraphMlNode gmlNode, mxCell v)
+ {
+ mxGraphMlData data = new mxGraphMlData();
+ mxGraphMlShapeNode dataShapeNode = new mxGraphMlShapeNode();
+
+ data.setDataKey(mxGraphMlConstants.KEY_NODE_ID);
+ dataShapeNode
+ .setDataHeight(String.valueOf(v.getGeometry().getHeight()));
+ dataShapeNode.setDataWidth(String.valueOf(v.getGeometry().getWidth()));
+ dataShapeNode.setDataX(String.valueOf(v.getGeometry().getX()));
+ dataShapeNode.setDataY(String.valueOf(v.getGeometry().getY()));
+ dataShapeNode.setDataLabel(v.getValue() != null ? v.getValue()
+ .toString() : "");
+ dataShapeNode.setDataStyle(v.getStyle() != null ? v.getStyle() : "");
+
+ data.setDataShapeNode(dataShapeNode);
+ gmlNode.setNodeData(data);
+ }
+
+ /**
+ * Add the edge data in the gmlEdge.
+ * @param gmlEdge Gml edge where the data add.
+ * @param v mxCell where data are obtained.
+ */
+ public static void addEdgeData(mxGraphMlEdge gmlEdge, mxCell v)
+ {
+ mxGraphMlData data = new mxGraphMlData();
+ mxGraphMlShapeEdge dataShapeEdge = new mxGraphMlShapeEdge();
+
+ data.setDataKey(mxGraphMlConstants.KEY_EDGE_ID);
+ dataShapeEdge.setText(v.getValue() != null ? v.getValue().toString()
+ : "");
+ dataShapeEdge.setStyle(v.getStyle() != null ? v.getStyle() : "");
+
+ data.setDataShapeEdge(dataShapeEdge);
+ gmlEdge.setEdgeData(data);
+ }
+
+ /**
+ * Converts a connection point in the string representation of a port.
+ * The specials names North, NorthWest, NorthEast, East, West, South, SouthEast and SouthWest
+ * may be returned. Else, the values returned follows the pattern "double,double"
+ * where double must be in the range 0..1
+ * @param point mxPoint
+ * @return Name of the port
+ */
+ private static String pointToPortString(mxPoint point)
+ {
+ String port = "";
+ if (point != null)
+ {
+ double x = point.getX();
+ double y = point.getY();
+
+ if (x == 0 && y == 0)
+ {
+ port = "NorthWest";
+ }
+ else if (x == 0.5 && y == 0)
+ {
+ port = "North";
+ }
+ else if (x == 1 && y == 0)
+ {
+ port = "NorthEast";
+ }
+ else if (x == 1 && y == 0.5)
+ {
+ port = "East";
+ }
+ else if (x == 1 && y == 1)
+ {
+ port = "SouthEast";
+ }
+ else if (x == 0.5 && y == 1)
+ {
+ port = "South";
+ }
+ else if (x == 0 && y == 1)
+ {
+ port = "SouthWest";
+ }
+ else if (x == 0 && y == 0.5)
+ {
+ port = "West";
+ }
+ else
+ {
+ port = "" + x + "," + y;
+ }
+ }
+ return port;
+ }
+
+ /**
+ * Returns a list of mxGmlEdge with the data of the edges in the graph.
+ * @param Gmledges List where the elements are put.
+ * @param parent Parent cell of the edges to be added.
+ * @param graph Graph that contains the edges.
+ * @return Returns the list Gmledges with the elements added.
+ */
+ private static List<mxGraphMlEdge> encodeEdges(List<mxGraphMlEdge> Gmledges,
+ Object parent, mxGraph graph)
+ {
+ Object[] edges = graph.getChildEdges(parent);
+ for (Object edge : edges)
+ {
+ mxCell e = (mxCell) edge;
+ mxCell source = (mxCell) e.getSource();
+ mxCell target = (mxCell) e.getTarget();
+
+ String sourceName = "";
+ String targetName = "";
+ String sourcePort = "";
+ String targetPort = "";
+ sourceName = source != null ? source.getId() : "";
+ targetName = target != null ? target.getId() : "";
+
+ //Get the graph view that contains the states
+ mxGraphView view = graph.getView();
+ mxPoint sourceConstraint = null;
+ mxPoint targetConstraint = null;
+ if (view != null)
+ {
+ mxCellState edgeState = view.getState(edge);
+ mxCellState sourceState = view.getState(source);
+ mxConnectionConstraint scc = graph.getConnectionConstraint(
+ edgeState, sourceState, true);
+ if (scc != null)
+ {
+ sourceConstraint = scc.getPoint();
+ }
+
+ mxCellState targetState = view.getState(target);
+ mxConnectionConstraint tcc = graph.getConnectionConstraint(
+ edgeState, targetState, false);
+ if (tcc != null)
+ {
+ targetConstraint = tcc.getPoint();
+ }
+ }
+
+ //gets the port names
+ targetPort = pointToPortString(targetConstraint);
+ sourcePort = pointToPortString(sourceConstraint);
+
+ mxGraphMlEdge Gmledge = new mxGraphMlEdge(sourceName, targetName,
+ sourcePort, targetPort);
+
+ String style = e.getStyle();
+
+ if (style == null)
+ {
+ style = "horizontal";
+
+ }
+
+ HashMap<String, Object> styleMap = mxGraphMlUtils.getStyleMap(style,
+ "=");
+ String endArrow = (String) styleMap.get(mxConstants.STYLE_ENDARROW);
+ if ((endArrow != null && !endArrow.equals(mxConstants.NONE))
+ || endArrow == null)
+ {
+ Gmledge.setEdgeDirected("true");
+ }
+ else
+ {
+ Gmledge.setEdgeDirected("false");
+ }
+ addEdgeData(Gmledge, e);
+ Gmledges.add(Gmledge);
+ }
+
+ return Gmledges;
+ }
+}
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index 0cd0af85..46f64fc1 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -317,7 +317,6 @@
<link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000">
<link rel="stylesheet" type="text/css" href="js/croppie/croppie.min.css">
<link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
- <link rel="stylesheet" type="text/css" href="mxgraph/css/common.css">
<link rel="canonical" href="https://app.diagrams.net">
<link rel="manifest" href="images/manifest.json">
<link rel="shortcut icon" href="favicon.ico">
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index fa19fd6d..57fdd9da 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -222,12 +222,11 @@ value:function(a,b,d,f,g,h){var c=this.gen.arc(a,b,d,f,g,h,6<arguments.length&&v
newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
-String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;mxLoadStylesheets="MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase();window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;
-window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";
-window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";
-window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
-window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
-window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
@@ -1524,8 +1523,8 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=0!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f,g){f=null!=f?f:[];if(0<c||0<d||null!=g){var k=this.getModel(),l=a+c,m=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var n=k.getChildCount(e),p=0;p<n;p++){var q=k.getChildAt(e,p),r=this.view.getState(q);if(null!=r&&this.isCellVisible(q)){var t=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(r=mxUtils.getBoundingBox(r,t));null!=g&&k.isVertex(q)&&mxUtils.intersects(g,r)||null==g&&(k.isEdge(q)||k.isVertex(q))&&
-r.x>=a&&r.y+r.height<=m&&r.y>=b&&r.x+r.width<=l?f.push(q):this.getCells(a,b,c,d,q,f,g)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k){f=null!=f?f:[];if(0<c||0<d||null!=g){var l=this.getModel(),m=a+c,n=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=l.getRoot()));if(null!=e)for(var p=l.getChildCount(e),q=0;q<p;q++){var r=l.getChildAt(e,q),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&(null==k||!k(t))){var u=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(t=mxUtils.getBoundingBox(t,u));null!=g&&l.isVertex(r)&&mxUtils.intersects(g,t)||null==g&&(l.isEdge(r)||
+l.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=b&&t.x+t.width<=m?f.push(r):this.getCells(a,b,c,d,r,f,g,k)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
@@ -1622,7 +1621,7 @@ mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0
mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;
mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};
mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
-mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
+mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a);)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));return null!=b?b.cell:null};
mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())&&!mxEvent.isAltDown(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};
@@ -2254,7 +2253,7 @@ var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.protot
a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,e=this.graph.pageScale,
f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+p*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-p)*d)};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){b.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var f=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,e,m){var g=f.apply(this,arguments);null==m||m||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d,f=this.graph.model.getParent(a);
-if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(f)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(f)||this.graph.isPart(a));d=e.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=f,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(c.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||
+if(b)d=this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(f)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(f)||this.graph.isPart(a));else if(d=e.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=f,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(c.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||
this.graph.isTableCell(a)&&this.graph.isCellSelected(f);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a),d=this.graph.view.getState(c),e=this.graph.isCellSelected(a);null!=d&&(b.isVertex(c)||b.isEdge(c));){var f=this.graph.isCellSelected(c),e=e||f;if(f||!e&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=b.getParent(c)}return a}})();EditorUi=function(a,c,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var b=this.editor.graph;b.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,b.isEnabled=function(){return!1},b.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!b.standalone){this.createDivs();this.createUi();this.refresh();var f=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return b.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=f,this.menubarContainer.onmousedown=f,this.toolbarContainer.onselectstart=f,this.toolbarContainer.onmousedown=f,this.diagramContainer.onselectstart=f,this.diagramContainer.onmousedown=f,this.sidebarContainer.onselectstart=f,this.sidebarContainer.onmousedown=f,this.formatContainer.onselectstart=f,this.formatContainer.onmousedown=f,this.footerContainer.onselectstart=
@@ -2265,13 +2264,13 @@ b.container.style.cursor="move",b.isEditing()||mxEvent.getSource(a)!=b.container
(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var l=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return l.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var n=b.isZoomWheelEvent;b.isZoomWheelEvent=function(){return h||n.apply(this,arguments)};var m=!1,p=null,u=null,t=null,v=
mxUtils.bind(this,function(){if(null!=this.toolbar&&m!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var e=0;e<t.length;e++)this.toolbar.container.appendChild(t[e]);this.toolbar.fontMenu=p;this.toolbar.sizeMenu=u}m=b.cellEditor.isContentEditing();
p=a;u=d;t=c}}),q=this,w=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){w.apply(this,arguments);v();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));q.toolbar.setFontName(d);
-q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var r=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{r.apply(this,arguments),v()}catch(N){q.handleError(N)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===
-window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(J){}var y=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
+q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var r=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{r.apply(this,arguments),v()}catch(M){q.handleError(M)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===
+window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(I){}var y=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
function(){return keyHandler};var x="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),B="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var c=
b.view.getState(a);if(null!=c){var d=a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var n=k.substring(l+1);null!=e[f]&&"none"==n&&(a.push(n),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
d,"values",a,"cells",[c.cell]))}}catch(Q){this.handleError(Q)}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),A=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["opacity"],["align"],["html"]];for(a=0;a<A.length;a++)for(c=0;c<A[a].length;c++)x.push(A[a][c]);for(a=0;a<B.length;a++)0>mxUtils.indexOf(x,B[a])&&x.push(B[a]);var E=function(a,c,d){d=null!=d?d:b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=x.slice();for(var l=0;l<k.length;l++){var n=k[l],p=n.indexOf("=");if(0<=p){var m=
-n.substring(0,p),t=mxUtils.indexOf(g,m);0<=t&&g.splice(t,1);for(var q=0;q<A.length;q++){var u=A[q];if(0<=mxUtils.indexOf(u,m))for(var r=0;r<u.length;r++){var v=mxUtils.indexOf(g,u[r]);0<=v&&g.splice(v,1)}}}}}for(var w=d.isEdge(f),H=w?b.currentEdgeStyle:b.currentVertexStyle,z=d.getStyle(f),l=0;l<g.length;l++){var m=g[l],N=H[m];null==N||"shape"==m&&!w||w&&!(0>mxUtils.indexOf(B,m))||(z=mxUtils.setStyle(z,m,N))}d.setStyle(f,z)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});
+n.substring(0,p),t=mxUtils.indexOf(g,m);0<=t&&g.splice(t,1);for(var q=0;q<A.length;q++){var u=A[q];if(0<=mxUtils.indexOf(u,m))for(var r=0;r<u.length;r++){var v=mxUtils.indexOf(g,u[r]);0<=v&&g.splice(v,1)}}}}}for(var w=d.isEdge(f),H=w?b.currentEdgeStyle:b.currentVertexStyle,z=d.getStyle(f),l=0;l<g.length;l++){var m=g[l],M=H[m];null==M||"shape"==m&&!w||w&&!(0>mxUtils.indexOf(B,m))||(z=mxUtils.setStyle(z,m,M))}d.setStyle(f,z)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});
b.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});this.insertHandler=E;b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=
c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(z,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(B,d[g]))f||0<=mxUtils.indexOf(C,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(x,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(x,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=
h[g];if(f||k||0<=mxUtils.indexOf(C,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":
@@ -2292,7 +2291,7 @@ f.apply(this,arguments)};var e=this.hoverIcons.execute;this.hoverIcons.execute=f
f.getGraphY(),d,mxUtils.bind(this,function(a){g(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,d,b){var f=this.getCellsForShapePicker(d);if(null!=f&&0<f.length){var e=this,h=this.editor.graph,g=document.createElement("div"),k=null!=d?h.copyStyle(d):null;g.className="geToolbarContainer geSidebarContainer geSidebar";g.style.cssText="position:absolute;left:"+(a- -4)+"px;top:"+(c- -4)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=h.background&&h.background!=mxConstants.NONE&&
(g.style.backgroundColor=h.background);h.container.appendChild(g);d=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(f);null!=k?this.sidebar.graph.pasteStyle(k,[d]):e.insertHandler([d],""!=d.value,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);
-mxEvent.addListener(f,"click",function(){if(null!=b)b(d);else{d.geometry.x=h.snap(Math.round(a/h.view.scale)-h.view.translate.x-d.geometry.width/2);d.geometry.y=h.snap(Math.round(c/h.view.scale)-h.view.translate.y-d.geometry.height/2);h.model.beginUpdate();try{h.addCell(d)}finally{h.model.endUpdate()}h.setSelectionCell(d);h.scrollCellToVisible(h.getSelectionCell());h.startEditingAtCell(d);null!=e.hoverIcons&&e.hoverIcons.update(h.view.getState(d))}e.hideShapePicker()})});for(var l=0;l<f.length;l++)d(f[l]);
+mxEvent.addListener(f,"click",function(){var f=h.cloneCell(d);if(null!=b)b(f);else{f.geometry.x=h.snap(Math.round(a/h.view.scale)-h.view.translate.x-d.geometry.width/2);f.geometry.y=h.snap(Math.round(c/h.view.scale)-h.view.translate.y-d.geometry.height/2);h.model.beginUpdate();try{h.addCell(f)}finally{h.model.endUpdate()}h.setSelectionCell(f);h.scrollCellToVisible(f);h.startEditingAtCell(f);null!=e.hoverIcons&&e.hoverIcons.update(h.view.getState(f))}e.hideShapePicker()})});for(var l=0;l<f.length;l++)d(f[l]);
null!=e.hoverIcons&&e.hoverIcons.reset();h.popupMenuHandler.hideMenu();h.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=b;this.shapePicker=g}};
EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,b,c,e){return this.editor.graph.createVertex(null,null,e||"",0,0,b||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
@@ -2331,15 +2330,15 @@ v(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"po
v(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())<
y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?t():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var B=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?B.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=
-b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var z=a.view.getBackgroundPane(),C=a.view.getDrawPane();a.cumulativeZoomFactor=1;var A=null,E=null,J=null,H=null,N=function(b){null!=A&&window.clearTimeout(A);window.setTimeout(function(){a.isMouseDown||(A=window.setTimeout(mxUtils.bind(this,
+b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var z=a.view.getBackgroundPane(),C=a.view.getDrawPane();a.cumulativeZoomFactor=1;var A=null,E=null,I=null,H=null,M=function(b){null!=A&&window.clearTimeout(A);window.setTimeout(function(){a.isMouseDown||(A=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),C.style.transformOrigin="",z.style.transformOrigin="",mxClient.IS_SF?(C.style.transform="scale(1)",z.style.transform="scale(1)",window.setTimeout(function(){C.style.transform="";z.style.transform=""},0)):(C.style.transform=
-"",z.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var b=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,h=0;null!=E&&(g=a.container.offsetWidth/2-E.x+e.x,h=a.container.offsetHeight/2-E.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=J&&(g+=b.x-J.x,h+=b.y-J.y),null!=c&&d.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=H&&C.setAttribute("filter",H);a.cumulativeZoomFactor=1;H=E=J=A=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(E=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"",z.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var b=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,h=0;null!=E&&(g=a.container.offsetWidth/2-E.x+e.x,h=a.container.offsetHeight/2-E.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=I&&(g+=b.x-I.x,h+=b.y-I.y),null!=c&&d.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=H&&C.setAttribute("filter",H);a.cumulativeZoomFactor=1;H=E=I=A=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(E=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==H&&""!=C.getAttribute("filter")&&(H=C.getAttribute("filter"),C.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:E.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:E.y+a.container.scrollTop-a.container.offsetTop;C.style.transformOrigin=b+"px "+f+"px";C.style.transform="scale("+
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==H&&""!=C.getAttribute("filter")&&(H=C.getAttribute("filter"),C.removeAttribute("filter"));I=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:E.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:E.y+a.container.scrollTop-a.container.offsetTop;C.style.transformOrigin=b+"px "+f+"px";C.style.transform="scale("+
this.cumulativeZoomFactor+")";z.style.transformOrigin=b+"px "+f+"px";z.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(b=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(b.style,"transform-origin",(c?a.container.clientWidth/2+a.container.scrollLeft-b.offsetLeft+"px":E.x+a.container.scrollLeft-b.offsetLeft-a.container.offsetLeft+"px")+" "+(c?a.container.clientHeight/2+a.container.scrollTop-b.offsetTop+"px":E.y+
-a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}N(e)};mxEvent.addGestureListeners(a.container,function(a){null!=A&&window.clearTimeout(A)},null,function(b){1!=a.cumulativeZoomFactor&&N(0)});mxEvent.addListener(a.container,"scroll",function(){A&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
-N(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(b)){d=a.view.getTranslate();var e=40/a.view.scale;mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e))}else if(d||a.isZoomWheelEvent(b))for(d=mxEvent.getSource(b);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),E=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),
+a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}M(e)};mxEvent.addGestureListeners(a.container,function(a){null!=A&&window.clearTimeout(A)},null,function(b){1!=a.cumulativeZoomFactor&&M(0)});mxEvent.addListener(a.container,"scroll",function(){A&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
+M(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(b)){d=a.view.getTranslate();var e=40/a.view.scale;mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e))}else if(d||a.isZoomWheelEvent(b))for(d=mxEvent.getSource(b);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),E=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c),
mxEvent.consume(b),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
@@ -2595,25 +2594,25 @@ Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwiml
Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,n=null,m=this,p=0;p<b.length&&(null==n&&this.editorUi.editor.graph.model.isVertex(b[p])?
n=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==n||null==l);p++);var u=this.isDropStyleEnabled(b,n),t=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=r&&F==A){var h=a.isCellSelected(r.cell)?a.getSelectionCells():[r.cell],h=this.updateShapes(a.model.isEdge(r.cell)?b[0]:b[n],h);a.setSelectionCells(h)}else null!=
-b&&null!=F&&null!=q&&F!=A?(h=a.model.isEdge(q.cell)||null==l?n:l,a.setSelectionCells(this.dropAndConnect(q.cell,b,N,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var v=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var q=null,w=
-null,r=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),B=e(this.triangleRight,mxResources.get("connect")),z=e(this.triangleDown,mxResources.get("connect")),C=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),E=null,J=e(this.roundDrop),H=e(this.roundDrop),N=mxConstants.DIRECTION_NORTH,F=null,K=t.createPreviewElement;t.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=
+b&&null!=F&&null!=q&&F!=A?(h=a.model.isEdge(q.cell)||null==l?n:l,a.setSelectionCells(this.dropAndConnect(q.cell,b,M,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var v=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var q=null,w=
+null,r=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),B=e(this.triangleRight,mxResources.get("connect")),z=e(this.triangleDown,mxResources.get("connect")),C=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),E=null,I=e(this.roundDrop),H=e(this.roundDrop),M=mxConstants.DIRECTION_NORTH,F=null,J=t.createPreviewElement;t.createPreviewElement=function(a){var b=J.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=
b.style.width;this.previewElementHeight=b.style.height;return b};var U=t.dragEnter;t.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");U.apply(this,arguments)};var T=t.dragExit;t.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");T.apply(this,arguments)};t.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=r&&F==A)this.previewElement.style.display=
-a.model.isEdge(r.cell)?"none":"",this.previewElement.style.left=r.x+"px",this.previewElement.style.top=r.y+"px",this.previewElement.style.width=r.width+"px",this.previewElement.style.height=r.height+"px";else if(null!=q&&null!=F){var e=a.model.isEdge(q.cell)||null==l?n:l,g=m.getDropAndConnectGeometry(q.cell,b[e],N,b),h=a.model.isEdge(q.cell)?null:a.getCellGeometry(q.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(q.cell),u=d.translate.x*d.scale,v=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
+a.model.isEdge(r.cell)?"none":"",this.previewElement.style.left=r.x+"px",this.previewElement.style.top=r.y+"px",this.previewElement.style.width=r.width+"px",this.previewElement.style.height=r.height+"px";else if(null!=q&&null!=F){var e=a.model.isEdge(q.cell)||null==l?n:l,g=m.getDropAndConnectGeometry(q.cell,b[e],M,b),h=a.model.isEdge(q.cell)?null:a.getCellGeometry(q.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(q.cell),u=d.translate.x*d.scale,v=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
p!=d.currentRoot&&(v=d.getState(p),u=v.x,v=v.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+u+"px";this.previewElement.style.top=(g.y-k)*d.scale+v+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),M=0,L=null,Q=this.editorUi.editor.graph.getCellStyle(b[0]);t.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g=
-this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=F=null;L!=k?(L=k,O=(new Date).getTime(),M=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(L=k,t.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):M=(new Date).getTime()-O;if(u&&2500>M&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(Q,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Q,mxConstants.STYLE_SHAPE)||1500<M||a.model.isEdge(k.cell))&&M>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!=
-n||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){r=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(A),E=A.parentNode);h(c,d,l,A)}else null==r||!mxUtils.contains(r,c,d)||1500<M&&!mxEvent.isShiftDown(e)?(r=null,null!=E&&(A.parentNode.removeChild(A),
-E=null)):null!=r&&null!=E&&(l=a.model.isEdge(r.cell)?a.view.getPoint(r):new mxPoint(r.getCenterX(),r.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=q&&!mxEvent.isAltDown(e)&&null==F){g=mxRectangle.fromRectangle(q);if(a.model.isEdge(q.cell)){var m=q.absolutePoints;null!=J.parentNode&&(l=m[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),J)));null!=H.parentNode&&(m=m[m.length-1],g.add(h(c,d,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else l=mxRectangle.fromRectangle(q),null!=q.shape&&null!=q.shape.boundingBox&&(l=mxRectangle.fromRectangle(q.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),m=this.graph.selectionCellsHandler.getHandler(q.cell),null!=m&&(l.x-=m.horizontalOffset/2,l.y-=m.verticalOffset/
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var N=(new Date).getTime(),L=0,K=null,Q=this.editorUi.editor.graph.getCellStyle(b[0]);t.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g=
+this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=F=null;K!=k?(K=k,N=(new Date).getTime(),L=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(K=k,t.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):L=(new Date).getTime()-N;if(u&&2500>L&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(Q,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Q,mxConstants.STYLE_SHAPE)||1500<L||a.model.isEdge(k.cell))&&L>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!=
+n||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){r=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==E&&(a.container.appendChild(A),E=A.parentNode);h(c,d,l,A)}else null==r||!mxUtils.contains(r,c,d)||1500<L&&!mxEvent.isShiftDown(e)?(r=null,null!=E&&(A.parentNode.removeChild(A),
+E=null)):null!=r&&null!=E&&(l=a.model.isEdge(r.cell)?a.view.getPoint(r):new mxPoint(r.getCenterX(),r.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=q&&!mxEvent.isAltDown(e)&&null==F){g=mxRectangle.fromRectangle(q);if(a.model.isEdge(q.cell)){var m=q.absolutePoints;null!=I.parentNode&&(l=m[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),I)));null!=H.parentNode&&(m=m[m.length-1],g.add(h(c,d,new mxRectangle(m.x-this.roundDrop.width/2,m.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else l=mxRectangle.fromRectangle(q),null!=q.shape&&null!=q.shape.boundingBox&&(l=mxRectangle.fromRectangle(q.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),m=this.graph.selectionCellsHandler.getHandler(q.cell),null!=m&&(l.x-=m.horizontalOffset/2,l.y-=m.verticalOffset/
2,l.width+=m.horizontalOffset,l.height+=m.verticalOffset,null!=m.rotationShape&&null!=m.rotationShape.node&&"hidden"!=m.rotationShape.node.style.visibility&&"none"!=m.rotationShape.node.style.display&&null!=m.rotationShape.boundingBox&&l.add(m.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),g.add(h(c,d,new mxRectangle(l.x+l.width,q.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,
-this.triangleRight.height),B)),g.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),z)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,q.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=g&&g.grow(10)}N=mxConstants.DIRECTION_NORTH;F==B?N=mxConstants.DIRECTION_EAST:F==z||F==H?N=mxConstants.DIRECTION_SOUTH:F==C&&(N=mxConstants.DIRECTION_WEST);null!=r&&F==A&&(k=r);
-l=(null==n||a.isCellConnectable(b[n]))&&(a.model.isEdge(f)&&null!=n||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=q&&5E3<=M||q!=k&&(null==g||!mxUtils.contains(g,c,d)||500<M&&null==F&&l))if(y=!1,q=5E3>M&&M>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=q&&l){g=[J,H,x,B,z,C];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(m=k.absolutePoints,null!=m&&(l=m[0],m=m[m.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),J.style.left=Math.floor(l.x-
-this.roundDrop.width/2)+"px",J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",H.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(J),null==a.model.getTerminal(f,!1)&&a.container.appendChild(H))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
+this.triangleRight.height),B)),g.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),z)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,q.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=g&&g.grow(10)}M=mxConstants.DIRECTION_NORTH;F==B?M=mxConstants.DIRECTION_EAST:F==z||F==H?M=mxConstants.DIRECTION_SOUTH:F==C&&(M=mxConstants.DIRECTION_WEST);null!=r&&F==A&&(k=r);
+l=(null==n||a.isCellConnectable(b[n]))&&(a.model.isEdge(f)&&null!=n||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=q&&5E3<=L||q!=k&&(null==g||!mxUtils.contains(g,c,d)||500<L&&null==F&&l))if(y=!1,q=5E3>L&&L>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=q&&l){g=[I,H,x,B,z,C];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(m=k.absolutePoints,null!=m&&(l=m[0],m=m[m.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),I.style.left=Math.floor(l.x-
+this.roundDrop.width/2)+"px",I.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(m.x-this.roundDrop.width/2)+"px",H.style.top=Math.floor(m.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(I),null==a.model.getTerminal(f,!1)&&a.container.appendChild(H))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),
m=this.graph.selectionCellsHandler.getHandler(k.cell),null!=m&&(l.x-=m.horizontalOffset/2,l.y-=m.verticalOffset/2,l.width+=m.horizontalOffset,l.height+=m.verticalOffset,null!=m.rotationShape&&null!=m.rotationShape.node&&"hidden"!=m.rotationShape.node.style.visibility&&"none"!=m.rotationShape.node.style.display&&null!=m.rotationShape.boundingBox&&l.add(m.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+
"px",B.style.left=Math.floor(l.x+l.width)+"px",B.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",z.style.left=x.style.left,z.style.top=Math.floor(l.y+l.height)+"px",C.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",C.style.top=B.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(z)),a.container.appendChild(B),a.container.appendChild(C));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&
-w.setHandlesVisible(!1));y=!0}else for(g=[J,H,x,B,z,C],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);y||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=r&&F==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=F||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||
-a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,b,e))&&(f=null)}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,H,A,x,B,z,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=q&&null!=w&&w.reset();F=E=r=q=w=null};return t};
+w.setHandlesVisible(!1));y=!0}else for(g=[I,H,x,B,z,C],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);y||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=r&&F==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=F||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||
+a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,b,e))&&(f=null)}return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[I,H,A,x,B,z,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=q&&null!=w&&w.reset();F=E=r=q=w=null};return t};
Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=mxEvent.isAltDown(d)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry(a,!0)),c.drop(b,d,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))>
@@ -2643,29 +2642,29 @@ mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY()))l=mxEvent.LABEL
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(d.cell)&&!this.isCellSelected(d.cell)){var m=this.model.getParent(d.cell),e=this.model.getParent(m);if(!this.isCellSelected(e)&&(mxUtils.intersects(f,new mxRectangle(d.x,d.y-2,d.width,3))&&this.model.getChildAt(e,0)!=m||mxUtils.intersects(f,new mxRectangle(d.x,d.y+d.height-2,d.width,3))||mxUtils.intersects(f,new mxRectangle(d.x-2,d.y,2,d.height))&&this.model.getChildAt(m,0)!=d.cell||mxUtils.intersects(f,new mxRectangle(d.x+d.width-
2,d.y,2,d.height)))&&(m=this.selectionCellsHandler.isHandled(e),this.selectCellForEvent(e,c.getEvent()),e=this.selectionCellsHandler.getHandler(e),null!=e)){var p=e.getHandleForEvent(c);null!=p&&(e.start(c.getGraphX(),c.getGraphY(),p),e.blockDelayedSelection=!m,c.consume())}}for(;!c.isConsumed()&&null!=d&&(this.isTableCell(d.cell)||this.isTableRow(d.cell)||this.isTable(d.cell));)this.isSwimlane(d.cell)&&(e=this.getActualStartSize(d.cell),m=this.view.scale,(0<e.x||0<e.width)&&mxUtils.intersects(f,
new mxRectangle(d.x+(e.x-e.width-1)*m+(0==e.x?d.width:0),d.y,1,d.height))||(0<e.y||0<e.height)&&mxUtils.intersects(f,new mxRectangle(d.x,d.y+(e.y-e.height-1)*m+(0==e.y?d.height:0),d.width,1)))&&(this.selectCellForEvent(d.cell,c.getEvent()),e=this.selectionCellsHandler.getHandler(d.cell),null!=e&&(p=mxEvent.CUSTOM_HANDLE-e.customHandles.length+1,e.start(c.getGraphX(),c.getGraphY(),p),c.consume())),d=this.view.getState(this.model.getParent(d.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=h&&null!=k&&null!=g){if(c=k,Math.abs(h.x-b.getGraphX())>d||Math.abs(h.y-b.getGraphY())>d){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,b.getEvent());var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){d=
-e.getHandleForEvent(g);var f=this.view.getEdgeStyle(c),m=f==mxEdgeStyle.EntityRelation;n||l!=mxEvent.LABEL_HANDLE||(d=l);if(m&&0!=d&&d!=e.bends.length-1&&d!=mxEvent.LABEL_HANDLE)!m||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(d==mxEvent.LABEL_HANDLE||0==d||null!=c.visibleSourceState||d==e.bends.length-1||null!=c.visibleTargetState)m||d==mxEvent.LABEL_HANDLE||(m=c.absolutePoints,null!=m&&(null==f&&null==d||f==mxEdgeStyle.OrthConnector)&&(d=
-l,null==d&&(d=new mxRectangle(h.x,h.y),d.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(d,m[0].x,m[0].y)?d=0:mxUtils.contains(d,m[m.length-1].x,m[m.length-1].y)?d=e.bends.length-1:null!=f&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?d=2:(d=mxUtils.findNearestSegment(c,h.x,h.y),d=null==f?mxEvent.VIRTUAL_HANDLE-d:d+1))),null==d&&(d=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),
-b.getGraphX(),d),l=h=g=k=null,n=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c){e=null;if(this.model.isEdge(c.cell)){if(d=new mxRectangle(b.getGraphX(),b.getGraphY()),d.grow(mxEdgeHandler.prototype.handleImage.width/2),m=c.absolutePoints,null!=m)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(d,m[0].x,m[0].y)||mxUtils.contains(d,m[m.length-1].x,m[m.length-1].y))e="pointer";else if(null!=
-c.visibleSourceState||null!=c.visibleTargetState)d=this.view.getEdgeStyle(c),e="crosshair",d!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(d=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),d<m.length-1&&0<=d&&(e=0==Math.round(m[d].x-m[d+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){d=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);d.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(m=this.model.getParent(c.cell),f=this.model.getParent(m),
-!this.isCellSelected(f)))if(mxUtils.intersects(d,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(m,0)!=c.cell||mxUtils.intersects(d,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))e="col-resize";else if(mxUtils.intersects(d,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(f,0)!=m||mxUtils.intersects(d,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))e="row-resize";for(m=c;null==e&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var f=
-this.getActualStartSize(m.cell),p=this.view.scale;(0<f.x||0<f.width)&&mxUtils.intersects(d,new mxRectangle(m.x+(f.x-f.width-1)*p+(0==f.x?m.width*p:0),m.y,1,m.height))?e="col-resize":(0<f.y||0<f.height)&&mxUtils.intersects(d,new mxRectangle(m.x,m.y+(f.y-f.height-1)*p+(0==f.y?m.height:0),m.width,1))&&(e="row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){l=h=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
-!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
-h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=1;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
-return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[e])&&this.graph.isCellSelected(b[e])?this.graph.model.getParent(b[e]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[e])&&this.graph.isCellSelected(b[e])?b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,
-!0),d.push(f))}return d};var u=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?e=!0:a=this.graph.model.getParent(a));e||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
-this.getRubberband=function(){return t};var v=(new Date).getTime(),q=0,w=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),q=0):q=(new Date).getTime()-v};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&r.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(B=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=B)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=
-function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=
-a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return C.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,
-b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var t=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(p=mxUtils.getBoundingBox(p,t));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);
-this.getAllCells(a,b,c,d,n,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==
-b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),t.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&
-this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var c=a.view.graph;return b&&(c.isCellSelected(a.cell)||c.isTableRow(a.cell)&&c.selectionCellsHandler.isHandled(c.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,
-!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,d;for(d in c)if(null!=c[d].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(b.getEvent()))if(d=this.tolerance,null!=h&&null!=k&&null!=g){if(c=k,Math.abs(h.x-b.getGraphX())>d||Math.abs(h.y-b.getGraphY())>d){var e=this.selectionCellsHandler.getHandler(c.cell);null==e&&this.model.isEdge(c.cell)&&(e=this.createHandler(c));if(null!=e&&null!=e.bends&&0<e.bends.length){d=e.getHandleForEvent(g);
+var f=this.view.getEdgeStyle(c),m=f==mxEdgeStyle.EntityRelation;n||l!=mxEvent.LABEL_HANDLE||(d=l);if(m&&0!=d&&d!=e.bends.length-1&&d!=mxEvent.LABEL_HANDLE)!m||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(d==mxEvent.LABEL_HANDLE||0==d||null!=c.visibleSourceState||d==e.bends.length-1||null!=c.visibleTargetState)m||d==mxEvent.LABEL_HANDLE||(m=c.absolutePoints,null!=m&&(null==f&&null==d||f==mxEdgeStyle.OrthConnector)&&(d=l,null==d&&(d=new mxRectangle(h.x,
+h.y),d.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(d,m[0].x,m[0].y)?d=0:mxUtils.contains(d,m[m.length-1].x,m[m.length-1].y)?d=e.bends.length-1:null!=f&&(2==m.length||3==m.length&&(0==Math.round(m[0].x-m[1].x)&&0==Math.round(m[1].x-m[2].x)||0==Math.round(m[0].y-m[1].y)&&0==Math.round(m[1].y-m[2].y)))?d=2:(d=mxUtils.findNearestSegment(c,h.x,h.y),d=null==f?mxEvent.VIRTUAL_HANDLE-d:d+1))),null==d&&(d=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),d),b.consume(),this.graphHandler.reset()}null!=
+e&&(this.selectionCellsHandler.isHandlerActive(e)?this.isCellSelected(c.cell)||(this.selectionCellsHandler.handlers.put(c.cell,e),this.selectCellForEvent(c.cell,b.getEvent())):this.isCellSelected(c.cell)||e.destroy());n=!1;h=g=k=l=null}}else if(c=b.getState(),null!=c){e=null;if(this.model.isEdge(c.cell)){if(d=new mxRectangle(b.getGraphX(),b.getGraphY()),d.grow(mxEdgeHandler.prototype.handleImage.width/2),m=c.absolutePoints,null!=m)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,
+b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(d,m[0].x,m[0].y)||mxUtils.contains(d,m[m.length-1].x,m[m.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)d=this.view.getEdgeStyle(c),e="crosshair",d!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(d=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),d<m.length-1&&0<=d&&(e=0==Math.round(m[d].x-m[d+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(b.getEvent())){d=new mxRectangle(b.getGraphX()-
+1,b.getGraphY()-1);d.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(m=this.model.getParent(c.cell),f=this.model.getParent(m),!this.isCellSelected(f)))if(mxUtils.intersects(d,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(m,0)!=c.cell||mxUtils.intersects(d,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))e="col-resize";else if(mxUtils.intersects(d,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(f,0)!=m||mxUtils.intersects(d,new mxRectangle(c.x,
+c.y+c.height-2,c.width,3)))e="row-resize";for(m=c;null==e&&null!=m&&(this.isTableCell(m.cell)||this.isTableRow(m.cell)||this.isTable(m.cell));){if(this.isSwimlane(m.cell)){var f=this.getActualStartSize(m.cell),p=this.view.scale;(0<f.x||0<f.width)&&mxUtils.intersects(d,new mxRectangle(m.x+(f.x-f.width-1)*p+(0==f.x?m.width*p:0),m.y,1,m.height))?e="col-resize":(0<f.y||0<f.height)&&mxUtils.intersects(d,new mxRectangle(m.x,m.y+(f.y-f.height-1)*p+(0==f.y?m.height:0),m.width,1))&&(e="row-resize")}m=this.view.getState(this.model.getParent(m.cell))}}null!=
+e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){l=h=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,
+d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=1;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[e])&&this.graph.isCellSelected(b[e])?this.graph.model.getParent(b[e]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[e])&&
+this.graph.isCellSelected(b[e])?b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}return d};var u=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?e=!0:a=this.graph.model.getParent(a));e||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var v=(new Date).getTime(),q=0,w=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),q=0):q=(new Date).getTime()-v};var r=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
+this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&r.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
+mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var B=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(B=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=B)}));this.popupMenuHandler.autoExpand=
+!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return z.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
+function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var C=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return C.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getCells(a.x,
+a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")});this.selectCellsForEvent(c,b);return c};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};
+var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),
+t.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var c=a.view.graph;return b&&(c.isCellSelected(a.cell)||c.isTableRow(a.cell)&&c.selectionCellsHandler.isHandled(c.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var I=this.updateMouseEvent;this.updateMouseEvent=function(a){a=I.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";
+Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,c,d,b,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=b&&null!=f?'viewBox="0 0 '+b+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)};
Graph.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&65535!=b&&65534!=b&&c.push(a.charAt(d))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.compressNode=function(a,c){var d=mxUtils.getXml(a);return Graph.compress(c?d:Graph.zapGremlins(d))};
Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(d):Base64.encode(d,!0)};Graph.decompress=function(a,c,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?c:Graph.zapGremlins(c)};
@@ -2713,12 +2712,12 @@ Graph.prototype.replacePlaceholders=function(a,c){var d=[];if(null!=c){for(var b
null==e&&(e=this.getGlobalVariable(h))}d.push(c.substring(b,match.index)+(null!=e?e:f));b=match.index+f.length}}d.push(c.substring(b))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],d=0;d<a.length;d++){var b=this.model.getCell(a[d].id);null!=b&&c.push(b)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=d&&(mxEvent.isTouchEvent(c)?d.update(d.getState(this.view.getState(a[1]))):d.reset())):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,c,d,b,f,e,h,g){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];e=e?e:!1;var k=this.getCompositeParent(a),l=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);c==mxConstants.DIRECTION_NORTH?(l.x+=k.geometry.width/2,l.y-=d):c==mxConstants.DIRECTION_SOUTH?(l.x+=k.geometry.width/2,l.y+=k.geometry.height+d):(l.x=c==mxConstants.DIRECTION_WEST?
-l.x-d:l.x+(k.geometry.width+d),l.y+=k.geometry.height/2);var n=this.view.getState(this.model.getParent(a));d=this.view.scale;var m=this.view.translate,k=m.x*d,m=m.y*d;null!=n&&this.model.isVertex(n.cell)&&(k=n.x,m=n.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(l.x+=a.parent.geometry.x,l.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(k+l.x*d,m+l.y*d)).grow(40);e=null!=e?this.getCells(0,0,0,0,null,null,e):null;var p=null!=e&&0<e.length?e[0]:null,u=!1;null!=p&&this.model.isAncestor(p,a)&&
-(u=!0,p=null);for(e=p;null!=e;){if(this.isCellLocked(e)){p=null;break}e=this.model.getParent(e)}null!=p&&(e=this.view.getState(a),n=this.view.getState(p),null!=e&&null!=n&&mxUtils.intersects(e,n)&&(p=null));var t=!mxEvent.isShiftDown(b)||mxEvent.isControlDown(b)||f;t&&(c==mxConstants.DIRECTION_NORTH?l.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?l.y+=a.geometry.height/2:l.x=c==mxConstants.DIRECTION_WEST?l.x-a.geometry.width/2:l.x+a.geometry.width/2);null==p||this.isCellConnectable(p)||this.isSwimlane(p)||
-(f=this.getModel().getParent(p),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(p=f));if(p==a||this.model.isEdge(p)||!this.isCellConnectable(p)&&!this.isSwimlane(p))p=null;var v=[],q=null!=p&&this.isSwimlane(p),w=q?null:p;f=mxUtils.bind(this,function(d){if(null==h||null!=d){this.model.beginUpdate();try{if(null==w&&t){for(var e=null!=d?d:a,f=this.getCellGeometry(e);null!=f&&f.relative;)e=this.getModel().getParent(e),f=this.getCellGeometry(e);e=this.getCompositeParent(e);w=null!=d?d:this.duplicateCells([e],
-!1)[0];null!=d&&this.addCells([w],this.model.getParent(a),null,null,null,!0);f=this.getCellGeometry(w);null!=f&&(f.x=l.x-f.width/2,f.y=l.y-f.height/2);q?(this.addCells([w],p,null,null,null,!0),p=null):t&&null==p&&!u&&this.addCells([w],this.getDefaultParent(),null,null,null,!0)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var k=mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)&&t||null==p&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),
-null,"",a,w,this.createCurrentEdgeStyle());if(null!=k&&this.connectionHandler.insertBeforeSource){for(var m=null,e=a;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=k.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==k.parent&&(m=e.parent.getIndex(e),this.model.add(e.parent,k,m))}null==p&&null!=w&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,w,m));null!=k&&v.push(k);null==p&&
-null!=w&&v.push(w);null==w&&null!=k&&k.geometry.setTerminalPoint(l,!1);null!=k&&this.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{this.model.endUpdate()}}if(null!=g)g(v);else return v});if(null!=h&&null==w&&t)h(k+l.x*d,m+l.y*d,f);else return f(w)};
+l.x-d:l.x+(k.geometry.width+d),l.y+=k.geometry.height/2);var n=this.view.getState(this.model.getParent(a));d=this.view.scale;var m=this.view.translate,k=m.x*d,m=m.y*d;null!=n&&this.model.isVertex(n.cell)&&(k=n.x,m=n.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(l.x+=a.parent.geometry.x,l.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(k+l.x*d,m+l.y*d)).grow(40);e=null!=e?this.getCells(0,0,0,0,null,null,e):null;var p=null!=e&&0<e.length?e.reverse()[0]:null,u=!1;null!=p&&this.model.isAncestor(p,
+a)&&(u=!0,p=null);for(e=p;null!=e;){if(this.isCellLocked(e)){p=null;break}e=this.model.getParent(e)}null!=p&&(e=this.view.getState(a),n=this.view.getState(p),null!=e&&null!=n&&mxUtils.intersects(e,n)&&(p=null));var t=!mxEvent.isShiftDown(b)||mxEvent.isControlDown(b)||f;t&&(c==mxConstants.DIRECTION_NORTH?l.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?l.y+=a.geometry.height/2:l.x=c==mxConstants.DIRECTION_WEST?l.x-a.geometry.width/2:l.x+a.geometry.width/2);null==p||this.isCellConnectable(p)||
+this.isSwimlane(p)||(f=this.getModel().getParent(p),this.getModel().isVertex(f)&&this.isCellConnectable(f)&&(p=f));if(p==a||this.model.isEdge(p)||!this.isCellConnectable(p)&&!this.isSwimlane(p))p=null;var v=[],q=null!=p&&this.isSwimlane(p),w=q?null:p;f=mxUtils.bind(this,function(d){if(null==h||null!=d){this.model.beginUpdate();try{if(null==w&&t){for(var e=null!=d?d:a,f=this.getCellGeometry(e);null!=f&&f.relative;)e=this.getModel().getParent(e),f=this.getCellGeometry(e);e=this.getCompositeParent(e);
+w=null!=d?d:this.duplicateCells([e],!1)[0];null!=d&&this.addCells([w],this.model.getParent(a),null,null,null,!0);f=this.getCellGeometry(w);null!=f&&(f.x=l.x-f.width/2,f.y=l.y-f.height/2);q?(this.addCells([w],p,null,null,null,!0),p=null):t&&null==p&&!u&&this.addCells([w],this.getDefaultParent(),null,null,null,!0)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var k=mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)&&t||null==p&&null!=d&&d.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,w,this.createCurrentEdgeStyle());if(null!=k&&this.connectionHandler.insertBeforeSource){for(var m=null,e=a;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=k.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==k.parent&&(m=e.parent.getIndex(e),this.model.add(e.parent,k,m))}null==p&&null!=w&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
+w,m));null!=k&&v.push(k);null==p&&null!=w&&v.push(w);null==w&&null!=k&&k.geometry.setTerminalPoint(l,!1);null!=k&&this.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{this.model.endUpdate()}}if(null!=g)g(v);else return v});if(null!=h&&null==w&&t)h(k+l.x*d,m+l.y*d,f);else return f(w)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],d,b;for(b in this.model.cells)if(d=this.model.cells[b],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&c.push(d);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),d=a,b=null;null==b&&null!=d;)null!=d.value&&"object"==typeof d.value&&(b=d.hasAttribute(c)?null!=d.getAttribute(c)?d.getAttribute(c):"":null),d=this.model.getParent(d);return b||""}return c.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2820,7 +2819,7 @@ d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(var f=new mxCodec,g=new
c);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var c=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return c==mxConstants.SHAPE_SWIMLANE||"table"==c}return!1};var h=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var c=this.getCurrentCellStyle(b);if(null!=c.expand)return"0"!=c.expand}return h.apply(this,arguments)&&(null==b||
!this.isTable(b))};var g=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,b,c,d,e,f,h,k){null==k&&(k=this.model.getParent(a),this.isTable(k)||this.isTableRow(k))&&(k=this.getCellAt(f,h,null,!0,!1));g.apply(this,[a,b,c,d,e,f,h,k])};var k=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)k.apply(this,arguments);else{var d=this.getSelectionCell(),e=null,f=[],g=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),
b==d)e=f.length-1;else if(a&&null==d&&0<f.length||null!=e&&a&&f.length>e||!a&&0<e)return;for(var c=0;c<this.model.getChildCount(b);c++)g(this.model.getChildAt(b,c))});g(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var h=[],k=0;k<a.length;k++)this.isTable(a[k])?h=h.concat(this.model.getChildCells(a[k],!0).reverse()):h.push(a[k]);
-a=h}this.model.beginUpdate();try{h=[];for(k=0;k<a.length;k++)if(null!=e&&this.isTableRow(a[k])){var G=this.model.getParent(a[k]),I=this.getCellGeometry(a[k]);this.isTable(G)&&h.push(G);if(null!=G&&null!=I&&this.isTable(G)&&this.isTable(e)&&(d||G!=e)){if(!d){var m=this.getCellGeometry(G);null!=m&&(m=m.clone(),m.height-=I.height,this.model.setGeometry(G,m))}m=this.getCellGeometry(e);null!=m&&(m=m.clone(),m.height+=I.height,this.model.setGeometry(e,m));var n=this.model.getChildCells(e,!0);if(0<n.length){var ha=
+a=h}this.model.beginUpdate();try{h=[];for(k=0;k<a.length;k++)if(null!=e&&this.isTableRow(a[k])){var G=this.model.getParent(a[k]),O=this.getCellGeometry(a[k]);this.isTable(G)&&h.push(G);if(null!=G&&null!=O&&this.isTable(G)&&this.isTable(e)&&(d||G!=e)){if(!d){var m=this.getCellGeometry(G);null!=m&&(m=m.clone(),m.height-=O.height,this.model.setGeometry(G,m))}m=this.getCellGeometry(e);null!=m&&(m=m.clone(),m.height+=O.height,this.model.setGeometry(e,m));var n=this.model.getChildCells(e,!0);if(0<n.length){var ha=
d?this.cloneCell(a[k]):a[k],p=this.model.getChildCells(ha,!0),ia=this.model.getChildCells(n[0],!0),W=ia.length-p.length;if(0<W)for(var t=0;t<W;t++){var q=this.cloneCell(p[p.length-1]);null!=q&&(q.value="",this.model.add(ha,q))}else if(0>W)for(t=0;t>W;t--)this.model.remove(p[p.length+t-1]);p=this.model.getChildCells(ha,!0);for(t=0;t<ia.length;t++){var qa=this.getCellGeometry(ia[t]),u=this.getCellGeometry(p[t]);null!=qa&&null!=u&&(u=u.clone(),u.width=qa.width,this.model.setGeometry(p[t],u))}}}}for(var r=
l.apply(this,arguments),k=0;k<h.length;k++)!d&&this.model.contains(h[k])&&0==this.model.getChildCount(h[k])&&this.model.remove(h[k]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),r)}finally{this.model.endUpdate()}return r};var n=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)if(this.isTableCell(a[d])){var e=this.model.getParent(a[d]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&
1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),h=0,k=0;k<g.length;k++)0<=mxUtils.indexOf(a,g[k])&&h++;h==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=
@@ -2829,8 +2828,8 @@ e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRE
mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,b,c){for(var d=this.getCurrentCellStyle(a),e=!0,f=!0,g=0;g<b.length&&f;g++)e=e&&this.isTable(b[g]),
f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(d,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||e)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();
-try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),G=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(G,!0);c.setGeometry(f,k);var I=this.view.getState(f),m=this.view.getState(g),n=this.view.getState(h);if(null!=I){var p=null!=m?this.getConnectionConstraint(I,m,!0):null,t=
-null!=n?this.getConnectionConstraint(I,n,!1):null;this.setConnectionConstraint(f,g,!0,t);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(f,k)}var u=this.view.getState(f);if(null!=u){var r=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
+try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),G=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(G,!0);c.setGeometry(f,k);var O=this.view.getState(f),m=this.view.getState(g),n=this.view.getState(h);if(null!=O){var p=null!=m?this.getConnectionConstraint(O,m,!0):null,t=
+null!=n?this.getConnectionConstraint(O,n,!1):null;this.setConnectionConstraint(f,g,!0,t);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(f,k)}var u=this.view.getState(f);if(null!=u){var r=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(u.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,r[mxUtils.mod(mxUtils.indexOf(r,v)+(b?-1:1),r.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var m=Graph.prototype.processChange;
Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var c=this.view.getState(b);null!=c&&null!=c.shape&&(this.view.invalidate(b),c.shape.bounds=null)}m.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=
@@ -2860,10 +2859,10 @@ a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].set
c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:
g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var n=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));
-var p=this.view.scale,I=mxUtils.createXmlDocument(),G=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"svg"):I.createElement("svg");null!=a&&(null!=G.style?G.style.backgroundColor=a:G.setAttribute("style","background-color:"+a));null==I.createElementNS?(G.setAttribute("xmlns",mxConstants.NS_SVG),G.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):G.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var t=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:
-0),ha=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);G.setAttribute("version","1.1");G.setAttribute("width",t+"px");G.setAttribute("height",ha+"px");G.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+ha);I.appendChild(G);var q=null!=I.createElementNS?I.createElementNS(mxConstants.NS_SVG,"g"):I.createElement("g");G.appendChild(q);var u=this.createSvgCanvas(q);u.foOffset=e?-.5:0;u.textOffset=e?-.5:0;u.imageOffset=e?-.5:0;u.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var r=document.createElement("div"),
-ia=u.getAlternateText;u.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,D,Ea,Ta){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(r.innerHTML=f,f=mxUtils.extractTextWithWhitespace(r.childNodes));for(var Y=Math.ceil(2*d/this.state.fontSize),m=[],n=0,p=0;(0==Y||n<Y)&&p<f.length;){var I=f.charCodeAt(p);if(10==I||13==I){if(0<n)break}else m.push(f.charAt(p)),255>I&&n++;p++}m.length<f.length&&1<f.length-m.length&&(f=mxUtils.trim(m.join(""))+"...");return f}catch(Ua){return ia.apply(this,
-arguments)}else return ia.apply(this,arguments)};var W=this.backgroundImage;if(null!=W){b=p/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,W.width*b,W.height*b);mxUtils.intersects(n,x)&&u.image(v.x,v.y,W.width,W.height,W.src,!0)}u.scale(a);u.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,B=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=B.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=
+var O=this.view.scale,p=mxUtils.createXmlDocument(),G=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=G.style?G.style.backgroundColor=a:G.setAttribute("style","background-color:"+a));null==p.createElementNS?(G.setAttribute("xmlns",mxConstants.NS_SVG),G.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):G.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/O;var t=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:
+0),ha=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);G.setAttribute("version","1.1");G.setAttribute("width",t+"px");G.setAttribute("height",ha+"px");G.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+t+" "+ha);p.appendChild(G);var q=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");G.appendChild(q);var u=this.createSvgCanvas(q);u.foOffset=e?-.5:0;u.textOffset=e?-.5:0;u.imageOffset=e?-.5:0;u.translate(Math.floor((c/b-n.x)/O),Math.floor((c/b-n.y)/O));var r=document.createElement("div"),
+ia=u.getAlternateText;u.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,D,Ea,Ua){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(r.innerHTML=f,f=mxUtils.extractTextWithWhitespace(r.childNodes));for(var Y=Math.ceil(2*d/this.state.fontSize),Fa=[],m=0,n=0;(0==Y||m<Y)&&n<f.length;){var p=f.charCodeAt(n);if(10==p||13==p){if(0<m)break}else Fa.push(f.charAt(n)),255>p&&m++;n++}Fa.length<f.length&&1<f.length-Fa.length&&(f=mxUtils.trim(Fa.join(""))+"...");return f}catch(Va){return ia.apply(this,
+arguments)}else return ia.apply(this,arguments)};var W=this.backgroundImage;if(null!=W){b=O/b;var v=this.view.translate,x=new mxRectangle(v.x*b,v.y*b,W.width*b,W.height*b);mxUtils.intersects(n,x)&&u.image(v.x,v.y,W.width,W.height,W.src,!0)}u.scale(a);u.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var z=h.drawCellState,B=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=B.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=
a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&z.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),u);this.updateSvgLinks(G,k,!0);this.addForeignObjectWarning(u,G);return G}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),
d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=
a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",
@@ -2909,8 +2908,8 @@ b.width,this.graph.model.setGeometry(d,e)))}};var B=mxSelectionCellsHandler.prot
mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=z.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var C=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=C.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+
this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,
"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var A=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return A.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var E=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return E.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var J=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||J.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var H=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return H.apply(this,arguments).grow(-this.getSelectionBorderInset())};var N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,
+this.bounds};var E=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return E.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var I=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||I.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var a=0;this.graph.isTableRow(this.state.cell)?a=1:this.graph.isTableCell(this.state.cell)&&(a=2);return a};var H=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return H.apply(this,arguments).grow(-this.getSelectionBorderInset())};var M=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=M.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,
c=b.model,d=this.state,e=this.selectionBorder,f=this;null==a&&(a=[]);var g=b.view.getCellStates(c.getChildCells(this.state.cell,!0));if(0<g.length){for(var h=b.view.getCellStates(c.getChildCells(g[0].cell,!0)),c=0;c<h.length;c++)mxUtils.bind(this,function(c){var g=h[c],k=c<h.length-1?h[c+1]:null,l=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);l.isDashed=e.isDashed;l.svgStrokeTolerance++;l=new mxHandle(g,"col-resize",null,l);l.tableHandle=!0;var m=0;l.shape.node.parentNode.insertBefore(l.shape.node,
l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=b.getActualStartSize(d.cell);this.shape.stroke=0==m?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+this.state.width+m*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=d.y+(c==h.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=d.height-(c==h.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var n=!1;l.setPosition=function(a,c,d){m=
Math.max(Graph.minTableColumnWidth-a.width,c.x-a.x-a.width);n=mxEvent.isShiftDown(d.getEvent());null==k||n||(m=Math.min((k.x+k.width-g.x-g.width)/b.view.scale-Graph.minTableColumnWidth,m))};l.execute=function(a){if(0!=m)b.setTableColumnWidth(this.state.cell,m,n);else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}m=0};l.reset=function(){m=0};a.push(l)})(c);for(c=0;c<g.length;c++)mxUtils.bind(this,function(c){c=g[c];var h=
@@ -2919,9 +2918,9 @@ this.shape.bounds.height=1,this.shape.redraw())};c.setPosition=function(a,b,c){k
mxVertexHandler.prototype.setHandlesVisible=function(a){F.apply(this,arguments);if(null!=this.moveHandles)for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].style.visibility=a?"":"hidden";if(null!=this.cornerHandles)for(b=0;b<this.cornerHandles.length;b++)this.cornerHandles[b].node.style.visibility=a?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var a=this.graph.model;if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);
this.moveHandles=null}this.moveHandles=[];for(b=0;b<a.getChildCount(this.state.cell);b++)mxUtils.bind(this,function(b){if(null!=b&&a.isVertex(b.cell)){var c=mxUtils.createImage(Editor.rowMoveImage);c.style.position="absolute";c.style.cursor="pointer";c.style.width="7px";c.style.height="4px";c.style.padding="4px 2px 4px 2px";c.rowState=b;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(a)&&this.graph.isCellSelected(b.cell)||
this.graph.selectCellForEvent(b.cell,a);mxEvent.isPopupTrigger(a)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0);mxEvent.consume(a)}),null,mxUtils.bind(this,function(a){mxEvent.isPopupTrigger(a)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(a),mxEvent.getClientY(a),b.cell,a),mxEvent.consume(a))}));
-this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(a.getChildAt(this.state.cell,b)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var K=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,
+this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(a.getChildAt(this.state.cell,b)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var J=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,
0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-
-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,this.graph.isTable(this.state.cell)&&(b+=7),a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=K.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
+g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,this.graph.isTable(this.state.cell)&&(b+=7),a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=J.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));
if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var U=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){U.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display=
"none")};var T=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){T.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=
@@ -2935,7 +2934,7 @@ Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.proto
(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var O=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){O.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
+function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var N=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){N.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<
this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=
@@ -2943,7 +2942,7 @@ this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!
var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var M=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);M.apply(this,arguments)};var L=(new Date).getTime(),Q=0,la=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){la.apply(this,arguments);c!=this.currentTerminalState?(L=(new Date).getTime(),Q=0):Q=(new Date).getTime()-L;this.currentTerminalState=
+this.secondDiv=null)),b.consume()}};var L=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);L.apply(this,arguments)};var K=(new Date).getTime(),Q=0,la=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){la.apply(this,arguments);c!=this.currentTerminalState?(K=(new Date).getTime(),Q=0):Q=(new Date).getTime()-K;this.currentTerminalState=
c};var ga=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Q||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ga.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-
1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,
mxConstants.HANDLE_STROKECOLOR)};var ma=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return ma.apply(this,arguments)};var ca=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);
@@ -3068,20 +3067,20 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m
[mxConstants.ALIGN_LEFT])),m),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),m),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_RIGHT])),m);this.styleButtons([u,t,v]);if(b.cellEditor.isContentEditing()){var q=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([q]);q.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
q.firstChild.style.backgroundPosition="2px 2px";q.firstChild.style.backgroundSize="18px 18px";this.styleButtons([q])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),m),r=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),m),y=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),m);this.styleButtons([w,r,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(m);var x,B,z,C,A,E,J;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",y.style.display="none",n.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull",
+mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),m);this.styleButtons([w,r,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(m);var x,B,z,C,A,E,I;b.cellEditor.isContentEditing()?(w.style.display="none",r.style.display="none",y.style.display="none",n.style.display="none",z=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==z.style.opacity&&document.execCommand("justifyfull",
!1,null)},m),z.style.marginRight="9px",z.style.opacity=1,this.styleButtons([z,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},m),B=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},m)]),x.style.marginLeft="9px",p=m.cloneNode(!1),p.style.paddingTop="4px",m=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(m),m[m.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",v.style.marginRight="9px");m=e.cloneNode(!1);m.style.marginLeft=
-"0px";m.style.paddingTop="8px";m.style.paddingBottom="4px";m.style.fontWeight="normal";mxUtils.write(m,mxResources.get("position"));var H=document.createElement("select");H.style.position="absolute";H.style.right="20px";H.style.width="97px";H.style.marginTop="-2px";for(var q="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),N={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+"0px";m.style.paddingTop="8px";m.style.paddingBottom="4px";m.style.fontWeight="normal";mxUtils.write(m,mxResources.get("position"));var H=document.createElement("select");H.style.position="absolute";H.style.right="20px";H.style.width="97px";H.style.marginTop="-2px";for(var q="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),M={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<q.length;p++){var F=document.createElement("option");F.setAttribute("value",q[p]);mxUtils.write(F,mxResources.get(q[p]));H.appendChild(F)}m.appendChild(H);q=e.cloneNode(!1);q.style.marginLeft="0px";q.style.paddingTop=
-"4px";q.style.paddingBottom="4px";q.style.fontWeight="normal";mxUtils.write(q,mxResources.get("writingDirection"));var K=document.createElement("select");K.style.position="absolute";K.style.right="20px";K.style.width="97px";K.style.marginTop="-2px";for(var F=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<F.length;p++){var T=document.createElement("option");T.setAttribute("value",F[p]);mxUtils.write(T,
-mxResources.get(F[p]));K.appendChild(T)}q.appendChild(K);b.isEditing()||(a.appendChild(m),mxEvent.addListener(H,"change",function(a){b.getModel().beginUpdate();try{var c=N[H.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(q),mxEvent.addListener(K,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[K.value],b.getSelectionCells());mxEvent.consume(a)}));var O=document.createElement("input");O.style.textAlign="right";O.style.marginTop="4px";mxClient.IS_QUIRKS||(O.style.position="absolute",O.style.right="32px");O.style.width="40px";O.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(O);var M=null,m=this.installInputHandler(O,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+"4px";q.style.paddingBottom="4px";q.style.fontWeight="normal";mxUtils.write(q,mxResources.get("writingDirection"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var F=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<F.length;p++){var T=document.createElement("option");T.setAttribute("value",F[p]);mxUtils.write(T,
+mxResources.get(F[p]));J.appendChild(T)}q.appendChild(J);b.isEditing()||(a.appendChild(m),mxEvent.addListener(H,"change",function(a){b.getModel().beginUpdate();try{var c=M[H.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(q),mxEvent.addListener(J,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[J.value],b.getSelectionCells());mxEvent.consume(a)}));var N=document.createElement("input");N.style.textAlign="right";N.style.marginTop="4px";mxClient.IS_QUIRKS||(N.style.position="absolute",N.style.right="32px");N.style.width="40px";N.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(N);var L=null,m=this.installInputHandler(N,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
-b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}O.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():
-(d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(M=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=M+"px";window.setTimeout(function(){O.value=M+" pt";M=null},0);break}},!0),m=this.createStepper(O,m,1,10,!0,Menus.prototype.defaultFontSize);m.style.display=O.style.display;m.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(m.style.right="20px");g.appendChild(m);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var L=null,Q="#ffffff",la=null,ga="#000000",ma=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Q},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}N.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():
+(d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(L=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=L+"px";window.setTimeout(function(){N.value=L+" pt";L=null},0);break}},!0),m=this.createStepper(N,m,1,10,!0,Menus.prototype.defaultFontSize);m.style.display=N.style.display;m.style.marginTop=
+"4px";mxClient.IS_QUIRKS||(m.style.right="20px");g.appendChild(m);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var K=null,Q="#ffffff",la=null,ga="#000000",ma=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Q},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){K=a},destroy:function(){K=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});ma.style.fontWeight="bold";var ca=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");ca.style.fontWeight="bold";g=1<=f.vertices.length?b.stylesheet.getDefaultVertexStyle():b.stylesheet.getDefaultEdgeStyle();g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
function(){return ga},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=
d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var f=c.nextSibling;a[e].appendChild(c);c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},null!=g[mxConstants.STYLE_FONTCOLOR]?g[mxConstants.STYLE_FONTCOLOR]:"#000000",{install:function(a){la=a},destroy:function(){la=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,null!=g[mxConstants.STYLE_FONTCOLOR]?g[mxConstants.STYLE_FONTCOLOR]:
@@ -3092,27 +3091,27 @@ g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.st
a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=fa&&(b.cellEditor.restoreSelection(fa),fa=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+
"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ba=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(fa=b.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(fa=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft=
"0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);m=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(m);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom=
-"10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";m=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=E?E.cellIndex:0)}catch(I){this.editorUi.handleError(I)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),
-mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=E?E.cellIndex+1:-1)}catch(I){this.editorUi.handleError(I)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=E&&b.deleteColumn(A,E.cellIndex)}catch(I){this.editorUi.handleError(I)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,
-J.sectionRowIndex)}catch(I){this.editorUi.handleError(I)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex+1)}catch(I){this.editorUi.handleError(I)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.deleteRow(A,J.sectionRowIndex)}catch(I){this.editorUi.handleError(I)}}),g)];this.styleButtons(m);
+"10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";m=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=E?E.cellIndex:0)}catch(O){this.editorUi.handleError(O)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),
+mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=E?E.cellIndex+1:-1)}catch(O){this.editorUi.handleError(O)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=E&&b.deleteColumn(A,E.cellIndex)}catch(O){this.editorUi.handleError(O)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,
+I.sectionRowIndex)}catch(O){this.editorUi.handleError(O)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex+1)}catch(O){this.editorUi.handleError(O)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.deleteRow(A,I.sectionRowIndex)}catch(O){this.editorUi.handleError(O)}}),g)];this.styleButtons(m);
m[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";m=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,
b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==E||null!=a&&mxEvent.isShiftDown(a)?A:E;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",
mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==E||null!=a&&mxEvent.isShiftDown(a)?A:E;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||
c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=A){var a=A.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?A.setAttribute("cellPadding",a):A.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=
A&&A.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=A&&A.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=A&&A.setAttribute("align","right")},e)];this.styleButtons(m);m[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);C=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),
mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var S=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(n,"0"==mxUtils.getValue(f.style,
-mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=O)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),O.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(r,a==mxConstants.ALIGN_MIDDLE);
+mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=N)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),N.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(r,a==mxConstants.ALIGN_MIDDLE);
c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&
-b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?K.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?K.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(K.value="automatic");if(d||document.activeElement!=R)a=parseFloat(mxUtils.getValue(f.style,
+b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?J.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?J.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(J.value="automatic");if(d||document.activeElement!=R)a=parseFloat(mxUtils.getValue(f.style,
mxConstants.STYLE_SPACING,2)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=V)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),V.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ka)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ka.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=aa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),aa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ja)a=parseFloat(mxUtils.getValue(f.style,
-mxConstants.STYLE_SPACING_LEFT,0)),ja.value=isNaN(a)?"":a+" pt"});ea=this.installInputHandler(R,mxConstants.STYLE_SPACING,2,-999,999," pt");da=this.installInputHandler(V,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");na=this.installInputHandler(ka,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");X=this.installInputHandler(ja,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(O,S);this.addKeyHandler(R,
+mxConstants.STYLE_SPACING_LEFT,0)),ja.value=isNaN(a)?"":a+" pt"});ea=this.installInputHandler(R,mxConstants.STYLE_SPACING,2,-999,999," pt");da=this.installInputHandler(V,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");na=this.installInputHandler(ka,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");Z=this.installInputHandler(aa,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");X=this.installInputHandler(ja,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(N,S);this.addKeyHandler(R,
S);this.addKeyHandler(V,S);this.addKeyHandler(ka,S);this.addKeyHandler(aa,S);this.addKeyHandler(ja,S);b.getModel().addListener(mxEvent.CHANGE,S);this.listeners.push({destroy:function(){b.getModel().removeListener(S)}});S();if(b.cellEditor.isContentEditing()){var G=!1,e=function(){G||(G=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+
1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-
1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a),n=g(m),p=h(n,m,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var r=window.getSelection(),w=0;w<q.length;w++)if(r.containsNode(q[w],
!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),y=h(n,temp,q[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(B,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(z,d(m.textAlign,"justify")),c(u,d(m.textAlign,"left")),c(t,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
-d(m.textAlign,"justify")?(c(z,d(m.textAlign,"justify")),c(u,!1),c(t,!1),c(v,!1)):(c(z,!1),c(u,e==mxConstants.ALIGN_LEFT),c(t,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),J=null==A?null:b.getParentByName(a,"TR",A),E=null==A?null:b.getParentByNames(a,["TD","TH"],A),C.style.display=null!=A?"":"none",document.activeElement!=O&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=M?(a.removeAttribute("size"),a.style.fontSize=M+" pt",
-M=null):O.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ba.value="100 %":ba.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)}),null!=la&&(ga="#"==d.charAt(0)?d:"#000000",la(ga,!0)),null!=L&&(Q="#"==n.charAt(0)?n:null,L(Q,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}G=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,
+d(m.textAlign,"justify")?(c(z,d(m.textAlign,"justify")),c(u,!1),c(t,!1),c(v,!1)):(c(z,!1),c(u,e==mxConstants.ALIGN_LEFT),c(t,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),I=null==A?null:b.getParentByName(a,"TR",A),E=null==A?null:b.getParentByNames(a,["TD","TH"],A),C.style.display=null!=A?"":"none",document.activeElement!=N&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=L?(a.removeAttribute("size"),a.style.fontSize=L+" pt",
+L=null):N.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ba.value="100 %":ba.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
+("0"+Number(d).toString(16)).substr(-2)}),null!=la&&(ga="#"==d.charAt(0)?d:"#000000",la(ga,!0)),null!=K&&(Q="#"==n.charAt(0)?n:null,K(Q,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}G=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,
"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -3173,19 +3172,19 @@ null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"e
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],
"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(x);this.addArrow(B);this.addArrow(z);r=this.addArrow(l,9);r.className="geIcon";r.style.width="auto";y=this.addArrow(n,9);y.className="geIcon";y.style.width="22px";var C=document.createElement("div");C.style.width="85px";C.style.height="1px";C.style.borderBottom="1px solid "+this.defaultStrokeColor;C.style.marginBottom="9px";r.appendChild(C);var A=document.createElement("div");
A.style.width="23px";A.style.height="1px";A.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.marginBottom="9px";y.appendChild(A);l.style.height="15px";n.style.height="15px";v.style.height="15px";x.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";z.style.marginLeft="3px";z.style.height="17px";a.appendChild(h);a.appendChild(t);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";n=document.createElement("div");
-n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));l.appendChild(n);var E,J,H=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),N=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));
-l.appendChild(n);var F,K,U=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),T=this.addUnitInput(l,"pt",20,33,function(){K.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";n=document.createElement("div");
-n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));h.appendChild(n);var O,M=this.addUnitInput(h,"pt",20,41,function(){O.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));
-var L=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];null!=d&&(d.className=b.getCssClassForMarker(f,e.style.shape,a,c),"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px"));return d}e=this.format.getSelectionState();
+n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="2px";n.style.fontWeight="normal";n.style.width="76px";mxUtils.write(n,mxResources.get("lineend"));l.appendChild(n);var E,I,H=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),M=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);r=document.createElement("div");r.style.height="8px";l.appendChild(r);n=n.cloneNode(!1);mxUtils.write(n,mxResources.get("linestart"));
+l.appendChild(n);var F,J,U=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),T=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";n=document.createElement("div");
+n.style.position="absolute";n.style.marginLeft="3px";n.style.marginBottom="12px";n.style.marginTop="1px";n.style.fontWeight="normal";n.style.width="120px";mxUtils.write(n,mxResources.get("perimeter"));h.appendChild(n);var N,L=this.addUnitInput(h,"pt",20,41,function(){N.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));
+var K=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];null!=d&&(d.className=b.getCssClassForMarker(f,e.style.shape,a,c),"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px"));return d}e=this.format.getSelectionState();
mxUtils.getValue(e.style,m,null);if(d||document.activeElement!=q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,
null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?C.style.borderBottom="1px dashed "+this.defaultStrokeColor:C.style.borderBottom="1px dotted "+this.defaultStrokeColor:C.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.borderBottom=C.style.borderBottom;a=x.getElementsByTagName("div")[0];null!=a&&(c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,
mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null),"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==
mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");a=v.getElementsByTagName("div")[0];null!=a&&(a.className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");e.edges.length==f.getSelectionCount()?(t.style.display="",p.style.display="none"):(t.style.display="none",
p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),B,"start");c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),z,"end");null!=a&&null!=c&&("arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(x,
"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(B,30),mxUtils.setOpacity(z,30)):(mxUtils.setOpacity(B,100),mxUtils.setOpacity(z,100));if(d||document.activeElement!=T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),T.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.value=
-isNaN(a)?"":a+" pt";if(d||document.activeElement!=N)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),N.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=M)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),M.value=isNaN(a)?"":a+" pt"});K=this.installInputHandler(T,mxConstants.STYLE_STARTSIZE,
-mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(N,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");O=this.installInputHandler(M,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(q,L);this.addKeyHandler(T,L);this.addKeyHandler(U,L);this.addKeyHandler(N,L);this.addKeyHandler(H,
-L);this.addKeyHandler(M,L);f.getModel().addListener(mxEvent.CHANGE,L);this.listeners.push({destroy:function(){f.getModel().removeListener(L)}});L();return a};
+isNaN(a)?"":a+" pt";if(d||document.activeElement!=M)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),M.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=L)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),L.value=isNaN(a)?"":a+" pt"});J=this.installInputHandler(T,mxConstants.STYLE_STARTSIZE,
+mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(M,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");N=this.installInputHandler(L,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(q,K);this.addKeyHandler(T,K);this.addKeyHandler(U,K);this.addKeyHandler(M,K);this.addKeyHandler(H,
+K);this.addKeyHandler(L,K);f.getModel().addListener(mxEvent.CHANGE,K);this.listeners.push({destroy:function(){f.getModel().removeListener(K)}});K();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var n=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -3229,16 +3228,16 @@ DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxReso
c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function d(){mxActor.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function h(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function u(){mxActor.call(this)}function t(){mxActor.call(this)}
function v(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=
this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function q(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function r(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function A(){mxShape.call(this)}function E(){mxShape.call(this)}
-function J(){mxEllipse.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function U(){mxShape.call(this)}function T(){mxShape.call(this)}function O(){mxShape.call(this)}function M(){mxShape.call(this)}function L(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function la(){mxRectangleShape.call(this)}function ga(){mxDoubleEllipse.call(this)}function ma(){mxDoubleEllipse.call(this)}function ca(){mxArrowConnector.call(this);
+function I(){mxEllipse.call(this)}function H(){mxShape.call(this)}function M(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function J(){mxShape.call(this)}function U(){mxShape.call(this)}function T(){mxShape.call(this)}function N(){mxShape.call(this)}function L(){mxShape.call(this)}function K(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function la(){mxRectangleShape.call(this)}function ga(){mxDoubleEllipse.call(this)}function ma(){mxDoubleEllipse.call(this)}function ca(){mxArrowConnector.call(this);
this.spacing=0}function da(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function X(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function na(){mxActor.call(this)}function V(){mxActor.call(this)}function R(){mxActor.call(this)}function ja(){mxActor.call(this)}function aa(){mxActor.call(this)}function ka(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(){mxActor.call(this)}function S(){mxActor.call(this)}function G(){mxEllipse.call(this)}
-function I(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function W(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function za(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxConnector.call(this)}function Ha(a,b,c,d,e,f,g,h,k,l){g+=k;var D=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(D.x-
+function O(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function W(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function za(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function ra(){mxConnector.call(this)}function Ia(a,b,c,d,e,f,g,h,k,l){g+=k;var D=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(D.x-
e-g,D.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxSwimlane);a.prototype.getLabelBounds=function(a){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};a.prototype.paintVertexShape=function(a,b,c,d,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-c));this.paintForeground(a,
b,c,d,e)};a.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.state){var f=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var D=f,f=g,g=D;a.rotate(-this.getShapeRotation(),f,g,b+d/2,c+e/2);s=this.scale;b=this.bounds.x/s;c=this.bounds.y/s;d=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(a,b,c,d,e)}};a.prototype.paintTableForeground=function(a,b,c,d,e){var f=this.state.view.graph,g=f.getActualStartSize(this.state.cell),
D=f.model.getChildCells(this.state.cell,!0);if(0<D.length){var h="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),k="0"!=mxUtils.getValue(this.state.style,"columnLines","1");if(h)for(h=1;h<D.length;h++){var l=f.getCellGeometry(D[h]);null!=l&&(a.begin(),a.moveTo(b+g.x,c+l.y),a.lineTo(b+d-g.width,c+l.y),a.end(),a.stroke())}if(k)for(d=f.model.getChildCells(D[0],!0),h=1;h<d.length;h++)l=f.getCellGeometry(d[h]),null!=l&&(a.begin(),a.moveTo(b+l.x+g.x,c+g.y),a.lineTo(b+l.x+g.x,c+e-g.height),a.end(),
a.stroke())}};mxCellRenderer.registerShape("table",a);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),D=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=D&&(a.setFillAlpha(Math.abs(D)),a.setFillColor(0>D?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f),
-a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",c);var Fa=Math.tan(mxUtils.toRadians(30)),sa=(.5-Fa)/2;mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
-e/Fa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*sa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-sa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Fa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-sa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-sa)*b),a.lineTo(.5*b,(1-sa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*sa),
+a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};c.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",c);var Ga=Math.tan(mxUtils.toRadians(30)),sa=(.5-Ga)/2;mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
+e/Ga);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*sa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-sa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ga));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-sa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-sa)*b),a.lineTo(.5*b,(1-sa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*sa),
a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-sa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",b);mxUtils.extend(f,mxCylinder);f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,
2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};f.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",f);mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.darkOpacity=0;e.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),
@@ -3247,19 +3246,19 @@ Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c
mxCellRenderer.registerShape("folder",g);mxUtils.extend(k,mxActor);k.prototype.size=30;k.prototype.isRoundable=function(){return!0};k.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",
k);mxUtils.extend(l,mxActor);l.prototype.size=.4;l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};l.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",
this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",l);mxUtils.extend(n,mxActor);n.prototype.size=.3;n.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
-a.height):null};n.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",n);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,
-Math.min(1,e)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
+a.height):null};n.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",n);var Ma=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,
+Math.min(1,e)):Ma.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.isRoundable=function(){return!0};p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",p);mxUtils.extend(u,mxActor);u.prototype.size=.5;u.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,
e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",u);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);v.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,
arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};v.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};v.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};v.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};
v.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};v.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),D=this.defaultVariation;5>g&&(g=5,D/=3);for(var h=c(a-this.lastX)*
d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*D;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};v.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
-this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Ma=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ma.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Na=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Na.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new v(a,mxUtils.getValue(this.style,"jiggle",
-this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Oa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Oa.apply(this,arguments)};
-var Pa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=v)Pa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,
+this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Na=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Na.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Oa=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Oa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new v(a,mxUtils.getValue(this.style,"jiggle",
+this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Pa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Pa.apply(this,arguments)};
+var Qa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=v)Qa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,
mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+
-d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Qa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Qa.apply(this,arguments)};mxUtils.extend(q,mxRectangleShape);q.prototype.size=.1;q.prototype.isHtmlAllowed=function(){return!1};q.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ra=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ra.apply(this,arguments)};mxUtils.extend(q,mxRectangleShape);q.prototype.size=.1;q.prototype.isHtmlAllowed=function(){return!1};q.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};q.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",q);mxUtils.extend(w,mxRectangleShape);w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);
a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",w);mxUtils.extend(r,mxHexagon);r.prototype.size=30;r.prototype.position=.5;r.prototype.position2=.5;r.prototype.base=20;r.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};r.prototype.isRoundable=function(){return!0};r.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
@@ -3267,19 +3266,19 @@ mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(
e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",r);mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",y);mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,
Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",x);mxUtils.extend(B,mxRectangleShape);B.prototype.isHtmlAllowed=function(){return!1};
-B.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",B);var Ia=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*
-this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ia.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ia.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==
+B.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",B);var Ja=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*
+this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ja.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ja.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};z.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);
var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],D=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,Ea=this.style["symbol"+f+"VSpacing"]||m,Y=this.style["symbol"+f+"ArcSpacing"];null!=Y&&(Y*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=Y,Ea+=Y);var Y=b,n=c,Y=h==mxConstants.ALIGN_CENTER?Y+(d-k)/2:h==mxConstants.ALIGN_RIGHT?Y+
(d-k-m):Y+m,n=D==mxConstants.ALIGN_MIDDLE?n+(e-l)/2:D==mxConstants.ALIGN_BOTTOM?n+(e-l-Ea):n+Ea;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,Y,n,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",z);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),
a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
-6,0,0,0)};E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
-J);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
+6,0,0,0)};E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+I);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(M,mxShape);M.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};M.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
+e/8,d,7*e/8);a.fillAndStroke()};M.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",M);mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};F.prototype.paintForeground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",K);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;
+function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.registerShape("umlLifeline",F);mxUtils.extend(J,mxShape);J.prototype.width=60;J.prototype.height=30;J.prototype.corner=10;J.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};J.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),k=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);k!=mxConstants.NONE&&(a.setFillColor(k),a.rect(b,c,d,e),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",J);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;
null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),
a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",r.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;
@@ -3293,9 +3292,9 @@ e),new mxPoint(g+k,h),new mxPoint(g+k,h+D-e),new mxPoint(l,h+D),new mxPoint(g,h+
a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(D,f)):D*Math.max(0,Math.min(1,f)),h=[new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+D-e),new mxPoint(l,h+D),new mxPoint(g,h+D-e),new mxPoint(g,h+e),new mxPoint(l,h)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k-e,h),
new mxPoint(g+k,a),new mxPoint(g+k-e,h+D),new mxPoint(g+e,h+D),new mxPoint(g,a),new mxPoint(g+e,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(U,mxShape);U.prototype.size=10;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();
a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",U);mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.inset=2;T.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+
-f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(O,mxShape);O.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",O);mxUtils.extend(M,mxShape);M.prototype.inset=2;M.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,
-c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",M);mxUtils.extend(L,mxCylinder);L.prototype.jettyWidth=20;L.prototype.jettyHeight=10;L.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,
-e-b),k=Math.min(h+2*b,e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",L);mxUtils.extend(Q,mxCylinder);Q.prototype.jettyWidth=32;Q.prototype.jettyHeight=12;Q.prototype.redrawPath=function(a,
+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",T);mxUtils.extend(N,mxShape);N.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",N);mxUtils.extend(L,mxShape);L.prototype.inset=2;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,
+c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",L);mxUtils.extend(K,mxCylinder);K.prototype.jettyWidth=20;K.prototype.jettyHeight=10;K.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,
+e-b),k=Math.min(h+2*b,e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",K);mxUtils.extend(Q,mxCylinder);Q.prototype.jettyWidth=32;Q.prototype.jettyHeight=12;Q.prototype.redrawPath=function(a,
b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),
a.close());a.end()};mxCellRenderer.registerShape("component",Q);mxUtils.extend(la,mxRectangleShape);la.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",
la);mxUtils.extend(ga,mxDoubleEllipse);ga.prototype.outerStroke=!0;ga.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",ga);mxUtils.extend(ma,ga);ma.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ma);mxUtils.extend(ca,mxArrowConnector);ca.prototype.defaultWidth=4;ca.prototype.isOpenEnded=
@@ -3312,7 +3311,7 @@ e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],th
mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ka);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",fa);mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(a,b,c,d,e){b=
Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ba);mxUtils.extend(S,mxActor);S.prototype.size=.375;S.prototype.isRoundable=function(){return!0};S.prototype.redrawPath=function(a,b,
c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",S);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
-a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",G);mxUtils.extend(I,mxEllipse);I.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",I);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=
+a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",G);mxUtils.extend(O,mxEllipse);O.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",O);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=
function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ha);mxUtils.extend(ia,mxRhombus);ia.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+
d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ia);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",W);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,
c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",qa);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);if(null!=this.style){var f=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||
@@ -3323,17 +3322,17 @@ a.end()};mxCellRenderer.registerShape("cross",ta);mxUtils.extend(ua,mxActor);ua.
ra.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ra.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ra.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",ra);"undefined"!==typeof StyleFormatPanel&&function(){var a=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("box",
function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1),D=d.x+m/2,p=d.y+n/2;d.x-=m;d.y-=n;return function(){a.begin();a.moveTo(D-m/2-n/2,p-n/2+m/2);a.lineTo(D-m/2+n/2,p-n/2-m/2);a.lineTo(D+n/2-3*m/2,p-3*n/2-m/2);a.lineTo(D-n/2-3*m/2,p-3*n/2+m/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-
-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ha);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ha.apply(this,arguments),D=e*(g+2*k),p=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*D+e*k,m.y-2*p+f*k);a.moveTo(m.x-D-p+f*k,m.y-p+D-e*k);a.lineTo(m.x+p-D-f*k,m.y-p-D+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+
+n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ia);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ia.apply(this,arguments),D=e*(g+2*k),p=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*D+e*k,m.y-2*p+f*k);a.moveTo(m.x-D-p+f*k,m.y-p+D-e*k);a.lineTo(m.x+p-D-f*k,m.y-p-D+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+
k+1),D=d.clone();d.x-=m;d.y-=n;return function(){a.begin();a.moveTo(D.x-n,D.y+m);a.quadTo(d.x-n,d.y+m,d.x,d.y);a.quadTo(d.x+n,d.y-m,D.x+n,D.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
-function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ka=function(a,b,c){return xa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
+function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var La=function(a,b,c){return xa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
Math.round(2*b)/a.view.scale-c})},xa=function(a,b,c,d,e){return P(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,n=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
n,h/n,m/n,l,g,d,f)})},pa=function(a){return function(b){return[P(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
-Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ga=function(a,b,c){return function(d){var e=[P(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)},!1)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(oa(d));return e}},Aa=function(a,b,c,d,e){c=null!=
+Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ha=function(a,b,c){return function(d){var e=[P(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)},!1)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(oa(d));return e}},Aa=function(a,b,c,d,e){c=null!=
c?c:1;return function(f){var g=[P(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){a=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));this.state.style.size=a},!1,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&
-g.push(oa(f));return g}},Ja=function(a){return function(b){var c=[P(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(oa(b));return c}},wa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
+g.push(oa(f));return g}},Ka=function(a){return function(b){var c=[P(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},!1,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(oa(b));return c}},wa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,
!1)&&b.push(oa(a));return b}},oa=function(a,b){return P(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},P=function(a,b,c,d,e,f,g){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(a){for(var c=
-0;c<b.length;c++)this.copyStyle(b[c]);g&&g(a)};h.getPosition=c;h.setPosition=d;h.ignoreGrid=null!=e?e:!0;if(f){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Ba={link:function(a){return[Ka(a,!0,10),Ka(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(xa(a,["width",mxConstants.STYLE_STARTSIZE,
+0;c<b.length;c++)this.copyStyle(b[c]);g&&g(a)};h.getPosition=c;h.setPosition=d;h.ignoreGrid=null!=e?e:!0;if(f){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},Ba={link:function(a){return[La(a,!0,10),La(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(xa(a,["width",mxConstants.STYLE_STARTSIZE,
mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(xa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
@@ -3345,8 +3344,8 @@ Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x
parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(oa(a,c/2))}b.push(P(a,[mxConstants.STYLE_STARTSIZE],
function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,
Math.min(b.width,c.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var c=b.getSwimlaneDirection(a.style),d=b.model.getParent(a.cell),d=b.model.getChildCells(d,!0),e=[],f=0;f<d.length;f++)d[f]!=a.cell&&b.isSwimlane(d[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(d[f]))==c&&e.push(d[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],e)}}));return b},label:wa(),ext:wa(),rectangle:wa(),
-triangle:wa(),rhombus:wa(),umlLifeline:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),
-c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[P(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",q.prototype.size))));
+triangle:wa(),rhombus:wa(),umlLifeline:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[P(a,["width","height"],function(a){var b=Math.max(J.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",J.prototype.width))),
+c=Math.max(1.5*J.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",J.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(J.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*J.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[P(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",q.prototype.size))));
return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(oa(a));return b},cross:function(a){return[P(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ta.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=
Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[P(a,["size"],
function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(oa(a));return b},dataStorage:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.x+
@@ -3354,18 +3353,18 @@ function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style
"base",r.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),P(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",r.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100},!1),P(a,["base"],function(a){var b=
Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",r.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",r.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",r.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",r.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
b.x-a.x-c*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(oa(a));return b},internalStorage:function(a){var b=[P(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
-Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(oa(a));return b},module:function(a){return[P(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",L.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",L.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,
+Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(oa(a));return b},module:function(a){return[P(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",K.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",K.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,
Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[P(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Z.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Z.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
Math.min(a.height,b.y-a.y)))},!1)]},tee:function(a){return[P(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:pa(1),
doubleArrow:pa(.5),folder:function(a){return[P(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,
"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},document:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},
!1)]},tape:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},offPageConnector:function(a){return[P(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*
-a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Aa(y.prototype.size,!0,null,!0,y.prototype.fixedSize),hexagon:Aa(x.prototype.size,!0,.5,!0,x.prototype.fixedSize),curlyBracket:Aa(u.prototype.size,!1),display:Aa(ua.prototype.size,!1),cube:Ga(1,c.prototype.size,!1),card:Ga(.5,k.prototype.size,!0),loopLimit:Ga(.5,ba.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=P;Graph.handleFactory=Ba;var Ra=mxVertexHandler.prototype.createCustomHandles;
-mxVertexHandler.prototype.createCustomHandles=function(){var a=Ra.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(b=mxConstants.SHAPE_SWIMLANE);b=Ba[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Ba[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=
+a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Aa(y.prototype.size,!0,null,!0,y.prototype.fixedSize),hexagon:Aa(x.prototype.size,!0,.5,!0,x.prototype.fixedSize),curlyBracket:Aa(u.prototype.size,!1),display:Aa(ua.prototype.size,!1),cube:Ha(1,c.prototype.size,!1),card:Ha(.5,k.prototype.size,!0),loopLimit:Ha(.5,ba.prototype.size,!0),trapezoid:Ka(.5),parallelogram:Ka(1)};Graph.createHandle=P;Graph.handleFactory=Ba;var Sa=mxVertexHandler.prototype.createCustomHandles;
+mxVertexHandler.prototype.createCustomHandles=function(){var a=Sa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(b=mxConstants.SHAPE_SWIMLANE);b=Ba[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Ba[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=
null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ba[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ca=new mxPoint(1,0),Da=new mxPoint(1,0),pa=mxUtils.toRadians(-30),Ca=mxUtils.getRotatedPoint(Ca,Math.cos(pa),Math.sin(pa)),pa=mxUtils.toRadians(-150),Da=mxUtils.getRotatedPoint(Da,
Math.cos(pa),Math.sin(pa));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Ca.x,l=Ca.y,m=Da.x,n=Da.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=t.x;var d=b-t.y;b=(n*a-
-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(t=new mxPoint(t.x+k*b,t.y+l*b),e.push(t)),t=new mxPoint(t.x+m*a,t.y+n*a)):(c&&(t=new mxPoint(t.x+m*a,t.y+n*a),e.push(t)),t=new mxPoint(t.x+k*b,t.y+l*b));e.push(t)};var t=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Sa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
-new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Sa.apply(this,arguments)};d.prototype.constraints=[];b.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(t=new mxPoint(t.x+k*b,t.y+l*b),e.push(t)),t=new mxPoint(t.x+m*a,t.y+n*a)):(c&&(t=new mxPoint(t.x+m*a,t.y+n*a),e.push(t)),t=new mxPoint(t.x+k*b,t.y+l*b));e.push(t)};var t=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ta=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
+new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ta.apply(this,arguments)};d.prototype.constraints=[];b.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};r.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
@@ -3380,9 +3379,9 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};X.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxEllipse.prototype.constraints;I.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};X.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.constraints=mxEllipse.prototype.constraints;O.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.constraints=
mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};L.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",L.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",L.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};K.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",K.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",K.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),
!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};ba.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=
mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
@@ -3410,7 +3409,7 @@ mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxC
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};F.prototype.constraints=
null;ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
-.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){b.escape();a=b.deleteCells(b.getDeletableCells(b.getSelectionCells()),a);null!=a&&b.setSelectionCells(a)}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey=
"import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(n){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+n.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+
"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=f;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,
@@ -9295,49 +9294,50 @@ g.appendChild(l);f.appendChild(g);x.appendChild(f);for(var u=[],A=0,f=0;f<c.leng
!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var d=["search"],b=0;b<u.length;b++){var c=u[b].apply(this,arguments);null!=c&&d.push(c)}a.sidebar.showEntries(0<d.length?
d.join(";"):"",v.checked);a.hideDialog()});g.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(g)):(c.appendChild(g),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a,e,c){function b(){if(0==l.length)f.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{f.innerHTML="";for(var d=0;d<l.length;d++){var e=document.createElement("span");e.style.whiteSpace=
"nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";e.appendChild(g);mxUtils.write(e,l[d]);f.appendChild(e);mxUtils.br(f);mxEvent.addListener(g,"click",function(d){return function(){a.confirm(mxResources.get("delete")+' "'+l[d]+'"?',function(){null!=c&&c(l[d]);l.splice(d,1);b()})}}(d))}}}var k=document.createElement("div"),f=document.createElement("div");
-f.style.height="120px";f.style.overflow="auto";var l=mxSettings.getPlugins().slice();k.appendChild(f);b();var d=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(a){a&&0>mxUtils.indexOf(l,a)&&l.push(a);b()})}:function(){var d="",c=urlParams.p;if(null!=c&&0<c.length){for(var e=c.split(";"),c=0;c<e.length;c++){var g=App.pluginRegistry[e[c]];null!=g&&(d+=g+";")}";"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1))}d=new FilenameDialog(a,d,mxResources.get("add"),function(a){if(null!=
-a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++){var d=e[a],c=App.pluginRegistry[d];null!=c&&(d=c);0<d.length&&0>mxUtils.indexOf(l,d)&&l.push(d)}b()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(l);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});
-m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(g),n.appendChild(d),n.appendChild(m)):(n.appendChild(d),n.appendChild(m),n.appendChild(g));k.appendChild(n);this.container=
-k},CropImageDialog=function(a,e,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:e})}var k=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height="300px";k.appendChild(f);var l=null;this.init=function(){b()};
-var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,t,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");t=document.createElement("i");m.appendChild(p);
-n.appendChild(t);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){l.result({type:"base64",
-size:"original"}).then(function(d){c(d);a.hideDialog()})});g.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(d),m.appendChild(g)):(m.appendChild(g),m.appendChild(d));k.appendChild(m);this.container=k},EditGeometryDialog=function(a,e){var c=a.editor.graph,b=1==e.length?c.getCellGeometry(e[0]):null,k=document.createElement("div"),f=document.createElement("table"),l=document.createElement("tbody"),d=
-document.createElement("tr"),g=document.createElement("td"),m=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};m.appendChild(n);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");
-mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.y:"";m.appendChild(t);d.appendChild(g);
-d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(u);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";m.appendChild(v);d.appendChild(g);d.appendChild(m);
-l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";m.appendChild(x);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=
-b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(t.value).length&&(b.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),
-c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,
-e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var I=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:
-mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};u.style.backgroundImage="";q.style.display="none";var G=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}G>K?(K=Math.round(100*K/G),G=100):(G=Math.round(100*G/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";
-y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=G+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-G)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var D=document.createElement("img");D.setAttribute("src",Editor.closeImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(a){mxEvent.consume(a)});(function(a,d,b){mxEvent.addListener(D,"click",function(c){v[d]=
-null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom=
-"-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});I();y.appendChild(J);mxEvent.addListener(J,"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&
-mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,I())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace=
-"";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;I()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=p&&(D.style.visibility="hidden",J.style.visibility=
-"hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);D.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==D.style.visibility&&(D.style.visibility="",J.style.visibility="");x=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,"transform",null)})}else B||
-(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var H=G.documentElement.getElementsByTagName("diagram"),F=0;F<H.length;F++){var K=mxUtils.getTextContent(H[F]),
-O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<u.children.length?(n.splice(y>x?y-1:y,0,n.splice(x,1)[0]),
-u.insertBefore(u.children[x],u.children[y])):(n.push(n.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,0,a.width,a.height);u.scrollTop=
-u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||t.setAttribute("disabled",
-"true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};p.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==
-n.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},x=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};mxEvent.addListener(u,
-"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var z=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==u||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,p,k,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name))?
-a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(d(c,e,
-g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",g);mxEvent.addListener(u,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&
-b.appendChild(e);"draw.io"!=a.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(d){a.spinner.stop();if(null!=d){var b=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),b=b+((0==b.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(d));d=new EmbedDialog(a,window.location.protocol+"//"+window.location.host+
-"/"+b,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(d.container,440,240,!0);d.init()}else k.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){a.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));p=mxUtils.button(mxResources.get("export"),
-function(){var d=a.createLibraryDataFromImages(n),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");
-D.setAttribute("type","file");mxEvent.addListener(D,"change",function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,p){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,p),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";b.appendChild(p)}p=
-mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,e)};p=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(t.value,n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan",
-"2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=b-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};l.appendChild(m);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top=
-"6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var t="";null!=c.shape&&null!=c.shape.stencil&&(t=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,t||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,20/k-c.y);f.appendChild(l);
-g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),k.className="geBtn",l.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&l.appendChild(k);
-var u=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=t){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,
+f.style.height="120px";f.style.overflow="auto";var l=mxSettings.getPlugins().slice();k.appendChild(f);b();var d=mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(a){a&&0>mxUtils.indexOf(l,a)&&l.push(a);b()})}:function(){var d=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("builtinPlugins")+": ");d.appendChild(c);var e=document.createElement("select");e.style.width="150px";for(c=0;c<App.publicPlugin.length;c++){var g=
+document.createElement("option");mxUtils.write(g,App.publicPlugin[c]);g.value=App.publicPlugin[c];e.appendChild(g)}d.appendChild(e);mxUtils.br(d);mxUtils.br(d);c=mxUtils.button(mxResources.get("custom")+"...",function(){var d=new FilenameDialog(a,"",mxResources.get("add"),function(d){a.hideDialog();if(null!=d&&0<d.length){d=d.split(";");for(var c=0;c<d.length;c++){var e=d[c],g=App.pluginRegistry[e];null!=g&&(e=g);0<e.length&&0>mxUtils.indexOf(l,e)&&l.push(e)}b()}},mxResources.get("enterValue")+" ("+
+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});c.className="geBtn";d=new CustomDialog(a,d,mxUtils.bind(this,function(){var a=App.pluginRegistry[e.value];0>mxUtils.indexOf(l,a)&&(l.push(a),b())}),null,null,null,c);a.showDialog(d.container,300,80,!0,!0)});d.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(l);mxSettings.save();a.hideDialog();
+a.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";var n=document.createElement("div");n.style.marginTop="14px";n.style.textAlign="right";var p=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});p.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(p.style.display="none");n.appendChild(p);a.editor.cancelFirst?(n.appendChild(g),n.appendChild(d),n.appendChild(m)):(n.appendChild(d),n.appendChild(m),
+n.appendChild(g));k.appendChild(n);this.container=k},CropImageDialog=function(a,e,c){function b(a){null!=l&&l.destroy();l=a?new Croppie(f,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(f,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});l.bind({url:e})}var k=document.createElement("div"),f=document.createElement("div");f.style.width="300px";f.style.height=
+"300px";k.appendChild(f);var l=null;this.init=function(){b()};var d=document.createElement("input");d.setAttribute("type","checkbox");d.setAttribute("id","croppieCircle");d.style.margin="5px";k.appendChild(d);var g=document.createElement("label");g.setAttribute("for","croppieCircle");mxUtils.write(g,mxResources.get("circle"));k.appendChild(g);var m,n,p,t,g=document.createElement("div");m=document.createElement("button");n=document.createElement("button");g.appendChild(m);g.appendChild(n);p=document.createElement("i");
+t=document.createElement("i");m.appendChild(p);n.appendChild(t);g.className="cr-rotate-controls";g.style["float"]="right";g.style.position="inherit";m.className="cr-rotate-l";n.className="cr-rotate-r";k.appendChild(g);m.addEventListener("click",function(){l.rotate(-90)});n.addEventListener("click",function(){l.rotate(90)});mxEvent.addListener(d,"change",function(){b(this.checked)});d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";g=mxUtils.button(mxResources.get("apply"),
+function(){l.result({type:"base64",size:"original"}).then(function(d){c(d);a.hideDialog()})});g.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";a.editor.cancelFirst?(m.appendChild(d),m.appendChild(g)):(m.appendChild(g),m.appendChild(d));k.appendChild(m);this.container=k},EditGeometryDialog=function(a,e){var c=a.editor.graph,b=1==e.length?c.getCellGeometry(e[0]):null,k=document.createElement("div"),f=document.createElement("table"),
+l=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),m=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var n=document.createElement("input");n.setAttribute("type","checkbox");null!=b&&b.relative&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);this.init=function(){n.focus()};m.appendChild(n);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
+m=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.x:"";m.appendChild(p);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.y:
+"";m.appendChild(t);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";m.appendChild(u);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");
+mxUtils.write(g,mxResources.get("dy")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.y:"";m.appendChild(q);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";
+m.appendChild(v);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";m.appendChild(x);d.appendChild(g);d.appendChild(m);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");m=document.createElement("td");mxUtils.write(g,
+mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=1==e.length?mxUtils.getValue(c.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(y);d.appendChild(g);d.appendChild(m);l.appendChild(d);f.appendChild(l);k.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();
+try{for(var d=0;d<e.length;d++){var b=c.getCellGeometry(e[d]);null!=b&&(b=b.clone(),c.isCellMovable(e[d])&&(b.relative=n.checked,0<mxUtils.trim(p.value).length&&(b.x=Number(p.value)),0<mxUtils.trim(t.value).length&&(b.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.x=Number(u.value)),0<mxUtils.trim(q.value).length&&(null==b.offset&&(b.offset=new mxPoint),b.offset.y=Number(q.value))),c.isCellResizable(e[d])&&(0<mxUtils.trim(v.value).length&&(b.width=
+Number(v.value)),0<mxUtils.trim(x.value).length&&(b.height=Number(x.value))),c.getModel().setGeometry(e[d],b));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[e[d]])}}finally{c.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&A.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(A)):(f.appendChild(A),
+f.appendChild(b));k.appendChild(f);this.container=k},LibraryDialog=function(a,e,c,b,k,f){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var d=null;if(null!=a)for(var b=u.firstChild,d=0;null!=b&&b!=a;)b=b.nextSibling,d++;return d}function d(b,c,e,g,m,f,p,k,t){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==v[b]){var I=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow=
+"ellipsis";mxUtils.write(J,null!=E.title&&0<E.title.length?E.title:mxResources.get("untitled"));J.style.color=null==E.title||0==E.title.length?"#d0d0d0":""};u.style.backgroundImage="";q.style.display="none";var G=m,K=f;if(m>a.maxImageSize||f>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,m)),a.maxImageSize/Math.max(1,f));m*=C;f*=C}G>K?(K=Math.round(100*K/G),G=100):(G=Math.round(100*G/K),K=100);var y=document.createElement("div");y.setAttribute("draggable","true");y.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="relative";y.style.cursor="move";mxUtils.setPrefixedStyle(y.style,"transition","transform .1s ease-in-out");if(null!=b){var L=document.createElement("img");L.setAttribute("src",z.convert(b));L.style.width=G+"px";L.style.height=K+"px";L.style.margin="10px";L.style.paddingBottom=Math.floor((100-K)/2)+"px";L.style.paddingLeft=Math.floor((100-G)/2)+"px";y.appendChild(L)}else if(null!=p){var O=a.stringToCells(Graph.decompress(p.xml));0<O.length&&
+(a.sidebar.createThumb(O,100,100,y,null,!0,!1),y.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",y.firstChild.style.cursor="")}var D=document.createElement("img");D.setAttribute("src",Editor.closeImage);D.setAttribute("border","0");D.setAttribute("title",mxResources.get("delete"));D.setAttribute("align","top");D.style.paddingTop="4px";D.style.position="absolute";D.style.marginLeft="-12px";D.style.zIndex="1";D.style.cursor="pointer";mxEvent.addListener(D,"dragstart",function(a){mxEvent.consume(a)});
+(function(a,d,b){mxEvent.addListener(D,"click",function(c){v[d]=null;for(var e=0;e<n.length;e++)if(null!=n[e].data&&n[e].data==d||null!=n[e].xml&&null!=b&&n[e].xml==b.xml){n.splice(e,1);break}y.parentNode.removeChild(a);0==n.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(c)});mxEvent.addListener(D,"dblclick",function(a){mxEvent.consume(a)})})(y,b,p);y.appendChild(D);y.style.marginBottom="30px";var J=document.createElement("div");J.style.position=
+"absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var E=null;null!=b?(E={data:b,w:m,h:f,title:t},null!=k&&(E.aspect=k),v[b]=L,n.push(E)):null!=p&&(p.aspect="fixed",n.push(p),E=p);mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=A&&(A(),A=null,mxEvent.consume(a))});I();y.appendChild(J);mxEvent.addListener(J,"mousedown",
+function(a){"true"!=J.getAttribute("contentEditable")&&mxEvent.consume(a)});O=function(d){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,E.title||"",mxResources.get("ok"),function(a){null!=a&&(E.title=a,I())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();mxEvent.consume(d)}else if("true"!=J.getAttribute("contentEditable")){null!=A&&(A(),A=null);if(null==E.title||0==E.title.length)J.innerHTML=
+"";J.style.textOverflow="";J.style.whiteSpace="";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(J.style,"user-select","text");J.focus();document.execCommand("selectAll",!1,null);A=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";E.title=J.innerHTML;I()};mxEvent.consume(d)}};mxEvent.addListener(J,"click",O);mxEvent.addListener(y,"dblclick",O);u.appendChild(y);mxEvent.addListener(y,"dragstart",function(a){null==b&&null!=
+p&&(D.style.visibility="hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=l(a);mxClient.IS_GC&&(y.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(y.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(y,30);D.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(y,"dragend",function(a){"hidden"==D.style.visibility&&(D.style.visibility="",J.style.visibility="");x=null;mxUtils.setOpacity(y,100);mxUtils.setPrefixedStyle(y.style,
+"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){K=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=K&&0<K.length)for(var F=0;F<K.length;F++)null!=K[F].xml?d(null,null,0,0,0,0,K[F]):d(K[F].data,null,0,0,K[F].w,K[F].h,null,"fixed",K[F].title);m=!0}else if("mxfile"==G.documentElement.nodeName){for(var H=G.documentElement.getElementsByTagName("diagram"),F=0;F<H.length;F++){var K=
+mxUtils.getTextContent(H[F]),O=a.stringToCells(Graph.decompress(K)),M=a.editor.graph.getBoundingBoxFromGeometry(O);d(null,null,0,0,0,0,{xml:K,w:M.width,h:M.height})}m=!0}}catch(ga){}m||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ga){}return null}function g(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function m(b){b.stopPropagation();b.preventDefault();B=!1;y=l(b);if(null!=x)null!=y&&y<u.children.length?(n.splice(y>
+x?y-1:y,0,n.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(n.push(n.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,C(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){d(c,null,0,
+0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var n=[];c=document.createElement("div");c.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";c.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==k||k.isRenamable()||
+t.setAttribute("disabled","true");this.init=function(){if(null==k||k.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};p.appendChild(t);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat=
+"no-repeat";0==n.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var q=document.createElement("div");q.style.position="absolute";q.style.width="640px";q.style.top="260px";q.style.textAlign="center";q.style.fontSize="22px";q.style.color="#a0c3ff";mxUtils.write(q,mxResources.get("dragImagesHere"));c.appendChild(q);var v={},x=null,y=null,A=null;e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=A&&(A(),A=null,mxEvent.consume(a))};
+mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var z=new mxUrlConverter,B=!1;if(null!=b)for(e=0;e<b.length;e++)p=b[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(u,"dragleave",function(a){q.style.cursor="";for(var d=mxEvent.getSource(a);null!=d;){if(d==u||d==q){a.stopPropagation();a.preventDefault();break}d=d.parentNode}});var C=function(b){return function(c,e,g,m,f,n,p,k,l){null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l.name)||
+/(\.vs(x|sx?))($|\?)/i.test(l.name))?a.importVisio(l,mxUtils.bind(this,function(a){d(a,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=l&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,l.name)?a.parseFile(l,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(d(c.responseText,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=
+u.scrollHeight))})):(d(c,e,g,m,f,n,p,"fixed",mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",g);mxEvent.addListener(u,"drop",m);mxEvent.addListener(q,"dragover",g);mxEvent.addListener(q,"drop",m);c.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className=
+"geBtn";a.editor.cancelFirst&&b.appendChild(e);"draw.io"!=a.getServiceName()||null==k||k.constructor!=DriveLibrary&&k.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){a.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(d){a.spinner.stop();if(null!=d){var b=a.getSearch("create title mode url drive splash state clibs ui".split(" ")),b=b+((0==b.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(d));d=new EmbedDialog(a,window.location.protocol+
+"//"+window.location.host+"/"+b,null,null,null,null,"Check out the library I made using @drawio");a.showDialog(d.container,440,240,!0);d.init()}else k.constructor==DriveLibrary?a.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){a.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):a.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",b.appendChild(p));
+p=mxUtils.button(mxResources.get("export"),function(){var d=a.createLibraryDataFromImages(n),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(d,b,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(d))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";b.appendChild(p);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");
+D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change",function(d){B=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,b,c,e,g,m,f,n,p){null!=D.files&&(C(d)(a,b,c,e,g,m,f,n,p),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}p=mxUtils.button(mxResources.get("import"),function(){null!=A&&(A(),A=null);a.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");
+p.className="geBtn";b.appendChild(p)}p=mxUtils.button(mxResources.get("addImages"),function(){null!=A&&(A(),A=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){B=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var e=a.indexOf(",");0<e&&(a=a.substring(0,e)+";base64,"+a.substring(e+1))}d(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";b.appendChild(p);this.saveBtnClickHandler=function(d,b,c,e){a.saveLibrary(d,b,c,
+e)};p=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=A&&(A(),A=null);this.saveBtnClickHandler(t.value,n,k,f)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";b.appendChild(p);a.editor.cancelFirst||b.appendChild(e);c.appendChild(b);this.container=c},EditShapeDialog=function(a,e,c,b,k){b=null!=b?b:300;k=null!=k?k:120;var f,l,d=document.createElement("table"),g=document.createElement("tbody");d.style.cellPadding="4px";f=document.createElement("tr");l=document.createElement("td");
+l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,c);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=b-200+"px";m.style.height=k+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};l.appendChild(m);f.appendChild(l);l=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border=
+"1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=k+4+"px";c.style.overflow="hidden";c.style.marginBottom="16px";mxEvent.disableContextMenu(c);l.appendChild(c);var n=new Graph(c);n.setEnabled(!1);var p=a.editor.graph.cloneCell(e);n.addCells([p]);c=n.view.getState(p);var t="";null!=c.shape&&null!=c.shape.stencil&&(t=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(m,t||"");c=n.getGraphBounds();k=Math.min(160/c.width,(k-40)/c.height);n.view.scaleAndTranslate(k,20/k-c.x,
+20/k-c.y);f.appendChild(l);g.appendChild(f);f=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),k.className="geBtn",l.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&
+l.appendChild(k);var u=function(d,b,c){var e=m.value,g=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(g.documentElement),g=g.documentElement.getElementsByTagName("parsererror");if(null!=g&&0<g.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),g=!d.model.contains(b),!c||g||e!=t){e=Graph.compress(e);d.getModel().beginUpdate();try{if(g){var f=a.editor.graph.getFreeInsertPoint();b.geometry.x=f.x;b.geometry.y=f.y;d.addCell(b)}d.setCellStyles(mxConstants.STYLE_SHAPE,
"stencil("+e+")",[b])}catch(B){throw B;}finally{d.getModel().endUpdate()}g&&(d.setSelectionCell(b),d.scrollCellToVisible(b))}};c=mxUtils.button(mxResources.get("preview"),function(){u(n,p,!1)});c.className="geBtn";l.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,e,!0)});c.className="geBtn gePrimaryBtn";l.appendChild(c);a.editor.cancelFirst||l.appendChild(k);f.appendChild(l);g.appendChild(f);d.appendChild(g);this.container=d},CustomDialog=function(a,e,c,b,k,f,
l,d,g){var m=document.createElement("div");m.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=l&&e.appendChild(l);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",e.appendChild(l));g=mxUtils.button(g||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});g.className="geBtn";d&&(g.style.display="none");a.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(k||mxResources.get("ok"),
function(){a.hideDialog();null!=c&&c()});e.appendChild(k);k.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(g);m.appendChild(e);this.cancelBtn=g;this.okButton=k;this.container=m},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
@@ -9622,7 +9622,7 @@ p.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.ge
g.appendChild(m);this.container=g};var E=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=
this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(E.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),
H=new Image;H.onload=function(){try{F.getContext("2d").drawImage(H,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(K){}};H.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(I){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.4.8";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="13.4.9";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;
EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},
gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,f,k,l){k=null!=k?k:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&
@@ -9699,13 +9699,13 @@ null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibr
l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var A=null;if(".scratchpad"!=a.title||this.closableScratchpad)n.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var d=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=A?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d();mxEvent.consume(b)}}));if(a.isEditable()){var z=this.editor.graph,B=null,
C=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),m,b,a,a.getMode());mxEvent.consume(d)}),D=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=l.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",n.insertBefore(B,n.firstChild),k.style.paddingRight=18*n.childNodes.length+"px",this.saveLibrary(a.getTitle(),
b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*n.childNodes.length+"px")})):null==A&&(A=l.cloneNode(!1),A.setAttribute("src",IMAGE_PATH+"/download.png"),A.setAttribute("title",mxResources.get("save")),n.insertBefore(A,n.firstChild),mxEvent.addListener(A,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==A||a.isModified()||(k.style.paddingRight=18*n.childNodes.length+
-"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var n=z.getCellGeometry(a[f]);null!=n&&n.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
+"px",A.parentNode.removeChild(A),A=null)});mxEvent.consume(d)})),k.style.paddingRight=18*n.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,d,c,e){a=z.cloneCells(mxUtils.sortCells(z.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var k=z.getCellGeometry(a[f]);null!=k&&k.translate(-d.x,-d.y)}m.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
(a.title=e);b.push(a);D(c);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),F=mxUtils.bind(this,function(a){if(z.isSelectionEmpty())z.getRubberband().isActive()?(z.getRubberband().execute(a),z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=z.getSelectionCells(),d=z.view.getBounds(b),c=z.view.scale;d.x/=c;d.y/=c;d.width/=c;d.height/=c;d.x-=z.view.translate.x;d.y-=z.view.translate.y;
E(b,d)}mxEvent.consume(a)});mxEvent.addGestureListeners(m,function(){},mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler.first&&(z.graphHandler.suspend(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="hidden"),m.style.backgroundColor="#f1f3f4",m.style.cursor="copy",z.panningManager.stop(),z.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.panningManager&&null!=z.graphHandler&&(m.style.backgroundColor=
"",m.style.cursor="default",this.sidebar.showTooltips=!0,z.panningManager.stop(),z.graphHandler.reset(),z.isMouseDown=!1,z.autoScroll=!0,F(a),mxEvent.consume(a))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(a){z.isMouseDown&&null!=z.graphHandler.first&&(z.graphHandler.resume(),null!=z.graphHandler.hint&&(z.graphHandler.hint.style.visibility="visible"),m.style.backgroundColor="",m.style.cursor="",z.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(m,"dragover",mxUtils.bind(this,
-function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,n,k,p,l,z,t){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,k,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,k,p),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var u=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var n=
-JSON.parse(mxUtils.getTextContent(e.documentElement));f(n,m);b=b.concat(n);D(a);this.spinner.stop();u=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),n=0;n<k.length;n++){var p=this.stringToCells(Editor.getDiagramNodeXml(k[n])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}u=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+function(a){m.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";m.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(a){m.style.cursor="";m.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,k,n,p,l,z,t){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,p),d)],d[0].vertex=!0,E(d,new mxRectangle(0,0,n,p),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var u=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var k=
+JSON.parse(mxUtils.getTextContent(e.documentElement));f(k,m);b=b.concat(k);D(a);this.spinner.stop();u=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var p=this.stringToCells(Editor.getDiagramNodeXml(n[k])),l=this.editor.graph.getBoundingBoxFromGeometry(p);E(p,new mxRectangle(0,0,l.width,l.height),a)}u=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=t&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(t,function(a){q(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,l)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(m,"dragleave",function(a){m.style.cursor="";m.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));n.insertBefore(l,n.firstChild);mxEvent.addListener(l,"click",C);mxEvent.addListener(m,"dblclick",function(a){mxEvent.getSource(a)==
m&&C(a)});e=l.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
@@ -9820,25 +9820,24 @@ g)}catch(F){e(F)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};f.oner
Editor.extractGraphModelFromPdf(a);if(null!=g&&0<g.length)return this.importXml(g,b,c,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(g=this.extractGraphModelFromPng(a),null!=g&&0<g.length))return this.importXml(g,b,c,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{g=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+1));var m=this.importXml(g,
b,c,k,!0);if(0<m.length)return m}catch(A){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
f=Math.round(e.width*g);e=Math.round(e.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;d.getModel().beginUpdate();try{g=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(g),d.fireEvent(new mxEventObject("textInserted","cells",[g]))}finally{d.getModel().endUpdate()}d.setSelectionCell(g)}))}else{a=
-Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,k));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;d.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=d.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&d.setLinkForCell(f,f.value);f.geometry.width+=d.gridSize;f.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
-a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
-14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
-if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
-360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,
-d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},
-function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,v,x,y){x=null!=x?x:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,e,x);null!=q&&q(b)});"image"==b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:
-this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,x),v=!0)),v||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),x&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,m)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||
-/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(v,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=v?(d=!0,this.importZipFile(v,m,mxUtils.bind(this,function(){g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||
-/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,x,y,A){e=null!=e?e:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var t=mxUtils.bind(this,function(){var m=
-this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,z=p,t=[],B=mxUtils.bind(this,function(a,b){t[a]=b;if(0==
---z){this.spinner.stop();if(null!=q)q(t);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<t.length;c++){var e=t[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),u=0;u<p;u++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,z=p.indexOf(","),t=decodeURIComponent(escape(atob(p.substring(z+1)))),
-u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],q=A?null:t.getAttribute("content");null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=unescape(window.atob?atob(q):Base64.decode(q,!0)));null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q));null==q||"<mxfile "!==q.substring(0,8)&&"<mxGraphModel "!==q.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var g=a[0],l=g.getAttribute("width"),t=
-g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),t=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),C=f(p,k.type,b+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(t*
-v)),k.name);if(isNaN(l)||isNaN(t)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);t=Math.max(1,x.height);C[0].geometry.width=l;C[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[C[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):B(d,mxUtils.bind(this,function(){return f(q,
-"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var v=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,p){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var z=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/p)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*z),Math.round(p*z),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,b,c,k))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted",
+"cells",[f]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");f.value=a;d.updateCellSize(f);if(0<this.maxTextWidth&&f.geometry.width>this.maxTextWidth){var n=d.getPreferredSizeForCell(f,this.maxTextWidth);f.geometry.width=n.width;f.geometry.height=n.height}Graph.isLink(f.value)&&d.setLinkForCell(f,f.value);f.geometry.width+=d.gridSize;f.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[f]}}return[]};
+EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=
+a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=
+d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,
+0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,g=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;g.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==
+Object.keys(e.files).length)c();else{var g=0,f,k=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>g&&(g=e,f=d))});0<g?f.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=
+a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):k||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,f,k,l,q,v,x,y){x=null!=x?x:!0;var d=!1,g=null,m=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,c,e,x);null!=q&&q(b)});"image"==
+b.substring(0,5)?(v=!1,"image/png"==b.substring(0,9)&&(b=y?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,c,e,x),v=!0)),v||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),x&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),g=[b.insertVertex(null,null,"",c,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,
+this.importGraphML(a,m)):null!=v&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?(d=!0,this.importVisio(v,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=v?v:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?m(a.responseText):null!=q&&q(null))}),l)):0==a.indexOf("PK")&&null!=v?(d=!0,this.importZipFile(v,m,mxUtils.bind(this,function(){g=
+this.insertTextAt(this.validateFileData(a),c,e,!0,null,x);q(g)}))):/(\.v(sd|dx))($|\?)/i.test(l)||/(\.vs(s|x))($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),c,e,!0,null,x));d||null==q||q(g);return g};EditorUi.prototype.importFiles=function(a,b,c,e,f,k,l,q,v,x,y,A){e=null!=e?e:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=b&&null!=c,g=!0;b=null!=b?b:0;c=null!=c?c:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=y||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==
+a[p].type.substring(0,6)&&a[p].size>n){m=!0;break}var t=mxUtils.bind(this,function(){var m=this.editor.graph,n=m.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,e,g,f,k,m,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,e,g,f,k,m,l,d,A)}catch(T){return this.handleError(T),null}});k=null!=k?k:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=
+a.length,z=p,t=[],B=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--z){this.spinner.stop();if(null!=q)q(t);else{var d=[];m.getModel().beginUpdate();try{for(var c=0;c<t.length;c++){var e=t[c]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),u=0;u<p;u++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var p=a.target.result,z=p.indexOf(","),
+t=decodeURIComponent(escape(atob(p.substring(z+1)))),u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],q=A?null:t.getAttribute("content");null!=q&&"<"!=q.charAt(0)&&"%"!=q.charAt(0)&&(q=unescape(window.atob?atob(q):Base64.decode(q,!0)));null!=q&&"%"==q.charAt(0)&&(q=decodeURIComponent(q));null==q||"<mxfile "!==q.substring(0,8)&&"<mxGraphModel "!==q.substring(0,14)?B(d,mxUtils.bind(this,function(){try{if(p.substring(0,z+1),null!=u){var a=u.getElementsByTagName("svg");
+if(0<a.length){var g=a[0],l=g.getAttribute("width"),t=g.getAttribute("height"),l=null!=l&&"%"!=l.charAt(l.length-1)?parseFloat(l):NaN,t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,B=g.getAttribute("viewBox");if(null==B||0==B.length)g.setAttribute("viewBox","0 0 "+l+" "+t);else if(isNaN(l)||isNaN(t)){var q=B.split(" ");3<q.length&&(l=parseFloat(q[2]),t=parseFloat(q[3]))}p=Editor.createSvgDataUri(mxUtils.getXml(g));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,t)),C=f(p,k.type,b+
+d*n,c+d*n,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(t*v)),k.name);if(isNaN(l)||isNaN(t)){var x=new Image;x.onload=mxUtils.bind(this,function(){l=Math.max(1,x.width);t=Math.max(1,x.height);C[0].geometry.width=l;C[0].geometry.height=t;g.setAttribute("viewBox","0 0 "+l+" "+t);p=Editor.createSvgDataUri(mxUtils.getXml(g));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));m.setCellStyles("image",p,[C[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(g))}return C}}}catch(fa){}return null})):
+B(d,mxUtils.bind(this,function(){return f(q,"text/xml",b+d*n,c+d*n,0,0,k.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{t=!1;if("image/png"==k.type){var v=A?null:this.extractGraphModelFromPng(a.target.result);if(null!=v&&0<v.length){var C=new Image;C.src=a.target.result;B(d,mxUtils.bind(this,function(){return f(v,"text/xml",b+d*n,c+d*n,C.width,C.height,k.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,l,p){B(d,mxUtils.bind(this,function(){if(null!=m&&m.length<x){var z=g&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/l,e/p)):1;return f(m,k.type,b+d*n,c+d*n,Math.round(l*z),Math.round(p*z),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),g,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else p=a.target.result,f(p,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?f(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){B(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?p.readAsDataURL(k):p.readAsText(k)}})(u)});if(m){m=[];
for(p=0;p<a.length;p++)m.push(a[p]);a=m;this.confirmImageResize(function(a){g=a;t()},v)}else t()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
@@ -9906,28 +9905,28 @@ a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?""
window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);if(null==a||0==a.length)a=this.emptyDiagramXml;this.setCurrentFile(new LocalFile(this,a,this.defaultFilename,!0));this.setFileData(a);this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();
this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
-this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
+this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(P){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
-var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){var n=m(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
-n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,t=1==g.enableSearch,q=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(T){k.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,t=1==g.enableSearch,q=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
name:d,message:g}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),
-null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var u=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var H=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=H;k.postMessage(JSON.stringify(b),"*")}),G=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(H)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);
K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=I.getGlobalVariable,I=this.createTemporaryGraph(I.getStylesheet()),J,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){J=this.updatePageRoot(this.pages[S]);break}I.getGlobalVariable=function(a){return"page"==a?J.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(J.root)}if(null!=g.layerIds){for(var W=
-I.model,aa=W.getChildCells(W.getRoot()),l={},S=0;S<g.layerIds.length;S++)l[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],l[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+I.model,aa=W.getChildCells(W.getRoot()),m={},S=0;S<g.layerIds.length;S++)m[g.layerIds[S]]=!0;for(S=0;S<aa.length;S++)W.setVisible(aa[S],m[aa[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){G(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){G(null)}),null,null,g.scale,null,null,null,I)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(H))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):G(null)}),mxUtils.bind(this,function(){G(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);u=this.createLoadMessage("export");u.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ca=this.getXmlFileData();u.xml=mxUtils.getXml(ca);
u.data=this.getFileData(null,null,!0,null,null,null,ca);u.format=g.format}else if("html"==g.format)H=this.editor.getGraphXml(),u.data=this.getHtml(H,this.editor.graph),u.xml=mxUtils.getXml(H),u.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);u.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);u.format="svg";var V=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=Editor.createSvgDataUri(a);
k.postMessage(JSON.stringify(u),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(u.xml,this.editor.graph,null,!0,V,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var U=this.editor.graph.getSvg(Y);this.embedFonts(U,mxUtils.bind(this,function(a){g.embedImages||
null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){V(mxUtils.getXml(a))})):V(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(u),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),
-this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=this.getCurrentFile();null!=Z&&(n=m(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==
-g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,
-function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
-b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=f;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(m="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
-1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
-mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=m(g),ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var Z=this.getCurrentFile();null!=Z&&(n=l(g.xml),null!=n&&""!=n&&Z.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==
+g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(T){this.handleError(T)}}var ba=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ga){this.handleError(ga)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();c&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var c=m();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
+b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;k.postMessage(JSON.stringify(l),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+
+1)),function(a){ba(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ba(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,
+mxUtils.bind(this,function(a){ba(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ba(g,f))}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(f,"*");if("json"==urlParams.proto){var l=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,d){l.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,target:b,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";var c=b;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b),c=b));"1"!=urlParams.noExitBtn&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("exit")),b.setAttribute("title",mxResources.get("exit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),a.appendChild(b),c=b);c.style.marginRight="20px";this.toolbar.container.appendChild(a);
@@ -9947,11 +9946,11 @@ this.executeLayoutList(JSON.parse(V),function(){ta();wa()});S=null}else if("circ
G;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(J.getDefaultParent(),0<ma.length?ma[0]:null)},!0,S);S=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ma.length){J.view.validate();var oa=new mxHierarchicalLayout(J,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=G;oa.parallelEdgeSpacing=K;oa.interRankCellSpacing=L;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(J.getDefaultParent(),ja);J.moveCells(ja,
aa,ca)},!0,S);S=null}else if("organic"==V||"auto"==V&&ja.length>e.length){J.view.validate();var pa=new mxFastOrganicLayout(J);pa.forceConstant=3*G;pa.resetEdges=!1;var ya=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return ya.apply(this,arguments)||0>mxUtils.indexOf(e,a)};ka=new mxParallelEdgeLayout(J);ka.spacing=K;this.executeLayout(function(){pa.execute(J.getDefaultParent());ta()},!0,S);S=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=S&&S()}}catch(za){this.handleError(za)}};EditorUi.prototype.getSearch=
function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||
+c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
+b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
+a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=1;null==this.drive&&"function"!==typeof window.DriveClient||
b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null!=this.gitLab&&b++;a&&isLocalStorage&&"1"==urlParams.browser&&b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
@@ -10417,14 +10416,14 @@ window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window
"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[b,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))},function(a){a=document.getElementById("geStatus");null!=a&&(a.innerHTML="Error loading page. <a>Please try refreshing.</a>",a.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||
mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function b(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var a=parseInt(mxSettings.settings.autosaveDelay);!isNaN(a)&&0<a?(DrawioFile.prototype.autosaveDelay=a,EditorUi.debug("Setting autosaveDelay",a)):EditorUi.debug("Invalid autosaveDelay",a)}null!=mxSettings.settings.defaultEdgeLength&&(a=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(a)&&0<a?(Graph.prototype.defaultEdgeLength=a,EditorUi.debug("Using defaultEdgeLength",
a)):EditorUi.debug("Invalid defaultEdgeLength",a))}}catch(p){null!=window.console&&console.error(p)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(a,b,c,d,e){EditorUi.logError("Global: "+(null!=a?a:""),b,c,d,e,null,!0)};if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==
-urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{"serviceWorker"in navigator&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname)||"1"==urlParams.offline)&&("0"==urlParams.offline||"1"!=urlParams.offline&&"1"==urlParams.dev?navigator.serviceWorker.getRegistrations().then(function(a){for(var b=0;b<a.length;b++)a[b].unregister()}):(mxscript("js/shapes.min.js"),
-mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),mxStencilRegistry.allowEval=!1,window.addEventListener("load",function(){navigator.serviceWorker.register("/service-worker.js")})))}catch(n){null!=window.console&&console.error(n)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);
-if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(k=f.plugins)}catch(n){}f=urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,d=0;d<k.length&&l;d++)"/"!=k[d].charAt(0)&&
-k[d].substring(0,f.length)!=f&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[k.join("\n")]).replace(/\\n/g,"\n")))for(d=0;d<k.length;d++)try{null==App.pluginsLoaded[k[d]]&&(App.pluginsLoaded[k[d]]=!0,App.embedModePluginsCount++,"/"==k[d].charAt(0)&&(k[d]=PLUGINS_BASE_PATH+
-k[d]),mxscript(k[d]))}catch(n){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var g=
-window.opener||window.parent,m=function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,a.data)}};mxEvent.addListener(window,"message",m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
-window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(".configuration"),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(n){null!=window.console&&console.error(n)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";
-App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
+urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){"1"==urlParams.dev&&null!=CryptoJS&&(k=document.getElementsByTagName("script"),null!=k&&0<k.length&&(k=mxUtils.getTextContent(k[0]),"5bf9ec4131db137e247634de78c4ec47"!=CryptoJS.MD5(k).toString()&&alert("[Dev] Script change requires update of CSP")));try{"serviceWorker"in navigator&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname)||
+"1"==urlParams.offline)&&("0"==urlParams.offline||"1"!=urlParams.offline&&"1"==urlParams.dev?navigator.serviceWorker.getRegistrations().then(function(a){for(var b=0;b<a.length;b++)a[b].unregister()}):(mxscript("js/shapes.min.js"),mxscript("js/stencils.min.js"),mxscript("js/extensions.min.js"),mxStencilRegistry.allowEval=!1,window.addEventListener("load",function(){navigator.serviceWorker.register("/service-worker.js")})))}catch(n){null!=window.console&&console.error(n)}!("ArrayBuffer"in window)||
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||mxscript(App.PUSHER_URL);if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var f=JSON.parse(localStorage.getItem(mxSettings.key));null!=f&&(k=f.plugins)}catch(n){}f=
+urlParams.p;App.initPluginCallback();null!=f&&App.loadPlugins(f.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var f=window.location.protocol+"//"+window.location.host,l=!0,d=0;d<k.length&&l;d++)"/"!=k[d].charAt(0)&&k[d].substring(0,f.length)!=f&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
+[k.join("\n")]).replace(/\\n/g,"\n")))for(d=0;d<k.length;d++)try{null==App.pluginsLoaded[k[d]]&&(App.pluginsLoaded[k[d]]=!0,App.embedModePluginsCount++,"/"==k[d].charAt(0)&&(k[d]=PLUGINS_BASE_PATH+k[d]),mxscript(k[d]))}catch(n){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
+null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var g=window.opener||window.parent,m=function(a){if(a.source==g)try{var c=JSON.parse(a.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(c.config,!0),mxSettings.load(),b())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,a.data)}};mxEvent.addListener(window,"message",
+m);g.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(n){null!=window.console&&console.error(n)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(".configuration"),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(n){null!=
+window.console&&console.error(n)}}b()}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=64";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+
@@ -10434,7 +10433,7 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;
App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(a,e){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(b):mxscript(b):e?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(k){null!=window.console&&console.log("Error loading plugin:",a[c],k)}};
+App.loadPlugins=function(a,e){EditorUi.debug("Loading plugins",a);for(var c=0;c<a.length;c++)if(null!=a[c]&&0<a[c].length)try{var b=PLUGINS_BASE_PATH+App.pluginRegistry[a[c]];null!=b?null==App.pluginsLoaded[b]&&(App.pluginsLoaded[b]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(b):mxscript(b):e?mxinclude(b):mxscript(drawDevUrl+b)):null!=window.console&&console.log("Unknown plugin:",a[c])}catch(k){null!=window.console&&console.log("Error loading plugin:",a[c],k)}};
App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var a=window.opener||window.parent;null!=a&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){a.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 375e37a4..8149c908 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -533,7 +533,7 @@ App.main = function(callback, createUi)
EditorUi.logError('Global: ' + ((message != null) ? message : ''),
url, linenumber, colno, err, null, true);
};
-
+
// Removes info text in embed mode
if (urlParams['embed'] == '1' || urlParams['lightbox'] == '1')
{
@@ -554,6 +554,22 @@ App.main = function(callback, createUi)
if (window.mxscript != null)
{
+ // Checks script content changes to avoid CSP errors in production
+ if (urlParams['dev'] == '1' && CryptoJS != null)
+ {
+ var scripts = document.getElementsByTagName('script');
+
+ if (scripts != null && scripts.length > 0)
+ {
+ var content = mxUtils.getTextContent(scripts[0]);
+
+ if (CryptoJS.MD5(content).toString() != '5bf9ec4131db137e247634de78c4ec47')
+ {
+ alert('[Dev] Script change requires update of CSP');
+ }
+ }
+ }
+
// Runs as progressive web app if service workers are supported
try
{
@@ -1131,7 +1147,7 @@ App.loadPlugins = function(plugins, useInclude)
{
try
{
- var url = App.pluginRegistry[plugins[i]];
+ var url = PLUGINS_BASE_PATH + App.pluginRegistry[plugins[i]];
if (url != null)
{
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index 24d62f0b..2b1c09e1 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -14,8 +14,10 @@ if (!mxIsElectron && location.protocol !== 'http:')
// storage.googleapis.com is needed for workbox-service-worker
'script-src %script-src% \'self\' https://storage.googleapis.com ' +
'https://apis.google.com https://*.pusher.com https://code.jquery.com ' +
- // Scripts in index.html (not checked here)
+ // Bootstrap script in index.html (checked for changes in App.main
+ // in dev mode to avoid deployment without updating this SHA)
'\'sha256-JqdgAC+ydIDMtmQclZEqgbw94J4IeABIfXAxwEJGDJs=\' ' +
+ // App.main script in index.html
'\'sha256-4Dg3/NrB8tLC7TUSCbrtUDWD/J6bSLka01GHn+qtNZ0=\'; ' +
'connect-src %connect-src% \'self\' https://*.draw.io https://*.diagrams.net https://*.googleapis.com wss://*.pusher.com https://*.pusher.com ' +
'https://api.github.com https://raw.githubusercontent.com https://gitlab.com ' +
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 0253b341..90b12e20 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -7254,7 +7254,7 @@ var PluginsDialog = function(editorUi, addFn, delFn)
div.appendChild(inner);
refresh();
- var addBtn = mxUtils.button(mxResources.get('add'), addFn != null? function()
+ var addBtn = mxUtils.button(mxResources.get('add') + '...', addFn != null? function()
{
addFn(function(newPlugin)
{
@@ -7268,57 +7268,75 @@ var PluginsDialog = function(editorUi, addFn, delFn)
}
: function()
{
- var tmp = '';
- var param = urlParams['p'];
-
- if (param != null && param.length > 0)
+ var div = document.createElement('div');
+
+ var title = document.createElement('span');
+ title.style.marginTop = '6px';
+ mxUtils.write(title, mxResources.get('builtinPlugins') + ': ');
+ div.appendChild(title);
+
+ var pluginsSelect = document.createElement('select');
+ pluginsSelect.style.width = '150px';
+
+ for (var i = 0; i < App.publicPlugin.length; i++)
{
- var tokens = param.split(';');
-
- for (var i = 0; i < tokens.length; i++)
- {
- var url = App.pluginRegistry[tokens[i]];
-
- if (url != null)
- {
- tmp += url + ';';
- }
- }
-
- if (tmp.charAt(tmp.length - 1) == ';')
- {
- tmp = tmp.substring(0, tmp.length - 1);
- }
+ var option = document.createElement('option');
+ mxUtils.write(option, App.publicPlugin[i]);
+ option.value = App.publicPlugin[i];
+ pluginsSelect.appendChild(option);
}
- var dlg = new FilenameDialog(editorUi, tmp, mxResources.get('add'), function(newValue)
+ div.appendChild(pluginsSelect);
+ mxUtils.br(div);
+ mxUtils.br(div);
+
+ var customBtn = mxUtils.button(mxResources.get('custom') + '...', function()
{
- if (newValue != null && newValue.length > 0)
+ var dlg = new FilenameDialog(editorUi, '', mxResources.get('add'), function(newValue)
{
- tokens = newValue.split(';');
+ editorUi.hideDialog();
- for (var i = 0; i < tokens.length; i++)
+ if (newValue != null && newValue.length > 0)
{
- var token = tokens[i];
- var url = App.pluginRegistry[token];
+ var tokens = newValue.split(';');
- if (url != null)
+ for (var i = 0; i < tokens.length; i++)
{
- token = url;
+ var token = tokens[i];
+ var url = App.pluginRegistry[token];
+
+ if (url != null)
+ {
+ token = url;
+ }
+
+ if (token.length > 0 && mxUtils.indexOf(plugins, token) < 0)
+ {
+ plugins.push(token);
+ }
}
- if (token.length > 0 && mxUtils.indexOf(plugins, token) < 0)
- {
- plugins.push(token);
- }
+ refresh();
}
-
+ }, mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+ editorUi.showDialog(dlg.container, 300, 80, true, true);
+ dlg.init();
+ });
+
+ customBtn.className = 'geBtn';
+
+ var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
+ {
+ var token = App.pluginRegistry[pluginsSelect.value];
+
+ if (mxUtils.indexOf(plugins, token) < 0)
+ {
+ plugins.push(token);
refresh();
}
- }, mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
-
+ }), null, null, null, customBtn);
editorUi.showDialog(dlg.container, 300, 80, true, true);
- dlg.init();
});
addBtn.className = 'geBtn';
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index f358a52b..8ed49c5e 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -7370,20 +7370,6 @@
{
this.editor.graph.setSelectionCells(
this.importXml(xml, dx, dy, crop));
-
- if (!this.isOffline() &&
- (/.*\.diagrams\.net$/.test(window.location.hostname) ||
- /.*\.appspot\.com$/.test(window.location.hostname) ||
- /.*\.draw\.io$/.test(window.location.hostname)))
- {
- this.showBanner('LucidChartImportSurvey', mxResources.get('notSatisfiedWithImport'),
- mxUtils.bind(this, function()
- {
- var dlg = new FeedbackDialog(this, 'Lucidchart Import Feedback', true, text);
- this.showDialog(dlg.container, 610, 360, true, false);
- dlg.init();
- }));
- }
}), mxUtils.bind(this, function(e)
{
this.handleError(e);
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index a4eede87..f27a7b28 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -12,9 +12,6 @@ window.isLocalStorage = window.isLocalStorage || false;
// Disables loading settings in configured mode
window.mxLoadSettings = window.mxLoadSettings || urlParams['configure'] != '1';
-// Loading stylesheets in index.html is faster
-mxLoadStylesheets = navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER';
-
// Checks for SVG support
window.isSvgBrowser = window.isSvgBrowser || navigator.userAgent == null ||
navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9;
diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js
index 4dd4f1f3..f032937e 100644
--- a/src/main/webapp/js/mxgraph/Editor.js
+++ b/src/main/webapp/js/mxgraph/Editor.js
@@ -2717,8 +2717,7 @@ FilenameDialog.createFileTypes = function(editorUi, nameInput, types)
{
var geo = this.graph.getCellGeometry(cell);
- return !this.graph.model.isEdge(cell) &&
- !this.graph.model.isEdge(parent) &&
+ result = !this.graph.model.isEdge(parent) &&
!this.graph.isSiblingSelected(cell) &&
(geo == null || geo.relative ||
!this.graph.isContainer(parent) ||
diff --git a/src/main/webapp/js/mxgraph/EditorUi.js b/src/main/webapp/js/mxgraph/EditorUi.js
index 3d507056..3d0b2ad6 100644
--- a/src/main/webapp/js/mxgraph/EditorUi.js
+++ b/src/main/webapp/js/mxgraph/EditorUi.js
@@ -1303,34 +1303,36 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
mxEvent.addListener(node, 'click', function()
{
+ var clone = graph.cloneCell(cell);
+
if (callback != null)
{
- callback(cell);
+ callback(clone);
}
else
{
- cell.geometry.x = graph.snap(Math.round(x / graph.view.scale) -
+ clone.geometry.x = graph.snap(Math.round(x / graph.view.scale) -
graph.view.translate.x - cell.geometry.width / 2);
- cell.geometry.y = graph.snap(Math.round(y / graph.view.scale) -
+ clone.geometry.y = graph.snap(Math.round(y / graph.view.scale) -
graph.view.translate.y - cell.geometry.height / 2);
graph.model.beginUpdate();
try
{
- graph.addCell(cell);
+ graph.addCell(clone);
}
finally
{
graph.model.endUpdate();
}
- graph.setSelectionCell(cell);
- graph.scrollCellToVisible(graph.getSelectionCell());
- graph.startEditingAtCell(cell);
+ graph.setSelectionCell(clone);
+ graph.scrollCellToVisible(clone);
+ graph.startEditingAtCell(clone);
if (ui.hoverIcons != null)
{
- ui.hoverIcons.update(graph.view.getState(cell));
+ ui.hoverIcons.update(graph.view.getState(clone));
}
}
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index 7b44b68f..7c4f595e 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -362,14 +362,13 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
if (Math.abs(start.point.x - me.getGraphX()) > tol ||
Math.abs(start.point.y - me.getGraphY()) > tol)
{
- // Lazy selection for edges inside groups
- if (!this.isCellSelected(state.cell))
+ var handler = this.selectionCellsHandler.getHandler(state.cell);
+
+ if (handler == null && this.model.isEdge(state.cell))
{
- this.selectCellForEvent(state.cell, me.getEvent());
+ handler = this.createHandler(state);
}
- var handler = this.selectionCellsHandler.getHandler(state.cell);
-
if (handler != null && handler.bends != null && handler.bends.length > 0)
{
var handle = handler.getHandleForEvent(start.event);
@@ -455,13 +454,8 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
handle = mxEvent.VIRTUAL_HANDLE;
}
}
-
+
handler.start(me.getGraphX(), me.getGraphX(), handle);
- start.state = null;
- start.event = null;
- start.point = null;
- start.handle = null;
- start.selected = false;
me.consume();
// Removes preview rectangle in graph handler
@@ -475,6 +469,31 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
me.consume();
}
}
+
+ if (handler != null)
+ {
+ // Lazy selection for edges inside groups
+ if (this.selectionCellsHandler.isHandlerActive(handler))
+ {
+ if (!this.isCellSelected(state.cell))
+ {
+ this.selectionCellsHandler.handlers.put(state.cell, handler);
+ this.selectCellForEvent(state.cell, me.getEvent());
+ }
+ }
+ else if (!this.isCellSelected(state.cell))
+ {
+ // Destroy temporary handler
+ handler.destroy();
+ }
+ }
+
+ // Reset start state
+ start.selected = false;
+ start.handle = null;
+ start.state = null;
+ start.event = null;
+ start.point = null;
}
}
else
@@ -943,70 +962,17 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
return getCursorForCell.apply(this, arguments);
};
- // Changes rubberband selection to be recursive
+ // Changes rubberband selection ignore locked cells
this.selectRegion = function(rect, evt)
{
- var cells = this.getAllCells(rect.x, rect.y, rect.width, rect.height);
+ var cells = this.getCells(rect.x, rect.y, rect.width, rect.height, null, null, null, function(state)
+ {
+ return mxUtils.getValue(state.style, 'locked', '0') == '1';
+ });
this.selectCellsForEvent(cells, evt);
return cells;
};
-
- // Recursive implementation for rubberband selection
- this.getAllCells = function(x, y, width, height, parent, result)
- {
- result = (result != null) ? result : [];
-
- if (width > 0 || height > 0)
- {
- var model = this.getModel();
- var right = x + width;
- var bottom = y + height;
-
- if (parent == null)
- {
- parent = this.getCurrentRoot();
-
- if (parent == null)
- {
- parent = model.getRoot();
- }
- }
-
- if (parent != null)
- {
- var childCount = model.getChildCount(parent);
-
- for (var i = 0; i < childCount; i++)
- {
- var cell = model.getChildAt(parent, i);
- var state = this.view.getState(cell);
-
- if (state != null && this.isCellVisible(cell) && mxUtils.getValue(state.style, 'locked', '0') != '1')
- {
- var deg = mxUtils.getValue(state.style, mxConstants.STYLE_ROTATION) || 0;
- var box = state;
-
- if (deg != 0)
- {
- box = mxUtils.getBoundingBox(box, deg);
- }
-
- if ((model.isEdge(cell) || model.isVertex(cell)) &&
- box.x >= x && box.y + box.height <= bottom &&
- box.y >= y && box.x + box.width <= right)
- {
- result.push(cell);
- }
-
- this.getAllCells(x, y, width, height, cell, result);
- }
- }
- }
- }
-
- return result;
- };
// Never removes cells from parents that are being moved
var graphHandlerShouldRemoveCellsFromParent = this.graphHandler.shouldRemoveCellsFromParent;
@@ -2891,7 +2857,7 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
// Checks actual end point of edge for target cell
var rect = (!ignoreCellAt) ? new mxRectangle(dx + pt.x * s, dy + pt.y * s).grow(40) : null;
var tempCells = (rect != null) ? this.getCells(0, 0, 0, 0, null, null, rect) : null;
- var target = (tempCells != null && tempCells.length > 0) ? tempCells[0] : null;
+ var target = (tempCells != null && tempCells.length > 0) ? tempCells.reverse()[0] : null;
var keepParent = false;
if (target != null && this.model.isAncestor(target, source))
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 81dbe2b9..3203a11f 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -187,12 +187,11 @@ value:function(a,b,d,f,g,h){var c=this.gen.arc(a,b,d,f,g,h,6<arguments.length&&v
newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
-String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;mxLoadStylesheets="MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase();window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;
-window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";
-window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";
-window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
-window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
-window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
@@ -1489,8 +1488,8 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=0!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f,g){f=null!=f?f:[];if(0<c||0<d||null!=g){var k=this.getModel(),l=a+c,m=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var n=k.getChildCount(e),p=0;p<n;p++){var q=k.getChildAt(e,p),r=this.view.getState(q);if(null!=r&&this.isCellVisible(q)){var t=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(r=mxUtils.getBoundingBox(r,t));null!=g&&k.isVertex(q)&&mxUtils.intersects(g,r)||null==g&&(k.isEdge(q)||k.isVertex(q))&&
-r.x>=a&&r.y+r.height<=m&&r.y>=b&&r.x+r.width<=l?f.push(q):this.getCells(a,b,c,d,q,f,g)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k){f=null!=f?f:[];if(0<c||0<d||null!=g){var l=this.getModel(),m=a+c,n=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=l.getRoot()));if(null!=e)for(var p=l.getChildCount(e),q=0;q<p;q++){var r=l.getChildAt(e,q),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&(null==k||!k(t))){var u=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(t=mxUtils.getBoundingBox(t,u));null!=g&&l.isVertex(r)&&mxUtils.intersects(g,t)||null==g&&(l.isEdge(r)||
+l.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=b&&t.x+t.width<=m?f.push(r):this.getCells(a,b,c,d,r,f,g,k)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
@@ -1587,7 +1586,7 @@ mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0
mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;
mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};
mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
-mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
+mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a);)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));return null!=b?b.cell:null};
mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())&&!mxEvent.isAltDown(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};
@@ -2150,11 +2149,11 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,f){c.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,c){var f=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],b=0;b<
f.length;b++)null!=a.view.getState(f[b])&&k.push(f[b]);a.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,x=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,v=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";v+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
-"geDialog");k=this.getPosition(v,D,f,d);v=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=v+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=v+f+38-n+"px",m.style.zIndex=
-this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,x=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";v=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
-Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(x,y-64);e=this.getPosition(v,D,f,d);v=e.x;D=e.y;z.style.left=v+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=v+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,x=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";x+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
+"geDialog");k=this.getPosition(x,D,f,d);x=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=x+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=x+f+38-n+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,v=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";x=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
+Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(v,y-64);e=this.getPosition(x,D,f,d);x=e.x;D=e.y;z.style.left=x+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=x+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2165,10 +2164,10 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,c,f,d,k,m,q,b,e,g,p){e=null!=e?e:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);n.appendChild(l)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var x=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
-x.className="geBtn";f.appendChild(x);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){x.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var x=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,x-=d.y*c.height):
-e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,x,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var v=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
+v.className="geBtn";f.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){v.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var v=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,v-=d.y*c.height):
+e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,v,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
k.appendChild(e);mxEvent.addListener(e,"click",function(a){b.checked=!b.checked;g.checked=!b.checked;mxEvent.consume(a)});mxEvent.addListener(b,"change",function(){g.checked=!b.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");k.appendChild(e);mxEvent.addListener(e,
"click",function(a){g.checked=!g.checked;b.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(p);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(g,"change",
function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";k.appendChild(n);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
@@ -2176,30 +2175,30 @@ k.style.paddingTop="20px";k.setAttribute("align","right");e=mxUtils.button(mxRes
k.appendChild(e);d.appendChild(k);q.appendChild(d);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
PrintDialog.createPrintPreview=function(a,c,f,d,k,m,q){c=new mxPrintPreview(a,c,f,d,k,m);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==x?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",x.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(x.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==v?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",v.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
m,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");
m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
a;c()});mxEvent.consume(b)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=d.getGridSize();m.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,
-mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var x=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(x=a,f())},x);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
-"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,x,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=x?x.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
+mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(v=a,f())},v);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
+"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,v,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";m.appendChild(y);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);b.appendChild(k);q.appendChild(b);this.container=q};
PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||n!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],z?"custom"==c.key&&(b.value=c.key,z=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
f.height==c.format.height?(b.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(n.value=f.width/100,l.value=f.height/100,m.setAttribute("checked","checked"),
b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var m=document.createElement("input");m.setAttribute("name",c);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var n=document.createElement("input");
-n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var x={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var v=t[y];x[v.key]=v;var D=document.createElement("option");D.setAttribute("value",v.key);mxUtils.write(D,v.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
-a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=x[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
+n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var x=t[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",x.key);mxUtils.write(D,x.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
+a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=v[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
g.height,g.width));c&&z||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){m.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(l,"blur",A);mxEvent.addListener(l,"click",A);mxEvent.addListener(q,"change",A);mxEvent.addListener(m,"change",A);mxEvent.addListener(b,"change",function(a){z="custom"==b.value;
A(a,!0)});A();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:n,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,x,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width=p?"80px":"120px";mxUtils.write(x,(k||mxResources.get("filename"))+":");l.appendChild(x);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=n?n+
-"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(v.value))e&&a.hideDialog(),d(v.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};x=document.createElement("td");
-x.style.whiteSpace="nowrap";x.appendChild(v);l.appendChild(x);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,v,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",x.appendChild(l),v.style.width=null!=n?n-40+"px":"140px"),x.appendChild(FilenameDialog.createTypeHint(a,v,p)));null!=q&&(l=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(q),l.appendChild(x),y.appendChild(l));l=
-document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&x.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",x.appendChild(n));mxEvent.addListener(v,"keypress",function(a){13==a.keyCode&&D.click()});
-x.appendChild(D);a.editor.cancelFirst||x.appendChild(p);l.appendChild(x);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,v,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");l.appendChild(v);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=n?n+
+"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(x.value))e&&a.hideDialog(),d(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=x,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
+v.style.whiteSpace="nowrap";v.appendChild(x);l.appendChild(v);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",v.appendChild(l),x.style.width=null!=n?n-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,x,p)));null!=q&&(l=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),l.appendChild(v),y.appendChild(l));l=
+document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",v.appendChild(n));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&D.click()});
+v.appendChild(D);a.editor.cancelFirst||v.appendChild(p);l.appendChild(v);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,f){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<f.length;a++)if(0<f[a].ext.length&&c.value.toLowerCase().substring(c.value.length-f[a].ext.length-1)=="."+f[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(f[a].title));break}};mxEvent.addListener(c,"keyup",k);mxEvent.addListener(c,"change",k);mxEvent.addListener(d,"click",function(c){var f=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=f&&a.showError(null,f,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(c)});k();return d};
@@ -2213,30 +2212,30 @@ d="url("+this.gridImage+")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=c,e.style.backgroundColor=b,e.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var e=this.gridSteps*b,d=[],c=1;c<this.gridSteps;c++){var f=c*b;d.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+" "+e)}return'<svg width="'+
e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;e=m.height;var t=
-new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:v,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
+new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:x,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
new mxPoint(Math.round(q),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,e){for(var d=0;d<b.length;d++){if(this.graph.isTableCell(b[d])||this.graph.isTableRow(b[d]))return!1;if(this.graph.getModel().isVertex(b[d])){var f=this.graph.getCellGeometry(b[d]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);
a.intersects=mxUtils.bind(this,function(b,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,c=this.graph.pageScale,
f=d.width*c,d=d.height*c,c=Math.floor(Math.min(0,b)/f),l=Math.floor(Math.min(0,e)/d);return new mxRectangle(this.scale*(this.translate.x+c*f),this.scale*(this.translate.y+l*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-c)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/d)-l)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
-if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=m.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
+if(b)d=this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));else if(d=m.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
this.graph.isTableCell(a)&&this.graph.isCellSelected(c);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),e=b.getParent(a),d=this.graph.view.getState(e),c=this.graph.isCellSelected(a);null!=d&&(b.isVertex(e)||b.isEdge(e));){var f=this.graph.isCellSelected(e),c=c||f;if(f||!c&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=b.getParent(e)}return a}})();EditorUi=function(a,c,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var d=this.editor.graph;d.lightbox=f;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=
k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=v.hoverIcons&&v.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=x.hoverIcons&&x.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,b=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,e){return q||b.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),
d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var e=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return e.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,x=null,t=null,y=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=x}n=d.cellEditor.isContentEditing();
-l=a;x=e;t=b}}),v=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=v.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));v.toolbar.setFontName(e);
-v.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){v.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,v=null,t=null,y=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=v}n=d.cellEditor.isContentEditing();
+l=a;v=e;t=b}}),x=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=x.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));x.toolbar.setFontName(e);
+x.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){x.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,b,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,e){this.menus.createPopupMenu(a,b,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],n=l.indexOf("=");if(0<=n){g=l.substring(0,n);var u=l.substring(n+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
e,"values",a,"cells",[b.cell]))}}catch(Y){this.handleError(Y)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)A.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(A,E[a])&&A.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=A.slice();for(var n=0;n<l.length;n++){var u=l[n],B=u.indexOf("=");if(0<=B){var t=
-u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var x=0;x<k.length;x++){var y=mxUtils.indexOf(f,k[x]);0<=y&&f.splice(y,1)}}}}}for(var v=e.isEdge(g),q=v?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!v||v&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
+u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var v=0;v<k.length;v++){var y=mxUtils.indexOf(f,k[v]);0<=y&&f.splice(y,1)}}}}}for(var x=e.isEdge(g),q=x?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!x||x&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
d.addListener("textInserted",function(a,b){J(b.getProperty("cells"),!0)});this.insertHandler=J;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&e.push(b.getProperty("terminal"));J(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var e=b.getProperty("cells"),c=!1,g=!1;if(0<e.length)for(var f=0;f<e.length&&(c=d.getModel().isVertex(e[f])||c,!(g=d.getModel().isEdge(e[f])||g)||!c);f++);else g=c=!0;for(var e=
b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(A,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(A,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
p[f];if(g||l||0<=mxUtils.indexOf(F,e[f]))null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
@@ -2257,7 +2256,7 @@ k.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=f
e.getGraphY(),b,mxUtils.bind(this,function(a){f(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var m=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a- -4)+"px;top:"+(c- -4)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e?this.sidebar.graph.pasteStyle(e,[g]):m.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g);null!=m.hoverIcons&&m.hoverIcons.update(q.view.getState(g))}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);
+mxEvent.addListener(f,"click",function(){var b=q.cloneCell(g);if(null!=d)d(b);else{b.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);b.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(b)}finally{q.model.endUpdate()}q.setSelectionCell(b);q.scrollCellToVisible(b);q.startEditingAtCell(b);null!=m.hoverIcons&&m.hoverIcons.update(q.view.getState(b))}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);
null!=m.hoverIcons&&m.hoverIcons.reset();q.popupMenuHandler.hideMenu();q.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=b}};
EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,m){return this.editor.graph.createVertex(null,null,m||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
@@ -2285,10 +2284,10 @@ e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("
e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",
p)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var l=null,x=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var v=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){v.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
+mxResources.get("fit"));var l=null,v=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var z=this.lightboxToolbarActions[n];m(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
@@ -2392,29 +2391,29 @@ mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),n=this.model.getParent(l);if(!this.isCellSelected(n)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(n,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(n),this.selectCellForEvent(n,c.getEvent()),n=this.selectionCellsHandler.getHandler(n),null!=n)){var t=n.getHandleForEvent(c);null!=t&&(n.start(c.getGraphX(),c.getGraphY(),t),n.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(n=this.getActualStartSize(f.cell),l=this.view.scale,(0<n.x||0<n.width)&&mxUtils.intersects(u,
new mxRectangle(f.x+(n.x-n.width-1)*l+(0==n.x?f.width:0),f.y,1,f.height))||(0<n.y||0<n.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(n.y-n.height-1)*l+(0==n.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),n=this.selectionCellsHandler.getHandler(f.cell),null!=n&&(t=mxEvent.CUSTOM_HANDLE-n.customHandles.length+1,n.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var n=this.selectionCellsHandler.getHandler(c.cell);if(null!=n&&null!=n.bends&&0<n.bends.length){f=
-n.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
-g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),
-d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=
-c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
-!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
-this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,c){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
-!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,c=this.graph.pageScale,d=e.width*c,e=e.height*c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
-l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*d+c.x)*f,(g.y*e+c.y)*f,d*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*d+c.x)*f,((g.y+l)*e+c.y)*f,d*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
-return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,c=[],d=0;d<b.length;d++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[d])&&this.graph.isCellSelected(b[d])?this.graph.model.getParent(b[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[d])&&this.graph.isCellSelected(b[d])?b[d]:this.graph.getCompositeParent(b[d]);null==f||e.get(f)||(e.put(f,
-!0),c.push(f))}return c};var x=this.graphHandler.start;this.graphHandler.start=function(a,b,e,c){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
-this.getRubberband=function(){return t};var y=(new Date).getTime(),v=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),v=0):v=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=
-function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=
-a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(e,b);return e};this.getAllCells=function(a,
-b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),n=a+e,l=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var p=g.getChildCount(c),u=0;u<p;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var m=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=m&&(B=mxUtils.getBoundingBox(B,m));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=l&&B.y>=b&&B.x+B.width<=n&&f.push(t);
-this.getAllCells(a,b,e,d,t,f)}}}return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==
-b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),c=b.getProperty("cell");null==c?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(c)&&
-this.removeSelectionCell(c);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,
-!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var u=this.updateMouseEvent;this.updateMouseEvent=function(a){a=u.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){var n=this.selectionCellsHandler.getHandler(c.cell);null==n&&this.model.isEdge(c.cell)&&(n=this.createHandler(c));if(null!=n&&null!=n.bends&&0<n.bends.length){f=n.getHandleForEvent(b);
+var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=g,null==f&&(f=new mxRectangle(q.x,
+q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),d.getGraphX(),f),d.consume(),this.graphHandler.reset()}null!=
+n&&(this.selectionCellsHandler.isHandlerActive(n)?this.isCellSelected(c.cell)||(this.selectionCellsHandler.handlers.put(c.cell,n),this.selectCellForEvent(c.cell,d.getEvent())):this.isCellSelected(c.cell)||n.destroy());p=!1;q=b=e=g=null}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,
+d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-
+1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,
+c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=
+n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,c){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,
+c=this.graph.pageScale,d=e.width*c,e=e.height*c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*d+c.x)*f,(g.y*e+c.y)*f,d*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*d+c.x)*f,((g.y+l)*e+c.y)*f,d*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,c=[],d=0;d<b.length;d++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[d])&&this.graph.isCellSelected(b[d])?this.graph.model.getParent(b[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[d])&&
+this.graph.isCellSelected(b[d])?b[d]:this.graph.getCompositeParent(b[d]);null==f||e.get(f)||(e.put(f,!0),c.push(f))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(a,b,e,c){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
+this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
+mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=
+!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
+function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getCells(a.x,
+a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")});this.selectCellsForEvent(e,b);return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};
+var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),c=b.getProperty("cell");null==c?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),
+t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var u=this.updateMouseEvent;this.updateMouseEvent=function(a){a=u.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";
+Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,c,f,d,k){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,c)};
Graph.zapGremlins=function(a){for(var c=[],f=0;f<a.length;f++){var d=a.charCodeAt(f);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&c.push(a.charAt(f))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};Graph.compressNode=function(a,c){var f=mxUtils.getXml(a);return Graph.compress(c?f:Graph.zapGremlins(f))};
Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var f=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(f):Base64.encode(f,!0)};Graph.decompress=function(a,c,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?c:Graph.zapGremlins(c)};
@@ -2453,8 +2452,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),x=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),v={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
-12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:x,MM:q(x),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),v=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),x={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
+12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:v,MM:q(v),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),f=c.getChildCount(c.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");c.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var b=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",b);mxUtils.write(f,b);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");c.setVisible(d,k.checked)})})(c.getChildAt(c.root,d));return a};
@@ -2462,12 +2461,12 @@ Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d
null==m&&(m=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=m?m:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,c,f,d,k,m,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var e=this.getCompositeParent(a),g=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
-g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(e+g.x*f,n+g.y*f)).grow(40);m=null!=m?this.getCells(0,0,0,0,null,null,m):null;var l=null!=m&&0<m.length?m[0]:null,x=!1;null!=l&&this.model.isAncestor(l,a)&&
-(x=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||
-(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],v=null!=l&&this.isSwimlane(l),D=v?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],
-!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);v?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!x&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),
-null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,D,k));null!=p&&y.push(p);null==l&&
-null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k(D)};
+g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(e+g.x*f,n+g.y*f)).grow(40);m=null!=m?this.getCells(0,0,0,0,null,null,m):null;var l=null!=m&&0<m.length?m.reverse()[0]:null,v=!1;null!=l&&this.model.isAncestor(l,
+a)&&(v=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||
+this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],x=null!=l&&this.isSwimlane(l),D=x?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);
+D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);x?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!v&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,
+D,k));null!=p&&y.push(p);null==l&&null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k(D)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&c.push(f);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return c.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2532,7 +2531,7 @@ f){var l=this.getCellGeometry(m);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(
TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),m=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*m/k,q.push(Math.round(d)))}return q};
TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),m=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==m.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==m.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(m[e],g))}return b};
TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),m="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),n=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<n){if(k){var l=this.graph.getCellGeometry(p[p.length-
-1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var x=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],x,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
+1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var v=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],v,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
Graph.minTableColumnWidth,q.setGeometry(a,f))}}finally{q.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var e=this.getState(a);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=c.apply(this,
arguments);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
@@ -2563,14 +2562,14 @@ this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.sketch&&(a+="sket
(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};
Graph.prototype.updateCellStyles=function(a,b,e){this.model.beginUpdate();try{for(var c=0;c<e.length;c++)if(this.model.isVertex(e[c])||this.model.isEdge(e[c])){this.setCellStyles(a,null,[e[c]]);var d=this.getCellStyle(e[c])[a];b!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,b,[e[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?
mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var e=0;e<a.length;e++){var c=a[e];b[mxObjectIdentity.get(c)]=c.getId();for(var d=this.model.getChildCount(c),f=0;f<d;f++)this.createCellLookup([this.model.getChildAt(c,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,e){e=null!=e?e:{};for(var c in a){var d=b[c];null==e[d]&&(e[d]=a[c].getId()||
-"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var u=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
-null!=u&&(a=a.concat(u))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,b-p.x,e-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
+"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var p=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
+null!=p&&(a=a.concat(p))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,b-u.x,e-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,n=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(n,e[d]);var l=this.view.getState(a[d]);if(null!=l){var u=this.getCellGeometry(e[d]);null!=u&&u.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(u.offset=null,u.relative=!1,u.x=l.x/l.view.scale-l.view.translate.x,u.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
e);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var q=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var e=this.getCurrentCellStyle(b);if(null!=e.expand)return"0"!=e.expand}return q.apply(this,arguments)&&(null==b||
!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,n,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(g,n,null,!0,!1));b.apply(this,[a,e,c,d,f,g,n,l])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],n=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)n(this.model.getChildAt(b,e))});n(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,n){n=null!=n?n:{};if(this.isTable(d)){for(var l=[],u=0;u<a.length;u++)this.isTable(a[u])?l=l.concat(this.model.getChildCells(a[u],!0).reverse()):l.push(a[u]);
a=l}this.model.beginUpdate();try{l=[];for(u=0;u<a.length;u++)if(null!=d&&this.isTableRow(a[u])){var p=this.model.getParent(a[u]),t=this.getCellGeometry(a[u]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(d)&&(c||p!=d)){if(!c){var R=this.getCellGeometry(p);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(p,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
-c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),x=this.model.getChildCells(B[0],!0),y=x.length-m.length;if(0<y)for(var K=0;K<y;K++){var v=this.cloneCell(m[m.length-1]);null!=v&&(v.value="",this.model.add(k,v))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<x.length;K++){var L=this.getCellGeometry(x[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
+c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),v=this.model.getChildCells(B[0],!0),y=v.length-m.length;if(0<y)for(var K=0;K<y;K++){var x=this.cloneCell(m[m.length-1]);null!=x&&(x.value="",this.model.add(k,x))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<v.length;K++){var L=this.getCellGeometry(v[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
g.apply(this,arguments),u=0;u<l.length;u++)!c&&this.model.contains(l[u])&&0==this.model.getChildCount(l[u])&&this.model.remove(l[u]);c&&this.updateCustomLinks(this.createCellMapping(n,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),n=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&n++;n==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
b[e]&&this.updateCustomLinksForCell(a,b[e])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var c=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var f=d[e];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(wa){}return c}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;
@@ -2579,8 +2578,8 @@ mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZO
f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var e=this.getModel(),c=[];e.beginUpdate();
try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),n=e.getTerminal(f,!1);e.setTerminal(f,n,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var u=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(u,!1);l.setTerminalPoint(p,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),m=this.view.getState(n);if(null!=t){var k=null!=B?this.getConnectionConstraint(t,B,!0):null,R=
-null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(f,g,!0,R);this.setConnectionConstraint(f,n,!1,k)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var x=l.width;l.width=l.height;l.height=x;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,v)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
+null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(f,g,!0,R);this.setConnectionConstraint(f,n,!1,k)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var v=l.width;l.width=l.height;l.height=v;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
+mxConstants.DIRECTION_NORTH],x=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,x)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}n.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var e=this.view.getState(a[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var e=a.ownerDocument.createElement(null!=
b?b:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var e=a.getElementsByTagName("*"),c=0;c<e.length;c++)b(e[c])};Graph.prototype.updateLabelElements=function(a,b,e){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var f=this.convertValueToString(a[d]);
@@ -2609,11 +2608,11 @@ a.length-1;0<=f;f--)if(0==f||a[f]!=d[f-1]){a[f].setAttribute("width",b);a[f].set
e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var e=[],c=null,d=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,d=null!=d?Math.min(d,l):l;e.push(g)}}if(2<e.length){e.sort(function(b,e){return a?b.x-e.x:b.y-e.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);c=c/l-(a?g.x:
g.y);this.getModel().beginUpdate();try{for(var n=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var u=this.view.getState(this.model.getParent(e[f].cell)),p=this.getCellGeometry(e[f].cell),c=c+n;null!=p&&null!=u&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-u.origin.x:p.y=Math.round(c-p.height/2)-u.origin.y,this.getModel().setGeometry(e[f].cell,p))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,u){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
-var B=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var x=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
-0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);k.setAttribute("version","1.1");k.setAttribute("width",x+"px");k.setAttribute("height",y+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+x+" "+y);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var v=this.createSvgCanvas(K);v.foOffset=d?-.5:0;v.textOffset=d?-.5:0;v.imageOffset=d?-.5:0;v.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
-H=v.getAlternateText;v.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var x=f.charCodeAt(m);if(10==x||13==x){if(0<k)break}else B.push(f.charAt(m)),255>x&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
-arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&v.image(O.x,O.y,R.width,R.height,R.src,!0)}v.scale(a);v.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
-a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),v);this.updateSvgLinks(k,n,!0);this.addForeignObjectWarning(v,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
+var B=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var v=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
+0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);k.setAttribute("version","1.1");k.setAttribute("width",v+"px");k.setAttribute("height",y+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+y);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
+H=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var v=f.charCodeAt(m);if(10==v||13==v){if(0<k)break}else B.push(f.charAt(m)),255>v&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
+arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&x.image(O.x,O.y,R.width,R.height,R.src,!0)}x.scale(a);x.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
+a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(k,n,!0);this.addForeignObjectWarning(x,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=
a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);e.appendChild(c);d.appendChild(f);e.appendChild(d);b.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,b,e){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var d=a[c].getAttribute("href");null==d&&(d=a[c].getAttribute("xlink:href"));null!=d&&(null!=b&&/^https?:\/\//.test(d)?a[c].setAttribute("target",
b):e&&this.isCustomLink(d)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,e){for(;null!=
@@ -2632,12 +2631,12 @@ this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideM
this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,e=!1,c=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),e=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&
(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",
this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var e=null!=b&&mxEvent.isShiftDown(b);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=
-window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var x=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));x.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var v=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);y.apply(this,arguments);var e=this.graph.view.getState(a);this.textarea.className=null!=e&&1==e.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var e=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(e)&&null!=
-c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var v=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
+c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var x=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
c),a=a.nextSibling,c=c.nextSibling;return e}function e(a,b){if(null!=a)if(b.originalNode!=a)c(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var d=a.nextSibling;null==b?c(a):(e(a,b),b=b.nextSibling);a=d}}function c(a){for(var b=a.firstChild;null!=b;){var e=b.nextSibling;c(b);b=e}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&
-(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}v.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}x.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(b?
n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
@@ -2717,9 +2716,9 @@ null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&thi
this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var oa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(oa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&
null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Z=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=
-function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxActor.call(this)}
+function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}
function y(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,y.prototype.quadTo);this.originalCurveTo=
-this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
+this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ba(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
this.spacing=0}function U(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function la(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function ja(){mxActor.call(this)}function sa(){mxActor.call(this)}function N(){mxActor.call(this)}function oa(){mxActor.call(this)}function W(){mxActor.call(this)}function Z(){mxActor.call(this)}function R(){mxEllipse.call(this)}
function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,n,u){g+=n;var ca=c.clone();c.x-=d*(2*g+n);c.y-=f*(2*g+n);d*=g+n;f*=g+n;return function(){a.ellipse(ca.x-
@@ -2741,8 +2740,8 @@ a.end()};mxCellRenderer.registerShape("card",e);mxUtils.extend(g,mxActor);g.prot
"size",this.size))*a.height):null};p.prototype.redrawPath=function(a,b,e,c,d){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",p);var Ia=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,e,c){var d=mxUtils.getValue(this.style,"size");return null!=
d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",n);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(v,mxActor);v.prototype.size=.5;v.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",v);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};y.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};y.prototype.quadTo=function(a,b,e,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=c};y.prototype.curveTo=function(a,b,e,c,d,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),l=this.defaultVariation;
5>g&&(g=5,l/=3);for(var ca=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ca*f+this.lastX-n*d,e*f+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
@@ -2750,9 +2749,9 @@ this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};m
mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Qa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?
"1":"0"))&&Qa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,e,c,d){if(null==a.handJiggle||a.handJiggle.constructor!=y)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(c/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(c*f,d*f)),a.moveTo(b+f,e),a.lineTo(b+c-f,e),a.quadTo(b+c,e,b+c,e+f),a.lineTo(b+c,e+d-f),a.quadTo(b+c,e+d,b+c-f,e+d),a.lineTo(b+f,e+d),a.quadTo(b,e+d,b,e+d-f),a.lineTo(b,e+f),a.quadTo(b,
-e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};v.prototype.paintForeground=function(a,
-b,e,c,d){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",v);mxUtils.extend(D,mxRectangleShape);
+e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};x.prototype.paintForeground=function(a,
+b,e,c,d){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(D,mxRectangleShape);
D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=function(){return!0};
z.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",
@@ -2838,7 +2837,7 @@ parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,e.y-b.y))):Math.round(Math.max(0,Math.min(b.width,e.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var e=b.getSwimlaneDirection(a.style),c=b.model.getParent(a.cell),c=b.model.getChildCells(c,!0),d=[],f=0;f<c.length;f++)c[f]!=a.cell&&b.isSwimlane(c[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(c[f]))==
e&&d.push(c[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return b},label:Ca(),ext:Ca(),rectangle:Ca(),triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,
["width","height"],function(a){var b=Math.max(O.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",O.prototype.width))),e=Math.max(1.5*O.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",O.prototype.height)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.width=Math.round(Math.max(O.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*O.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},
-process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},dataStorage:function(a){return[V(a,
["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
@@ -2851,7 +2850,7 @@ mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));retu
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",b.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",b.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);return new mxPoint(a.x+e,a.y+c)},function(a,e){var c=Math.max(0,Math.min(a.width,e.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,e.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",p.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},offPageConnector:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(x.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(v.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
e.prototype.size,!0),loopLimit:Ka(.5,W.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=V;Graph.handleFactory=Fa;var Ta=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ta.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(b=mxConstants.SHAPE_SWIMLANE);b=Fa[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Fa[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga,Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,b,e,c,d){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==l&&null!=b&&(l=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=e&&(g=new mxPoint(e.getCenterX(),
@@ -2908,7 +2907,7 @@ Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.get
"+S").isEnabled=k;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,
300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(b){c.handleError(b)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,n=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
-null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),v=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,v-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,x-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=c.copiedSize){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(a=0;a<b.length;a++)if(d.getModel().isVertex(b[a])){var f=d.getCellGeometry(b[a]);null!=f&&(f=f.clone(),f.width=c.copiedSize.width,f.height=c.copiedSize.height,d.getModel().setGeometry(b[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(b){c.handleError(b)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2963,9 +2962,9 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(m){null!=c&&c(m)}}),c))};
DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(m,
-b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),x=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+x+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),v=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,D)}}catch(z){}}};
+b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(z){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),f=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(a,c,f){c=null!=c?c:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var m=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -3130,9 +3129,9 @@ else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";els
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.extFonts;if(null!=b&&0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?
(c++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,x,v){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,v),mxUtils.bind(this,function(e){try{var c=new Image;
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,v,x){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=x?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,x),mxUtils.bind(this,function(e){try{var c=new Image;
c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,0,0);a(n)},0):(y.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p);t=Math.ceil(l*t);n.setAttribute("width",p);n.setAttribute("height",t);var y=n.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,0,p,t),y.fillStyle=u,
-y.fill());y.scale(l,l);if(x){var v=k.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*v.gridSteps*l,z=k.getGraphBounds(),D=v.translate.x*B,K=v.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
+y.fill());y.scale(l,l);if(v){var x=k.view,B=x.scale;x.scale=1;var A=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*x.gridSteps*l,z=k.getGraphBounds(),D=x.translate.x*B,K=x.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=d&&d(T)}}))}catch(P){null!=
d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=k,q=0;8>q;q++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=n;n+=b;return a.substring(e,n)}
function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,n);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,n-8);"pHYs"==b&&"dpi"==
@@ -3166,7 +3165,7 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b){var c=function(a){if(null!=a)if(e)for(var c=
0;c<a.length;c++)b[a[c].name]=a[c];else for(var d in b){for(var f=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==b[d].type){f=!0;break}f||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
+c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
b,0==e.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
function(a,b,e){function c(a,b,e,c){k.getModel().beginUpdate();try{var d=[],f=[];if(null!=e.index){for(var g=[],l=e.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;e.index<g.length?null!=c?g.splice(c,1):g[e.index]=b:g.push(b);null!=e.size&&g.length>e.size&&(g=g.slice(0,e.size));b=g.join(",");null!=e.countProperty&&(k.setCellStyles(e.countProperty,g.length,k.getSelectionCells()),d.push(e.countProperty),f.push(g.length))}k.setCellStyles(a,
@@ -3174,15 +3173,15 @@ b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a
function d(b,e,c){var d=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=f.x-d.x+"px";e.style.top=f.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function f(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),m.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
a)n=n.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var n=0;n<d;n++)l[n]=null!=b[n]?b[n]:null!=c?c:"";m.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
-function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var x=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",k=!0);var v=document.createElement("td");
-v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));k&&(v.style.textAlign="right");u.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==y)v.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)v.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(x=B[m],x.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var f=
-document.createElement("select");d(v,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?v.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
-u,m)):"staticArr"==y?v.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(v,g,!0);g.value=e;g.className=
+function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var v=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var x=document.createElement("td");
+x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(x.style.textAlign="right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==y)x.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)x.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(v=B[m],v.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=
+document.createElement("select");d(x,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?x.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
+u,m)):"staticArr"==y?x.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(x.innerHTML=e,mxEvent.addListener(x,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className=
"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",
-v.appendChild(m));u.appendChild(v);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;u.appendChild(v);mxUtils.write(u,mxResources.get("property"));
-x.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else v.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
-B()});x.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");x.appendChild(u);y.appendChild(x);var A=!1,q=!1,z;for(z in b)if(x=b[z],"function"!=typeof x.isVisible||x.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=x.getDefaultValue?x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)q=!q;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=
-x.dependentProps){for(var C=x.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=K;x.dependentPropsVals=E}y.appendChild(p(z,D,x,A,q));A=!A}}for(u=0;u<m.length;u++)for(x=m[u],b=x.parentRow,e=0;e<x.values.length;e++)z=p(x.name,x.values[e],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(z,
+x.appendChild(m));u.appendChild(x);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;u.appendChild(x);mxUtils.write(u,mxResources.get("property"));
+v.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){x.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else x.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+B()});v.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");v.appendChild(u);y.appendChild(v);var A=!1,q=!1,z;for(z in b)if(v=b[z],"function"!=typeof v.isVisible||v.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=v.getDefaultValue?v.getDefaultValue(e,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(e.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=
+v.dependentProps){for(var C=v.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}y.appendChild(p(z,D,v,A,q));A=!A}}for(u=0;u<m.length;u++)for(v=m[u],b=v.parentRow,e=0;e<v.values.length;e++)z=p(v.name,v.values[e],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:e,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==e%2,v.flipBkg),b.parentNode.insertBefore(z,
b.nextSibling),b=z;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(n);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
@@ -3193,8 +3192,8 @@ mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.initialDefaultVertexStyle,
mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=g;b.style.border="1px solid "+l}d.appendChild(b)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(m,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(x);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
+mxEvent.addListener(m,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(v);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft=
"2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var y=Graph.prototype.init;
@@ -3202,11 +3201,11 @@ Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==
window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);
if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||
2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,
-"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
+"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=D.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);
return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,p,t,k){var m=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var x=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=x.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var v="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(v+B));x.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return x};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+this.refresh());var v=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=v.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var x="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?x+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(x+B));v.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return v};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@@ -3234,20 +3233,20 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,x=0,y=ia.get(),v=1/b.pageScale,q=A.checked;if(q)var v=parseInt(K.value),z=parseInt(R.value),v=Math.min(y.height*z/(k.height/b.view.scale),y.width*v/(k.width/b.view.scale));else v=parseInt(u.value)/(100*b.pageScale),isNaN(v)&&(c=1/b.pageScale,u.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*
-c);y.height=Math.ceil(y.height*c);v*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*y.width,x-=k.y*y.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,v,y,0,m,x,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
+function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){v.value=Math.max(1,Math.min(l,Math.max(parseInt(v.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(v.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,v=0,y=ia.get(),x=1/b.pageScale,q=A.checked;if(q)var x=parseInt(K.value),z=parseInt(R.value),x=Math.min(y.height*z/(k.height/b.view.scale),y.width*x/(k.width/b.view.scale));else x=parseInt(u.value)/(100*b.pageScale),isNaN(x)&&(c=1/b.pageScale,u.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*
+c);y.height=Math.ceil(y.height*c);x*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*y.width,v-=k.y*y.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,x,y,0,m,v,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=b.extFonts[c].name,f=b.extFonts[c].url;0==f.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+f+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+f+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}m=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=m&&(d.stylesheet=m,d.refresh())}else{y=
-b.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";e.backgroundColor=y;e.autoOrigin=q;e.appendGraph(b,v,m,x,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,x=b.extFonts[f].url,0==x.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+x+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+x+'");\n}'),
-e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=x.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
-1);for(var v=y;v<=p;v++){var q=a.pages[v],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
-function(b){return"page"==b?q.getName():"pagenumber"==b?v+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,v!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
+b.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";e.backgroundColor=y;e.autoOrigin=q;e.appendGraph(b,x,m,v,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,v=b.extFonts[f].url,0==v.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+v+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+v+'");\n}'),
+e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=v.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
+1);for(var x=y;x<=p;x++){var q=a.pages[x],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
+function(b){return"page"==b?q.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,x!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var m=document.createElement("input");
-m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var x=m.cloneNode(!0);p.appendChild(x);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(l=a.pages.length,
-null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;x.value=n;break}m.setAttribute("max",l);x.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");y.appendChild(v);g=document.createElement("span");
-mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){v.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var v=m.cloneNode(!0);p.appendChild(v);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(v,"change",e);if(null!=a.pages&&(l=a.pages.length,
+null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;v.value=n;break}m.setAttribute("max",l);v.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");y.appendChild(x);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){x.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value","fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
g.appendChild(A);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),J=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);I.appendChild(R);mxEvent.addListener(K,"focus",function(){A.checked=!0});mxEvent.addListener(R,"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);z.appendChild(C);
z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(J);q.appendChild(z);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
@@ -3275,11 +3274,11 @@ function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.r
b.pause=function(){return function(){}};return b};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(x){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(v){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var l=this.updatePageRoot(new DiagramPage(d[f]));
null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,l,0==f?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,v,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
-Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}v?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
+this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,x,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
+Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}x?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("agent",navigator.appVersion),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",Editor.guid()),
a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(n),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
d,null,t,m,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
@@ -3290,8 +3289,8 @@ l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]
delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,e){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b++)"as"!=a.attributes[b].name&&a.setAttribute(a.attributes[b].name,this.anonymizeString(a.attributes[b].value,e));if(null!=a.childNodes)for(b=
0;b<a.childNodes.length;b++)this.anonymizeAttributes(a.childNodes[b],e)};EditorUi.prototype.anonymizeNode=function(a,e){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)null!=b[c].getAttribute("value")&&b[c].setAttribute("value","["+b[c].getAttribute("value").length+"]"),null!=b[c].getAttribute("xmlValue")&&b[c].setAttribute("xmlValue","["+b[c].getAttribute("xmlValue").length+"]"),null!=b[c].getAttribute("style")&&b[c].setAttribute("style","["+b[c].getAttribute("style").length+"]"),null!=
b[c].parentNode&&"root"!=b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&(b[c].setAttribute("id",b[c].parentNode.getAttribute("id")),b[c].parentNode.parentNode.replaceChild(b[c],b[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),
-this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,v){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(v=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,v);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,v);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
+this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,x){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(x=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,x);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,x);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),n=e.view.scale;l=Math.floor(b.x/n-e.view.translate.x);n=Math.floor(b.y/n-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=b&&b!=mxConstants.NONE?' style="background-color:'+b+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
@@ -3301,26 +3300,26 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="tex
null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),d=0;d<k.length;d++){var t=k[d];l.setVisible(t,a[t.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,v,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
+this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,x,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
g=b+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
-null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,v,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
-null;var D=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
-function(a,e,c,d,f,l,k,t,m,v){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};v=v?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(v="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
-null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+v+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
+null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,x,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=
+null;var D=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
+function(a,e,c,d,f,l,k,t,m,x){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(x="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
+null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
e){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,e,c){var b=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
-new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var v=
-mxUtils.parseXml(m).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))l.setValue(t,v);else for(var q=v.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
+new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var x=
+mxUtils.parseXml(m).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))l.setValue(t,x);else for(var q=x.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
0<A.length?JSON.parse(A):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
console.log("Error in icon for "+t.id+": "+u)}}}else if("model"==a.nodeName){for(var J=a.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(a.firstChild)).decode(J,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),v=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+v+"-"+f));
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+x+"-"+f));
return b=mxResources.get("copyOf",[b])+c};EditorUi.prototype.fileLoaded=function(a,e){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(EditorUi.debug("File.closed",[b]),b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");c.root=a[f].root;var t=d.encode(c);this.editor.graph.saveViewState(a[f].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");k.appendChild(t);null!=e&&(e.eltCount+=k.getElementsByTagName("*").length,e.nodeCount+=k.getElementsByTagName("mxCell").length);b=(b<<5)-b+this.hashValue(k,function(a,b,e,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},e)<<0}return b};EditorUi.prototype.hashValue=function(a,e,c){var b=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(b^=this.hashValue(a.nodeName,e,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
g=null!=e?e(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=g&&(b^=this.hashValue(f,e,c)+this.hashValue(g,e,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)b=(b<<5)-b+this.hashValue(a.childNodes[d],e,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);e=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)e=(e<<5)-e+a.charCodeAt(d)<<0;b^=e}return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -3338,10 +3337,10 @@ c,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.remo
F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,d,f,l,n,k,t,m,y){if(null!=b&&"image/"==d.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null);else{var x=!1,v=mxUtils.bind(this,function(b,d){if(null!=b&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(b);null!=f&&0<f.length&&(b=f)}if(null!=b)if(f=mxUtils.parseXml(b),"mxlibrary"==f.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(f.documentElement));g(l,p);c=c.concat(l);G(a);this.spinner.stop();x=!0}catch(M){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){v(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(b,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null);else{var v=!1,x=mxUtils.bind(this,function(b,d){if(null!=b&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(b);null!=f&&0<f.length&&(b=f)}if(null!=b)if(f=mxUtils.parseXml(b),"mxlibrary"==f.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(f.documentElement));g(l,p);c=c.concat(l);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(b,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
p&&E(a)});f=q.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
@@ -3357,7 +3356,7 @@ if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid
m);this.handleError(a,c,d,f,n)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
d.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var c=d.value,e=b.length!=c;e&&this.drive.setUser(b[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,x,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
+e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,v,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
n,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";b=document.createElement("img");b.setAttribute("src",IMAGE_PATH+
"/logo.png");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(b);b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.setAttribute("border","0");b.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(b);mxUtils.write(e,c);document.body.appendChild(e);
@@ -3369,7 +3368,7 @@ EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image
620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,n,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",a):this.openInNewWindow(a,d,f);else{var b=document.createElement("a");l=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof b.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);l=65==(e?parseInt(e[2],10):!1)?!1:l}if(l||this.isOffline()){b.href=URL.createObjectURL(f?
this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+
-l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,m=Math.min(t+1024,e),v=Array(m-t),q=0;t<m;++q,++t)v[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(v)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,m){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
+l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var m=1024*k,y=Math.min(m+1024,e),x=Array(y-m),q=0;m<y;++q,++m)x[q]=b[m].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,m){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
isLocalStorage&&n++;var b=4>=n?2:6<n?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,m):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
b,d,f,c,e)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,b,a,d,f);l=this.isServices(n)?n>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),b.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+a+'"/></html>')):b.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),b.document.close())};var f=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,
@@ -3380,8 +3379,8 @@ mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute(
Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,n,c,b)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();
if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,l,!0,b,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,n);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,m,y,v,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(e,a,k,m,null,d,null,null,"blank"==v?"_blank":"self"==v?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,m,y,x,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var g=this.editor.graph.getSvg(e,a,k,m,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,n,l,k){return this.addCheckbox(a,
d,f,n,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,n,l,k,m){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=m&&b.setAttribute("name",m);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
n||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
@@ -3392,8 +3391,8 @@ f:"background-position:center center;background-repeat:no-repeat;background-imag
mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));b();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=
function(a,c,d,f,n,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=n&&0<n.length&&k.push("edit="+encodeURIComponent(n)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,n,l,k,m,
y){y=null!=y?y:this.createUrlParameters(a,c,d,!1,n,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),m||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(f?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,v,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=v&&0<v.length&&(b.edit=v);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,x,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=x&&0<x.length&&(b.edit=x);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
q(c,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));
e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";b.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);
var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.style.cursor="pointer",mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,
@@ -3403,19 +3402,19 @@ I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,
"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace=
"normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,
function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight=
-"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",k.appendChild(q),mxUtils.br(k);var x=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
+"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",k.appendChild(q),mxUtils.br(k);var v=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!l),F=this.addEditButton(k,G),I=F.getEditInput();l&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(x.getTarget(),x.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(v.getTarget(),v.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";b.appendChild(k);mxUtils.br(b)}var p=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
m=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
function(a,c,d,f,n,l,k,m){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
-"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";b.appendChild(q);mxUtils.br(b);var x=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
+"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";b.appendChild(q);mxUtils.br(b);var v=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),
I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=m);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");
H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
-m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,x.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,v.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=c){var g=document.createElement("h3");mxUtils.write(g,c);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(g)}var k=this.addCheckbox(b,mxResources.get("fit"),!0),p=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,
!f),m=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),A=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,mxResources.get("layers"),E,!E);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
A.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),n);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,n,l,k,m){function b(b){var c=" ",g="";f&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -3432,13 +3431,13 @@ parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border
"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,n)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,n,l,k,m){m=null!=m?m:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=n)this.embedFonts(l,mxUtils.bind(this,function(a){m?this.editor.convertImages(a,mxUtils.bind(this,function(a){n((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):n((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.embedFonts=function(a,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.editor.addFontCss(a,b),c(a)}catch(p){c(a)}}))}catch(g){c(a)}}))};
-EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,v,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
-this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,v,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,x,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,x,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,m=1);for(;m<p.length;m++){var q=
p[m].getAttribute("id");p[m].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[m]));a[q]=p[m].getAttribute("id");var A=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[A+1]));e.model.execute(new ChangePage(this,C,C,A,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(m=0;m<b.length;m++)this.updatePageLinksForCell(a,b[m])}finally{e.model.endUpdate()}}}catch(E){if(n)throw E;this.handleError(E)}return b};
EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)d=f[m].getAttribute("href"),null!=d&&(f[m].setAttribute("href",this.updatePageLink(a,
d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(m=0;m<e.model.getChildCount(c);m++)this.updatePageLinksForCell(a,e.model.getChildAt(c,m))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
-13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(x){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
+13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var n=f.lastIndexOf("/");0<=n&&n<f.length&&(f=f.substring(n+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
@@ -3446,7 +3445,7 @@ this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?b():(this.loadi
"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=window.console&&
console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<c.length){var e=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));d(b.convertDataUri(Editor.createSvgDataUri(a)),e,
-g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(x){f(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
+g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(v){f(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+b(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+b(a.charCodeAt(i),0,0):r+b(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=c&&(g.responseType=
"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,n,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
@@ -3454,60 +3453,59 @@ e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.oner
Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,c,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,c,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,
c,d,l,!0);if(0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
g=Math.round(e.width*f);e=Math.round(e.height*f);b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;b.getModel().beginUpdate();try{e=b.insertVertex(b.getDefaultParent(),null,a,b.snap(c),b.snap(d),1,1,"text;"+(f?"html=1;":"")),b.updateCellSize(e),b.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{b.getModel().endUpdate()}b.setSelectionCell(e)}))}else{a=
-Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
-a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
-14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
-if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
-360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,
-b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},
-function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,v,D){v=null!=v?v:!0;var b=!1,e=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,d,f,v);null!=m&&m(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
-this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,v),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),v&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
-/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
-/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,v,D,z){f=null!=f?f:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
-this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],x=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
---q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(t+1)))),
-y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?x(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
-e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=e.getAttribute("viewBox");if(null==v||0==v.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=v.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var x=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=n(m,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(q*
-x)),l.name);if(isNaN(k)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=Math.max(1,A.width);q=Math.max(1,A.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[B[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):x(b,mxUtils.bind(this,function(){return n(u,
-"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else x(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var A=new Image;A.src=a.target.result;x(b,mxUtils.bind(this,function(){return n(B,"text/xml",c+b*p,d+b*p,A.width,A.height,l.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){x(b,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,c,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted",
+"cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}return[]};
+EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=
+a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=
+b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,
+0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==
+Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=
+a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,x,D){x=null!=x?x:!0;var b=!1,e=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,d,f,x);null!=m&&m(b)});"image"==
+c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,x),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),x&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,
+this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=
+this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,x,D,z){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==
+a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=
+a.length,q=t,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==--q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),
+q=decodeURIComponent(escape(atob(m.substring(t+1)))),y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");
+if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,x=e.getAttribute("viewBox");if(null==x||0==x.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=x.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var v=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),A=n(m,l.type,c+
+b*p,d+b*p,Math.max(1,Math.round(k*v)),Math.max(1,Math.round(q*v)),l.name);if(isNaN(k)||isNaN(q)){var B=new Image;B.onload=mxUtils.bind(this,function(){k=Math.max(1,B.width);q=Math.max(1,B.height);A[0].geometry.width=k;A[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[A[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return A}}}catch(W){}return null})):
+v(b,mxUtils.bind(this,function(){return n(u,"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else v(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var A=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;v(b,mxUtils.bind(this,function(){return n(A,"text/xml",c+b*p,d+b*p,B.width,B.height,l.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){v(b,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){e=a;y()},q)}else y()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||c)mxSettings.setResizeImages(e?d:null),mxSettings.save();b();a(d)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,e)};EditorUi.prototype.parseFile=function(a,c,d){d=null!=d?d:a.name;var b=new FormData;b.append("format","xml");b.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,n,l){n=null!=n?n:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/n,e/n);if(1<g){var k=Math.round(b/g),m=Math.round(e/g),p=document.createElement("canvas");
p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<c.length){var A=document.createElement("canvas");A.width=k;A.height=m;var E=A.toDataURL();q!==E&&(c=q,b=k,e=m)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
b.src=a}catch(n){if(null!=d)d(n);else throw n;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
-":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=g,k.height=l,c.cellsResized([b],[k],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
-function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=Math.max(k.width,
-g),k.height=Math.max(k.height,l),c.cellsResized([b],[k],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var n=c.model.getGeometry(b);null!=n&&(n=n.clone(),n.width=g,n.height=l,c.cellsResized([b],[n],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
+function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var n=c.model.getGeometry(b);null!=n&&(n=n.clone(),n.width=Math.max(n.width,
+g),n.height=Math.max(n.height,l),c.cellsResized([b],[n],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
null!=d)this.editMermaidData(b,e,d);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):f.apply(this,arguments)}}catch(F){a.handleError(F)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
"https://desk.draw.io/support/solutions/articles/16000051979");var n=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return n.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
"a"==e.nodeName.toLowerCase()&&(b=e.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=d&&d(a,b)};l.call(this,a,b,e)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");
var m=c.getExportVariables;c.getExportVariables=function(){var b=m.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var q=c.labelLinkClicked;c.labelLinkClicked=function(a,b,e){var d=b.getAttribute("href");if(null==d||!c.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(d),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
-function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
+function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var e=Math.max(1,
a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,e)),d/Math.max(1,a));b.insertImage(decodeURIComponent(c),e*d,a*d)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();
-a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){v=document.getElementById("geFooter");
-null!=v&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}v=document.getElementById("geInfo");
-null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
+a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");
+null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}x=document.getElementById("geInfo");
+null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
-else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=c.sanitizeHtml(k);var n=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(k=e[0].getAttribute("src"),
-null==k&&(k=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?k=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(k=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&null!=k&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
+else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var n=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=c.sanitizeHtml(n);var k=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(n=e[0].getAttribute("src"),
+null==n&&(n=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)||(k=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?n=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(n=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(n,f,g,!0,k,null,m))});k&&null!=n&&n.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,b)),e/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,
"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position=
"absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);
null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||f||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,
-null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=b&&17!=b&&91!=b||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,
-"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
+null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=b&&17!=b&&91!=b||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,
+"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==d?!0:n.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,
function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);
@@ -3531,7 +3529,7 @@ f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,
c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();
this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));
else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.openFileHandle(b.target.result,a.name,
-a,c)}catch(x){this.handleError(x)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
+a,c)}catch(v){this.handleError(v)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
a);var c=[],d;for(d in a)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(a,c){function b(a){if(null!=a){var b=a.lastIndexOf(".");0<b&&(a=a.substring(b+1,a.length));null==c[a]&&(c[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),
@@ -3542,24 +3540,24 @@ this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi(
function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
-var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
-n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,n=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
-null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(n.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var v=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);
K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=
-u.model,ga=fa.getChildCells(fa.getRoot()),m={},S=0;S<g.layerIds.length;S++)m[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],m[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
-"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();x.xml=mxUtils.getXml(aa);
-x.data=this.getFileData(null,null,!0,null,null,null,aa);x.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),x.data=this.getHtml(J,this.editor.graph),x.xml=mxUtils.getXml(J),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);
-k.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
-null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
-(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),
-this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(n=l(g.xml),null!=n&&""!=n&&ha.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
+u.model,ga=fa.getChildCells(fa.getRoot()),n={},S=0;S<g.layerIds.length;S++)n[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],n[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");v.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();v.xml=mxUtils.getXml(aa);
+v.data=this.getFileData(null,null,!0,null,null,null,aa);v.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),v.data=this.getHtml(J,this.editor.graph),v.xml=mxUtils.getXml(J),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=Editor.createSvgDataUri(a);
+k.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
+null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(v),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
+(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),
+this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();
d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
-b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=e;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=e;k.postMessage(JSON.stringify(n),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===
typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var m=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,
target:b,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
@@ -3567,15 +3565,15 @@ mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("sav
c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),
-d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,v=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=
-a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?v=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
+d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,x=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):"connect"==Q?ba.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)A==la[P]&&
(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=ba)for(var T=0;T<ba.length;T++)null==k[ba[T].to]&&(k[ba[T].to]={});A=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&A.push(ja)}H.model.beginUpdate();try{for(P=0;P<A.length;P++){var ja=
-A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=v&&null!=q){var ia=q[W.getAttribute(v)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
+A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=x&&null!=q){var ia=q[W.getAttribute(x)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ba.length;T++)k[ba[T].to][N.getAttribute(ba[T].to)]=N;null!=ha&&"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=aa+
parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width="auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=
H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ba.length;T++)for(var Aa=ba[T],P=0;P<d.length;P++){var N=d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));
-var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}ra.push(g);
+var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var n=c.labels[l],m=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");m.vertex=!0;m.connectable=!1;m.geometry.relative=!0;if(null!=n.dx||null!=n.dy)m.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(m)}ra.push(g);
mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));
"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==
2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;
@@ -3598,7 +3596,7 @@ this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(Exp
p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==
d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));
c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(v){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));
c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
@@ -3606,20 +3604,20 @@ setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.proto
(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,
arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),
"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){b(Array.prototype.slice.apply(arguments))}),m.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,m);else{var q=this[d].apply(this,m);
-b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(v){b(null,"Invalid Call: An error occured, "+v.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=c&&c(x)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
-"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
-{};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
+"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
+function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
+{};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,k()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):l())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(n){null!=c&&c(n)}else null!=c&&c()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=
-function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.getDatabaseItems=
-function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();
+function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=
+function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();
e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();
null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,
a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,m,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,m,q,y,v,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,
-y,v,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};
+return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,m,q,y,x,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,
+y,x,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};
EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,
c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=
function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
@@ -3627,28 +3625,28 @@ var CommentsWindow=function(a,c,f,d,k,m){function q(){for(var a=z.getElementsByT
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function n(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,m){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=v;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(v,function(a){v.id=a;c.replies.push(v);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(v,A,function(a){t()},!0)}var B=u().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(v,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var v=document.createElement("div");v.className="geCommentContainer";v.setAttribute("data-commentId",c.id);v.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(v.style.backgroundColor="ghostWhite");
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=x;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(x,function(a){x.id=a;c.replies.push(x);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(x,A,function(a){t()},!0)}var B=u().pdiv,x=a.newComment(d,a.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(x,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",c.id);x.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=c.user.pictureUrl||Editor.userImage;E.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";E.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,c.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",c.id);e(c,
-F);L.appendChild(F);v.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");v.appendChild(E);c.isLocked&&(v.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);x||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||x||c.isLocked||(B(mxResources.get("edit"),
-function(){function d(){b(c,v,function(){g(v);c.editComment(c.content,function(){n(v)},function(b){p(v);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(v);c.deleteComment(function(a){if(!0===a){a=v.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=v.querySelectorAll(".geCommentAction");for(a=
-0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(v);v.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(v);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));x||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
+F);L.appendChild(F);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");x.appendChild(E);c.isLocked&&(x.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);v||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||v||c.isLocked||(B(mxResources.get("edit"),
+function(){function d(){b(c,x,function(){g(x);c.editComment(c.content,function(){n(x)},function(b){p(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);c.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=x.querySelectorAll(".geCommentAction");for(a=
+0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(x);x.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?A(mxResources.get("reOpened")+": ",!0,b,!1,
-!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});v.appendChild(E);null!=f?z.insertBefore(v,f.nextSibling):z.appendChild(v);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,v,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return v}}var x=
-!a.canComment(),t=a.canReplyToReplies(),y=null,v=document.createElement("div");v.className="geCommentsWin";v.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";v.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!x){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});x.appendChild(E);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,x,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return x}}var v=
+!a.canComment(),t=a.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";x.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);n(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});A.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
-mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));v.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
+mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));x.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
-A;this.window=new mxWindow(mxResources.get("comments"),v,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+A;this.window=new mxWindow(mxResources.get("comments"),x,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=
function(a,c,f,d,k,m,q,b,e,g,p){var n=document.createElement("div");n.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);n.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),n.appendChild(l));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(x.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
-f(x.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
-mxEvent.addListener(k,"click",function(a){x.checked=!x.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
+f(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
+mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,c,f){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=f&&(c.viewState=f,this.neverShown=!1))}
@@ -3716,28 +3714,28 @@ m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],c))}for(k=0;k<g
return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function b(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,c){c=null!=c?c:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=b(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||
g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
-!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var u=t.model.getTerminal(p[y],!1);if(g==b(u)){var v=t.view.getState(u);u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(u=t.model.getTerminal(p[y],
-!1),g==b(u)&&(v=t.view.getState(u),u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY()))){var A=[];t.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
+!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var x=t.model.getTerminal(p[y],!1);if(g==b(x)){var u=t.view.getState(x);x!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(e=10+Math.max(e,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(x=t.model.getTerminal(p[y],
+!1),g==b(x)&&(u=t.view.getState(x),x!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY()))){var A=[];t.traverse(u.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,m=-m):c==mxConstants.DIRECTION_WEST?(l=-l,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
-null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?x.actions.get("selectParent").funct():
-d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var x=this,t=x.editor.graph,y=t.getModel(),v=x.menus.createPopupMenu;x.menus.createPopupMenu=function(b,c,d){v.apply(this,arguments);
-if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};x.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",
-function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};x.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,u=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/u-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?v.actions.get("selectParent").funct():
+d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,y=t.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
+if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
-if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-y.getCenterX())/t.view.scale,d=(v.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=x.sidebar){var A=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},G=x.onKeyDown;x.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){x.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
-function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),v=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,u=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):v==u?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
+if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-y.getCenterX())/t.view.scale,d=(u.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var A=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
+function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),u=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):u==x?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=f.apply(this,arguments),c=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var b=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
@@ -3745,8 +3743,8 @@ d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);b.insertEdge(d,!1);a.insert(
c.vertex=!0;var b=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;
c.insertEdge(d,!0);b.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var n=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');n.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;c.insertEdge(l,!0);n.insertEdge(l,!1);var x=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.vertex=!0;var t=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);x.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(x);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+l.geometry.relative=!0;l.edge=!0;c.insertEdge(l,!0);n.insertEdge(l,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3782,7 +3780,7 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
this.menus.findWindow=null);n.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
@@ -3795,26 +3793,26 @@ function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql im
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
-"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
+"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?m.insertBefore(g,l.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+m.insertBefore(c,l.statusContainer):m.appendChild(c);return c}function g(){for(var a=m.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=m.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);c=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([c,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=f&&(c=l.actions.get("undo"),a=l.actions.get("redo"),c=d("",c.funct,null,mxResources.get("undo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([c,a],60),480<=f)){var a=l.actions.get("zoomIn"),c=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-e([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e([d("",function(){n.popupMenuHandler.hideMenu();var a=n.view.scale,b=n.view.translate.x,c=n.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-n.view.scale)&&b==n.view.translate.x&&c==n.view.translate.y&&l.actions.get(n.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?d("",c.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(c=q.addMenu("",a.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor=
-"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
-null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
-b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
+"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
+null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,m);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};l.setStatusText(l.editor.getStatus());m.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(l.buttonContainer);l.menubarContainer=
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var B=q.addMenu("100%",K.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);K=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(m);u.appendChild(l.diagramContainer);
k.appendChild(u);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,m,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,c,f){this.init(a,c,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
@@ -3827,8 +3825,8 @@ mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,
1:"pagecount"==a?b.length:f.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
-!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var n=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
+!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
@@ -3848,9 +3846,9 @@ function(){e.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),e.style.cur
f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var b=this.graph,e=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,x=0;x<g.length;x++){var t=g[x];if("pages"==t){l=c.ownerDocument.createElement("div");
-l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;v.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){l=c.ownerDocument.createElement("div");
+l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=n)n.parentNode.removeChild(n),
n=null;else{n=this.graph.createLayersDialog();mxEvent.addListener(n,"mouseleave",function(){n.parentNode.removeChild(n);n=null});a=z.getBoundingClientRect();n.style.width="140px";n.style.padding="2px 0px 2px 0px";n.style.border="1px solid #d0d0d0";n.style.backgroundColor="#eee";n.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";n.style.fontSize="11px";n.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(n,80);var b=mxUtils.getDocumentScrollOrigin(document);n.style.left=b.x+a.left+
"px";n.style.top=b.y+a.bottom+"px";document.body.appendChild(n)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 0f0dc8dd..4f02434f 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -187,12 +187,11 @@ value:function(a,b,d,f,g,h){var c=this.gen.arc(a,b,d,f,g,h,6<arguments.length&&v
newSeed:function(){return U.newSeed()}}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
-String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;mxLoadStylesheets="MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase();window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;
-window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";
-window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";
-window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
-window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
-window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
+String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
+window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";
+window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";
+window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskadi",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
he:"עברית",ar:"العربية",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
@@ -1489,8 +1488,8 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=0!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f,g){f=null!=f?f:[];if(0<c||0<d||null!=g){var k=this.getModel(),l=a+c,m=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var n=k.getChildCount(e),p=0;p<n;p++){var q=k.getChildAt(e,p),r=this.view.getState(q);if(null!=r&&this.isCellVisible(q)){var t=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=t&&(r=mxUtils.getBoundingBox(r,t));null!=g&&k.isVertex(q)&&mxUtils.intersects(g,r)||null==g&&(k.isEdge(q)||k.isVertex(q))&&
-r.x>=a&&r.y+r.height<=m&&r.y>=b&&r.x+r.width<=l?f.push(q):this.getCells(a,b,c,d,q,f,g)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k){f=null!=f?f:[];if(0<c||0<d||null!=g){var l=this.getModel(),m=a+c,n=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=l.getRoot()));if(null!=e)for(var p=l.getChildCount(e),q=0;q<p;q++){var r=l.getChildAt(e,q),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&(null==k||!k(t))){var u=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(t=mxUtils.getBoundingBox(t,u));null!=g&&l.isVertex(r)&&mxUtils.intersects(g,t)||null==g&&(l.isEdge(r)||
+l.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=b&&t.x+t.width<=m?f.push(r):this.getCells(a,b,c,d,r,f,g,k)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
@@ -1587,7 +1586,7 @@ mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0
mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;
mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};
mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
-mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
+mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null==b||b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a);)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));return null!=b?b.cell:null};
mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())&&!mxEvent.isAltDown(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};
@@ -2150,11 +2149,11 @@ Editor.prototype.setFilename=function(a){this.filename=a};
Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,f){c.undoableEditHappened(f.getProperty("edit"))};var f=mxUtils.bind(this,function(a,c){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,c){var f=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<f.length){a.getModel();for(var k=[],b=0;b<
f.length;b++)null!=a.view.getState(f[b])&&k.push(f[b]);a.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,f);c.addListener(mxEvent.REDO,f);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,x=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,v=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";v+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
-"geDialog");k=this.getPosition(v,D,f,d);v=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=v+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=v+f+38-n+"px",m.style.zIndex=
-this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,x=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";v=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
-Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(x,y-64);e=this.getPosition(v,D,f,d);v=e.x;D=e.y;z.style.left=v+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=v+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+function Dialog(a,c,f,d,k,m,q,b,e,g,p){var n=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(n=80);f+=n;d+=n;var l=f,v=d,t=mxUtils.getDocumentSize();null!=window.innerHeight&&(t.height=window.innerHeight);var y=t.height,x=Math.max(1,Math.round((t.width-f-64)/2)),D=Math.max(1,Math.round((y-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(d,y-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));t=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=t.x+"px";this.bg.style.top=t.y+"px";x+=t.x;D+=t.y;k&&document.body.appendChild(this.bg);var z=a.createDiv(e?"geTransDialog":
+"geDialog");k=this.getPosition(x,D,f,d);x=k.x;D=k.y;z.style.width=f+"px";z.style.height=d+"px";z.style.left=x+"px";z.style.top=D+"px";z.style.zIndex=this.zIndex;z.appendChild(c);document.body.appendChild(z);!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=D+14+"px",m.style.left=x+f+38-n+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!p)){var C=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){C=!0}),null,mxUtils.bind(this,function(b){C&&(a.hideDialog(!0),C=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var e=g();null!=e&&(l=f=e.w,v=d=e.h)}e=mxUtils.getDocumentSize();y=e.height;this.bg.style.height=y+"px";x=Math.max(1,Math.round((e.width-f-64)/2));D=Math.max(1,
+Math.round((y-d-a.footerHeight)/3));f=null!=document.body?Math.min(l,document.body.scrollWidth-64):l;d=Math.min(v,y-64);e=this.getPosition(x,D,f,d);x=e.x;D=e.y;z.style.left=x+"px";z.style.top=D+"px";z.style.width=f+"px";z.style.height=d+"px";!b&&c.clientHeight>z.clientHeight-64&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=D+14+"px",this.dialogImg.style.left=x+f+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2165,10 +2164,10 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,c){return new mxPoint(a,c)};Dialog.prototype.close=function(a,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,c))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(a,c,f,d,k,m,q,b,e,g,p){e=null!=e?e:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var l=document.createElement("div");l.style.padding="0px";l.style.margin="0px";l.style.fontSize="18px";l.style.paddingBottom="16px";l.style.marginBottom="10px";l.style.borderBottom="1px solid #c0c0c0";l.style.color="gray";l.style.whiteSpace="nowrap";l.style.textOverflow="ellipsis";l.style.overflow="hidden";mxUtils.write(l,c);l.setAttribute("title",c);n.appendChild(l)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var x=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
-x.className="geBtn";f.appendChild(x);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){x.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var x=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,x-=d.y*c.height):
-e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,x,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=f;n.appendChild(c);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=m&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),c.className="geBtn",f.appendChild(c),f.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=p&&p()}),g.className="geBtn",f.appendChild(g));var v=mxUtils.button(d,function(){e&&a.hideDialog();null!=k&&k()});
+v.className="geBtn";f.appendChild(v);null!=q&&(d=mxUtils.button(q,function(){e&&a.hideDialog();null!=b&&b()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){v.focus()};n.appendChild(f);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
+PrintDialog.prototype.create=function(a){function c(a){var e=b.checked||g.checked,d=parseInt(n.value)/100;isNaN(d)&&(d=1,n.value="100%");var d=.75*d,c=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,l=1/f.pageScale;if(e){var m=b.checked?1:parseInt(p.value);isNaN(m)||(l=mxUtils.getScaleForPageCount(m,f,c))}f.getGraphBounds();var v=m=0,c=mxRectangle.fromRectangle(c);c.width=Math.ceil(c.width*d);c.height=Math.ceil(c.height*d);l*=d;!e&&f.pageVisible?(d=f.getPageLayout(),m-=d.x*c.width,v-=d.y*c.height):
+e=!0;e=PrintDialog.createPrintPreview(f,l,c,0,m,v,e);e.open();a&&PrintDialog.printPreview(e)}var f=a.editor.graph,d,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var b=document.createElement("input");b.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(b);var e=document.createElement("span");mxUtils.write(e," "+mxResources.get("fitPage"));
k.appendChild(e);mxEvent.addListener(e,"click",function(a){b.checked=!b.checked;g.checked=!b.checked;mxEvent.consume(a)});mxEvent.addListener(b,"change",function(){g.checked=!b.checked});d.appendChild(k);q.appendChild(d);d=d.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);e=document.createElement("span");mxUtils.write(e," "+mxResources.get("posterPrint")+":");k.appendChild(e);mxEvent.addListener(e,
"click",function(a){g.checked=!g.checked;b.checked=!g.checked;mxEvent.consume(a)});d.appendChild(k);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(p);mxUtils.write(k," "+mxResources.get("pages")+" (max)");d.appendChild(k);q.appendChild(d);mxEvent.addListener(g,"change",
function(){g.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");b.checked=!g.checked});d=d.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");d.appendChild(k);k=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";k.appendChild(n);d.appendChild(k);q.appendChild(d);d=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
@@ -2176,30 +2175,30 @@ k.style.paddingTop="20px";k.setAttribute("align","right");e=mxUtils.button(mxRes
k.appendChild(e);d.appendChild(k);q.appendChild(d);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var c=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(f){}};
PrintDialog.createPrintPreview=function(a,c,f,d,k,m,q){c=new mxPrintPreview(a,c,f,d,k,m);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var b=c.writeHead;c.writeHead=function(a){b.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==x?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",x.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(x.src.substring(0,42))+"...")}var d=a.editor.graph,k,
+var PageSetupDialog=function(a){function c(){null==p||p==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=p,g.style.backgroundImage="")}function f(){null==v?(l.removeAttribute("title"),l.style.fontSize="",l.innerHTML=mxUtils.htmlEntities(mxResources.get("change"))+"..."):(l.setAttribute("title",v.src),l.style.fontSize="11px",l.innerHTML=mxUtils.htmlEntities(v.src.substring(0,42))+"...")}var d=a.editor.graph,k,
m,q=document.createElement("table");q.style.width="100%";q.style.height="100%";var b=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var e=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",d.pageFormat);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");
m=document.createElement("td");mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="18px";g.style.height="18px";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";var p=d.background;c();mxEvent.addListener(g,"click",function(b){a.pickColor(p||"none",function(a){p=
a;c()});mxEvent.consume(b)});m.appendChild(g);mxUtils.write(m,mxResources.get("gridSize")+":");var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.style.width="40px";n.style.marginLeft="6px";n.value=d.getGridSize();m.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?d.getGridSize():a)});k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,
-mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var x=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(x=a,f())},x);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
-"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,x,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=x?x.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
+mxResources.get("image")+":");k.appendChild(m);m=document.createElement("td");var l=document.createElement("a");l.style.textDecoration="underline";l.style.cursor="pointer";l.style.color="#a0a0a0";var v=d.backgroundImage;mxEvent.addListener(l,"click",function(b){a.showBackgroundImageDialog(function(a,b){b||(v=a,f())},v);mxEvent.consume(b)});f();m.appendChild(l);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align",
+"right");var t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);var y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||d.gridSize===b||d.setGridSize(b);b=new ChangePageSetup(a,p,v,e.get());b.ignoreColor=d.background==p;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=v?v.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==
b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||d.model.execute(b)});y.className="geBtn gePrimaryBtn";m.appendChild(y);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);b.appendChild(k);q.appendChild(b);this.container=q};
PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function k(a,d,c){if(c||n!=document.activeElement&&l!=document.activeElement){a=!1;for(d=0;d<t.length;d++)c=t[d],z?"custom"==c.key&&(b.value=c.key,z=!1):null!=c.format&&("a4"==c.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==c.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==c.format.width&&
f.height==c.format.height?(b.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):f.width==c.format.height&&f.height==c.format.width&&(b.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(e.style.display="",p.style.display="none"):(n.value=f.width/100,l.value=f.height/100,m.setAttribute("checked","checked"),
b.value="custom",e.style.display="none",p.style.display="")}}c="format-"+c;var m=document.createElement("input");m.setAttribute("name",c);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",c);q.setAttribute("type","radio");q.setAttribute("value","landscape");var b=document.createElement("select");b.style.marginBottom="8px";b.style.width="202px";var e=document.createElement("div");e.style.marginLeft="4px";e.style.width="210px";
e.style.height="24px";m.style.marginRight="6px";e.appendChild(m);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));e.appendChild(c);q.style.marginLeft="10px";q.style.marginRight="6px";e.appendChild(q);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));e.appendChild(g);var p=document.createElement("div");p.style.marginLeft="4px";p.style.width="210px";p.style.height="24px";var n=document.createElement("input");
-n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var x={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var v=t[y];x[v.key]=v;var D=document.createElement("option");D.setAttribute("value",v.key);mxUtils.write(D,v.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
-a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=x[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
+n.setAttribute("size","7");n.style.textAlign="right";p.appendChild(n);mxUtils.write(p," in x ");var l=document.createElement("input");l.setAttribute("size","7");l.style.textAlign="right";p.appendChild(l);mxUtils.write(p," in");e.style.display="none";p.style.display="none";for(var v={},t=PageSetupDialog.getFormats(),y=0;y<t.length;y++){var x=t[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",x.key);mxUtils.write(D,x.title);b.appendChild(D)}var z=!1;k();a.appendChild(b);mxUtils.br(a);
+a.appendChild(e);a.appendChild(p);var C=f,A=function(a,c){var g=v[b.value];null!=g.format?(n.value=g.format.width/100,l.value=g.format.height/100,p.style.display="none",e.style.display=""):(e.style.display="none",p.style.display="");g=parseFloat(n.value);if(isNaN(g)||0>=g)n.value=f.width/100;g=parseFloat(l.value);if(isNaN(g)||0>=g)l.value=f.height/100;g=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(l.value)));"custom"!=b.value&&q.checked&&(g=new mxRectangle(0,0,
g.height,g.width));c&&z||g.width==C.width&&g.height==C.height||(C=g,null!=d&&d(C))};mxEvent.addListener(c,"click",function(a){m.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){q.checked=!0;A(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",A);mxEvent.addListener(n,"click",A);mxEvent.addListener(l,"blur",A);mxEvent.addListener(l,"click",A);mxEvent.addListener(q,"change",A);mxEvent.addListener(m,"change",A);mxEvent.addListener(b,"change",function(a){z="custom"==b.value;
A(a,!0)});A();return{set:function(a){f=a;k(null,null,!0)},get:function(){return C},widthInput:n,heightInput:l}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,x,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");x=document.createElement("td");x.style.whiteSpace="nowrap";x.style.fontSize="10pt";x.style.width=p?"80px":"120px";mxUtils.write(x,(k||mxResources.get("filename"))+":");l.appendChild(x);var v=document.createElement("input");v.setAttribute("value",c||"");v.style.marginLeft="4px";v.style.width=null!=n?n+
-"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(v.value))e&&a.hideDialog(),d(v.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(v.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=v,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(v.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};x=document.createElement("td");
-x.style.whiteSpace="nowrap";x.appendChild(v);l.appendChild(x);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,v,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",x.appendChild(l),v.style.width=null!=n?n-40+"px":"140px"),x.appendChild(FilenameDialog.createTypeHint(a,v,p)));null!=q&&(l=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(q),l.appendChild(x),y.appendChild(l));l=
-document.createElement("tr");x=document.createElement("td");x.colSpan=2;x.style.paddingTop="20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&x.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",x.appendChild(n));mxEvent.addListener(v,"keypress",function(a){13==a.keyCode&&D.click()});
-x.appendChild(D);a.editor.cancelFirst||x.appendChild(p);l.appendChild(x);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
+var FilenameDialog=function(a,c,f,d,k,m,q,b,e,g,p,n){e=null!=e?e:!0;var l,v,t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";l=document.createElement("tr");v=document.createElement("td");v.style.whiteSpace="nowrap";v.style.fontSize="10pt";v.style.width=p?"80px":"120px";mxUtils.write(v,(k||mxResources.get("filename"))+":");l.appendChild(v);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=n?n+
+"px":"180px";var D=mxUtils.button(f,function(){if(null==m||m(x.value))e&&a.hideDialog(),d(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=t.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=x,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor="",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),D.click());a.stopPropagation();a.preventDefault()}))}}};v=document.createElement("td");
+v.style.whiteSpace="nowrap";v.appendChild(x);l.appendChild(v);if(null!=k||null==q)y.appendChild(l),null!=p&&(null!=a.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),l.style.marginLeft="6px",l.style.width="74px",v.appendChild(l),x.style.width=null!=n?n-40+"px":"140px"),v.appendChild(FilenameDialog.createTypeHint(a,x,p)));null!=q&&(l=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(q),l.appendChild(v),y.appendChild(l));l=
+document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop="20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});p.className="geBtn";a.editor.cancelFirst&&v.appendChild(p);null!=b&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(b)}),n.className="geBtn",v.appendChild(n));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&D.click()});
+v.appendChild(D);a.editor.cancelFirst||v.appendChild(p);l.appendChild(v);y.appendChild(l);t.appendChild(y);this.container=t};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(a,c,f){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var k=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<f.length;a++)if(0<f[a].ext.length&&c.value.toLowerCase().substring(c.value.length-f[a].ext.length-1)=="."+f[a].ext){d.setAttribute("src",
mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(f[a].title));break}};mxEvent.addListener(c,"keyup",k);mxEvent.addListener(c,"change",k);mxEvent.addListener(d,"click",function(c){var f=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=f&&a.showError(null,f,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
mxEvent.consume(c)});k();return d};
@@ -2213,30 +2212,30 @@ d="url("+this.gridImage+")";var f=e=0;null!=a.view.backgroundPageShape&&(f=this.
b,a.container.className="geDiagramContainer geDiagramBackdrop",e.style.backgroundImage="none",e.style.backgroundColor=""):(a.container.className="geDiagramContainer",e.style.backgroundPosition=c,e.style.backgroundColor=b,e.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var e=this.gridSteps*b,d=[],c=1;c<this.gridSteps;c++){var f=c*b;d.push("M 0 "+f+" L "+e+" "+f+" M "+f+" 0 L "+f+" "+e)}return'<svg width="'+
e+'" height="'+e+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+e+'" height="'+e+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+e+" 0 L 0 0 0 "+e+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,e){var d=this.view.scale,c=this.view.translate,f=this.pageFormat,l=d*this.pageScale,m=this.view.getBackgroundPageBounds();b=m.width;e=m.height;var t=
-new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:v,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
+new mxRectangle(d*c.x,d*c.y,f.width*l,f.height*l),k=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(e/t.height)-1:0,x=a?Math.ceil(b/t.width)-1:0,q=m.x+b,z=m.y+e;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?k:x,e=0;e<=b;e++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(m.x),Math.round(m.y+(e+1)*t.height)),
new mxPoint(Math.round(q),Math.round(m.y+(e+1)*t.height))]:[new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(m.y)),new mxPoint(Math.round(m.x+(e+1)*t.width),Math.round(z))];null!=a[e]?(a[e].points=d,a[e].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[e]=d)}for(e=b;e<a.length;e++)a[e].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,e){for(var d=0;d<b.length;d++){if(this.graph.isTableCell(b[d])||this.graph.isTableRow(b[d]))return!1;if(this.graph.getModel().isVertex(b[d])){var f=this.graph.getCellGeometry(b[d]);if(null!=f&&f.relative)return!1}}return c.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=f.apply(this,arguments);
a.intersects=mxUtils.bind(this,function(b,e){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,e=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,c=this.graph.pageScale,
f=d.width*c,d=d.height*c,c=Math.floor(Math.min(0,b)/f),l=Math.floor(Math.min(0,e)/d);return new mxRectangle(this.scale*(this.translate.x+c*f),this.scale*(this.translate.y+l*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-c)*f,this.scale*(Math.ceil(Math.max(1,e+a.height/this.scale)/d)-l)*d)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&
mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,e,d,c,f){var g=k.apply(this,arguments);null==f||f||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var m=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,e){var d,c=this.graph.model.getParent(a);
-if(b)return d=this.graph.getCellGeometry(a),!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));d=m.apply(this,arguments);if(this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
+if(b)d=this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isContainer(c)||this.graph.isPart(a));else if(d=m.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=c,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(e.getEvent())||this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(e.getEvent())||
this.graph.isTableCell(a)&&this.graph.isCellSelected(c);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),e=b.getParent(a),d=this.graph.view.getState(e),c=this.graph.isCellSelected(a);null!=d&&(b.isVertex(e)||b.isEdge(e));){var f=this.graph.isCellSelected(e),c=c||f;if(f||!c&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=e;e=b.getParent(e)}return a}})();EditorUi=function(a,c,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var d=this.editor.graph;d.lightbox=f;this.initialDefaultVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=
mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,
function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=
k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(c=function(a){if(null!=a){var b=mxEvent.getSource(a);if("A"==b.nodeName)for(;null!=b;){if("geHint"==b.className)return!0;b=b.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c):d.panningHandler.usePopupTrigger=
-!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=v.hoverIcons&&v.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
+!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(c=d.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var m=d.graphHandler.start;d.graphHandler.start=function(){null!=x.hoverIcons&&x.hoverIcons.reset();m.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-
b.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-b.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var q=!1,b=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,e){return q||b.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),
d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var e=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return e.apply(this,arguments)||q||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&
-(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,x=null,t=null,y=
-mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=x}n=d.cellEditor.isContentEditing();
-l=a;x=e;t=b}}),v=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=v.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));v.toolbar.setFontName(e);
-v.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){v.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
+(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var g=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var p=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return q||p.apply(this,arguments)};var n=!1,l=null,v=null,t=null,y=
+mxUtils.bind(this,function(){if(null!=this.toolbar&&n!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==t)this.toolbar.createTextToolbar();else{for(var c=0;c<t.length;c++)this.toolbar.container.appendChild(t[c]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=v}n=d.cellEditor.isContentEditing();
+l=a;v=e;t=b}}),x=this,D=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){D.apply(this,arguments);y();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=x.toolbar)){var e=b.fontFamily;"'"==e.charAt(0)&&(e=e.substring(1));"'"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1));x.toolbar.setFontName(e);
+x.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var z=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,b){try{z.apply(this,arguments),y()}catch(B){x.handleError(B)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===
window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(u){}var C=d.fireMouseEvent;d.fireMouseEvent=function(a,b,e){a==mxEvent.MOUSE_DOWN&&this.container.focus();C.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,e){this.menus.createPopupMenu(a,b,e)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
function(){return keyHandler};var A="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");this.setDefaultStyle=function(a){try{var b=
d.view.getState(a);if(null!=b){var e=a.clone();e.style="";var c=d.getCellStyle(e);a=[];var e=[],g;for(g in b.style)c[g]!=b.style[g]&&(a.push(b.style[g]),e.push(g));for(var f=d.getModel().getStyle(b.cell),p=null!=f?f.split(";"):[],f=0;f<p.length;f++){var l=p[f],n=l.indexOf("=");if(0<=n){g=l.substring(0,n);var u=l.substring(n+1);null!=c[g]&&"none"==u&&(a.push(u),e.push(g))}}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
e,"values",a,"cells",[b.cell]))}}catch(Y){this.handleError(Y)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(c=0;c<I[a].length;c++)A.push(I[a][c]);for(a=0;a<E.length;a++)0>mxUtils.indexOf(A,E[a])&&A.push(E[a]);var J=function(a,b,e){e=null!=e?e:d.getModel();e.beginUpdate();try{for(var c=0;c<a.length;c++){var g=a[c],f;if(b)f=["fontSize","fontFamily","fontColor"];else{var p=e.getStyle(g),l=null!=p?p.split(";"):[];f=A.slice();for(var n=0;n<l.length;n++){var u=l[n],B=u.indexOf("=");if(0<=B){var t=
-u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var x=0;x<k.length;x++){var y=mxUtils.indexOf(f,k[x]);0<=y&&f.splice(y,1)}}}}}for(var v=e.isEdge(g),q=v?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!v||v&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
+u.substring(0,B),K=mxUtils.indexOf(f,t);0<=K&&f.splice(K,1);for(var m=0;m<I.length;m++){var k=I[m];if(0<=mxUtils.indexOf(k,t))for(var v=0;v<k.length;v++){var y=mxUtils.indexOf(f,k[v]);0<=y&&f.splice(y,1)}}}}}for(var x=e.isEdge(g),q=x?d.currentEdgeStyle:d.currentVertexStyle,D=e.getStyle(g),n=0;n<f.length;n++){var t=f[n],z=q[t];null==z||"shape"==t&&!x||x&&!(0>mxUtils.indexOf(E,t))||(D=mxUtils.setStyle(D,t,z))}e.setStyle(g,D)}}finally{e.endUpdate()}};d.addListener("cellsInserted",function(a,b){J(b.getProperty("cells"))});
d.addListener("textInserted",function(a,b){J(b.getProperty("cells"),!0)});this.insertHandler=J;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var e=[b.getProperty("cell")];b.getProperty("terminalInserted")&&e.push(b.getProperty("terminal"));J(e)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var e=b.getProperty("cells"),c=!1,g=!1;if(0<e.length)for(var f=0;f<e.length&&(c=d.getModel().isVertex(e[f])||c,!(g=d.getModel().isEdge(e[f])||g)||!c);f++);else g=c=!0;for(var e=
b.getProperty("keys"),p=b.getProperty("values"),f=0;f<e.length;f++){var l=0<=mxUtils.indexOf(G,e[f]);if("strokeColor"!=e[f]||null!=p[f]&&"none"!=p[f])if(0<=mxUtils.indexOf(E,e[f]))g||0<=mxUtils.indexOf(F,e[f])?null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]:c&&0<=mxUtils.indexOf(A,e[f])&&(null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=p[f]);else if(0<=mxUtils.indexOf(A,e[f])){if(c||l)null==p[f]?delete d.currentVertexStyle[e[f]]:d.currentVertexStyle[e[f]]=
p[f];if(g||l||0<=mxUtils.indexOf(F,e[f]))null==p[f]?delete d.currentEdgeStyle[e[f]]:d.currentEdgeStyle[e[f]]=p[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
@@ -2257,7 +2256,7 @@ k.apply(this,arguments)};var m=this.hoverIcons.execute;this.hoverIcons.execute=f
e.getGraphY(),b,mxUtils.bind(this,function(a){f(a)}))}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,g,this)}))}}};
EditorUi.prototype.showShapePicker=function(a,c,f,d){var k=this.getCellsForShapePicker(f);if(null!=k&&0<k.length){var m=this,q=this.editor.graph,b=document.createElement("div"),e=null!=f?q.copyStyle(f):null;b.className="geToolbarContainer geSidebarContainer geSidebar";b.style.cssText="position:absolute;left:"+(a- -4)+"px;top:"+(c- -4)+"px;width:140px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;";null!=q.background&&q.background!=mxConstants.NONE&&
(b.style.backgroundColor=q.background);q.container.appendChild(b);f=mxUtils.bind(this,function(g){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";b.appendChild(f);null!=e?this.sidebar.graph.pasteStyle(e,[g]):m.insertHandler([g],""!=g.value,this.sidebar.graph.model);this.sidebar.createThumb([g],25,25,f,null,!0,!1,g.geometry.width,g.geometry.height);
-mxEvent.addListener(f,"click",function(){if(null!=d)d(g);else{g.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);g.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(g)}finally{q.model.endUpdate()}q.setSelectionCell(g);q.scrollCellToVisible(q.getSelectionCell());q.startEditingAtCell(g);null!=m.hoverIcons&&m.hoverIcons.update(q.view.getState(g))}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);
+mxEvent.addListener(f,"click",function(){var b=q.cloneCell(g);if(null!=d)d(b);else{b.geometry.x=q.snap(Math.round(a/q.view.scale)-q.view.translate.x-g.geometry.width/2);b.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-g.geometry.height/2);q.model.beginUpdate();try{q.addCell(b)}finally{q.model.endUpdate()}q.setSelectionCell(b);q.scrollCellToVisible(b);q.startEditingAtCell(b);null!=m.hoverIcons&&m.hoverIcons.update(q.view.getState(b))}m.hideShapePicker()})});for(var g=0;g<k.length;g++)f(k[g]);
null!=m.hoverIcons&&m.hoverIcons.reset();q.popupMenuHandler.hideMenu();q.tooltipHandler.hideTooltip();this.hideCurrentMenu();this.hideShapePicker();this.shapePickerCallback=d;this.shapePicker=b}};
EditorUi.prototype.getCellsForShapePicker=function(a){var c=mxUtils.bind(this,function(a,d,c,m){return this.editor.graph.createVertex(null,null,m||"",0,0,d||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):c("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;",40,20,"Text"),c("whiteSpace=wrap;html=1;"),c("ellipse;whiteSpace=wrap;html=1;",120,80),c("rhombus;whiteSpace=wrap;html=1;",80,80),c("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;"),
c("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;",120,60),c("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),c("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),c("shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;",120,80),c("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",
@@ -2285,10 +2284,10 @@ e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("
e=document.createElement("div");e.style.display="inline-block";e.style.verticalAlign="top";e.style.fontFamily="Helvetica,Arial";e.style.marginTop="8px";e.style.fontSize="14px";e.style.color="#ffffff";this.chromelessToolbar.appendChild(e);var g=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(e.innerHTML="",mxUtils.write(e,
mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});b.style.paddingLeft="0px";b.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",b.style.display="",e.style.display="inline-block"):(g.style.display="none",b.style.display="none",e.style.display="none");p()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",
p)}m(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(b){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,
-mxResources.get("fit"));var l=null,x=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;x=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";x=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=x&&(window.clearTimeout(x),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var v=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
-null}));var e=v.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){v.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
+mxResources.get("fit"));var l=null,v=null,t=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";v=null}),600)}),a||200)}),y=mxUtils.bind(this,function(a){null!=l&&(window.clearTimeout(l),fadeThead=null);null!=v&&(window.clearTimeout(v),
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+null}));var e=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=e.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=e.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(b){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(b)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var z=this.lightboxToolbarActions[n];m(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(b){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
@@ -2392,29 +2391,29 @@ mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY()))g=mxEvent.LABEL
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(f.cell)&&!this.isCellSelected(f.cell)){var l=this.model.getParent(f.cell),n=this.model.getParent(l);if(!this.isCellSelected(n)&&(mxUtils.intersects(u,new mxRectangle(f.x,f.y-2,f.width,3))&&this.model.getChildAt(n,0)!=l||mxUtils.intersects(u,new mxRectangle(f.x,f.y+f.height-2,f.width,3))||mxUtils.intersects(u,new mxRectangle(f.x-2,f.y,2,f.height))&&this.model.getChildAt(l,0)!=f.cell||mxUtils.intersects(u,new mxRectangle(f.x+f.width-
2,f.y,2,f.height)))&&(l=this.selectionCellsHandler.isHandled(n),this.selectCellForEvent(n,c.getEvent()),n=this.selectionCellsHandler.getHandler(n),null!=n)){var t=n.getHandleForEvent(c);null!=t&&(n.start(c.getGraphX(),c.getGraphY(),t),n.blockDelayedSelection=!l,c.consume())}}for(;!c.isConsumed()&&null!=f&&(this.isTableCell(f.cell)||this.isTableRow(f.cell)||this.isTable(f.cell));)this.isSwimlane(f.cell)&&(n=this.getActualStartSize(f.cell),l=this.view.scale,(0<n.x||0<n.width)&&mxUtils.intersects(u,
new mxRectangle(f.x+(n.x-n.width-1)*l+(0==n.x?f.width:0),f.y,1,f.height))||(0<n.y||0<n.height)&&mxUtils.intersects(u,new mxRectangle(f.x,f.y+(n.y-n.height-1)*l+(0==n.y?f.height:0),f.width,1)))&&(this.selectCellForEvent(f.cell,c.getEvent()),n=this.selectionCellsHandler.getHandler(f.cell),null!=n&&(t=mxEvent.CUSTOM_HANDLE-n.customHandles.length+1,n.start(c.getGraphX(),c.getGraphY(),t),c.consume())),f=this.view.getState(this.model.getParent(f.cell))}}}));this.addMouseListener({mouseDown:function(a,b){},
-mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){this.isCellSelected(c.cell)||this.selectCellForEvent(c.cell,d.getEvent());var n=this.selectionCellsHandler.getHandler(c.cell);if(null!=n&&null!=n.bends&&0<n.bends.length){f=
-n.getHandleForEvent(b);var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=
-g,null==f&&(f=new mxRectangle(q.x,q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),
-d.getGraphX(),f),g=q=b=e=null,p=!1,d.consume(),this.graphHandler.reset()}}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=
-c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),
-!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=
-this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,c){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
-!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,c=this.graph.pageScale,d=e.width*c,e=e.height*c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),
-l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*d+c.x)*f,(g.y*e+c.y)*f,d*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*d+c.x)*f,((g.y+l)*e+c.y)*f,d*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;
-return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,c=[],d=0;d<b.length;d++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[d])&&this.graph.isCellSelected(b[d])?this.graph.model.getParent(b[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[d])&&this.graph.isCellSelected(b[d])?b[d]:this.graph.getCompositeParent(b[d]);null==f||e.get(f)||(e.put(f,
-!0),c.push(f))}return c};var x=this.graphHandler.start;this.graphHandler.start=function(a,b,e,c){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));x.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);
-this.getRubberband=function(){return t};var y=(new Date).getTime(),v=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),v=0):v=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<v||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&
-mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=
-function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=
-a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(e,b);return e};this.getAllCells=function(a,
-b,e,d,c,f){f=null!=f?f:[];if(0<e||0<d){var g=this.getModel(),n=a+e,l=b+d;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var p=g.getChildCount(c),u=0;u<p;u++){var t=g.getChildAt(c,u),B=this.view.getState(t);if(null!=B&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(B.style,"locked","0")){var m=mxUtils.getValue(B.style,mxConstants.STYLE_ROTATION)||0;0!=m&&(B=mxUtils.getBoundingBox(B,m));(g.isEdge(t)||g.isVertex(t))&&B.x>=a&&B.y+B.height<=l&&B.y>=b&&B.x+B.width<=n&&f.push(t);
-this.getAllCells(a,b,e,d,t,f)}}}return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==
-b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),c=b.getProperty("cell");null==c?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(c)&&
-this.removeSelectionCell(c);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,
-!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var u=this.updateMouseEvent;this.updateMouseEvent=function(a){a=u.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+mouseMove:mxUtils.bind(this,function(a,d){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(f=this.tolerance,null!=q&&null!=e&&null!=b){if(c=e,Math.abs(q.x-d.getGraphX())>f||Math.abs(q.y-d.getGraphY())>f){var n=this.selectionCellsHandler.getHandler(c.cell);null==n&&this.model.isEdge(c.cell)&&(n=this.createHandler(c));if(null!=n&&null!=n.bends&&0<n.bends.length){f=n.getHandleForEvent(b);
+var u=this.view.getEdgeStyle(c),l=u==mxEdgeStyle.EntityRelation;p||g!=mxEvent.LABEL_HANDLE||(f=g);if(l&&0!=f&&f!=n.bends.length-1&&f!=mxEvent.LABEL_HANDLE)!l||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(f==mxEvent.LABEL_HANDLE||0==f||null!=c.visibleSourceState||f==n.bends.length-1||null!=c.visibleTargetState)l||f==mxEvent.LABEL_HANDLE||(l=c.absolutePoints,null!=l&&(null==u&&null==f||u==mxEdgeStyle.OrthConnector)&&(f=g,null==f&&(f=new mxRectangle(q.x,
+q.y),f.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(f,l[0].x,l[0].y)?f=0:mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y)?f=n.bends.length-1:null!=u&&(2==l.length||3==l.length&&(0==Math.round(l[0].x-l[1].x)&&0==Math.round(l[1].x-l[2].x)||0==Math.round(l[0].y-l[1].y)&&0==Math.round(l[1].y-l[2].y)))?f=2:(f=mxUtils.findNearestSegment(c,q.x,q.y),f=null==u?mxEvent.VIRTUAL_HANDLE-f:f+1))),null==f&&(f=mxEvent.VIRTUAL_HANDLE)),n.start(d.getGraphX(),d.getGraphX(),f),d.consume(),this.graphHandler.reset()}null!=
+n&&(this.selectionCellsHandler.isHandlerActive(n)?this.isCellSelected(c.cell)||(this.selectionCellsHandler.handlers.put(c.cell,n),this.selectCellForEvent(c.cell,d.getEvent())):this.isCellSelected(c.cell)||n.destroy());p=!1;q=b=e=g=null}}else if(c=d.getState(),null!=c){n=null;if(this.model.isEdge(c.cell)){if(f=new mxRectangle(d.getGraphX(),d.getGraphY()),f.grow(mxEdgeHandler.prototype.handleImage.width/2),l=c.absolutePoints,null!=l)if(null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,
+d.getGraphX(),d.getGraphY()))n="move";else if(mxUtils.contains(f,l[0].x,l[0].y)||mxUtils.contains(f,l[l.length-1].x,l[l.length-1].y))n="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)f=this.view.getEdgeStyle(c),n="crosshair",f!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(f=mxUtils.findNearestSegment(c,d.getGraphX(),d.getGraphY()),f<l.length-1&&0<=f&&(n=0==Math.round(l[f].x-l[f+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){f=new mxRectangle(d.getGraphX()-
+1,d.getGraphY()-1);f.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(c.cell)&&(l=this.model.getParent(c.cell),u=this.model.getParent(l),!this.isCellSelected(u)))if(mxUtils.intersects(f,new mxRectangle(c.x-2,c.y,2,c.height))&&this.model.getChildAt(l,0)!=c.cell||mxUtils.intersects(f,new mxRectangle(c.x+c.width-2,c.y,2,c.height)))n="col-resize";else if(mxUtils.intersects(f,new mxRectangle(c.x,c.y-2,c.width,3))&&this.model.getChildAt(u,0)!=l||mxUtils.intersects(f,new mxRectangle(c.x,
+c.y+c.height-2,c.width,3)))n="row-resize";for(l=c;null==n&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));){if(this.isSwimlane(l.cell)){var u=this.getActualStartSize(l.cell),t=this.view.scale;(0<u.x||0<u.width)&&mxUtils.intersects(f,new mxRectangle(l.x+(u.x-u.width-1)*t+(0==u.x?l.width*t:0),l.y,1,l.height))?n="col-resize":(0<u.y||0<u.height)&&mxUtils.intersects(f,new mxRectangle(l.x,l.y+(u.y-u.height-1)*t+(0==u.y?l.height:0),l.width,1))&&(n="row-resize")}l=this.view.getState(this.model.getParent(l.cell))}}null!=
+n&&c.setCursor(n)}}),mouseUp:mxUtils.bind(this,function(a,c){g=q=b=e=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(b=1!=a.style.html?mxUtils.htmlEntities(b,!1):a.view.graph.sanitizeHtml(b));return b};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
+this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],e=this.graph.pageFormat,
+c=this.graph.pageScale,d=e.width*c,e=e.height*c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),l=0;l<g.width;l++)b.push(new mxRectangle(((g.x+l)*d+c.x)*f,(g.y*e+c.y)*f,d*f,e*f));for(l=1;l<g.height;l++)b.push(new mxRectangle((g.x*d+c.x)*f,((g.y+l)*e+c.y)*f,d*f,e*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=l.apply(this,arguments),e=new mxDictionary,c=[],d=0;d<b.length;d++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[d])&&this.graph.isCellSelected(b[d])?this.graph.model.getParent(b[d]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[d])&&
+this.graph.isCellSelected(b[d])?b[d]:this.graph.getCompositeParent(b[d]);null==f||e.get(f)||(e.put(f,!0),c.push(f))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(a,b,e,c){var d=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?d=!0:a=this.graph.model.getParent(a));d||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var t=new mxRubberband(this);this.getRubberband=function(){return t};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;D.apply(this,arguments);a!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var z=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=
+this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var C=this.isToggleEvent;this.isToggleEvent=function(a){return C.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
+mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=
+!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return G.apply(this,arguments);var e=b?a.sourceState.cell:a.getCell();null!=e&&(e=this.getClickableLinkForCell(e),null!=e&&(this.isCustomLink(e)?this.customLinkClicked(e):this.openLink(e)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
+function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,b){var e=this.getCells(a.x,
+a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")});this.selectCellsForEvent(e,b);return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,e){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};
+var J=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var e=b.getProperty("event").getState();J=null==e||this.isSelectionEmpty()||this.isCellSelected(e.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var e=b.getProperty("event"),c=b.getProperty("cell");null==c?(e=mxUtils.convertPoint(this.container,mxEvent.getClientX(e),mxEvent.getClientY(e)),
+t.start(e.x,e.y)):null!=J?this.addSelectionCells(J):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);J=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var e=a.view.graph;return b&&(e.isCellSelected(a.cell)||e.isTableRow(a.cell)&&e.selectionCellsHandler.isHandled(e.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var u=this.updateMouseEvent;this.updateMouseEvent=function(a){a=u.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";
+Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,c,f,d,k){f=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,c)};
Graph.zapGremlins=function(a){for(var c=[],f=0;f<a.length;f++){var d=a.charCodeAt(f);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&c.push(a.charAt(f))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=a.charCodeAt(f);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);return c.join("")};Graph.compressNode=function(a,c){var f=mxUtils.getXml(a);return Graph.compress(c?f:Graph.zapGremlins(f))};
Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var f=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(f):Base64.encode(f,!0)};Graph.decompress=function(a,c,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?c:Graph.zapGremlins(c)};
@@ -2453,8 +2452,8 @@ Graph.prototype.isLabelMovable=function(a){var c=this.getCurrentCellStyle(a);ret
Graph.prototype.getClickableLinkForCell=function(a){do{var c=this.getLinkForCell(a);if(null!=c)return c;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
Graph.prototype.formatDate=function(a,c,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),x=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),v={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
-12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:x,MM:q(x),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(d.masks[c]||c||d.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),f=!0);var b=f?"getUTC":"get",e=a[b+"Date"](),g=a[b+"Day"](),p=a[b+"Month"](),n=a[b+"FullYear"](),l=a[b+"Hours"](),v=a[b+"Minutes"](),t=a[b+"Seconds"](),b=a[b+"Milliseconds"](),y=f?0:a.getTimezoneOffset(),x={d:e,dd:q(e),ddd:d.i18n.dayNames[g],dddd:d.i18n.dayNames[g+7],m:p+1,mm:q(p+1),mmm:d.i18n.monthNames[p],mmmm:d.i18n.monthNames[p+
+12],yy:String(n).slice(2),yyyy:n,h:l%12||12,hh:q(l%12||12),H:l,HH:q(l),M:v,MM:q(v),s:t,ss:q(t),l:q(b,3),L:q(99<b?Math.round(b/10):b),t:12>l?"a":"p",tt:12>l?"am":"pm",T:12>l?"A":"P",TT:12>l?"AM":"PM",Z:f?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<y?"-":"+")+q(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<e%10?0:(10!=e%100-e%10)*e%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),f=c.getChildCount(c.root),d=0;d<f;d++)mxUtils.bind(this,function(d){var f=document.createElement("div");f.style.overflow="hidden";f.style.textOverflow="ellipsis";f.style.padding="2px";f.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");c.isVisible(d)&&(k.setAttribute("checked","checked"),
k.defaultChecked=!0);f.appendChild(k);var b=this.convertValueToString(d)||mxResources.get("background")||"Background";f.setAttribute("title",b);mxUtils.write(f,b);a.appendChild(f);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");c.setVisible(d,k.checked)})})(c.getChildAt(c.root,d));return a};
@@ -2462,12 +2461,12 @@ Graph.prototype.replacePlaceholders=function(a,c){var f=[];if(null!=c){for(var d
null==m&&(m=this.getGlobalVariable(q))}f.push(c.substring(d,match.index)+(null!=m?m:k));d=match.index+k.length}}f.push(c.substring(d))}return f.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&c.push(d)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(a,c,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.connectVertex=function(a,c,f,d,k,m,q,b){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var e=this.getCompositeParent(a),g=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(e.geometry.x,e.geometry.y);c==mxConstants.DIRECTION_NORTH?(g.x+=e.geometry.width/2,g.y-=f):c==mxConstants.DIRECTION_SOUTH?(g.x+=e.geometry.width/2,g.y+=e.geometry.height+f):(g.x=c==mxConstants.DIRECTION_WEST?
-g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(e+g.x*f,n+g.y*f)).grow(40);m=null!=m?this.getCells(0,0,0,0,null,null,m):null;var l=null!=m&&0<m.length?m[0]:null,x=!1;null!=l&&this.model.isAncestor(l,a)&&
-(x=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||this.isSwimlane(l)||
-(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],v=null!=l&&this.isSwimlane(l),D=v?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);D=null!=e?e:this.duplicateCells([f],
-!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);v?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!x&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),
-null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,D,k));null!=p&&y.push(p);null==l&&
-null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k(D)};
+g.x-f:g.x+(e.geometry.width+f),g.y+=e.geometry.height/2);var p=this.view.getState(this.model.getParent(a));f=this.view.scale;var n=this.view.translate,e=n.x*f,n=n.y*f;null!=p&&this.model.isVertex(p.cell)&&(e=p.x,n=p.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(g.x+=a.parent.geometry.x,g.y+=a.parent.geometry.y);m=m?null:(new mxRectangle(e+g.x*f,n+g.y*f)).grow(40);m=null!=m?this.getCells(0,0,0,0,null,null,m):null;var l=null!=m&&0<m.length?m.reverse()[0]:null,v=!1;null!=l&&this.model.isAncestor(l,
+a)&&(v=!0,l=null);for(m=l;null!=m;){if(this.isCellLocked(m)){l=null;break}m=this.model.getParent(m)}null!=l&&(m=this.view.getState(a),p=this.view.getState(l),null!=m&&null!=p&&mxUtils.intersects(m,p)&&(l=null));var t=!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||k;t&&(c==mxConstants.DIRECTION_NORTH?g.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?g.y+=a.geometry.height/2:g.x=c==mxConstants.DIRECTION_WEST?g.x-a.geometry.width/2:g.x+a.geometry.width/2);null==l||this.isCellConnectable(l)||
+this.isSwimlane(l)||(k=this.getModel().getParent(l),this.getModel().isVertex(k)&&this.isCellConnectable(k)&&(l=k));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l)&&!this.isSwimlane(l))l=null;var y=[],x=null!=l&&this.isSwimlane(l),D=x?null:l;k=mxUtils.bind(this,function(e){if(null==q||null!=e){this.model.beginUpdate();try{if(null==D&&t){for(var f=null!=e?e:a,n=this.getCellGeometry(f);null!=n&&n.relative;)f=this.getModel().getParent(f),n=this.getCellGeometry(f);f=this.getCompositeParent(f);
+D=null!=e?e:this.duplicateCells([f],!1)[0];null!=e&&this.addCells([D],this.model.getParent(a),null,null,null,!0);n=this.getCellGeometry(D);null!=n&&(n.x=g.x-n.width/2,n.y=g.y-n.height/2);x?(this.addCells([D],l,null,null,null,!0),l=null):t&&null==l&&!v&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(a)));var p=mxEvent.isControlDown(d)&&mxEvent.isShiftDown(d)&&t||null==l&&null!=e&&e.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,D,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){for(var k=null,f=a;null!=f.parent&&null!=f.geometry&&f.geometry.relative&&f.parent!=p.parent;)f=this.model.getParent(f);null!=f&&null!=f.parent&&f.parent==p.parent&&(k=f.parent.getIndex(f),this.model.add(f.parent,p,k))}null==l&&null!=D&&null!=e&&null!=a.parent&&e.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),this.model.add(a.parent,
+D,k));null!=p&&y.push(p);null==l&&null!=D&&y.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(g,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=b)b(y);else return y});if(null!=q&&null==D&&t)q(e+g.x*f,n+g.y*f,k);else return k(D)};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],f,d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&c.push(f);return c.join(" ")};
Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var c=a.getAttribute("placeholder"),f=a,d=null;null==d&&null!=f;)null!=f.value&&"object"==typeof f.value&&(d=f.hasAttribute(c)?null!=f.getAttribute(c)?f.getAttribute(c):"":null),f=this.model.getParent(f);return d||""}return c.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2532,7 +2531,7 @@ f){var l=this.getCellGeometry(m);null!=l&&(l=l.clone(),l.width+=c,d.setGeometry(
TableLayout.prototype.getSize=function(a,c){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var k=this.graph.getCellGeometry(a[d]);null!=k&&(f+=c?k.width:k.height)}return f};TableLayout.prototype.getRowLayout=function(a,c){for(var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0),k=this.getSize(f,!0),m=c-d.x-d.width,q=[],d=d.x,b=0;b<f.length;b++){var e=this.graph.getCellGeometry(f[b]);null!=e&&(d+=e.width*m/k,q.push(Math.round(d)))}return q};
TableLayout.prototype.layoutRow=function(a,c,f,d){var k=this.graph.getModel(),m=k.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var q=a.x,b=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var e=0;e<m.length;e++){var g=this.graph.getCellGeometry(m[e]);null!=g&&(g=g.clone(),g.y=a.y,g.height=f-a.y-a.height,null!=c?(g.x=c[e],g.width=c[e+1]-g.x,e==m.length-1&&e<c.length-2&&(g.width=d-g.x-a.x-a.width)):(g.x=q,q+=g.width,e==m.length-1?g.width=d-a.x-a.width-b:b+=g.width),k.setGeometry(m[e],g))}return b};
TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),k="1"==mxUtils.getValue(d,"resizeLastRow","0"),m="1"==mxUtils.getValue(d,"resizeLast","0"),d="1"==mxUtils.getValue(d,"fixedRows","0"),q=this.graph.getModel(),b=0;q.beginUpdate();try{var e=f.height-c.y-c.height,g=f.width-c.x-c.width,p=q.getChildCells(a,!0),n=this.getSize(p,!1);if(0<e&&0<g&&0<p.length&&0<n){if(k){var l=this.graph.getCellGeometry(p[p.length-
-1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var x=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],x,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
+1]);null!=l&&(l=l.clone(),l.height=e-n+l.height,q.setGeometry(p[p.length-1],l))}for(var v=m?null:this.getRowLayout(p[0],g),t=c.y,y=0;y<p.length;y++)l=this.graph.getCellGeometry(p[y]),null!=l&&(l=l.clone(),l.x=c.x,l.width=g,l.y=Math.round(t),t=k||d?t+l.height:t+l.height/n*e,l.height=Math.round(t)-l.y,q.setGeometry(p[y],l)),b=Math.max(b,this.layoutRow(p[y],v,l.height,g));d&&e<n&&(f=f.clone(),f.height=t+c.height,q.setGeometry(a,f));m&&g<b+Graph.minTableColumnWidth&&(f=f.clone(),f.width=b+c.width+c.x+
Graph.minTableColumnWidth,q.setGeometry(a,f))}}finally{q.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var e=this.getState(a);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=c.apply(this,
arguments);null!=e&&b&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var f=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return f.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
@@ -2563,14 +2562,14 @@ this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.sketch&&(a+="sket
(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};
Graph.prototype.updateCellStyles=function(a,b,e){this.model.beginUpdate();try{for(var c=0;c<e.length;c++)if(this.model.isVertex(e[c])||this.model.isEdge(e[c])){this.setCellStyles(a,null,[e[c]]);var d=this.getCellStyle(e[c])[a];b!=(null==d?mxConstants.NONE:d)&&this.setCellStyles(a,b,[e[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?
mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var e=0;e<a.length;e++){var c=a[e];b[mxObjectIdentity.get(c)]=c.getId();for(var d=this.model.getChildCount(c),f=0;f<d;f++)this.createCellLookup([this.model.getChildAt(c,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,e){e=null!=e?e:{};for(var c in a){var d=b[c];null==e[d]&&(e[d]=a[c].getId()||
-"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var u=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
-null!=u&&(a=a.concat(u))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,b-p.x,e-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
+"")}return e};Graph.prototype.importGraphModel=function(a,b,e,c){b=null!=b?b:0;e=null!=e?e:0;var d=new mxCodec(a.ownerDocument),f=new mxGraphModel;d.decode(a,f);a=[];var d={},g={},n=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),d));if(null!=n){var l=this.createCellLookup([f.root]),n=n.slice();this.model.beginUpdate();try{if(1!=n.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<n.length;f++){var p=this.model.getChildren(this.moveCells([n[f]],b,e,!1,this.model.getRoot())[0]);
+null!=p&&(a=a.concat(p))}else a=this.moveCells(f.getChildren(n[0]),b,e,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(d,l,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(b=this.snap(b),e=this.snap(e));var u=this.getBoundingBoxFromGeometry(a,!0);null!=u&&this.moveCells(a,b-u.x,e-u.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},e=this.cloneCells(a,null,b),
c=new mxDictionary,d=0;d<a.length;d++)c.put(a[d],!0);for(var f=new mxCodec,g=new mxGraphModel,n=g.getChildAt(g.getRoot(),0),d=0;d<e.length;d++){g.add(n,e[d]);var l=this.view.getState(a[d]);if(null!=l){var u=this.getCellGeometry(e[d]);null!=u&&u.relative&&!this.model.isEdge(a[d])&&null==c.get(this.model.getParent(a[d]))&&(u.offset=null,u.relative=!1,u.x=l.x/l.view.scale-l.view.translate.x,u.y=l.y/l.view.scale-l.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),
e);return f.encode(g)};Graph.prototype.isSwimlane=function(a,b){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()&&!this.model.isEdge(a)){var e=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return e==mxConstants.SHAPE_SWIMLANE||"table"==e}return!1};var q=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var e=this.getCurrentCellStyle(b);if(null!=e.expand)return"0"!=e.expand}return q.apply(this,arguments)&&(null==b||
!this.isTable(b))};var b=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,e,c,d,f,g,n,l){null==l&&(l=this.model.getParent(a),this.isTable(l)||this.isTableRow(l))&&(l=this.getCellAt(g,n,null,!0,!1));b.apply(this,[a,e,c,d,f,g,n,l])};var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],n=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),
b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var e=0;e<this.model.getChildCount(b);e++)n(this.model.getChildAt(b,e))});n(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var g=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,e,c,d,f,n){n=null!=n?n:{};if(this.isTable(d)){for(var l=[],u=0;u<a.length;u++)this.isTable(a[u])?l=l.concat(this.model.getChildCells(a[u],!0).reverse()):l.push(a[u]);
a=l}this.model.beginUpdate();try{l=[];for(u=0;u<a.length;u++)if(null!=d&&this.isTableRow(a[u])){var p=this.model.getParent(a[u]),t=this.getCellGeometry(a[u]);this.isTable(p)&&l.push(p);if(null!=p&&null!=t&&this.isTable(p)&&this.isTable(d)&&(c||p!=d)){if(!c){var R=this.getCellGeometry(p);null!=R&&(R=R.clone(),R.height-=t.height,this.model.setGeometry(p,R))}R=this.getCellGeometry(d);null!=R&&(R=R.clone(),R.height+=t.height,this.model.setGeometry(d,R));var B=this.model.getChildCells(d,!0);if(0<B.length){var k=
-c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),x=this.model.getChildCells(B[0],!0),y=x.length-m.length;if(0<y)for(var K=0;K<y;K++){var v=this.cloneCell(m[m.length-1]);null!=v&&(v.value="",this.model.add(k,v))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<x.length;K++){var L=this.getCellGeometry(x[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
+c?this.cloneCell(a[u]):a[u],m=this.model.getChildCells(k,!0),v=this.model.getChildCells(B[0],!0),y=v.length-m.length;if(0<y)for(var K=0;K<y;K++){var x=this.cloneCell(m[m.length-1]);null!=x&&(x.value="",this.model.add(k,x))}else if(0>y)for(K=0;K>y;K--)this.model.remove(m[m.length+K-1]);m=this.model.getChildCells(k,!0);for(K=0;K<v.length;K++){var L=this.getCellGeometry(v[K]),ia=this.getCellGeometry(m[K]);null!=L&&null!=ia&&(ia=ia.clone(),ia.width=L.width,this.model.setGeometry(m[K],ia))}}}}for(var H=
g.apply(this,arguments),u=0;u<l.length;u++)!c&&this.model.contains(l[u])&&0==this.model.getChildCount(l[u])&&this.model.remove(l[u]);c&&this.updateCustomLinks(this.createCellMapping(n,this.createCellLookup(a)),H)}finally{this.model.endUpdate()}return H};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var e=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)if(this.isTableCell(a[c])){var d=this.model.getParent(a[c]),f=this.model.getParent(d);1==this.model.getChildCount(d)&&
1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f)&&e.push(f):this.labelChanged(a[c],"")}else{if(this.isTableRow(a[c])&&(f=this.model.getParent(a[c]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(e,f))){for(var g=this.model.getChildCells(f,!0),n=0,l=0;l<g.length;l++)0<=mxUtils.indexOf(a,g[l])&&n++;n==g.length&&e.push(f)}e.push(a[c])}e=p.apply(this,[e,b])}finally{this.model.endUpdate()}return e};Graph.prototype.updateCustomLinks=function(a,b){for(var e=0;e<b.length;e++)null!=
b[e]&&this.updateCustomLinksForCell(a,b[e])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var e=mxUtils.getValue(a.style,"points",null);if(null!=e){var c=[];try{for(var d=JSON.parse(e),e=0;e<d.length;e++){var f=d[e];c.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(wa){}return c}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;
@@ -2579,8 +2578,8 @@ mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZO
f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||d)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
arguments);if(b&&null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);null!=e&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var e=this.getModel(),c=[];e.beginUpdate();
try{for(var d=0;d<a.length;d++){var f=a[d];if(e.isEdge(f)){var g=e.getTerminal(f,!0),n=e.getTerminal(f,!1);e.setTerminal(f,n,!0);e.setTerminal(f,g,!1);var l=e.getGeometry(f);if(null!=l){l=l.clone();null!=l.points&&l.points.reverse();var u=l.getTerminalPoint(!0),p=l.getTerminalPoint(!1);l.setTerminalPoint(u,!1);l.setTerminalPoint(p,!0);e.setGeometry(f,l);var t=this.view.getState(f),B=this.view.getState(g),m=this.view.getState(n);if(null!=t){var k=null!=B?this.getConnectionConstraint(t,B,!0):null,R=
-null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(f,g,!0,R);this.setConnectionConstraint(f,n,!1,k)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var x=l.width;l.width=l.height;l.height=x;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
-mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,v)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
+null!=m?this.getConnectionConstraint(t,m,!1):null;this.setConnectionConstraint(f,g,!0,R);this.setConnectionConstraint(f,n,!1,k)}c.push(f)}}else if(e.isVertex(f)&&(l=this.getCellGeometry(f),null!=l)){if(!this.isTable(f)&&!this.isTableRow(f)&&!this.isTableCell(f)){l=l.clone();l.x+=l.width/2-l.height/2;l.y+=l.height/2-l.width/2;var v=l.width;l.width=l.height;l.height=v;e.setGeometry(f,l)}var y=this.view.getState(f);if(null!=y){var K=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,
+mxConstants.DIRECTION_NORTH],x=mxUtils.getValue(y.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,K[mxUtils.mod(mxUtils.indexOf(K,x)+(b?-1:1),K.length)],[f])}c.push(f)}}}finally{e.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var n=Graph.prototype.processChange;
Graph.prototype.processChange=function(a){if(a instanceof mxGeometryChange&&(this.isTableCell(a.cell)||this.isTableRow(a.cell))&&(null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))){var b=a.cell;this.isTableCell(b)&&(b=this.model.getParent(b));this.isTableRow(b)&&(b=this.model.getParent(b));var e=this.view.getState(b);null!=e&&null!=e.shape&&(this.view.invalidate(b),e.shape.bounds=null)}n.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&
"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var e=this.view.getState(a[b]);null!=e&&null!=e.shape&&null!=e.shape.stencil&&this.stencilHasPlaceholders(e.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var e=a.ownerDocument.createElement(null!=
b?b:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)e.setAttribute(attr.nodeName,attr.nodeValue);e.innerHTML=a.innerHTML;a.parentNode.replaceChild(e,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var e=a.getElementsByTagName("*"),c=0;c<e.length;c++)b(e[c])};Graph.prototype.updateLabelElements=function(a,b,e){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),d=0;d<a.length;d++)if(this.isHtmlLabel(a[d])){var f=this.convertValueToString(a[d]);
@@ -2609,11 +2608,11 @@ a.length-1;0<=f;f--)if(0==f||a[f]!=d[f-1]){a[f].setAttribute("width",b);a[f].set
e[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var e=[],c=null,d=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,d=null!=d?Math.min(d,l):l;e.push(g)}}if(2<e.length){e.sort(function(b,e){return a?b.x-e.x:b.y-e.y});g=this.view.translate;l=this.view.scale;d=d/l-(a?g.x:g.y);c=c/l-(a?g.x:
g.y);this.getModel().beginUpdate();try{for(var n=(c-d)/(e.length-1),c=d,f=1;f<e.length-1;f++){var u=this.view.getState(this.model.getParent(e[f].cell)),p=this.getCellGeometry(e[f].cell),c=c+n;null!=p&&null!=u&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-u.origin.x:p.y=Math.round(c-p.height/2)-u.origin.y,this.getModel().setGeometry(e[f].cell,p))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};
Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,u){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;e=null!=e?e:0;d=null!=d?d:!0;f=null!=f?f:!0;g=null!=g?g:!0;var t=f||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
-var B=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var x=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
-0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);k.setAttribute("version","1.1");k.setAttribute("width",x+"px");k.setAttribute("height",y+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+x+" "+y);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var v=this.createSvgCanvas(K);v.foOffset=d?-.5:0;v.textOffset=d?-.5:0;v.imageOffset=d?-.5:0;v.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
-H=v.getAlternateText;v.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var x=f.charCodeAt(m);if(10==x||13==x){if(0<k)break}else B.push(f.charAt(m)),255>x&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
-arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&v.image(O.x,O.y,R.width,R.height,R.src,!0)}v.scale(a);v.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
-a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),v);this.updateSvgLinks(k,n,!0);this.addForeignObjectWarning(v,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
+var B=this.view.scale,m=mxUtils.createXmlDocument(),k=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==m.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/B;var v=Math.max(1,Math.ceil(t.width*a)+2*e)+(u?5:
+0),y=Math.max(1,Math.ceil(t.height*a)+2*e)+(u?5:0);k.setAttribute("version","1.1");k.setAttribute("width",v+"px");k.setAttribute("height",y+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+v+" "+y);m.appendChild(k);var K=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");k.appendChild(K);var x=this.createSvgCanvas(K);x.foOffset=d?-.5:0;x.textOffset=d?-.5:0;x.imageOffset=d?-.5:0;x.translate(Math.floor((e/b-t.x)/B),Math.floor((e/b-t.y)/B));var L=document.createElement("div"),
+H=x.getAlternateText;x.getAlternateText=function(a,b,e,c,d,f,g,l,n,u,ca,p,t){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(L.innerHTML=f,f=mxUtils.extractTextWithWhitespace(L.childNodes));for(var Na=Math.ceil(2*c/this.state.fontSize),B=[],k=0,m=0;(0==Na||k<Na)&&m<f.length;){var v=f.charCodeAt(m);if(10==v||13==v){if(0<k)break}else B.push(f.charAt(m)),255>v&&k++;m++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(Va){return H.apply(this,
+arguments)}else return H.apply(this,arguments)};var R=this.backgroundImage;if(null!=R){b=B/b;var O=this.view.translate,A=new mxRectangle(O.x*b,O.y*b,R.width*b,R.height*b);mxUtils.intersects(t,A)&&x.image(O.x,O.y,R.width,R.height,R.src,!0)}x.scale(a);x.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,z=l.getLinkForCellState;l.getLinkForCellState=function(a,b){var e=z.apply(this,arguments);return null==e||a.view.graph.isCustomLink(e)?null:e};l.drawCellState=function(a,b){for(var e=
+a.view.graph,c=e.isCellSelected(a.cell),d=e.model.getParent(a.cell);!f&&!c&&null!=d;)c=e.isCellSelected(d),d=e.model.getParent(d);(f||c)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(k,n,!0);this.addForeignObjectWarning(x,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var e=a.createElement("switch"),
c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=
a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);e.appendChild(c);d.appendChild(f);e.appendChild(d);b.appendChild(e)}};Graph.prototype.updateSvgLinks=function(a,b,e){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var d=a[c].getAttribute("href");null==d&&(d=a[c].getAttribute("xlink:href"));null!=d&&(null!=b&&/^https?:\/\//.test(d)?a[c].setAttribute("target",
b):e&&this.isCustomLink(d)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,e){for(;null!=
@@ -2632,12 +2631,12 @@ this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideM
this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,e=!1,c=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),e=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&
(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(d.getEvent())&&(e&&null==d.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",
this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var e=null!=b&&mxEvent.isShiftDown(b);if(e||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(a){e||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=
-window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var x=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));x.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],e=0,c=a.rangeCount;e<c;++e)b.push(a.getRangeAt(e));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,e=a.length;b<e;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(qa){}};var v=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));v.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);y.apply(this,arguments);var e=this.graph.view.getState(a);this.textarea.className=null!=e&&1==e.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var e=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(e)&&null!=
-c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var v=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
+c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var x=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,e){e.originalNode=a;a=a.firstChild;for(var c=e.firstChild;null!=a&&null!=c;)b(a,
c),a=a.nextSibling,c=c.nextSibling;return e}function e(a,b){if(null!=a)if(b.originalNode!=a)c(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var d=a.nextSibling;null==b?c(a):(e(a,b),b=b.nextSibling);a=d}}function c(a){for(var b=a.firstChild;null!=b;){var e=b.nextSibling;c(b);b=e}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&
-(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}v.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}x.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?e(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),e=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(b?
n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&
mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+
@@ -2717,9 +2716,9 @@ null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&thi
this.moveHandles[a]&&null!=this.moveHandles[a].parentNode&&this.moveHandles[a].parentNode.removeChild(this.moveHandles[a]);this.moveHandles=null}if(null!=this.cornerHandles){for(a=0;a<this.cornerHandles.length;a++)null!=this.cornerHandles[a]&&null!=this.cornerHandles[a].node&&null!=this.cornerHandles[a].node.parentNode&&this.cornerHandles[a].node.parentNode.removeChild(this.cornerHandles[a].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var oa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(oa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&
null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var W=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Z=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=
-function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function x(){mxActor.call(this)}function t(){mxActor.call(this)}
+function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function f(){mxActor.call(this)}function d(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function q(){mxActor.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function n(){mxActor.call(this)}function l(){mxActor.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}
function y(a,b){this.canvas=a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,y.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,y.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,y.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,y.prototype.quadTo);this.originalCurveTo=
-this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
+this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,y.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,y.prototype.arcTo)}function x(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function C(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function I(){mxShape.call(this)}function J(){mxShape.call(this)}
function u(){mxEllipse.call(this)}function K(){mxShape.call(this)}function B(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxShape.call(this)}function H(){mxShape.call(this)}function S(){mxShape.call(this)}function fa(){mxShape.call(this)}function ga(){mxShape.call(this)}function aa(){mxCylinder.call(this)}function Y(){mxCylinder.call(this)}function X(){mxRectangleShape.call(this)}function ba(){mxDoubleEllipse.call(this)}function ha(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
this.spacing=0}function U(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function Q(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}function la(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function ja(){mxActor.call(this)}function sa(){mxActor.call(this)}function N(){mxActor.call(this)}function oa(){mxActor.call(this)}function W(){mxActor.call(this)}function Z(){mxActor.call(this)}function R(){mxEllipse.call(this)}
function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ya(){mxActor.call(this)}function ma(){mxActor.call(this)}function ta(){mxConnector.call(this)}function Ba(a,b,e,c,d,f,g,l,n,u){g+=n;var ca=c.clone();c.x-=d*(2*g+n);c.y-=f*(2*g+n);d*=g+n;f*=g+n;return function(){a.ellipse(ca.x-
@@ -2741,8 +2740,8 @@ a.end()};mxCellRenderer.registerShape("card",e);mxUtils.extend(g,mxActor);g.prot
"size",this.size))*a.height):null};p.prototype.redrawPath=function(a,b,e,c,d){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,d-b/2);a.quadTo(3*c/4,d-1.4*b,c/2,d-b/2);a.quadTo(c/4,d-b*(1-1.4),0,d-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",p);var Ia=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,e,c){var d=mxUtils.getValue(this.style,"size");return null!=
d?c*Math.max(0,Math.min(1,d)):Ia.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c,0),new mxPoint(c-b,d)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("parallelogram",n);mxUtils.extend(l,mxActor);l.prototype.size=.2;l.prototype.isRoundable=function(){return!0};l.prototype.redrawPath=function(a,b,e,c,d){b=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(x,mxActor);x.prototype.size=.5;x.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",x);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(b,0),new mxPoint(c-b,0),new mxPoint(c,d)],this.isRounded,e,!0)};mxCellRenderer.registerShape("trapezoid",l);mxUtils.extend(v,mxActor);v.prototype.size=.5;v.prototype.redrawPath=function(a,b,e,c,d){a.setFillColor(null);b=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(c,0),new mxPoint(b,0),new mxPoint(b,d/2),new mxPoint(0,d/2),new mxPoint(b,d/2),new mxPoint(b,d),new mxPoint(c,d)],this.isRounded,e,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",v);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(a,b,e,c,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=c/5;a.rect(0,0,b,d);a.fillAndStroke();a.rect(2*b,0,b,d);a.fillAndStroke();a.rect(4*b,0,b,d);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",t);y.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};y.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};y.prototype.quadTo=function(a,b,e,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=c};y.prototype.curveTo=function(a,b,e,c,d,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=d;this.lastY=f};y.prototype.arcTo=function(a,b,e,c,d,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};y.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var e=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),f=Math.sqrt(c*c+d*d);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),l=this.defaultVariation;
5>g&&(g=5,l/=3);for(var ca=e(a-this.lastX)*c/g,e=e(b-this.lastY)*d/g,c=c/f,d=d/f,f=0;f<g;f++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ca*f+this.lastX-n*d,e*f+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};y.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
@@ -2750,9 +2749,9 @@ this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};m
mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(a)};mxRhombus.prototype.defaultJiggle=2;var Qa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?
"1":"0"))&&Qa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,e,c,d){if(null==a.handJiggle||a.handJiggle.constructor!=y)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),
a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(c/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(c*f,d*f)),a.moveTo(b+f,e),a.lineTo(b+c-f,e),a.quadTo(b+c,e,b+c,e+f),a.lineTo(b+c,e+d-f),a.quadTo(b+c,e+d,b+c-f,e+d),a.lineTo(b+f,e+d),a.quadTo(b,e+d,b,e+d-f),a.lineTo(b,e+f),a.quadTo(b,
-e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(v,mxRectangleShape);v.prototype.size=.1;v.prototype.isHtmlAllowed=function(){return!1};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
-this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};v.prototype.paintForeground=function(a,
-b,e,c,d){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",v);mxUtils.extend(D,mxRectangleShape);
+e,b+f,e)):(a.moveTo(b,e),a.lineTo(b+c,e),a.lineTo(b+c,e+d),a.lineTo(b,e+d),a.lineTo(b,e)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,e,c,d){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(x,mxRectangleShape);x.prototype.size=.1;x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==
+this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,e=a.height;a=new mxRectangle(a.x,a.y,b,e);var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(b*d,e*d));a.x+=Math.round(c);a.width-=Math.round(2*c)}return a};x.prototype.paintForeground=function(a,
+b,e,c,d){var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,d*g));f=Math.round(f);a.begin();a.moveTo(b+f,e);a.lineTo(b+f,e+d);a.moveTo(b+c-f,e);a.lineTo(b+c-f,e+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",x);mxUtils.extend(D,mxRectangleShape);
D.prototype.paintBackground=function(a,b,e,c,d){a.setFillColor(mxConstants.NONE);a.rect(b,e,c,d);a.fill()};D.prototype.paintForeground=function(a,b,e,c,d){};mxCellRenderer.registerShape("transparent",D);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable=function(){return!0};
z.prototype.redrawPath=function(a,b,e,c,d){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,
[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d-e),new mxPoint(Math.min(c,f+l),d-e),new mxPoint(g,d),new mxPoint(Math.max(0,f),d-e),new mxPoint(0,d-e)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(C,mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(a,b,e,c,d){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",
@@ -2838,7 +2837,7 @@ parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFA
1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,e.y-b.y))):Math.round(Math.max(0,Math.min(b.width,e.x-b.x)))},!1,null,function(b){if(mxEvent.isControlDown(b.getEvent())&&(b=a.view.graph,b.isTableRow(a.cell)||b.isTableCell(a.cell))){for(var e=b.getSwimlaneDirection(a.style),c=b.model.getParent(a.cell),c=b.model.getChildCells(c,!0),d=[],f=0;f<c.length;f++)c[f]!=a.cell&&b.isSwimlane(c[f])&&b.getSwimlaneDirection(b.getCurrentCellStyle(c[f]))==
e&&d.push(c[f]);b.setCellStyles(mxConstants.STYLE_STARTSIZE,a.style[mxConstants.STYLE_STARTSIZE],d)}}));return b},label:Ca(),ext:Ca(),rectangle:Ca(),triangle:Ca(),rhombus:Ca(),umlLifeline:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,
["width","height"],function(a){var b=Math.max(O.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",O.prototype.width))),e=Math.max(1.5*O.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",O.prototype.height)));return new mxPoint(a.x+b,a.y+e)},function(a,b){this.state.style.width=Math.round(Math.max(O.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*O.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},
-process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+process:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},cross:function(a){return[V(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"size",ya.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var e=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/e*2,Math.max(0,a.getCenterX()-b.x)/e*2)))})]},note:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[V(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(va(a));return b},dataStorage:function(a){return[V(a,
["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",sa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))},!1)]},callout:function(a){var b=[V(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),e=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));
@@ -2851,7 +2850,7 @@ mxUtils.getValue(this.state.style,"jettyHeight",aa.prototype.jettyHeight)));retu
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:za(1),doubleArrow:za(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var e=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",b.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",b.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(e=a.width-e);return new mxPoint(a.x+e,a.y+c)},function(a,e){var c=Math.max(0,Math.min(a.width,e.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",b.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,e.y-a.y)))},!1)]},document:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",p.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},tape:function(a){return[V(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))},!1)]},offPageConnector:function(a){return[V(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(x.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))},!1)]},step:Ea(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ea(A.prototype.size,!0,.5,!0,A.prototype.fixedSize),curlyBracket:Ea(v.prototype.size,!1),display:Ea(ma.prototype.size,!1),cube:Ka(1,c.prototype.size,!1),card:Ka(.5,
e.prototype.size,!0),loopLimit:Ka(.5,W.prototype.size,!0),trapezoid:Ma(.5),parallelogram:Ma(1)};Graph.createHandle=V;Graph.handleFactory=Fa;var Ta=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ta.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)?b=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
(b=mxConstants.SHAPE_SWIMLANE);b=Fa[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Fa[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Fa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ga=new mxPoint(1,0),Ha=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ga=mxUtils.getRotatedPoint(Ga,Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ha=mxUtils.getRotatedPoint(Ha,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,b,e,c,d){var f=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=f.transformControlPoint(a,c));null==l&&null!=b&&(l=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=e&&(g=new mxPoint(e.getCenterX(),
@@ -2908,7 +2907,7 @@ Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.get
"+S").isEnabled=k;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){c.showDialog((new PageSetupDialog(c)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){c.showDialog((new PrintDialog(c)).container,
300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){c.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){c.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(b){c.handleError(b)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var c=0;c<b.length&&a;c++)a=a&&d.model.isEdge(b[c]);var f=d.view.translate,n=d.view.scale,l=f.x,k=f.y,f=null;if(1==b.length&&a){var t=d.getCellGeometry(b[0]);
-null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),v=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,v-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
+null!=t&&(f=t.getTerminalPoint(!0))}f=null!=f?f:d.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(d.snap(d.popupMenuHandler.triggerX/n-l)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/n-k));d.cellsMoved(b,m-f.x,x-f.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(c.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");
this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=c.copiedSize){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(a=0;a<b.length;a++)if(d.getModel().isVertex(b[a])){var f=d.getCellGeometry(b[a]);null!=f&&(f=f.clone(),f.width=c.copiedSize.width,f.height=c.copiedSize.height,d.getModel().setGeometry(b[a],f))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(b){c.handleError(b)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,
!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,
@@ -2963,9 +2962,9 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR
DrawioFile.prototype.synchronizeFile=function(a,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,c):this.updateFile(a,c)};
DrawioFile.prototype.updateFile=function(a,c,f,d){null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=f&&f()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=k?this.mergeFile(k,a,c,d):this.reloadFile(a,c))}catch(m){null!=c&&c(m)}}),c))};
DrawioFile.prototype.mergeFile=function(a,c,f,d){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var b=[this.ui.diffPages(null!=d?d:m,this.shadowPages)];if(!this.ignorePatches(b)){var e=this.ui.patchPages(m,
-b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),x=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+x+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),v=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,D)}}catch(z){}}};
+b[0]);d={};var g=this.ui.getHashValueForPages(e,d),m={},p=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",b,"checksum",p==g,g);if(null!=g&&g!=p){var n=this.compressReportData(this.getAnonymizedXmlForPages(q)),l=this.compressReportData(this.getAnonymizedXmlForPages(e)),v=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(f,b,"Shadow Details: "+JSON.stringify(d)+
+"\nChecksum: "+g+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+v+"\nTo: "+t+"\n\nFile Data:\n"+n+"\nPatched Shadow:\n"+l,null,"mergeFile");return}this.patch(b,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=f&&f(D);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,D)}}catch(z){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUtils.createXmlDocument()),f=c.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var k=c.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,k,!0);f.appendChild(k)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(a,c,f){c=null!=c?c:1E4;null!=f&&null!=a&&a.length>f?a=a.substring(0,f)+"[...]":null!=a&&a.length>c&&(a=Graph.compress(a)+"\n");return a};
DrawioFile.prototype.checksumError=function(a,c,f,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var m=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -3130,9 +3129,9 @@ else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";els
function(a){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(b){this.resolvedFontCss=b;a()})):a()};Editor.prototype.embedExtFonts=function(a){var b=this.graph.extFonts;if(null!=b&&0<b.length){var e="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var d=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(e,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?
(c++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;e+=a;c--;d()}),mxUtils.bind(this,function(a){c--;e+="@import url("+b+");";d()}))):e+=this.cachedGoogleFonts[b]:e+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);d()}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&&a[0].appendChild(b[e].cloneNode(!0))};
Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.absoluteCssFonts(this.fontCss);if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,b);e.appendChild(c)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,x,v){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=v?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,v),mxUtils.bind(this,function(e){try{var c=new Image;
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.exportToCanvas=function(a,b,e,c,d,f,g,l,n,p,t,k,m,y,v,x){try{f=null!=f?f:!0;g=null!=g?g:!0;k=null!=k?k:this.graph;m=null!=m?m:0;var u=n?null:k.background;u==mxConstants.NONE&&(u=null);null==u&&(u=c);null==u&&0==n&&(u=x?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(k.getSvg(null,null,m,y,null,g,null,null,null,p,null,x),mxUtils.bind(this,function(e){try{var c=new Image;
c.onload=mxUtils.bind(this,function(){try{var g=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(c,0,0);a(n)},0):(y.drawImage(c,0,0),a(n))},n=document.createElement("canvas"),p=parseInt(e.getAttribute("width")),t=parseInt(e.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*t),b/p)):b/p);p=Math.ceil(l*p);t=Math.ceil(l*t);n.setAttribute("width",p);n.setAttribute("height",t);var y=n.getContext("2d");null!=u&&(y.beginPath(),y.rect(0,0,p,t),y.fillStyle=u,
-y.fill());y.scale(l,l);if(x){var v=k.view,B=v.scale;v.scale=1;var A=btoa(unescape(encodeURIComponent(v.createSvgGrid(v.gridColor))));v.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*v.gridSteps*l,z=k.getGraphBounds(),D=v.translate.x*B,K=v.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
+y.fill());y.scale(l,l);if(v){var x=k.view,B=x.scale;x.scale=1;var A=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=B;var A="data:image/svg+xml;base64,"+A,q=k.gridSize*x.gridSteps*l,z=k.getGraphBounds(),D=x.translate.x*B,K=x.translate.y*B,C=D+(z.x-D)/B-m,H=K+(z.y-K)/B-m,E=new Image;E.onload=function(){try{for(var a=-Math.round(q-mxUtils.mod((D-C)*l,q)),b=-Math.round(q-mxUtils.mod((K-H)*l,q));a<p;a+=q)for(var e=b;e<t;e+=q)y.drawImage(E,a/l,e/l);g()}catch(ma){null!=d&&d(ma)}};
E.onerror=function(a){null!=d&&d(a)};E.src=A}else g()}catch(pa){null!=d&&d(pa)}});c.onerror=function(a){null!=d&&d(a)};p&&this.graph.addSvgShadow(e);this.graph.mathEnabled&&this.addMathCss(e);var g=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(e,this.resolvedFontCss),c.src=Editor.createSvgDataUri(mxUtils.getXml(e))}catch(P){null!=d&&d(P)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.addFontCss(e,a),this.loadFonts(g)}catch(T){null!=d&&d(T)}}))}catch(P){null!=
d&&d(P)}}),e,t)}catch(Q){null!=d&&d(Q)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var m=k,q=0;8>q;q++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[k]=m;Editor.updateCRC=function(a,b,e,c){for(var d=0;d<c;d++)a=Editor.crcTable[(a^b.charCodeAt(e+d))&255]^a>>>8;return a};Editor.crc32=function(a){for(var b=-1,e=0;e<a.length;e++)b=b>>>8^Editor.crcTable[(b^a.charCodeAt(e))&255];return(b^-1)>>>0};Editor.writeGraphModelToPng=function(a,b,e,c,d){function f(a,b){var e=n;n+=b;return a.substring(e,n)}
function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(a,4),"IHDR"!=f(a,4))null!=d&&d();else{f(a,17);d=a.substring(0,n);do{var p=g(a);if("IDAT"==f(a,4)){d=a.substring(0,n-8);"pHYs"==b&&"dpi"==
@@ -3166,7 +3165,7 @@ stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",
gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b){var c=function(a){if(null!=a)if(e)for(var c=
0;c<a.length;c++)b[a[c].name]=a[c];else for(var d in b){for(var f=!1,c=0;c<a.length;c++)if(a[c].name==d&&a[c].type==b[d].type){f=!0;break}f||delete b[d]}},d=this.editorUi.editor.graph.view.getState(a);null!=d&&null!=d.shape&&(d.shape.commonCustomPropAdded||(d.shape.commonCustomPropAdded=!0,d.shape.customProperties=d.shape.customProperties||[],d.cell.vertex?Array.prototype.push.apply(d.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),
-c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
+c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(H){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},e=a.vertices,c=a.edges,d=0;d<e.length;d++)this.findCommonProperties(e[d],b,0==d);for(d=0;d<c.length;d++)this.findCommonProperties(c[d],
b,0==e.length&&0==d);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var t=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");
b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return t.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=
function(a,b,e){function c(a,b,e,c){k.getModel().beginUpdate();try{var d=[],f=[];if(null!=e.index){for(var g=[],l=e.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;e.index<g.length?null!=c?g.splice(c,1):g[e.index]=b:g.push(b);null!=e.size&&g.length>e.size&&(g=g.slice(0,e.size));b=g.join(",");null!=e.countProperty&&(k.setCellStyles(e.countProperty,g.length,k.getSelectionCells()),d.push(e.countProperty),f.push(g.length))}k.setCellStyles(a,
@@ -3174,15 +3173,15 @@ b,k.getSelectionCells());d.push(a);f.push(b);if(null!=e.dependentProps)for(a=0;a
function d(b,e,c){var d=mxUtils.getOffset(a,!0),f=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=f.x-d.x+"px";e.style.top=f.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function f(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px";d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,
function(f){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(f)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function g(a,b,e,d,f,g,l){null!=b&&(b=b.split(","),m.push({name:a,values:b,type:e,defVal:d,countProperty:f,parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(b){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==
a)n=n.nextSibling,t++;else break;var k={type:e,parentRow:g,index:t,isDeletable:!0,defVal:d,countProperty:f},t=p(a,"",k,0==t%2,l);c(a,d,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,b,e,c,d,f,g){if(0<d){var l=Array(d);b=null!=b?b.split(","):[];for(var n=0;n<d;n++)l[n]=null!=b[n]?b[n]:null!=c?c:"";m.push({name:a,values:l,type:e,defVal:c,parentRow:f,flipBkg:g,size:d})}return document.createElement("div")}
-function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var x=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),x=(null!=x?x:"")+"["+p.index+"]",k=!0);var v=document.createElement("td");
-v.className="gePropRowCell";v.innerHTML=mxUtils.htmlEntities(mxResources.get(x,null,x));k&&(v.style.textAlign="right");u.appendChild(v);v=document.createElement("td");v.className="gePropRowCell";if("color"==y)v.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)v.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(x=B[m],x.val==e){v.innerHTML=mxUtils.htmlEntities(mxResources.get(x.dispName,null,x.dispName));break}mxEvent.addListener(v,"click",mxUtils.bind(t,function(){var f=
-document.createElement("select");d(v,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?v.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
-u,m)):"staticArr"==y?v.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(v.innerHTML=e,mxEvent.addListener(v,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(v,g,!0);g.value=e;g.className=
+function n(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function p(b,e,p,k,m){var v=p.dispName,y=p.type,u=document.createElement("tr");u.className="gePropRow"+(m?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";u.setAttribute("data-pName",b);u.setAttribute("data-pValue",e);k=!1;null!=p.index&&(u.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var x=document.createElement("td");
+x.className="gePropRowCell";x.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(x.style.textAlign="right");u.appendChild(x);x=document.createElement("td");x.className="gePropRowCell";if("color"==y)x.appendChild(f(b,e,p));else if("bool"==y||"boolean"==y)x.appendChild(n(b,e,p));else if("enum"==y){var B=p.enumList;for(m=0;m<B.length;m++)if(v=B[m],v.val==e){x.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(x,"click",mxUtils.bind(t,function(){var f=
+document.createElement("select");d(x,f);for(var g=0;g<B.length;g++){var l=B[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));f.appendChild(n)}f.value=e;a.appendChild(f);mxEvent.addListener(f,"change",function(){var a=mxUtils.htmlEntities(f.value);c(b,a,p)});f.focus();mxEvent.addListener(f,"blur",function(){a.removeChild(f)})}))}else"dynamicArr"==y?x.appendChild(g(b,e,p.subType,p.subDefVal,p.countProperty,
+u,m)):"staticArr"==y?x.appendChild(l(b,e,p.subType,p.subDefVal,p.size,u,m)):(x.innerHTML=e,mxEvent.addListener(x,"click",mxUtils.bind(t,function(){function f(){var a=g.value,a=0==a.length&&"string"!=y?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(b,a,p)}var g=document.createElement("input");d(x,g,!0);g.value=e;g.className=
"gePropEditor";"int"!=y&&"float"!=y||p.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&f()});g.focus();mxEvent.addListener(g,"blur",function(){f()})})));p.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(t,function(a){c(b,"",p,p.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",
-v.appendChild(m));u.appendChild(v);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var v=document.createElement("img");v.src=Sidebar.prototype.expandedImage;u.appendChild(v);mxUtils.write(u,mxResources.get("property"));
-x.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){v.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else v.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
-B()});x.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");x.appendChild(u);y.appendChild(x);var A=!1,q=!1,z;for(z in b)if(x=b[z],"function"!=typeof x.isVisible||x.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=x.getDefaultValue?x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)q=!q;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=
-x.dependentProps){for(var C=x.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=K;x.dependentPropsVals=E}y.appendChild(p(z,D,x,A,q));A=!A}}for(u=0;u<m.length;u++)for(x=m[u],b=x.parentRow,e=0;e<x.values.length;e++)z=p(x.name,x.values[e],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(z,
+x.appendChild(m));u.appendChild(x);return u}var t=this,k=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var x=document.createElement("img");x.src=Sidebar.prototype.expandedImage;u.appendChild(x);mxUtils.write(u,mxResources.get("property"));
+v.style.cursor="pointer";var B=function(){var b=y.querySelectorAll(".gePropNonHeaderRow"),e;if(t.editorUi.propertiesCollapsed){x.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],f=d.nodeName.toUpperCase();"INPUT"!=f&&"SELECT"!=f||a.removeChild(d)}catch(qa){}}else x.src=Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;
+B()});v.appendChild(u);u=document.createElement("th");u.className="gePropHeaderCell";u.innerHTML=mxResources.get("value");v.appendChild(u);y.appendChild(v);var A=!1,q=!1,z;for(z in b)if(v=b[z],"function"!=typeof v.isVisible||v.isVisible(e,this)){var D=null!=e.style[z]?mxUtils.htmlEntities(e.style[z]+""):null!=v.getDefaultValue?v.getDefaultValue(e,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(e.style[v.sizeProperty]||b[v.sizeProperty].defVal)||0;else if(null!=
+v.dependentProps){for(var C=v.dependentProps,E=[],K=[],u=0;u<C.length;u++){var G=e.style[C[u]];K.push(b[C[u]].subDefVal);E.push(null!=G?G.split(","):[])}v.dependentPropsDefVal=K;v.dependentPropsVals=E}y.appendChild(p(z,D,v,A,q));A=!A}}for(u=0;u<m.length;u++)for(v=m[u],b=v.parentRow,e=0;e<v.values.length;e++)z=p(v.name,v.values[e],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:e,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==e%2,v.flipBkg),b.parentNode.insertBefore(z,
b.nextSibling),b=z;a.appendChild(y);B();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var e=this.editorUi,c=e.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);
var f="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.position="relative";g.style.textAlign="center";for(var l=[],n=0;n<this.defaultColorSchemes.length;n++){var p=document.createElement("div");p.style.display="inline-block";p.style.width="6px";p.style.height="6px";p.style.marginLeft="4px";p.style.marginRight=
"3px";p.style.borderRadius="3px";p.style.cursor="pointer";p.style.background="transparent";p.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){t(a)}))})(n);l.push(p);g.appendChild(p)}var t=mxUtils.bind(this,function(a){null!=this.format.currentScheme&&(l[this.format.currentScheme].style.background="transparent");this.format.currentScheme=a;k(this.defaultColorSchemes[this.format.currentScheme]);l[this.format.currentScheme].style.background=
@@ -3193,8 +3192,8 @@ mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(d[
"linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE?"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(e.initialDefaultVertexStyle,
mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(e.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var g=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),l=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=g;b.style.border="1px solid "+l}d.appendChild(b)});d.innerHTML="";for(var g=0;g<a.length;g++)0<g&&0==mxUtils.mod(g,
4)&&mxUtils.br(d),b(a[g])});null==this.format.currentScheme?t("dark"==uiTheme?1:0):t(this.format.currentScheme);var n=10>=this.defaultColorSchemes.length?28:8,m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(m,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var x=document.createElement("div");x.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(x));mxEvent.addListener(x,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(x);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
+mxEvent.addListener(m,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+n+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){t(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));b(m);b(v);k(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&a.appendChild(g);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&(e=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editShape").funct()})),
b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft=
"2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=urlParams.edge;var y=Graph.prototype.init;
@@ -3202,11 +3201,11 @@ Graph.prototype.init=function(){function a(a){b=a;try{if(mxClient.IS_QUIRKS||7==
window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);
if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"==b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||
2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,
-"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
+"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return x.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=D.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);
return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,f,g,l,n,p,t,k){var m=null;k||null==this.themes||"darkTheme"!=this.defaultThemeName||(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
-this.refresh());var x=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=x.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var v="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?v+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
-q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(v+B));x.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return x};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
+this.refresh());var v=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var y=v.ownerDocument,u=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?u.setAttributeNS("type","text/css"):u.setAttribute("type","text/css");for(var x="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?x+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
+q+'";\nsrc: url("'+D+'");\n}\n'}u.appendChild(y.createTextNode(x+B));v.getElementsByTagName("defs")[0].appendChild(u)}null!=m&&(this.stylesheet=m,this.refresh());return v};var C=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=C.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var E=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){E.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@@ -3234,20 +3233,20 @@ STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people
"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,x=0,y=ia.get(),v=1/b.pageScale,q=A.checked;if(q)var v=parseInt(K.value),z=parseInt(R.value),v=Math.min(y.height*z/(k.height/b.view.scale),y.width*v/(k.width/b.view.scale));else v=parseInt(u.value)/(100*b.pageScale),isNaN(v)&&(c=1/b.pageScale,u.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*
-c);y.height=Math.ceil(y.height*c);v*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*y.width,x-=k.y*y.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,v,y,0,m,x,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
+function(a,b,e,c,d,f,g,l,n,p){if(null!=e&&null==mxMarker.markers[e]){var t=this.getPackageForType(e);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){v.value=Math.max(1,Math.min(l,Math.max(parseInt(v.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(v.value),parseInt(m.value))))}function c(b){function e(b,e,f){var g=b.useCssTransforms,l=b.currentTranslate,n=b.currentScale,p=b.view.translate,t=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var k=b.getGraphBounds(),m=0,v=0,y=ia.get(),x=1/b.pageScale,q=A.checked;if(q)var x=parseInt(K.value),z=parseInt(R.value),x=Math.min(y.height*z/(k.height/b.view.scale),y.width*x/(k.width/b.view.scale));else x=parseInt(u.value)/(100*b.pageScale),isNaN(x)&&(c=1/b.pageScale,u.value="100 %");y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*
+c);y.height=Math.ceil(y.height*c);x*=c;!q&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*y.width,v-=k.y*y.height):q=!0;if(null==e){e=PrintDialog.createPrintPreview(b,x,y,0,m,v,q);e.pageSelector=!1;e.mathEnabled=!1;m=a.getCurrentFile();null!=m&&(e.title=m.getTitle());var D=e.writeHead;e.writeHead=function(e){D.apply(this,arguments);mxClient.IS_GC&&(e.writeln('<style type="text/css">'),e.writeln("@media print {"),e.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),e.writeln("}"),e.writeln("</style>"));
null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=b.extFonts[c].name,f=b.extFonts[c].url;0==f.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+f+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+f+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
e.renderPage;e.renderPage=function(b,e,c,d,f,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var n=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}m=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(m=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,f,!0);null!=m&&(d.stylesheet=m,d.refresh())}else{y=
-b.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";e.backgroundColor=y;e.autoOrigin=q;e.appendGraph(b,v,m,x,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,x=b.extFonts[f].url,0==x.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+x+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+x+'");\n}'),
-e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=x.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
-1);for(var v=y;v<=p;v++){var q=a.pages[v],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
-function(b){return"page"==b?q.getName():"pagenumber"==b?v+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,v!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
+b.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";e.backgroundColor=y;e.autoOrigin=q;e.appendGraph(b,x,m,v,f,!0);if(null!=b.extFonts&&null!=e.wnd)for(f=0;f<b.extFonts.length;f++)m=b.extFonts[f].name,v=b.extFonts[f].url,0==v.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+v+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+m+'";\n\tsrc: url("'+v+'");\n}'),
+e.wnd.document.writeln("</style>"))}g&&(b.useCssTransforms=g,b.currentTranslate=l,b.currentScale=n,b.view.translate=p,b.view.scale=t);return e}var c=parseInt(ka.value)/100;isNaN(c)&&(c=1,ka.value="100 %");var c=.75*c,f=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(f=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=m.value,l=v.value,p=!t.checked,k=null;p&&(p=g==n&&l==n);if(!p&&null!=a.pages&&a.pages.length){var y=0,p=a.pages.length-1;t.checked||(y=parseInt(g)-1,p=parseInt(l)-
+1);for(var x=y;x<=p;x++){var q=a.pages[x],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,y=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,y=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=y;var B=g.getGlobalVariable;g.getGlobalVariable=
+function(b){return"page"==b?q.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}k=e(g,k,x!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else k=e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,b&&(k.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),
k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k));null!=f&&(d.stylesheet=f,d.refresh())}var d=a.editor.graph,f=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,b||mxResources.get("print"));f.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText=
"margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var m=document.createElement("input");
-m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var x=m.cloneNode(!0);p.appendChild(x);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(x,"change",e);if(null!=a.pages&&(l=a.pages.length,
-null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;x.value=n;break}m.setAttribute("max",l);x.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");y.appendChild(v);g=document.createElement("span");
-mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){v.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+m.style.cssText="margin:0 8px 0 8px;";m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";p.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var v=m.cloneNode(!0);p.appendChild(v);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(v,"change",e);if(null!=a.pages&&(l=a.pages.length,
+null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){n=g+1;m.value=n;v.value=n;break}m.setAttribute("max",l);v.setAttribute("max",l);a.isPagesEnabled()?1<l&&(f.appendChild(p),k.checked=!0):k.checked=!0;var y=document.createElement("div");y.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");y.appendChild(x);g=document.createElement("span");
+mxUtils.write(g,mxResources.get("adjustTo"));y.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","100 %");u.style.width="50px";y.appendChild(u);mxEvent.addListener(u,"focus",function(){x.checked=!0});f.appendChild(y);var p=p.cloneNode(!1),A=x.cloneNode(!0);A.setAttribute("value","fit");x.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
g.appendChild(A);p.appendChild(g);y=document.createElement("table");y.style.display="inline-block";var q=document.createElement("tbody"),z=document.createElement("tr"),D=z.cloneNode(!0),C=document.createElement("td"),E=C.cloneNode(!0),G=C.cloneNode(!0),F=C.cloneNode(!0),I=C.cloneNode(!0),J=C.cloneNode(!0);C.style.textAlign="right";F.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";E.appendChild(K);g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsAcross"));G.appendChild(g);mxUtils.write(F,mxResources.get("fitToBy"));var R=K.cloneNode(!0);I.appendChild(R);mxEvent.addListener(K,"focus",function(){A.checked=!0});mxEvent.addListener(R,"focus",function(){A.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));J.appendChild(g);z.appendChild(C);
z.appendChild(E);z.appendChild(G);D.appendChild(F);D.appendChild(I);D.appendChild(J);q.appendChild(z);q.appendChild(D);y.appendChild(q);p.appendChild(y);f.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var ia=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
@@ -3275,11 +3274,11 @@ function(a,e,c){c=null!=c?c:24;var b=new Spinner({lines:12,length:c,width:Math.r
b.pause=function(){return function(){}};return b};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,
-">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(x){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
+">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),l=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=l?mxUtils.getXml(l):""}catch(v){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var l=this.updatePageRoot(new DiagramPage(d[f]));
null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[f+1]));b.model.execute(new ChangePage(this,l,0==f?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
-this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,v,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
-Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}v?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
+this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)b.model.execute(new ChangePage(this,c[f],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,e,c,d,f,l,k,t,m,x,q){e=null!=e?e:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var b,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?b="_blank":g=b=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){if(q){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",
+Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=a.ownerDocument.createElement("mxfile");n.appendChild(p)}x?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),
n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("modified",(new Date).toISOString()),n.setAttribute("agent",navigator.appVersion),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("etag",Editor.guid()),
a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!l&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))q=this.getHtml2(mxUtils.getXml(n),e,null!=c?c.getTitle():null,b,g);else if(l||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),q=this.getEmbeddedSvg(q,e,
d,null,t,m,g);return q};EditorUi.prototype.getXmlFileData=function(a,e,c){a=null!=a?a:!0;e=null!=e?e:!1;c=null!=c?c:!Editor.compressXml;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var e=a.getElementsByTagName("mxGraphModel"),e=0<e.length?e[0]:null;null==e&&c?(e=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<e.length&&(e=Graph.decompress(e),null!=e&&0<e.length&&a.appendChild(mxUtils.parseXml(e).documentElement))):null==e||c?a=a.cloneNode(!0):
@@ -3290,8 +3289,8 @@ l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]
delete f.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(f.cells).length&&delete f.cells);0==Object.keys(f).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,e){if(null!=a.attributes)for(var b=0;b<a.attributes.length;b++)"as"!=a.attributes[b].name&&a.setAttribute(a.attributes[b].name,this.anonymizeString(a.attributes[b].value,e));if(null!=a.childNodes)for(b=
0;b<a.childNodes.length;b++)this.anonymizeAttributes(a.childNodes[b],e)};EditorUi.prototype.anonymizeNode=function(a,e){for(var b=a.getElementsByTagName("mxCell"),c=0;c<b.length;c++)null!=b[c].getAttribute("value")&&b[c].setAttribute("value","["+b[c].getAttribute("value").length+"]"),null!=b[c].getAttribute("xmlValue")&&b[c].setAttribute("xmlValue","["+b[c].getAttribute("xmlValue").length+"]"),null!=b[c].getAttribute("style")&&b[c].setAttribute("style","["+b[c].getAttribute("style").length+"]"),null!=
b[c].parentNode&&"root"!=b[c].parentNode.nodeName&&null!=b[c].parentNode.parentNode&&(b[c].setAttribute("id",b[c].parentNode.getAttribute("id")),b[c].parentNode.parentNode.replaceChild(b[c],b[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum?b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),
-this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,v){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(v=
-!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,v);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,v);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
+this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,e,c,d,f,l,k,t,m,x){f=null!=f?f:!0;l=null!=l?l:!1;var b=this.editor.graph;if(e||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))if(x=
+!1,null!=this.pages&&this.currentPage!=this.pages[0]){var g=b.getGlobalVariable,b=this.createTemporaryGraph(b.getStylesheet()),n=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?n.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(n.root)}k=null!=k?k:this.getXmlFileData(f,l,x);m=null!=m?m:this.getCurrentFile();a=this.createFileData(k,b,m,window.location.href,a,e,c,d,f,t,x);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);
return a};EditorUi.prototype.getHtml=function(a,e,c,d,f,l){l=null!=l?l:!0;var b=null,g=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){var b=l?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),n=e.view.scale;l=Math.floor(b.x/n-e.view.translate.x);n=Math.floor(b.y/n-e.view.translate.y);b=e.background;null==f&&(e=this.getBasenames().join(";"),0<e.length&&(g=EditorUi.drawHost+"/embed.js?s="+e));a.setAttribute("x0",l);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=b&&b!=mxConstants.NONE?' style="background-color:'+b+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
@@ -3301,26 +3300,26 @@ mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==f?'<script type="tex
null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c=null;this.fileNode=a;this.pages=[];for(var d=0;d<b.length;d++)null==b[d].getAttribute("id")&&b[d].setAttribute("id",d),a=new DiagramPage(b[d]),
null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var f=urlParams["layer-ids"].split(" ");a={};for(d=0;d<f.length;d++)a[f[d]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),d=0;d<k.length;d++){var t=k[d];l.setVisible(t,a[t.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,v,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
+this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};EditorUi.prototype.downloadFile=function(a,e,c,d,f,l,k,t,m,x,q){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var b=this.getBaseFilename(!f),
g=b+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,e);this.saveData(g,a,n,"text/xml")}else if("html"==a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,b),this.saveData(g,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=b+".png":"jpeg"==a&&(g=b+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(b,e){try{var c=this.editor.graph.pageVisible;
-null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,v,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var x=this.editor.graph.background;if(k||x==mxConstants.NONE)x=
-null;var D=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
-function(a,e,c,d,f,l,k,t,m,v){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};v=v?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(v="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
-null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+v+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
+null!=l&&(this.editor.graph.pageVisible=l);var g=this.createDownloadRequest(b,a,d,e,k,f,t,m,x,q);this.editor.graph.pageVisible=c;return g}catch(L){this.handleError(L)}}));else{var p=null,y=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=
+null;var D=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();y('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=b+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();y(a)}),d)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=
+function(a,e,c,d,f,l,k,t,m,x){var b=this.editor.graph,g=b.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=e);var n="",p="";if(g.width*g.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==e&&0==l&&(p="&allPages=1");if("xmlpng"==e&&(x="1",e="png",null!=this.pages&&null!=this.currentPage))for(l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){n="&from="+l;break}l=b.background;"png"!=e&&"pdf"!=e||!f?f||
+null!=l&&l!=mxConstants.NONE||(l="#ffffff"):l=mxConstants.NONE;f={globalVars:b.getExportVariables()};m&&(f.grid={size:b.gridSize,steps:b.view.gridSteps,color:b.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+e+n+p+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+(null!=k?"&scale="+k:"")+(null!=t?"&border="+t:""))};EditorUi.prototype.setMode=function(a,
e){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,e,c){var b=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return b};this.fileLoaded(c);"csv"==a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=e&&e()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.editor.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=
-new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var v=
-mxUtils.parseXml(m).documentElement;if(null!=v)if("1"==v.getAttribute("replace-value"))l.setValue(t,v);else for(var q=v.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
+new mxCellOverlay(a.image||f.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,e){d.alert(a.tooltip)});return b}var c=null,d=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var f=this.editor.graph,l=f.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var t=l.getCell(a.getAttribute("id"));if(null!=t){try{var m=a.getAttribute("value");if(null!=m){var x=
+mxUtils.parseXml(m).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))l.setValue(t,x);else for(var q=x.attributes,z=0;z<q.length;z++)f.setAttributeForCell(t,q[z].nodeName,0<q[z].nodeValue.length?q[z].nodeValue:null)}}catch(u){null!=window.console&&console.log("Error in value for "+t.id+": "+u)}try{var C=a.getAttribute("style");null!=C&&f.model.setStyle(t,C)}catch(u){null!=window.console&&console.log("Error in style for "+t.id+": "+u)}try{var A=a.getAttribute("icon");if(null!=A){var E=
0<A.length?JSON.parse(A):null;null!=E&&E.append||f.removeCellOverlays(t);null!=E&&f.addCellOverlay(t,b(E))}}catch(u){null!=window.console&&console.log("Error in icon for "+t.id+": "+u)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=f.getCellGeometry(t);if(null!=F){F=F.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?F.x+=I:"dy"==key?F.y+=I:"dw"==key?F.width+=I:"dh"==key?F.height+=I:F[key]=parseFloat(G[key])}f.model.setGeometry(t,F)}}}catch(u){null!=window.console&&
console.log("Error in icon for "+t.id+": "+u)}}}else if("model"==a.nodeName){for(var J=a.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(a.firstChild)).decode(J,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(f.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))f.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(k=a.hasAttribute("max-scale")?
-parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),v=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+v+"-"+f));
+parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return c};EditorUi.prototype.getCopyFilename=function(a,e){var b=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",d=b.lastIndexOf(".");0<=d&&(c=b.substring(d),b=b.substring(0,d));if(e)var f=new Date,d=f.getFullYear(),k=f.getMonth()+1,t=f.getDate(),m=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),b=b+(" "+(d+"-"+k+"-"+t+"-"+m+"-"+x+"-"+f));
return b=mxResources.get("copyOf",[b])+c};EditorUi.prototype.fileLoaded=function(a,e){var b=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=b&&(EditorUi.debug("File.closed",[b]),b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();
this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(a);a.addListener("descriptorChanged",
this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(t){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?this.fileLoaded(b):d()});e?f():this.handleError(v,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return c};EditorUi.prototype.getHashValueForPages=function(a,e){var b=0,c=new mxGraphModel,d=new mxCodec;null!=e&&(e.byteCount=
0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var k=a[f].node.cloneNode(!1);k.removeAttribute("name");c.root=a[f].root;var t=d.encode(c);this.editor.graph.saveViewState(a[f].viewState,t,!0);t.removeAttribute("pageWidth");t.removeAttribute("pageHeight");k.appendChild(t);null!=e&&(e.eltCount+=k.getElementsByTagName("*").length,e.nodeCount+=k.getElementsByTagName("mxCell").length);b=(b<<5)-b+this.hashValue(k,function(a,b,e,c){return!c||"mxGeometry"!=
a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?c&&"mxCell"==a.nodeName&&"previous"==b?null:e:Math.round(e)},e)<<0}return b};EditorUi.prototype.hashValue=function(a,e,c){var b=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(b^=this.hashValue(a.nodeName,e,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
g=null!=e?e(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=g&&(b^=this.hashValue(f,e,c)+this.hashValue(g,e,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)b=(b<<5)-b+this.hashValue(a.childNodes[d],e,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);e=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)e=(e<<5)-e+a.charCodeAt(d)<<0;b^=e}return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -3338,10 +3337,10 @@ c,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.remo
F(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,d,f,l,n,k,t,m,y){if(null!=b&&"image/"==d.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null);else{var x=!1,v=mxUtils.bind(this,function(b,d){if(null!=b&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(b);null!=f&&0<f.length&&(b=f)}if(null!=b)if(f=mxUtils.parseXml(b),"mxlibrary"==f.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(f.documentElement));g(l,p);c=c.concat(l);G(a);this.spinner.stop();x=!0}catch(M){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){v(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(b,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,n,k),b)],b[0].vertex=!0,F(b,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null);else{var v=!1,x=mxUtils.bind(this,function(b,d){if(null!=b&&"application/pdf"==d){var f=Editor.extractGraphModelFromPdf(b);null!=f&&0<f.length&&(b=f)}if(null!=b)if(f=mxUtils.parseXml(b),"mxlibrary"==f.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(f.documentElement));g(l,p);c=c.concat(l);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=e&&null!=e.parentNode&&0<c.length&&(e.parentNode.removeChild(e),e=null)});null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(y,function(a){x(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?x(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(b,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));m.insertBefore(q,m.firstChild);mxEvent.addListener(q,"click",E);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
p&&E(a)});f=q.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",mxResources.get("add"));m.insertBefore(f,m.firstChild);mxEvent.addListener(f,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(f=document.createElement("span"),f.setAttribute("title",mxResources.get("help")),f.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(f,"?"),mxEvent.addGestureListeners(f,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(a)})),m.insertBefore(f,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,c){for(var b=0;b<a.length;b++){var e=a[b],d=e.data;if(null!=d){var d=this.convertDataUri(d),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(Graph.decompress(e.xml)),
0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
@@ -3357,7 +3356,7 @@ if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid
m);this.handleError(a,c,d,f,n)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){d.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;d.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");d.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;
d.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),e=document.createElement("span");e.style.marginTop="6px";mxUtils.write(e,mxResources.get("changeUser")+": ");c.appendChild(e);var d=document.createElement("select");d.style.width="200px";a();mxEvent.addListener(d,"change",mxUtils.bind(this,function(){var c=d.value,e=b.length!=c;e&&this.drive.setUser(b[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),
!0)}));c.appendChild(d);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=e.message?k=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error?k=mxUtils.htmlEntities(e.response.error):"undefined"!==typeof window.App&&(e.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):
-e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,x,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
+e.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=l=null;null!=e&&null!=e.helpLink&&(l=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(e.helpLink)}));this.showError(c,k,g,d,p,null,null,l,v,null,null,null,f?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,c,d){a=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(a.container,d||340,100,!0,!1);a.init()};EditorUi.prototype.confirm=function(a,c,d,f,
n,l){var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){b();null!=c&&c()},function(){b();null!=d&&d()},f,n,null,null,null,null,e);this.showDialog(a.container,340,46+e,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,c,d){var b=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+a])){var e=document.createElement("div");
e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";b=document.createElement("img");b.setAttribute("src",IMAGE_PATH+
"/logo.png");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(b);b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.setAttribute("border","0");b.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";e.appendChild(b);mxUtils.write(e,c);document.body.appendChild(e);
@@ -3369,7 +3368,7 @@ EditorUi.prototype.createImageDataUri=function(a,c,d,f){var b=a.toDataURL("image
620,460,!0,!0,null,null,null,null,!0);b.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,c,d,f,n,l){"text/xml"!=d||/(\.drawio)$/i.test(c)||/(\.xml)$/i.test(c)||(c=c+"."+(null!=l?l:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)a=f?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",
!0,c),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(c+":",a):this.openInNewWindow(a,d,f);else{var b=document.createElement("a");l=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof b.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);l=65==(e?parseInt(e[2],10):!1)?!1:l}if(l||this.isOffline()){b.href=URL.createObjectURL(f?
this.base64ToBlob(a,d):new Blob([a],{type:d}));l?b.download=c:b.setAttribute("target","_blank");document.body.appendChild(b);try{window.setTimeout(function(){URL.revokeObjectURL(b.href)},2E4),b.click(),b.parentNode.removeChild(b)}catch(y){}}else this.createEchoRequest(a,c,d,f,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,d,f,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+
-l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var t=1024*k,m=Math.min(t+1024,e),v=Array(m-t),q=0;t<m;++q,++t)v[q]=b[t].charCodeAt(0);f[k]=new Uint8Array(v)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,m){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
+l:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(f?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),e=b.length,d=Math.ceil(e/1024),f=Array(d),k=0;k<d;++k){for(var m=1024*k,y=Math.min(m+1024,e),x=Array(y-m),q=0;m<y;++q,++m)x[q]=b[m].charCodeAt(0);f[k]=new Uint8Array(x)}return new Blob(f,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,d,f,n,l,k,m){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);
isLocalStorage&&n++;var b=4>=n?2:6<n?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,f);else{var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),e.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,d,f,null,m):null!=b&&0<b.length&&this.pickFolder(c,mxUtils.bind(this,function(e){try{this.exportFile(a,
b,d,f,c,e)}catch(A){this.handleError(A)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,b,a,d,f);l=this.isServices(n)?n>b?390:270:160;this.showDialog(c.container,400,l,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,d){var b=window.open("about:blank");null==b||null==b.document?mxUtils.popup(a,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?b.document.write("<html>"+
a+"</html>"):(a=d?a:btoa(unescape(encodeURIComponent(a))),b.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+a+'"/></html>')):b.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),b.document.close())};var f=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,
@@ -3380,8 +3379,8 @@ mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute(
Editor.cameraLargeImage,mxResources.get("export"))}f.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,d,f,n){this.isLocalFileSave()?this.saveLocalFile(d,a,f,n,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,b){return this.createEchoRequest(d,a,f,n,c,b)}),d,n,f)};EditorUi.prototype.saveRequest=function(a,c,d,f,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var b=this.getServiceCount(!1);isLocalStorage&&b++;var e=4>=b?2:6<b?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,
function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||"download"==b||null==b||"_blank"==b?"0":"1");null!=e&&(b==App.MODE_DEVICE||"download"==b||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){l=null!=l?l:"pdf"==c?"application/pdf":"image/"+c;if(null!=f)try{this.exportFile(f,a,l,!0,b,d)}catch(A){this.handleError(A)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();
if(200<=e.getStatus()&&299>=e.getStatus())try{this.exportFile(e.getText(),a,l,!0,b,d)}catch(A){this.handleError(A)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<b,e,f,l,n);b=this.isServices(b)?4<b?390:270:160;this.showDialog(a.container,380,b,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=
-a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,m,y,v,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var g=this.editor.graph.getSvg(e,a,k,m,null,d,null,null,"blank"==v?"_blank":"self"==v?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
+a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,c,d,f,n,l){};EditorUi.prototype.pickFolder=function(a,c,d){c(null)};EditorUi.prototype.exportSvg=function(a,c,d,f,n,l,k,m,y,x,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;var e=c?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==c&&(e=q?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var g=this.editor.graph.getSvg(e,a,k,m,null,d,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,q);f&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",t=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,y,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||
b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,t,this.thumbImageCache)):t(g)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(a,c,d,f,n,l,k){return this.addCheckbox(a,
d,f,n,l,k,!0,c)};EditorUi.prototype.addCheckbox=function(a,c,d,f,n,l,k,m){l=null!=l?l:!0;var b=document.createElement("input");b.style.marginRight="8px";b.style.marginTop="16px";b.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();b.id=k;null!=m&&b.setAttribute("name",m);d&&(b.setAttribute("checked","checked"),b.defaultChecked=!0);f&&b.setAttribute("disabled","disabled");l&&(a.appendChild(b),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",k),a.appendChild(d),
n||mxUtils.br(a));return b};EditorUi.prototype.addEditButton=function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,
@@ -3392,8 +3391,8 @@ f:"background-position:center center;background-repeat:no-repeat;background-imag
mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(a)}));b();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=
function(a,c,d,f,n,l,k){k=null!=k?k:[];f&&(k.push("lightbox=1"),"auto"!=a&&k.push("target="+a),null!=c&&c!=mxConstants.NONE&&k.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=n&&0<n.length&&k.push("edit="+encodeURIComponent(n)),l&&k.push("layers=1"),this.editor.graph.foldingEnabled&&k.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&k.push("page-id="+this.currentPage.getId());return k};EditorUi.prototype.createLink=function(a,c,d,f,n,l,k,m,
y){y=null!=y?y:this.createUrlParameters(a,c,d,!1,n,l);a=this.getCurrentFile();c=!0;null!=k?d="#U"+encodeURIComponent(k):(a=this.getCurrentFile(),m||null==a||a.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+a.getHash(),c=!1));c&&null!=a&&null!=a.getTitle()&&a.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(a.getTitle()));return(f?EditorUi.lightboxHost:
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,v,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
-null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=v&&0<v.length&&(b.edit=v);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,c,d,f,n,l,k,m,y,x,q){this.getBasenames();var b={};""!=n&&n!=mxConstants.NONE&&(b.highlight=n);"auto"!==f&&(b.target=f);y||(b.lightbox=!1);b.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(b.zoom=d/100);d=[];k&&(d.push("pages"),b.resize=!0,null!=this.pages&&
+null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),b.resize=!0);m&&d.push("layers");0<d.length&&(y&&d.push("lightbox"),b.toolbar=d.join(" "));null!=x&&0<x.length&&(b.edit=x);null!=a?b.url=a:b.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(b))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";
q(c,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,d,f){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));
e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";b.appendChild(e);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");e=k.cloneNode(!0);e.setAttribute("value","copy");g.appendChild(e);
var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.style.cursor="pointer",mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,
@@ -3403,19 +3402,19 @@ I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,
"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(b);var e=this.getCurrentFile(),b="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=e&&e.constructor==window.DriveFile&&!c){a=80;var b="https://desk.draw.io/support/solutions/articles/16000039384",g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace=
"normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));g.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(e.getId())}));p.style.marginTop="12px";p.className="geBtn";g.appendChild(p);k.appendChild(g);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));g.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,
function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=f)a+=30,mxUtils.write(k,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight=
-"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",k.appendChild(q),mxUtils.br(k);var x=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
+"16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",k.appendChild(m),mxUtils.write(k,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=f+"px",k.appendChild(q),mxUtils.br(k);var v=this.addLinkSection(k,l);d=null!=this.pages&&1<this.pages.length;var E=null;if(null==e||e.constructor!=window.DriveFile||c)E=
this.addCheckbox(k,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(k,mxResources.get("lightbox"),!0,null,null,!l),F=this.addEditButton(k,G),I=F.getEditInput();l&&(I.style.marginLeft=G.style.marginLeft,G.style.display="none",a-=30);var J=this.addCheckbox(k,mxResources.get("layers"),!0);J.style.marginLeft=I.style.marginLeft;J.style.marginBottom="16px";J.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),I.removeAttribute("disabled")):(J.setAttribute("disabled",
-"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(x.getTarget(),x.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
-mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):x.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
+"disabled"),I.setAttribute("disabled","disabled"));I.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,k,mxUtils.bind(this,function(){n(v.getTarget(),v.getColor(),null==E?!0:E.checked,G.checked,F.getLink(),J.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),b);this.showDialog(c.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";b.appendChild(e);if(n){mxUtils.write(b,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type",
"text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";b.appendChild(g);mxUtils.write(b,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";b.appendChild(k);mxUtils.br(b)}var p=this.addCheckbox(b,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),
m=f?null:this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,q=f?null:this.addCheckbox(b,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=q&&(q.style.marginBottom="16px");a=new CustomDialog(this,b,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,b)}),null,a,c);this.showDialog(a.container,300,(n?25:0)+(f?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
function(a,c,d,f,n,l,k,m){k=null!=k?k:!0;var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";b.appendChild(p);mxUtils.write(b,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight=
-"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";b.appendChild(q);mxUtils.br(b);var x=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
+"12px";t.value=this.lastExportZoom||"100%";b.appendChild(t);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";b.appendChild(q);mxUtils.br(b);var v=this.addCheckbox(b,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),G=null;"dark"==uiTheme&&(G=this.addCheckbox(b,mxResources.get("dark"),!0),g+=26);var F=this.addCheckbox(b,
mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");l&&(b.appendChild(I),mxUtils.write(b,mxResources.get("crop")),mxUtils.br(b),g+=26,mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));e.isSelectionEmpty()||(I.setAttribute("checked","checked"),
I.defaultChecked=!0);var J=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||u.setAttribute("disabled","disabled");c&&(b.appendChild(u),mxUtils.write(b,mxResources.get("embedImages")),mxUtils.br(b),g+=26);var K=null;if("png"==m||"jpeg"==m)K=this.addCheckbox(b,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,
!0),g+=26;var B=this.addCheckbox(b,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),L=null!=this.pages&&1<this.pages.length,O=this.addCheckbox(b,L?mxResources.get("allPages"):"",L,!L,null,"jpeg"!=m);O.style.marginLeft="24px";O.style.marginBottom="16px";L?g+=26:O.style.display="none";mxEvent.addListener(B,"change",function(){B.checked&&L?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")});k&&L||O.setAttribute("disabled","disabled");var H=document.createElement("select");
H.style.maxWidth="260px";H.style.marginLeft="8px";H.style.marginRight="10px";H.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));H.appendChild(a);a=document.createElement("option");a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));H.appendChild(a);"svg"==
-m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,x.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
+m&&(mxUtils.write(b,mxResources.get("links")+":"),b.appendChild(H),mxUtils.br(b),mxUtils.br(b),g+=26);d=new CustomDialog(this,b,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=t.value;n(t.value,v.checked,!F.checked,J.checked,B.checked,u.checked,q.value,I.checked,!O.checked,H.value,null!=K?K.checked:null,null!=G?G.checked:null)}),null,d,f);this.showDialog(d.container,340,g,!0,!0,null,null,null,null,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||
mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,d,f,n){var b=document.createElement("div");b.style.whiteSpace="nowrap";var e=this.editor.graph;if(null!=c){var g=document.createElement("h3");mxUtils.write(g,c);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(g)}var k=this.addCheckbox(b,mxResources.get("fit"),!0),p=this.addCheckbox(b,mxResources.get("shadow"),e.shadowVisible&&f,
!f),m=this.addCheckbox(b,d),q=this.addCheckbox(b,mxResources.get("lightbox"),!0),C=this.addEditButton(b,q),A=C.getEditInput(),E=1<e.model.getChildCount(e.model.getRoot()),G=this.addCheckbox(b,mxResources.get("layers"),E,!E);G.style.marginLeft=A.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(E&&G.removeAttribute("disabled"),A.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
A.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,b,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),G.checked)}),null,mxResources.get("embed"),n);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,c,d,f,n,l,k,m){function b(b){var c=" ",g="";f&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -3432,13 +3431,13 @@ parseFloat(a.getAttribute("scale"));!isNaN(d)&&0<d&&(b=d)}a.hasAttribute("border
"tEXt","mxfile",encodeURIComponent(g));a(d.substring(d.lastIndexOf(",")+1));b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}catch(C){null!=c&&c(C)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,f,null,b.shadowVisible,null,b,n)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(a,c,d,f,n,l,k,m){m=null!=m?m:!0;k=c.background;k==mxConstants.NONE&&(k=null);l=c.getSvg(k,null,null,null,null,l);c.shadowVisible&&c.addSvgShadow(l);null!=a&&
l.setAttribute("content",a);null!=d&&l.setAttribute("resource",d);if(null!=n)this.embedFonts(l,mxUtils.bind(this,function(a){m?this.editor.convertImages(a,mxUtils.bind(this,function(a){n((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))})):n((f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
mxUtils.getXml(a))}));else return(f?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.embedFonts=function(a,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(a,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.editor.addFontCss(a,b),c(a)}catch(p){c(a)}}))}catch(g){c(a)}}))};
-EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,v,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
-this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,v,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
+EditorUi.prototype.exportImage=function(a,c,d,f,n,l,k,m,q,x,D,z){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var b=this.editor.graph.isSelectionEmpty();d=null!=d?d:b;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,n?this.getFileData(!0,null,null,null,d,m):null,q,null==this.pages||0==this.pages.length,D)}catch(E){"Invalid image"==E.message?this.downloadFile(q):
+this.handleError(E)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,c,f,null,null,l,k,x,z)}catch(A){this.spinner.stop(),this.handleError(A)}}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.importXml=function(a,c,d,f,n){c=null!=c?c:0;d=null!=d?d:0;var b=[];try{var e=this.editor.graph;if(null!=a&&0<a.length){e.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};
var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var g=[],m=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),f=!1,m=1);for(;m<p.length;m++){var q=
p[m].getAttribute("id");p[m].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(p[m]));a[q]=p[m].getAttribute("id");var A=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[A+1]));e.model.execute(new ChangePage(this,C,C,A,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(b=e.importGraphModel(k,c,d,f),null!=b))for(m=0;m<b.length;m++)this.updatePageLinksForCell(a,b[m])}finally{e.model.endUpdate()}}}catch(E){if(n)throw E;this.handleError(E)}return b};
EditorUi.prototype.updatePageLinks=function(a,c){for(var b=0;b<c.length;b++)this.updatePageLinksForCell(a,c[b].root)};EditorUi.prototype.updatePageLinksForCell=function(a,c){var b=document.createElement("div"),e=this.editor.graph,d=e.getLinkForCell(c);null!=d&&e.setLinkForCell(c,this.updatePageLink(a,d));if(e.isHtmlLabel(c)){b.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var f=b.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)d=f[m].getAttribute("href"),null!=d&&(f[m].setAttribute("href",this.updatePageLink(a,
d)),k=!0);k&&e.labelChanged(c,b.innerHTML)}for(m=0;m<e.model.getChildCount(c);m++)this.updatePageLinksForCell(a,e.model.getChildAt(c,m))};EditorUi.prototype.updatePageLink=function(a,c){if("data:page/id,"==c.substring(0,13)){var b=a[c.substring(c.indexOf(",")+1)];c=null!=b?"data:page/id,"+b:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var d=0;d<e.actions.length;d++){var f=e.actions[d];null!=f.open&&"data:page/id,"==f.open.substring(0,
-13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(x){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
+13)&&(b=a[f.open.substring(f.open.indexOf(",")+1)],null!=b?f.open="data:page/id,"+b:delete f.open)}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,c,d,f){f=null!=f?f:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var b=this.isRemoteVisioFormat(f);
try{var e="UNKNOWN-VISIO",g=f.lastIndexOf(".");if(0<=g&&g<f.length)e=f.substring(g+1).toUpperCase();else{var n=f.lastIndexOf("/");0<=n&&n<f.length&&(f=f.substring(n+1))}EditorUi.logEvent({category:e+"-MS-IMPORT-FILE",action:"filename_"+f,label:b?"remote":"local"})}catch(D){}if(b)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{b=new FormData;b.append("file1",a,f);var k=new XMLHttpRequest;
k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var b=new FileReader;b.onload=mxUtils.bind(this,function(a){try{c(a.target.result)}catch(A){d({message:mxResources.get("errorLoadingFile")})}});b.readAsText(a)}else this.doImportVisio(a,c,d,f)}catch(C){d(C)}else d({})});k.send(b)}else try{this.doImportVisio(a,c,d,f)}catch(D){d(D)}}else this.spinner.stop(),
this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?b():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",b))};EditorUi.prototype.importGraphML=function(a,c,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,c,d)}catch(n){d(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});
@@ -3446,7 +3445,7 @@ this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?b():(this.loadi
"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,c,d){var b=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{c(LucidImporter.importState(JSON.parse(a)))}catch(n){null!=window.console&&
console.error(n),d(n)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(b,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",b):mxscript("js/extensions.min.js",b))};EditorUi.prototype.generateMermaidImage=function(a,c,d,f){var b=this,e=function(){try{this.loadingMermaid=!1,c=null!=c?c:EditorUi.defaultMermaidConfig,c.securityLevel="strict",c.startOnLoad=
!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var c=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<c.length){var e=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));d(b.convertDataUri(Editor.createSvgDataUri(a)),e,
-g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(x){f(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
+g)}else f({message:mxResources.get("invalidInput")})}catch(D){f(D)}})}catch(v){f(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?e():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.generatePlantUmlImage=function(a,c,d,f){function b(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=e(c1&63);r+=e(c2&63);r+=e(c3&63);return r+=e(c4&63)}function e(a){if(10>a)return String.fromCharCode(48+
a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+b(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+b(a.charCodeAt(i),0,0):r+b(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=c&&(g.responseType=
"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==c)d(this.response);else{var b=new FileReader;b.readAsDataURL(this.response);b.onloadend=function(a){var c=new Image;c.onload=function(){try{var a=c.width,e=c.height;if(0==a&&0==e){var g=b.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),e=parseFloat(k[0].getAttribute("height")))}d(b.result,a,
e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.onerror=function(a){f(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,c,d){var b=this.editor.graph,e=null;b.getModel().beginUpdate();try{e=b.insertVertex(null,null,"<pre>"+a+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),b.updateCellSize(e,!0)}finally{b.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,c,d,f,n,l,k){l=null!=l?l:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
@@ -3454,60 +3453,59 @@ e)}catch(I){f(I)}};c.src=b.result};b.onerror=function(a){f(a)}}else f(a)};g.oner
Editor.extractGraphModelFromPdf(a);if(null!=e&&0<e.length)return this.importXml(e,c,d,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(e=this.extractGraphModelFromPng(a),null!=e&&0<e.length))return this.importXml(e,c,d,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{e=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(e=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0)):e=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(e,
c,d,l,!0);if(0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
g=Math.round(e.width*f);e=Math.round(e.height*f);b.setSelectionCell(b.insertVertex(null,null,"",b.snap(c),b.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;b.getModel().beginUpdate();try{e=b.insertVertex(b.getDefaultParent(),null,a,b.snap(c),b.snap(d),1,1,"text;"+(f?"html=1;":"")),b.updateCellSize(e),b.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{b.getModel().endUpdate()}b.setSelectionCell(e)}))}else{a=
-Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var b=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(b.container,610,360,!0,!1);b.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted","cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<
-a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
-14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
-if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
-360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,
-b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},
-function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,v,D){v=null!=v?v:!0;var b=!1,e=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,d,f,v);null!=m&&m(b)});"image"==c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:
-this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,v),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),v&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
-/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
-/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,v));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,v,D,z){f=null!=f?f:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=
-this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,q=t,y=[],x=mxUtils.bind(this,function(a,b){y[a]=b;if(0==
---q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),q=decodeURIComponent(escape(atob(m.substring(t+1)))),
-y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?x(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=
-e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,v=e.getAttribute("viewBox");if(null==v||0==v.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=v.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var x=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),B=n(m,l.type,c+b*p,d+b*p,Math.max(1,Math.round(k*x)),Math.max(1,Math.round(q*
-x)),l.name);if(isNaN(k)||isNaN(q)){var A=new Image;A.onload=mxUtils.bind(this,function(){k=Math.max(1,A.width);q=Math.max(1,A.height);B[0].geometry.width=k;B[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[B[0]])});A.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return B}}}catch(W){}return null})):x(b,mxUtils.bind(this,function(){return n(u,
-"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else x(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var B=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var A=new Image;A.src=a.target.result;x(b,mxUtils.bind(this,function(){return n(B,"text/xml",c+b*p,d+b*p,A.width,A.height,l.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){x(b,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){x(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,d,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(a){this.editor.graph.setSelectionCells(this.importXml(a,c,d,l))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{b=this.editor.graph;n=null;b.getModel().beginUpdate();try{n=b.insertVertex(b.getDefaultParent(),null,"",b.snap(c),b.snap(d),1,1,"text;whiteSpace=wrap;"+(f?"html=1;":""));b.fireEvent(new mxEventObject("textInserted",
+"cells",[n]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");n.value=a;b.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var m=b.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=m.width;n.geometry.height=m.height}Graph.isLink(n.value)&&b.setLinkForCell(n,n.value);n.geometry.width+=b.gridSize;n.geometry.height+=b.gridSize}finally{b.getModel().endUpdate()}return[n]}}return[]};
+EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=
+a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,c){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){null!=b.files&&(this.importFiles(b.files,null,null,this.maxImageSize),b.type="",b.type="file",b.value="")}));b.style.display="none";document.body.appendChild(b);this.importFileInputElt=
+b}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,
+0,0,!0))}));this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!c){var d=this.dialog,f=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=e;f.apply(d,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,c,d){var b=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==
+Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,b){var e=b.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,b.async("string").then(function(a){0==a.indexOf("<mxfile ")?c(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=b))});0<f?g.async("string").then(function(e){!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(e,a.name)?b.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=
+a.status&&299>=a.status?c(a.responseText):d())}),a.name):d()}):l||d()}},function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,c,d,f,n,l,k,m,q,x,D){x=null!=x?x:!0;var b=!1,e=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,d,f,x);null!=m&&m(b)});"image"==
+c.substring(0,5)?(q=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(e=this.importXml(c,d,f,x),q=!0)),q||(c=this.editor.graph,D=a.indexOf(";"),0<D&&(a=a.substring(0,D)+a.substring(a.indexOf(",",D+1))),x&&c.isGridEnabled()&&(d=c.snap(d),f=c.snap(f)),e=[c.insertVertex(null,null,"",d,f,n,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(b=!0,
+this.importGraphML(a,g)):null!=q&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(b=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(b=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=q?(b=!0,this.importZipFile(q,g,mxUtils.bind(this,function(){e=
+this.insertTextAt(this.validateFileData(a),d,f,!0,null,x);m(e)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(e=this.insertTextAt(this.validateFileData(a),d,f,!0,null,x));b||null==m||m(e);return e};EditorUi.prototype.importFiles=function(a,c,d,f,n,l,k,m,q,x,D,z){f=null!=f?f:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var b=null!=c&&null!=d,e=!0;c=null!=c?c:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=D||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==
+a[t].type.substring(0,6)&&a[t].size>p){g=!0;break}var y=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;n=null!=n?n:mxUtils.bind(this,function(a,c,e,d,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,c,e,d,f,g,l,n,k,b,z)}catch(U){return this.handleError(U),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=
+a.length,q=t,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==--q){this.spinner.stop();if(null!=m)m(y);else{var c=[];g.getModel().beginUpdate();try{for(var e=0;e<y.length;e++){var d=y[e]();null!=d&&(c=c.concat(d))}}finally{g.getModel().endUpdate()}}l(c)}}),A=0;A<t;A++)mxUtils.bind(this,function(b){var l=a[b];if(null!=l){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),
+q=decodeURIComponent(escape(atob(m.substring(t+1)))),y=mxUtils.parseXml(q),q=y.getElementsByTagName("svg");if(0<q.length){var q=q[0],u=z?null:q.getAttribute("content");null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?v(b,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");
+if(0<a.length){var e=a[0],k=e.getAttribute("width"),q=e.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,x=e.getAttribute("viewBox");if(null==x||0==x.length)e.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var u=x.split(" ");3<u.length&&(k=parseFloat(u[2]),q=parseFloat(u[3]))}m=Editor.createSvgDataUri(mxUtils.getXml(e));var v=Math.min(1,Math.min(f/Math.max(1,k)),f/Math.max(1,q)),A=n(m,l.type,c+
+b*p,d+b*p,Math.max(1,Math.round(k*v)),Math.max(1,Math.round(q*v)),l.name);if(isNaN(k)||isNaN(q)){var B=new Image;B.onload=mxUtils.bind(this,function(){k=Math.max(1,B.width);q=Math.max(1,B.height);A[0].geometry.width=k;A[0].geometry.height=q;e.setAttribute("viewBox","0 0 "+k+" "+q);m=Editor.createSvgDataUri(mxUtils.getXml(e));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[A[0]])});B.src=Editor.createSvgDataUri(mxUtils.getXml(e))}return A}}}catch(W){}return null})):
+v(b,mxUtils.bind(this,function(){return n(u,"text/xml",c+b*p,d+b*p,0,0,l.name)}))}else v(b,mxUtils.bind(this,function(){return null}))}else{q=!1;if("image/png"==l.type){var A=z?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var B=new Image;B.src=a.target.result;v(b,mxUtils.bind(this,function(){return n(A,"text/xml",c+b*p,d+b*p,B.width,B.height,l.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),
+mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){v(b,mxUtils.bind(this,function(){if(null!=g&&g.length<x){var t=e&&this.isResampleImage(a.target.result,D)?Math.min(1,Math.min(f/k,f/m)):1;return n(g,l.type,c+b*p,d+b*p,Math.round(k*t),Math.round(m*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),e,f,D)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=a.target.result,n(m,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?n(null,l.type,c+b*p,d+b*p,240,160,l.name,function(a){v(b,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?m.readAsDataURL(l):m.readAsText(l)}})(A)});if(g){g=[];
for(t=0;t<a.length;t++)g.push(a[t]);a=g;this.confirmImageResize(function(a){e=a;y()},q)}else y()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||c)mxSettings.setResizeImages(e?d:null),mxSettings.save();b();a(d)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,e)};EditorUi.prototype.parseFile=function(a,c,d){d=null!=d?d:a.name;var b=new FormData;b.append("format","xml");b.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",
OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(b);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,d,f,n,l){n=null!=n?n:this.maxImageSize;var b=Math.max(1,a.width),e=Math.max(1,a.height);if(f&&this.isResampleImage(c,l))try{var g=Math.max(b/n,e/n);if(1<g){var k=Math.round(b/g),m=Math.round(e/g),p=document.createElement("canvas");
p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<c.length){var A=document.createElement("canvas");A.width=k;A.height=m;var E=A.toDataURL();q!==E&&(c=q,b=k,e=m)}}}catch(G){}d(c,b,e)};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,c,d){try{var b=new Image;b.onload=function(){b.width=0<b.width?b.width:120;b.height=0<b.height?b.height:120;c(b)};null!=d&&(b.onerror=d);
b.src=a}catch(n){if(null!=d)d(n);else throw n;}};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph;"dark"==uiTheme&&(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("plantUml")+
-":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=g,k.height=l,c.cellsResized([b],[k],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
-function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var k=c.model.getGeometry(b);null!=k&&(k=k.clone(),k.width=Math.max(k.width,
-g),k.height=Math.max(k.height,l),c.cellsResized([b],[k],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(e,f.format,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{if("txt"==f.format)c.labelChanged(b,"<pre>"+d+"</pre>"),c.updateCellSize(b,!0);else{c.setCellStyles("image",a.convertDataUri(d),[b]);var n=c.model.getGeometry(b);null!=n&&(n=n.clone(),n.width=g,n.height=l,c.cellsResized([b],[n],!1))}c.setAttributeForCell(b,"plantUmlData",JSON.stringify({data:e,format:f.format}))}finally{c.getModel().endUpdate()}},
+function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(b,e,d){var f=JSON.parse(d);e=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(e){null!=e&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(e,f.config,function(d,g,l){a.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",d,[b]);var n=c.model.getGeometry(b);null!=n&&(n=n.clone(),n.width=Math.max(n.width,
+g),n.height=Math.max(n.height,l),c.cellsResized([b],[n],!1));c.setAttributeForCell(b,"mermaidData",JSON.stringify({data:e,config:f.config},null,2))}finally{c.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(e.container,420,300,!0,!0);e.init()};var f=c.cellEditor.startEditing;c.cellEditor.startEditing=function(b,e){try{var d=this.graph.getAttributeForCell(b,"plantUmlData");if(null!=d)this.editPlantUmlData(b,e,d);else if(d=this.graph.getAttributeForCell(b,"mermaidData"),
null!=d)this.editMermaidData(b,e,d);else{var g=c.getCellStyle(b);"1"==mxUtils.getValue(g,"metaEdit","0")?a.showDataDialog(b):f.apply(this,arguments)}}catch(F){a.handleError(F)}};c.getLinkTitle=function(b){return a.getLinkTitle(b)};c.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(E){a.handleError(E)}return c};var k=this.clearDefaultStyle;this.clearDefaultStyle=function(){k.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink=
"https://desk.draw.io/support/solutions/articles/16000051979");var n=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return n.apply(this,arguments)};var l=c.addClickHandler;c.addClickHandler=function(a,b,e){var d=b;b=function(a,b){if(null==b){var e=mxEvent.getSource(a);
"a"==e.nodeName.toLowerCase()&&(b=e.getAttribute("href"))}null!=b&&c.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&c.customLinkClicked(b)&&mxEvent.consume(a);null!=d&&d(a,b)};l.call(this,a,b,e)};d.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");
var m=c.getExportVariables;c.getExportVariables=function(){var b=m.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=c.getGlobalVariable;c.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():
"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var q=c.labelLinkClicked;c.labelLinkClicked=function(a,b,e){var d=b.getAttribute("href");if(null==d||!c.isCustomLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=a&&c.isCellLocked(a.cell))c.customLinkClicked(d),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
-function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
+function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,
function(a){var b=this.editor.graph,c=b.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=e&&(e.parentNode.removeChild(e),e=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<
a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,e,d,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var e=Math.max(1,
a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,e)),d/Math.max(1,a));b.insertImage(decodeURIComponent(c),e*d,a*d)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();
-a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,v.unit),this.refresh());if("1"==urlParams.styledev){v=document.getElementById("geFooter");
-null!=v&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}v=document.getElementById("geInfo");
-null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
+a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");
+null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}x=document.getElementById("geInfo");
+null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();
a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),e=c.view.translate,d=c.view.scale,f=b.x/d-e.x,g=b.y/d-e.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));
-else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=c.sanitizeHtml(k);var n=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(k=e[0].getAttribute("src"),
-null==k&&(k=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?k=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(k=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&null!=k&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
+else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var n=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=c.sanitizeHtml(n);var k=null,e=b.getElementsByTagName("img");null!=e&&1==e.length?(n=e[0].getAttribute("src"),
+null==n&&(n=e[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)||(k=!0)):(e=b.getElementsByTagName("a"),null!=e&&1==e.length?n=e[0].getAttribute("href"):(b=b.getElementsByTagName("pre"),null!=b&&1==b.length&&(n=mxUtils.getTextContent(b[0]))));var m=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(n,f,g,!0,k,null,m))});k&&null!=n&&n.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,b)),e/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*e,a*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,
"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===
c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position=
"absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var f=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);
null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||224!=a.keyCode&&(mxClient.IS_MAC||17!=a.keyCode)&&(!mxClient.IS_MAC||91!=a.keyCode&&93!=a.keyCode)||f||(d.style.left=c.container.scrollLeft+10+"px",d.style.top=c.container.scrollTop+10+"px",c.container.appendChild(d),f=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,
-null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=b&&17!=b&&91!=b||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,
-"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=
-function(a){return mxEvent.getSource(a)==d?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
+null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!f||224!=b&&17!=b&&91!=b||(f=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,
+"cut",mxUtils.bind(this,function(b){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(d,!0),a()}catch(v){this.handleError(v)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=
+function(a){return mxEvent.getSource(a)==d?!0:n.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");
if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,
function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(b){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("customFonts");this.menus.customFonts=b;mxSettings.setCustomFonts(b);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);
@@ -3531,7 +3529,7 @@ f);try{this.loadLibrary(new LocalLibrary(this,a,c))}catch(y){this.handleError(y,
c))this.parseFile(d,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?b(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(a))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(a,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,c,f)}),mxUtils.bind(this,function(a){this.spinner.stop();
this.handleError(a)}));else if("<mxlibrary"==a.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,f);try{this.loadLibrary(new LocalLibrary(this,a,d.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else if(0==a.indexOf("PK"))this.importZipFile(d,mxUtils.bind(this,function(a){this.spinner.stop();b(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(a,c,f)}));
else{if("image/png"==d.type.substring(0,9))a=this.extractGraphModelFromPng(a);else if("application/pdf"==d.type){var e=Editor.extractGraphModelFromPdf(a);null!=e&&(a=e)}this.spinner.stop();this.openLocalFile(a,c,f,k,null!=k?d:null)}}};EditorUi.prototype.openFiles=function(a,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.openFileHandle(b.target.result,a.name,
-a,c)}catch(x){this.handleError(x)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
+a,c)}catch(v){this.handleError(v)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?b.readAsText(a):b.readAsDataURL(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,d,f,k){var b=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var b=mxUtils.parseXml(a);
null!=b&&(this.editor.setGraphXml(b.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,c||this.defaultFilename,d,f,k))});if(null!=a&&0<a.length)null==b||!b.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
null}),window.openFile.setData(a,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
a);var c=[],d;for(d in a)c.push(d);return c};EditorUi.prototype.addBasenamesForCell=function(a,c){function b(a){if(null!=a){var b=a.lastIndexOf(".");0<b&&(a=a.substring(b+1,a.length));null==c[a]&&(c[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(b(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),
@@ -3542,24 +3540,24 @@ this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi(
function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,f=null,l=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){if(e.source==(window.opener||window.parent)){var g=e.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(da){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(U){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
-var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
-n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,
-640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
+var n=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
+m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(n.container,
+640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{n.init()}catch(U){k.postMessage(JSON.stringify({event:"draft",error:U.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,n=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,
name:c,message:g}),"*"):(a(b,e,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),
-null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
+null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(n.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var v=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var J=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var u=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=J;k.postMessage(JSON.stringify(b),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(J)));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container);
K(a)}),L=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=L){for(var O=u.getGlobalVariable,u=this.createTemporaryGraph(u.getStylesheet()),H,S=0;S<this.pages.length;S++)if(this.pages[S].getId()==L){H=this.updatePageRoot(this.pages[S]);break}u.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:O.apply(this,arguments)};document.body.appendChild(u.container);u.model.setRoot(H.root)}if(null!=g.layerIds){for(var fa=
-u.model,ga=fa.getChildCells(fa.getRoot()),m={},S=0;S<g.layerIds.length;S++)m[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],m[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
-"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");x.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();x.xml=mxUtils.getXml(aa);
-x.data=this.getFileData(null,null,!0,null,null,null,aa);x.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),x.data=this.getHtml(J,this.editor.graph),x.xml=mxUtils.getXml(J),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);x.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);x.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=Editor.createSvgDataUri(a);
-k.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
-null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
-(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),
-this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(n=l(g.xml),null!=n&&""!=n&&ha.mergeFile(new LocalFile(this,n),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
+u.model,ga=fa.getChildCells(fa.getRoot()),n={},S=0;S<g.layerIds.length;S++)n[g.layerIds[S]]=!0;for(S=0;S<ga.length;S++)fa.setVisible(ga[S],n[ga[S].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(a){B(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){B(null)}),null,null,g.scale,null,null,null,u)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=L?"&pageId="+L:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):
+"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(J))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):B(null)}),mxUtils.bind(this,function(){B(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");v.message=g;if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var aa=this.getXmlFileData();v.xml=mxUtils.getXml(aa);
+v.data=this.getFileData(null,null,!0,null,null,null,aa);v.format=g.format}else if("html"==g.format)J=this.editor.getGraphXml(),v.data=this.getHtml(J,this.editor.graph),v.xml=mxUtils.getXml(J),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var Y=this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var X=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=Editor.createSvgDataUri(a);
+k.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,X,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var ba=this.editor.graph.getSvg(Y);this.embedFonts(ba,mxUtils.bind(this,function(a){g.embedImages||
+null==g.embedImages?this.editor.convertImages(a,mxUtils.bind(this,function(a){X(mxUtils.getXml(a))})):X(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(v),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=g.noSaveBtn),null!=g.noExitBtn&&null==urlParams.noExitBtn&&
+(urlParams.noExitBtn=g.noExitBtn),null!=g.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),
+this.embedFilenameSpan=m),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{if("merge"==g.action){var ha=this.getCurrentFile();null!=ha&&(m=l(g.xml),null!=m&&""!=m&&ha.mergeFile(new LocalFile(this,m),function(){k.postMessage(JSON.stringify({event:"merge",message:g}),"*")},function(a){k.postMessage(JSON.stringify({event:"merge",message:g,error:a}),"*")}))}else"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,e.origin):
"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(U){this.handleError(U)}}var ea=mxUtils.bind(this,function(e,g){c=!0;try{a(e,g)}catch(la){this.handleError(la)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});f=l();
d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=l();if(d!=f&&!c){var e=this.createLoadMessage("autosave");e.xml=d;d=JSON.stringify(e);(window.opener||window.parent).postMessage(d,"*")}f=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",
-b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=e;k.postMessage(JSON.stringify(m),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
+b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=e;k.postMessage(JSON.stringify(n),"*")}});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",
this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){ea(a,e)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&ea(a.responseText,e)}),""):null!=g&&"function"===
typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){ea(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),ea(g,e))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*");if("json"==urlParams.proto){var m=this.editor.graph.openLink;this.editor.graph.openLink=function(a,b,c){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:a,
target:b,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";var d=c;"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&(mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),
@@ -3567,15 +3565,15 @@ mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("sav
c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c),d=c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("exit")),c.setAttribute("title",mxResources.get("exit")),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),
a.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,c){for(var b=this.editor.graph,d=b.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](b);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(b.getDefaultParent(),0==d.length?null:d)},e==a.length-1,c)}};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),
-d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,v=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=
-a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?v=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
+d=[],e=[],f={};if(0<b.length){var k={},m=null,q=null,x=null,D=null,z=null,C=null,A=null,E=null,G="",F="auto",I="auto",J=null,u=null,K=40,B=40,L=100,O=0,H=this.editor.graph;H.getGraphBounds();for(var S=function(){null!=c?c(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},fa=H.getFreeInsertPoint(),ga=fa.x,aa=fa.y,fa=aa,Y=null,X="auto",E=null,ba=[],ha=null,ea=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=
+a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?Y=H.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?D=M:"labels"==Q&&0<M.length&&"-"!=M?z=JSON.parse(M):"style"==Q?m=M:"parentstyle"==Q?C=M:"stylename"==Q&&0<M.length&&"-"!=M?x=M:"styles"==Q&&0<M.length&&"-"!=M?q=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?A=M:"parent"==Q&&0<M.length&&"-"!=M?E=M:
"namespace"==Q&&0<M.length&&"-"!=M?G=M:"width"==Q?F=M:"height"==Q?I=M:"left"==Q&&0<M.length?J=M:"top"==Q&&0<M.length?u=M:"ignore"==Q?ea=M.split(","):"connect"==Q?ba.push(JSON.parse(M)):"link"==Q?ha=M:"padding"==Q?O=parseFloat(M):"edgespacing"==Q?K=parseFloat(M):"nodespacing"==Q?B=parseFloat(M):"levelspacing"==Q?L=parseFloat(M):"layout"==Q&&(X=M)}}}if(null==b[U])throw Error(mxResources.get("invalidOrMissingFile"));for(var la=this.editor.csvToArray(b[U]),Q=da=null,M=[],P=0;P<la.length;P++)A==la[P]&&
(da=P),E==la[P]&&(Q=P),M.push(mxUtils.trim(la[P]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Y&&(Y="%"+M[0]+"%");if(null!=ba)for(var T=0;T<ba.length;T++)null==k[ba[T].to]&&(k[ba[T].to]={});A=[];for(P=U+1;P<b.length;P++){var ja=this.editor.csvToArray(b[P]);if(null==ja){var sa=40<b[P].length?b[P].substring(0,40)+"...":b[P];throw Error(sa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<ja.length&&A.push(ja)}H.model.beginUpdate();try{for(P=0;P<A.length;P++){var ja=
-A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=v&&null!=q){var ia=q[W.getAttribute(v)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
+A[P],N=null,oa=null!=da?G+ja[da]:null;null!=oa&&(N=H.model.getCell(oa));var b=null!=N,W=new mxCell(Y,new mxGeometry(ga,fa,0,0),m||"whiteSpace=wrap;html=1;");W.vertex=!0;W.id=oa;for(var Z=0;Z<ja.length;Z++)H.setAttributeForCell(W,M[Z],ja[Z]);if(null!=D&&null!=z){var R=z[W.getAttribute(D)];null!=R&&H.labelChanged(W,R)}if(null!=x&&null!=q){var ia=q[W.getAttribute(x)];null!=ia&&(W.style=ia)}H.setAttributeForCell(W,"placeholders","1");W.style=H.replacePlaceholders(W,W.style);b&&(H.model.setGeometry(N,
W.geometry),H.model.setStyle(N,W.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=W;if(!b)for(T=0;T<ba.length;T++)k[ba[T].to][N.getAttribute(ba[T].to)]=N;null!=ha&&"link"!=ha&&(H.setLinkForCell(N,N.getAttribute(ha)),H.setAttributeForCell(N,ha,null));H.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var ka=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=J&&null!=N.getAttribute(J)&&(N.geometry.x=ga+parseFloat(N.getAttribute(J))),null!=u&&null!=N.getAttribute(u)&&(N.geometry.y=aa+
parseFloat(N.getAttribute(u))),"@"==F.charAt(0)&&null!=N.getAttribute(F.substring(1))?N.geometry.width=parseFloat(N.getAttribute(F.substring(1))):N.geometry.width="auto"==F?ka.width+O:parseFloat(F),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?ka.height+O:parseFloat(I),fa+=N.geometry.height+B);b?(null==f[oa]&&(f[oa]=[]),f[oa].push(N)):(E=null!=Q?H.model.getCell(G+ja[Q]):null,d.push(N),null!=E?(E.style=
H.replacePlaceholders(E,C),H.addCell(N,E)):e.push(H.addCell(N)))}for(var qa=e.slice(),ra=e.slice(),T=0;T<ba.length;T++)for(var Aa=ba[T],P=0;P<d.length;P++){var N=d[P],wa=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(H.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));
-var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);g.insert(n)}ra.push(g);
+var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?H.replacePlaceholders(l,c.style):H.createCurrentEdgeStyle(),g=H.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var n=c.labels[l],m=new mxCell(n.label||l,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");m.vertex=!0;m.connectable=!1;m.geometry.relative=!0;if(null!=n.dx||null!=n.dy)m.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);g.insert(m)}ra.push(g);
mxUtils.remove(c.invert?a:f,qa)}}});wa(N,N,Aa);if(null!=f[N.id])for(Z=0;Z<f[N.id].length;Z++)wa(N,f[N.id][Z],Aa)}if(null!=ea)for(P=0;P<d.length;P++)for(N=d[P],Z=0;Z<ea.length;Z++)H.setAttributeForCell(N,mxUtils.trim(ea[Z]),null);if(0<e.length){var pa=new mxParallelEdgeLayout(H);pa.spacing=K;var xa=function(){0<pa.spacing&&pa.execute(H.getDefaultParent());for(var a=0;a<e.length;a++){var b=H.getCellGeometry(e[a]);b.x=Math.round(H.snap(b.x));b.y=Math.round(H.snap(b.y));"auto"==F&&(b.width=Math.round(H.snap(b.width)));
"auto"==I&&(b.height=Math.round(H.snap(b.height)))}};if("["==X.charAt(0)){var ya=S;H.view.validate();this.executeLayoutList(JSON.parse(X),function(){xa();ya()});S=null}else if("circle"==X){var ma=new mxCircleLayout(H);ma.resetEdges=!1;var ta=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ta.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ma.execute(H.getDefaultParent());xa()},!0,S);S=null}else if("horizontaltree"==X||"verticaltree"==X||"auto"==X&&ra.length==
2*e.length-1&&1==qa.length){H.view.validate();var Ba=new mxCompactTreeLayout(H,"horizontaltree"==X);Ba.levelDistance=B;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(H.getDefaultParent(),0<qa.length?qa[0]:null)},!0,S);S=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==qa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=B;ua.parallelEdgeSpacing=K;
@@ -3598,7 +3596,7 @@ this.exportDialog=null);q.apply(this,arguments)};null!=window.ExportDialog&&(Exp
p=Math.floor(g.height*k/b.view.scale);if(e.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:b.getExportVariables()};a.saveRequest(c,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=f?f:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(e))})}else"png"==
d?a.exportImage(k,null==f||"none"==f,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,c="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var f=a;this.currentPage!=this.pages[d]&&(f=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),f.model.setRoot(this.pages[d].root));
c+=this.pages[d].getName()+" "+f.getIndexableText()+" "}else c=a.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var f=document.createElement("div");f.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(v){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+f.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var q=JSON.parse(decodeURIComponent(m.substring(1)));l[q[0]]={id:q[0],title:q[1],downloadUrl:q[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){f.innerHTML="";if(0==a.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
"</div>";else for(var c=0;c<a.length;c++){var d=a[c];l[d.id]&&(b[d.id]=d);var e=this.addCheckbox(f,d.title,l[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,e)}},mxUtils.bind(this,function(a){f.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));f.appendChild(b)}));
c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==l[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in l)b[c]||this.closeLibrary(new RemoteLibrary(this,null,l[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
@@ -3606,20 +3604,20 @@ setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.proto
(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,c,d,f,k){var b=!0,e=window.setTimeout(mxUtils.bind(this,function(){b=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(e);b&&f.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(e);b&&k.apply(this,
arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:m});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,c){var b=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),
"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(c=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){b(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){b(Array.prototype.slice.apply(arguments))}),m.push(function(a){b(null,a||"Unkown Error")}),this[d].apply(this,m);else{var q=this[d].apply(this,m);
-b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(v){b(null,"Invalid Call: An error occured, "+v.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=c&&c(x)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
-"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
-{};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
+b([q])}}else b(null,"Invalid Call: "+d+" is not found.")}catch(x){b(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,c){if(null==this.database){var b=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=b)try{var d=b.open("database",2);d.onupgradeneeded=function(a){try{var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
+"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
+function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
+{};try{f=JSON.parse(a.data)}catch(J){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,k()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):l())}}catch(J){console.log(J)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
function(){c.close()}});d.onerror=c;d.onblocked=function(){}}catch(n){null!=c&&c(n)}else null!=c&&c()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,c,d,f,k){this.openDatabase(mxUtils.bind(this,function(b){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],c=[c]);var e=b.transaction(k,"readwrite");e.oncomplete=d;e.onerror=f;for(b=0;b<k.length;b++)e.objectStore(k[b]).put(null!=a&&null!=a[b]?{key:a[b],data:c[b]}:c[b])}catch(t){null!=f&&f(t)}}),f)};EditorUi.prototype.removeDatabaseItem=
-function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.getDatabaseItems=
-function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();
+function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){f=f||"objects";Array.isArray(f)||(f=[f],a=[a]);b=b.transaction(f,"readwrite");b.oncomplete=c;b.onerror=d;for(var e=0;e<f.length;e++)b.objectStore(f[e])["delete"](a[e])}),d)};EditorUi.prototype.getDatabaseItem=function(a,c,d,f){this.openDatabase(mxUtils.bind(this,function(b){try{f=f||"objects";var e=b.transaction([f],"readonly").objectStore(f).get(a);e.onsuccess=function(){c(e.result)};e.onerror=d}catch(v){null!=d&&d(v)}}),d)};EditorUi.prototype.getDatabaseItems=
+function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(a,c,d){this.openDatabase(mxUtils.bind(this,function(b){try{d=d||"objects";var e=b.transaction([d],"readonly").objectStore(d).getAllKeys();
e.onsuccess=function(){a(e.result)};e.onerror=c}catch(l){null!=c&&c(l)}}),c)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,c){var b=this.getCurrentFile();
null!=b?b.getComments(a,c):a([])};EditorUi.prototype.addComment=function(a,c,d){var b=this.getCurrentFile();null!=b?b.addComment(a,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,c){var b=this.getCurrentFile();return null!=b?b.newComment(a,c):new DrawioComment(this,null,
a,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,c){var b=this.getCurrentFile();null!=b&&b.getRevisions?b.getRevisions(a,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(a,c,d,f,k,l,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(a,c,d,f,k,l,m,q)};EditorUi.prototype.loadFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(a)};EditorUi.prototype.createSvgDataUri=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,m,q,y,v,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,
-y,v,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};
+return Editor.createSvgDataUri(a)};EditorUi.prototype.embedCssFonts=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(a,c)};EditorUi.prototype.embedExtFonts=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(a)};EditorUi.prototype.exportToCanvas=function(a,c,d,f,k,l,m,q,y,x,D,z,C,A,E,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(a,c,d,f,k,l,m,q,
+y,x,D,z,C,A,E,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(a,c,d,f)};EditorUi.prototype.convertImageToDataUri=function(a,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(a,c)};
EditorUi.prototype.base64Encode=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(a)};EditorUi.prototype.updateCRC=function(a,c,d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(a,c,d,f)};EditorUi.prototype.crc32=function(a){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(a)};EditorUi.prototype.writeGraphModelToPng=function(a,c,d,f,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(a,
c,d,f,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),f=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<f.length){var k="<mxfile "===f.substring(0,8)||"<?xml"===f.substring(0,5)||"\x3c!--[if IE]>"===f.substring(0,12),f="<mxlibrary>"===f.substring(0,11);(k||f)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=
function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
@@ -3627,28 +3625,28 @@ var CommentsWindow=function(a,c,f,d,k,m){function q(){for(var a=z.getElementsByT
"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();y=null});m.className="geCommentEditBtn";l.appendChild(m);var n=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);y=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(n.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";l.appendChild(n);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function e(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function g(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function p(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function n(a){a.style.border="";a.removeChild(a.busyImg)}function l(c,d,f,k,m){function B(a,b,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=v;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(v,function(a){v.id=a;c.replies.push(v);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(v,A,function(a){t()},!0)}var B=u().pdiv,v=a.newComment(d,a.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(v,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var v=document.createElement("div");v.className="geCommentContainer";v.setAttribute("data-commentId",c.id);v.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(v.style.backgroundColor="ghostWhite");
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){b(a,c);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);d&&(e.style.display="none")}function u(){function a(c){b.push(d);if(null!=c.replies)for(var e=0;e<c.replies.length;e++)d=d.nextSibling,a(c.replies[e])}var b=[],d=x;a(c);return{pdiv:d,replies:b}}function A(d,e,f,m,q){function t(){g(A);c.addReply(x,function(a){x.id=a;c.replies.push(x);n(A);f&&f()},function(b){y();p(A);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,q)}function y(){b(x,A,function(a){t()},!0)}var B=u().pdiv,x=a.newComment(d,a.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var A=l(x,c.replies,B,k+1);e?y():t()}if(m||!c.isResolved){C.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",c.id);x.style.marginLeft=20*k+5+"px";c.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var L=document.createElement("img");L.className="geCommentUserImg";L.src=c.user.pictureUrl||Editor.userImage;E.appendChild(L);L=document.createElement("div");L.className="geCommentHeaderTxt";E.appendChild(L);var F=document.createElement("div");F.className="geCommentUsername";mxUtils.write(F,c.user.displayName||"");L.appendChild(F);F=document.createElement("div");F.className="geCommentDate";F.setAttribute("data-commentId",c.id);e(c,
-F);L.appendChild(F);v.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");v.appendChild(E);c.isLocked&&(v.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);x||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||x||c.isLocked||(B(mxResources.get("edit"),
-function(){function d(){b(c,v,function(){g(v);c.editComment(c.content,function(){n(v)},function(b){p(v);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(v);c.deleteComment(function(a){if(!0===a){a=v.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=v.querySelectorAll(".geCommentAction");for(a=
-0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(v);v.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(v);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));x||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
+F);L.appendChild(F);x.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");x.appendChild(E);c.isLocked&&(x.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";E.appendChild(D);v||c.isLocked||0!=k&&!t||B(mxResources.get("reply"),function(){A("",!0)},c.isResolved);L=a.getCurrentUser();null==L||L.id!=c.user.id||v||c.isLocked||(B(mxResources.get("edit"),
+function(){function d(){b(c,x,function(){g(x);c.editComment(c.content,function(){n(x)},function(b){p(x);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),B(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){g(x);c.deleteComment(function(a){if(!0===a){a=x.querySelector(".geCommentTxt");a.innerHTML="";mxUtils.write(a,mxResources.get("msgDeleted"));var b=x.querySelectorAll(".geCommentAction");for(a=
+0;a<b.length;a++)b[a].parentNode.removeChild(b[a]);n(x);x.style.opacity="0.5"}else{b=u(c).replies;for(a=0;a<b.length;a++)z.removeChild(b[a]);for(a=0;a<d.length;a++)if(d[a]==c){d.splice(a,1);break}C.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(b){p(x);a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function b(){var b=
a.target;b.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(b,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=c.isResolved?"none":"",e=u(c).replies,f="dark"==uiTheme?"transparent":c.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),l=0;l<k.length;l++)k[l]!=b.parentNode&&(k[l].style.display=d);G||(e[g].style.display="none")}q()}c.isResolved?A(mxResources.get("reOpened")+": ",!0,b,!1,
-!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});v.appendChild(E);null!=f?z.insertBefore(v,f.nextSibling):z.appendChild(v);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,v,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return v}}var x=
-!a.canComment(),t=a.canReplyToReplies(),y=null,v=document.createElement("div");v.className="geCommentsWin";v.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";v.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!x){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
+!0):A(mxResources.get("markedAsResolved"),!1,b,!0)});x.appendChild(E);null!=f?z.insertBefore(x,f.nextSibling):z.appendChild(x);for(f=0;null!=c.replies&&f<c.replies.length;f++)E=c.replies[f],E.isResolved=c.isResolved,l(E,c.replies,null,k+1,m);null!=y&&(y.comment.id==c.id?(m=c.content,c.content=y.comment.content,b(c,x,y.saveCallback,y.deleteOnCancel),c.content=m):null==y.comment.id&&y.comment.pCommentId==c.id&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return x}}var v=
+!a.canComment(),t=a.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var D=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;z.style.bottom=parseInt(D)+7+"px";x.appendChild(z);var C=document.createElement("span");C.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(C,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=D;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter="none");D=document.createElement("a");D.className="geButton";mxClient.IS_QUIRKS&&(D.style.filter="none");if(!v){var E=D.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';
E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(c){function d(){b(e,f,function(b){g(f);a.addComment(b,function(a){b.id=a;F.push(b);n(f)},function(b){p(f);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=a.newComment("",a.getCurrentUser()),f=l(e,F,null,0);d();c.preventDefault();mxEvent.consume(c)});A.appendChild(E)}E=D.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';
E.setAttribute("title",mxResources.get("showResolved"));var G=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&&(E=D.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),
-mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));v.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
+mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),A.appendChild(D));x.appendChild(A);var F=[],I=mxUtils.bind(this,function(){this.hasError=
!1;if(null!=y)try{y.div=y.div.cloneNode(!0);var c=y.div.querySelector(".geCommentEditTxtArea"),d=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(B){a.handleError(B)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function c(a){if(null!=
a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var b=0;b<a.length;b++)c(a[b].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});z.innerHTML="";z.appendChild(C);C.style.display="block";F=a;for(a=0;a<F.length;a++)c(F[a].replies),l(F[a],F,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(z.appendChild(y.div),b(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(a){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+
(a&&a.message?": "+a.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(e(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}if(this.window.isVisible()){for(var b=z.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var f=b[d];c[f.getAttribute("data-commentId")]=f}for(d=0;d<F.length;d++)a(F[d])}});setInterval(A,6E4);this.refreshCommentsTime=
-A;this.window=new mxWindow(mxResources.get("comments"),v,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
+A;this.window=new mxWindow(mxResources.get("comments"),x,c,f,d,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,
(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=
function(a,c,f,d,k,m,q,b,e,g,p){var n=document.createElement("div");n.style.textAlign="center";p=null!=p?p:44;var l=document.createElement("div");l.style.padding="6px";l.style.overflow="auto";l.style.maxHeight=p+"px";l.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(l.style.height="60px");mxUtils.write(l,c);n.appendChild(l);null!=g&&(l=document.createElement("div"),l.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",g),l.appendChild(c),n.appendChild(l));g=document.createElement("div");
-g.style.textAlign="center";g.style.whiteSpace="nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(x.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
-f(x.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
-mxEvent.addListener(k,"click",function(a){x.checked=!x.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(v.checked)});m.className="geBtn";null!=b&&(m.innerHTML=b+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&g.appendChild(m);var t=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=f&&
+f(v.checked)});g.appendChild(t);null!=q?(t.innerHTML=q+"<br>"+t.innerHTML+"<br>",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(m);n.appendChild(g);e?(g.style.marginTop="10px",l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(v),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),l.appendChild(k),n.appendChild(l),
+mxEvent.addListener(k,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)})):g.style.marginTop="12px";this.init=function(){t.focus()};this.container=n};function DiagramPage(a,c){this.node=a;null!=c?this.node.setAttribute("id",c):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=this.name=f}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,c,f){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=f&&(c.viewState=f,this.neverShown=!1))}
@@ -3716,28 +3714,28 @@ m[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[k],c))}for(k=0;k<g
return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function b(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,c){c=null!=c?c:!0;t.model.beginUpdate();try{var d=t.model.getParent(a),e=t.getIncomingEdges(a),f=t.cloneCells([e[0],a]);t.model.setTerminal(f[0],t.model.getTerminal(e[0],!0),!0);var g=b(a),k=d.geometry;g==mxConstants.DIRECTION_SOUTH||
g==mxConstants.DIRECTION_NORTH?f[1].geometry.x+=c?a.geometry.width+10:-f[1].geometry.width-10:f[1].geometry.y+=c?a.geometry.height+10:-f[1].geometry.height-10;t.view.currentRoot!=d&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);var l=t.view.getState(a),m=t.view.scale;if(null!=l){var n=mxRectangle.fromRectangle(l);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?n.x+=(c?a.geometry.width+10:-f[1].geometry.width-10)*m:n.y+=(c?a.geometry.height+10:-f[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(e[0],
-!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var u=t.model.getTerminal(p[y],!1);if(g==b(u)){var v=t.view.getState(u);u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,v)&&(e=10+Math.max(e,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(u=t.model.getTerminal(p[y],
-!1),g==b(u)&&(v=t.view.getState(u),u!=a&&null!=v&&(q&&c!=v.getCenterX()<l.getCenterX()||!q&&c!=v.getCenterY()<l.getCenterY()))){var A=[];t.traverse(v.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
+!0));if(null!=p){for(var q=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,y=k=e=0;y<p.length;y++){var x=t.model.getTerminal(p[y],!1);if(g==b(x)){var u=t.view.getState(x);x!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY())&&mxUtils.intersects(n,u)&&(e=10+Math.max(e,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),k=10+Math.max(k,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?k=0:e=0;for(y=0;y<p.length;y++)if(x=t.model.getTerminal(p[y],
+!1),g==b(x)&&(u=t.view.getState(x),x!=a&&null!=u&&(q&&c!=u.getCenterX()<l.getCenterX()||!q&&c!=u.getCenterY()<l.getCenterY()))){var A=[];t.traverse(u.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});t.moveCells(A,(c?1:-1)*e,(c?1:-1)*k)}}}return t.addCells(f,d)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var c=b(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(d[0],e[1],!1);t.model.setTerminal(e[0],e[1],!0);t.model.setTerminal(e[0],a,!1);
var f=t.model.getParent(a),g=f.geometry,k=[];t.view.currentRoot!=f&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);t.traverse(a,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});var l=a.geometry.width+40,m=a.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?l=0:c==mxConstants.DIRECTION_NORTH?(l=0,m=-m):c==mxConstants.DIRECTION_WEST?(l=-l,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(k,l,m);return t.addCells(e,f)}finally{t.model.endUpdate()}}function p(a,c){t.model.beginUpdate();try{var d=
t.model.getParent(a),e=t.getIncomingEdges(a),f=b(a);0==e.length&&(e=[t.createEdge(d,null,"",null,null,t.createCurrentEdgeStyle())],f=c);var g=t.cloneCells([e[0],a]);t.model.setTerminal(g[0],a,!0);if(null==t.model.getTerminal(g[0],!1)){t.model.setTerminal(g[0],g[1],!1);var k=t.getCellStyle(g[1]).newEdgeStyle;if(null!=k)try{var l=JSON.parse(k),m;for(m in l)t.setCellStyles(m,l[m],[g[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==l[m]&&t.setCellStyles("elbow",f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,v=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
-null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/v-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/v-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?x.actions.get("selectParent").funct():
-d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var x=this,t=x.editor.graph,y=t.getModel(),v=x.menus.createPopupMenu;x.menus.createPopupMenu=function(b,c,d){v.apply(this,arguments);
-if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};x.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",
-function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};x.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+"vertical":"horizontal",[g[0]])}catch(da){}}var e=t.getOutgoingEdges(a),n=d.geometry,k=[];t.view.currentRoot==d&&(n=new mxRectangle);for(l=0;l<e.length;l++){var p=t.model.getTerminal(e[l],!1);null!=p&&k.push(p)}var q=t.view.getBounds(k),y=t.view.translate,u=t.view.scale;f==mxConstants.DIRECTION_SOUTH?(g[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x-n.x+10,g[1].geometry.y+=g[1].geometry.height-n.y+40):f==mxConstants.DIRECTION_NORTH?(g[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-g[1].geometry.width)/2:(q.x+q.width)/u-y.x+-n.x+10,g[1].geometry.y-=g[1].geometry.height+n.y+40):(g[1].geometry.x=f==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+n.x+40):g[1].geometry.x+(g[1].geometry.width-n.x+40),g[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-g[1].geometry.height)/2:(q.y+q.height)/u-y.y+-n.y+10);return t.addCells(g,d)}finally{t.model.endUpdate()}}function n(a,b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=
+[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function l(a,c){var d=b(a),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?v.actions.get("selectParent").funct():
+d==c?(e=t.getOutgoingEdges(a),null!=e&&0<e.length&&t.setSelectionCell(t.model.getTerminal(e[0],!1))):(d=t.getIncomingEdges(a),null!=d&&0<d.length&&(e=n(t.model.getTerminal(d[0],!0),e,a),d=t.view.getState(a),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&t.setSelectionCell(e[d].cell)))))}var v=this,t=v.editor.graph,y=t.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
+if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getOutgoingEdges(a);
+if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",
+function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var D=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],e=0;e<b.length;e++){var g=b[e];y.isEdge(g)&&f(g)&&(d.push(g),g=y.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=t.getIncomingEdges(b[e]),b=b.concat(g))}else null!=g&&d.push(b[e])}b=d;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
d))};var z=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=z.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=t.getIncomingEdges(b[0]);
-if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var v=t.view.getState(m);null!=v&&(c=(v.getCenterX()-y.getCenterX())/t.view.scale,d=(v.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=x.sidebar){var A=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},G=x.onKeyDown;x.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
-(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
-null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){x.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
-function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),v=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,u=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):v==u?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
+if(0<q.length){var y=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=y){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-y.getCenterX())/t.view.scale,d=(u.getCenterY()-y.getCenterY())/t.view.scale)}}}}l=C.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(q=t.getIncomingEdges(b[p]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==t.getIncomingEdges(l[p]).length){n=m;if(null==n||n==t.model.getParent(b[p]))n=t.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,t.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var A=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(b,c,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=t.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(b){try{if(t.isEnabled()&&!t.isEditing()&&a(t.getSelectionCell())&&1==t.getSelectionCount()){var c=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?g(t.getSelectionCell()):p(t.getSelectionCell()):13==b.which&&(c=e(t.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&t.model.isEdge(c[0])?t.setSelectionCell(t.model.getTerminal(c[0],!1)):t.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];
+null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(l(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(l(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(H){v.handleError(H)}mxEvent.isConsumed(b)||G.apply(this,arguments)};var F=t.connectVertex;t.connectVertex=
+function(c,d,f,k,l,m,n){var q=t.getIncomingEdges(c);if(a(c)){var y=b(c),u=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==q.length?p(c,d):u==x?g(c):e(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};t.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||q(b)||t.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);
return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",
-this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=f.apply(this,arguments),c=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=
!0;var c=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var b=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
@@ -3745,8 +3743,8 @@ d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);b.insertEdge(d,!1);a.insert(
c.vertex=!0;var b=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;
c.insertEdge(d,!0);b.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);f.insertEdge(k,!1);var n=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');n.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;c.insertEdge(l,!0);n.insertEdge(l,!1);var x=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');x.vertex=!0;var t=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);x.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(x);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+l.geometry.relative=!0;l.edge=!0;c.insertEdge(l,!0);n.insertEdge(l,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);v.insertEdge(t,!1);a.insert(d);a.insert(k);a.insert(l);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(n);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;html=1;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3782,7 +3780,7 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt
this.formatWindow.window.setVisible(null!=b?b:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
this.menus.findWindow=null);n.apply(this,arguments)};var l=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){l.apply(this,arguments);a?1E3<=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0),null!=this.formatWindow&&this.formatWindow.window.setVisible(!0)):(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};
-EditorUi.prototype.chromelessWindowResize=function(){};var x=Menus.prototype.init;Menus.prototype.init=function(){x.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
+EditorUi.prototype.chromelessWindowResize=function(){};var v=Menus.prototype.init;Menus.prototype.init=function(){v.apply(this,arguments);var b=this.editorUi,d=b.editor.graph;b.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",
function(){d.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",
function(){c(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(b,mxResources.get("plantUml")+"...","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var a=new ParseDialog(b,mxResources.get("mermaid")+"...","mermaid");
b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.menus.addMenuItems(a,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?(b.menus.addMenuItems(a,["-","save"],c),"1"==urlParams.saveAndExit&&b.menus.addMenuItems(a,["saveAndExit"],c),a.addSeparator(c)):(b.menus.addMenuItems(a,
@@ -3795,26 +3793,26 @@ function(a,c){b.menus.addMenuItems(a,"importText plantUml mermaid - formatSql im
function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",
c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],c)})))};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c){var d=l.menus.get(a),e=q.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),p);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height=
"30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));l.menus.menuCreated(d,e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat=
-"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?n.insertBefore(g,l.statusContainer):n.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
+"no-repeat",e.style.paddingRight="22px");return e}function d(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=l.statusContainer?m.insertBefore(g,l.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat=
"no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled",
"disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className="geMenuItem";c.style.display="inline-block";c.style.verticalAlign="top";c.style.marginRight="6px";c.style.padding="0 4px 0 4px";c.style.height="30px";c.style.position="relative";c.style.top="0px";for(var d=0;d<a.length;d++)null!=a[d]&&(a[d].style.margin="0px",a[d].style.boxShadow="none",c.appendChild(a[d]));null!=b&&mxUtils.setOpacity(c,b);null!=l.statusContainer?
-n.insertBefore(c,l.statusContainer):n.appendChild(c);return c}function g(){for(var a=n.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=n.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
+m.insertBefore(c,l.statusContainer):m.appendChild(c);return c}function g(){for(var a=m.firstChild;null!=a;){var c=a.nextSibling;"geMenuItem"!=a.className&&"geItem"!=a.className||a.parentNode.removeChild(a);a=c}p=m.firstChild;f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;(a=1E3>f)||b("diagram");e([a?b("diagram",null,IMAGE_PATH+"/drawlogo.svg"):null,d(mxResources.get("shapes"),l.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),l.actions.get("image"),
a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),l.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+l.actions.get("formatPanel").shortcut+")",l.actions.get("image"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
null)],a?60:null);c=b("insert",!0,a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null);e([c,d(mxResources.get("delete"),l.actions.get("delete").funct,null,mxResources.get("delete"),l.actions.get("delete"),a?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
null)],a?60:null);if(411<=f&&(c=l.actions.get("undo"),a=l.actions.get("redo"),c=d("",c.funct,null,mxResources.get("undo")+" ("+c.shortcut+")",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),a=d("",
a.funct,null,mxResources.get("redo")+" ("+a.shortcut+")",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg=="),e([c,a],60),480<=f)){var a=l.actions.get("zoomIn"),c=l.actions.get("zoomOut"),g=l.actions.get("resetView");
-e([d("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&l.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+e([d("",function(){n.popupMenuHandler.hideMenu();var a=n.view.scale,b=n.view.translate.x,c=n.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(a-n.view.scale)&&b==n.view.translate.x&&c==n.view.translate.y&&l.actions.get(n.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
640<=f?d("",a.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",a,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
null,640<=f?d("",c.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",c,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
null],60)}a=l.menus.get("language");null!=a&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=f?(null==O&&(c=q.addMenu("",a.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor=
-"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",n.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
-null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,m=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var n=document.createElement("div");n.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,n);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
-"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var x=l.descriptorChanged;l.descriptorChanged=function(){x.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
-b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);n.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else n.removeAttribute("title")};l.setStatusText(l.editor.getStatus());n.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";n.appendChild(l.buttonContainer);l.menubarContainer=
+"pointer",c.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(c),O=c),l.buttonContainer.style.paddingRight="34px"):(l.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}t.apply(this,arguments);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);(1E3<=f||null!=urlParams.clibs||
+null!=urlParams.libs)&&c(this,!0);1E3<=f&&a(this,!0);var l=this,n=l.editor.graph;l.toolbar=this.createToolbar(l.createDiv("geToolbar"));l.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var p=null,q=new Menubar(l,m);l.statusContainer=l.createStatusContainer();l.statusContainer.style.position=
+"relative";l.statusContainer.style.maxWidth="";l.statusContainer.style.marginTop="7px";l.statusContainer.style.marginLeft="6px";l.statusContainer.style.color="gray";l.statusContainer.style.cursor="default";l.editor.addListener("statusChanged",mxUtils.bind(this,function(){l.setStatusText(l.editor.getStatus())}));var v=l.descriptorChanged;l.descriptorChanged=function(){v.apply(this,arguments);var a=l.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==
+b?b="gitHub":"gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};l.setStatusText(l.editor.getStatus());m.appendChild(l.statusContainer);l.buttonContainer=document.createElement("div");l.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(l.buttonContainer);l.menubarContainer=
l.buttonContainer;l.tabContainer=document.createElement("div");l.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var k=l.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";l.diagramContainer.style.top="47px";var K=
l.menus.get("viewZoom");if(null!=K){this.tabContainer.style.right="70px";var B=q.addMenu("100%",K.funct);B.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");B.style.whiteSpace="nowrap";B.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";B.style.backgroundPosition="right 6px center";B.style.backgroundRepeat="no-repeat";B.style.backgroundColor="#ffffff";B.style.paddingRight="10px";B.style.display="block";B.style.position="absolute";B.style.textDecoration="none";B.style.textDecoration=
"none";B.style.right="0px";B.style.bottom="0px";B.style.overflow="hidden";B.style.visibility="hidden";B.style.textAlign="center";B.style.color="#000";B.style.fontSize="12px";B.style.color="#707070";B.style.width="59px";B.style.cursor="pointer";B.style.borderTop="1px solid lightgray";B.style.borderLeft="1px solid lightgray";B.style.height=parseInt(l.tabContainerHeight)-1+"px";B.style.lineHeight=parseInt(l.tabContainerHeight)+1+"px";u.appendChild(B);K=mxUtils.bind(this,function(){B.innerHTML=Math.round(100*
-l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(n);u.appendChild(l.diagramContainer);
+l.editor.graph.view.scale)+"%"});l.editor.graph.view.addListener(mxEvent.EVENT_SCALE,K);l.editor.addListener("resetGraphView",K);l.editor.addListener("pageSelected",K);var L=l.setGraphEnabled;l.setGraphEnabled=function(){L.apply(this,arguments);null!=this.tabContainer&&(B.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(l.tabContainer);u.appendChild(m);u.appendChild(l.diagramContainer);
k.appendChild(u);l.updateTabContainer();var O=null;g();mxEvent.addListener(window,"resize",function(){g();null!=l.sidebarWindow&&l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();null!=l.actions.outlineWindow&&l.actions.outlineWindow.window.fit();null!=l.actions.layersWindow&&l.actions.layersWindow.window.fit();null!=l.menus.tagsWindow&&l.menus.tagsWindow.window.fit();null!=l.menus.findWindow&&l.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,c,f,d,k,m,q){this.file=a;this.id=c;this.content=f;this.modifiedDate=d;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,c,f,d,k){c()};DrawioComment.prototype.editComment=function(a,c,f){c()};DrawioComment.prototype.deleteComment=function(a,c){a()};DrawioUser=function(a,c,f,d,k){this.id=a;this.email=c;this.displayName=f;this.pictureUrl=d;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first.\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list.\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,c,f){this.init(a,c,f)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
@@ -3827,8 +3825,8 @@ mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,
1:"pagecount"==a?b.length:f.apply(this,arguments)}}}this.diagrams=[];var k=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};e=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
[];this.xmlNode!=k&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),k=this.xmlNode)});this.addListener("xmlNodeChanged",e);e();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var m=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
-!0;return m.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};var n=this.graph.foldCells;this.graph.foldCells=mxUtils.bind(this,function(){this.cellFolded=
+!0;return n.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof f){var k=this.getObservableParent(a),m=new f(mxUtils.bind(this,function(c){0<a.offsetWidth&&(m.disconnect(),d())}));m.observe(k,{attributes:!0})}else d()}};
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
@@ -3848,9 +3846,9 @@ function(){e.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),e.style.cur
f.style.whiteSpace="nowrap";f.style.textAlign="left";f.style.zIndex=this.toolbarZIndex;f.style.backgroundColor="#eee";f.style.height=this.toolbarHeight+"px";this.toolbar=f;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(f.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(f,30);var d=null,k=null,m=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(f,0);d=null;k=window.setTimeout(mxUtils.bind(this,function(){f.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);f.style.display="";mxUtils.setOpacity(f,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(f,mxClient.IS_POINTER?
"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var b=this.graph,e=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,x=0;x<g.length;x++){var t=g[x];if("pages"==t){l=c.ownerDocument.createElement("div");
-l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;v.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<e&&Math.abs(this.scrollTop-b.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&(0<parseFloat(f.style.opacity||0)?m():q(30))}})}for(var g=this.toolbarItems,p=0,n=null,l=null,v=0;v<g.length;v++){var t=g[v];if("pages"==t){l=c.ownerDocument.createElement("div");
+l.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(l,70);var y=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");y.style.borderRightStyle="none";y.style.paddingLeft="0px";y.style.paddingRight="0px";f.appendChild(l);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";t=mxUtils.bind(this,function(){l.innerHTML="";mxUtils.write(l,this.currentPage+1+" / "+this.diagrams.length);l.style.display=1<this.diagrams.length?"inline-block":"none";y.style.display=l.style.display;x.style.display=l.style.display});this.addListener("graphChanged",t);t()}else if("zoom"==t)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==t){if(this.layersEnabled){var D=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=n)n.parentNode.removeChild(n),
n=null;else{n=this.graph.createLayersDialog();mxEvent.addListener(n,"mouseleave",function(){n.parentNode.removeChild(n);n=null});a=z.getBoundingClientRect();n.style.width="140px";n.style.padding="2px 0px 2px 0px";n.style.border="1px solid #d0d0d0";n.style.backgroundColor="#eee";n.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";n.style.fontSize="11px";n.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(n,80);var b=mxUtils.getDocumentScrollOrigin(document);n.style.left=b.x+a.left+
"px";n.style.top=b.y+a.bottom+"px";document.body.appendChild(n)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});z.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else"lightbox"==t?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(t=this.graphConfig["toolbar-buttons"][t],
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index f3d1c539..cf5ae318 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,7 +6,7 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
- "revision": "d90601480a4fac030dbc8a9b020a687c"
+ "revision": "eb6afac65b25308b2f16f7a09eb570a8"
},
{
"url": "js/extensions.min.js",
@@ -26,7 +26,7 @@ if (workbox)
},
{
"url": "index.html",
- "revision": "6fd128384a51dcce8da696c90bb8969a"
+ "revision": "18c33f3af16a7c95000d868f1886c7b5"
},
{
"url": "open.html",